ss-component-new 1.2.72 → 1.2.73

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 (87) hide show
  1. package/dist/{MTLLoader-K11XHLAM.js → MTLLoader-C8f_8u_d.js} +1 -1
  2. package/dist/{MTLLoader-ikqYcjAo.cjs → MTLLoader-bGxXiH2P.cjs} +1 -1
  3. package/dist/{OrbitControls-Cw_tl6K1.js → OrbitControls--BFTtfLk.js} +1 -1
  4. package/dist/{OrbitControls-CS8gOWAT.cjs → OrbitControls-D2Rfszp6.cjs} +1 -1
  5. package/dist/{URDFLoader-BhEBwb_Y.cjs → URDFLoader-B2Mddboq.cjs} +1 -1
  6. package/dist/{URDFLoader-Dlh2X0Iv.js → URDFLoader-BxCn2jnZ.js} +2 -2
  7. package/dist/{animationData-D_zroenU.cjs → animationData-ptkfkBjF.cjs} +1 -1
  8. package/dist/{animationData-C0Dh4mjP.js → animationData-yUSDctu6.js} +1 -1
  9. package/dist/{array-eASasGM2.js → array-BwP37J1t.js} +1 -1
  10. package/dist/{array-Dkcb0MKV.cjs → array-CPzmA4t5.cjs} +1 -1
  11. package/dist/{iconfont-T0wWnxgR.js → iconfont-Bfo51Yte.js} +2 -2
  12. package/dist/{iconfont-77OhOwxs.cjs → iconfont-RRElI-SY.cjs} +1 -1
  13. package/dist/{index-Bd3cJhSh.cjs → index--8jDZXDO.cjs} +1 -1
  14. package/dist/{index-jz3YasSY.js → index-6EZ2c42F.js} +1 -1
  15. package/dist/{index-DVdauMYc.js → index-B2DQOaxH.js} +1 -1
  16. package/dist/{index-Z5WfIite.js → index-B7L2pIgD.js} +3 -3
  17. package/dist/{index-HiZw37CZ.cjs → index-BCj3Biv7.cjs} +1 -1
  18. package/dist/{index-C6Hq4npG.cjs → index-BFWFISwE.cjs} +1 -1
  19. package/dist/{index-Cyiwumzg.js → index-BMG9pw74.js} +1 -1
  20. package/dist/{index-D907HeIK.cjs → index-BNa7hFlv.cjs} +1 -1
  21. package/dist/{index-BUxE-JUG.cjs → index-BjFLyOy2.cjs} +1 -1
  22. package/dist/{index-O38XeeGF.js → index-BjpMFwVb.js} +16 -16
  23. package/dist/{index-DTFPueRJ.cjs → index-BmAvaFkY.cjs} +1 -1
  24. package/dist/{index-BHb9mdSS.js → index-Bo-Isokv.js} +1 -1
  25. package/dist/{index-DvMLV6_i.js → index-C2lTLJyO.js} +1 -1
  26. package/dist/{index-BVsUXckx.js → index-C4Bz7x-a.js} +4 -4
  27. package/dist/{index-BKZZqxv8.js → index-C73fqPKN.js} +7 -7
  28. package/dist/{index-DClp_CE2.cjs → index-CLWM8vdx.cjs} +1 -1
  29. package/dist/{index-BVHMMDYj.cjs → index-CWPdwhFo.cjs} +1 -1
  30. package/dist/{index-Ds1y6Uqe.cjs → index-CWf7Ft_2.cjs} +1 -1
  31. package/dist/{index-vUsExAu6.cjs → index-CfSZ94oy.cjs} +1 -1
  32. package/dist/{index-DzDFCtjN.cjs → index-Cmns7DGJ.cjs} +1 -1
  33. package/dist/{index-Cf-44FjK.cjs → index-DChnUwef.cjs} +1 -1
  34. package/dist/{index-CTnokPli.js → index-DKv5HhZA.js} +4 -4
  35. package/dist/{index-D77fb8YT.cjs → index-DNyv2azK.cjs} +1 -1
  36. package/dist/{index-Dgu3YiKg.cjs → index-DU996MGb.cjs} +1 -1
  37. package/dist/{index-GBag8JpT.cjs → index-DXjIiBKm.cjs} +1 -1
  38. package/dist/{index-Bw5o8WK1.cjs → index-D_6g6WxH.cjs} +1 -1
  39. package/dist/{index-C7_zXFBB.js → index-D_8s9Jv8.js} +1 -1
  40. package/dist/{index-CnUzzOAg.js → index-D_LF-ySC.js} +1 -1
  41. package/dist/{index-Dj4SVmPC.js → index-DfdrLT2k.js} +4 -4
  42. package/dist/{index-YWsdowCe.js → index-DpwZhuPz.js} +1 -1
  43. package/dist/{index-Di9z9n0o.cjs → index-DrtYy1lh.cjs} +1 -1
  44. package/dist/{index-C0TESDF4.cjs → index-DtNajbhX.cjs} +1 -1
  45. package/dist/{index-ECG5cq2t.cjs → index-DwzobGZ4.cjs} +1 -1
  46. package/dist/{index-BtmfheCs.js → index-DxMdNUo0.js} +1 -1
  47. package/dist/{index-DcRnbkgF.cjs → index-Fk0-h7BT.cjs} +1 -1
  48. package/dist/{index-DMSzQRai.js → index-ISwjwHnE.js} +1 -1
  49. package/dist/{index-Dm78GSsI.js → index-PoKBuhpL.js} +1 -1
  50. package/dist/{index-svORarJa.js → index-QXJLZVkw.js} +7 -7
  51. package/dist/{index-BGdo0lqx.cjs → index-cd67kj-n.cjs} +1 -1
  52. package/dist/{index-K-uL8YOH.cjs → index-h40g0hP1.cjs} +1 -1
  53. package/dist/{index-ZM_5Mf9f.js → index-kkkmA8ut.js} +2 -2
  54. package/dist/{index-DJIYiX7n.js → index-mmAwB7MM.js} +3 -3
  55. package/dist/{index-BsynnP1m.js → index-n1LeBjBw.js} +5 -5
  56. package/dist/{index-DBmvCes2.js → index-udkxep-V.js} +2 -2
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BlnK_yzI.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DfCftOkM.js} +1647 -1636
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BzQaSUrd.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-f2cWH6Na.cjs} +6 -6
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B8vp1IiT.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B-fXuLTS.cjs} +43 -43
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BqQqbKuV.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-vAxHEUPT.js} +1395 -1383
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Ptcjn9Ky.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-ByXI7fJH.cjs} +1 -1
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Dz4nCqvT.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-DnJ3D_TN.js} +5 -5
  63. package/dist/{index.vue_vue_type_style_index_1_lang-BwRYUsPu.js → index.vue_vue_type_style_index_1_lang-B12hzlNV.js} +3 -3
  64. package/dist/{index.vue_vue_type_style_index_1_lang-BSiAbU7c.cjs → index.vue_vue_type_style_index_1_lang-BuCtDbIL.cjs} +1 -1
  65. package/dist/{main-DhuYYLjy.js → main-BQkVwQGt.js} +3 -3
  66. package/dist/{main-DYDt57Qc.cjs → main-CKJOZvmd.cjs} +1 -1
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.js +9 -9
  69. package/dist/ss-component2.cjs +1 -1
  70. package/dist/ss-component2.js +10 -10
  71. package/dist/{threeModel-CcHi1GT0.js → threeModel-B70hqGbt.js} +4 -4
  72. package/dist/{threeModel-5wvGy8S9.cjs → threeModel-BSxLcY10.cjs} +1 -1
  73. package/dist/{threePreview-DjrtURuf.js → threePreview-B_u6OLOV.js} +3 -3
  74. package/dist/{threePreview-unSCDqCQ.cjs → threePreview-DzxpKE29.cjs} +1 -1
  75. package/dist/{threeSceneView-o0KAzZ_q.cjs → threeSceneView-CxOKxbjP.cjs} +1 -1
  76. package/dist/{threeSceneView-DhSHXsQI.js → threeSceneView-D1tPKP8f.js} +8 -8
  77. package/dist/{threeSceneViewForCPMPIP-CX3biKW2.js → threeSceneViewForCPMPIP-8zR1iiKh.js} +7 -7
  78. package/dist/{threeSceneViewForCPMPIP-5KiGagRG.cjs → threeSceneViewForCPMPIP-CKkRPc08.cjs} +1 -1
  79. package/dist/{threeTrackPathView-ChRPHpPb.cjs → threeTrackPathView-D37NVq6t.cjs} +1 -1
  80. package/dist/{threeTrackPathView-DxGKpAp8.js → threeTrackPathView-DtmXAv5H.js} +3 -3
  81. package/dist/{threeViewerHost-CzYaQhEH.js → threeViewerHost-BNs118k0.js} +2 -2
  82. package/dist/{threeViewerHost-BGIjs6Rt.cjs → threeViewerHost-vo3_msNQ.cjs} +1 -1
  83. package/dist/{urdfTree-DSu_fNLS.cjs → urdfTree-BRyv3OKC.cjs} +1 -1
  84. package/dist/{urdfTree-CJmO7Y4d.js → urdfTree-C45qnYd1.js} +1 -1
  85. package/dist/{workpieceTreePanel-CMuekYhH.js → workpieceTreePanel-BA7m84k8.js} +4 -4
  86. package/dist/{workpieceTreePanel-Cnr0mMqr.cjs → workpieceTreePanel-DQYwtsmB.cjs} +1 -1
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const l=require("vue"),k=require("./index-C8qRkCgn.cjs"),ne=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B8vp1IiT.cjs"),He=require("./index-DcRnbkgF.cjs"),ya=require("./threeViewerHost-BGIjs6Rt.cjs"),Vl=require("./index-DeBHVrj0.cjs");require("./index.vue_vue_type_style_index_1_lang-BSiAbU7c.cjs");const $l=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Tl=require("./index-ECG5cq2t.cjs");require("./index-CLJYSvkY.cjs");const va=require("./isString--eJE54G5.cjs"),Hl=U=>U.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(U){const I=U,H=l.ref(null),P=l.ref(!1),O=l.ref(null);return l.watch(()=>I==null?void 0:I.isVisible,()=>{P.value=I==null?void 0:I.isVisible},{deep:!0,immediate:!0}),l.watch(()=>O.value,()=>{l.nextTick(()=>{var s,ee;(ee=(s=H.value)==null?void 0:s.updatePopper)==null||ee.call(s)})},{deep:!0,immediate:!0}),(s,ee)=>{const pe=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(pe,{visible:P.value,title:I==null?void 0:I.title,placement:I==null?void 0:I.placement,width:I==null?void 0:I.width,ref_key:"popOverRef",ref:H},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:O})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$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"},Vn={key:0,class:"extra-header"},$n={class:"drop-menu",style:{width:"120px"}},Fn={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(U,{emit:I}){const H=I,P=U,O=l.ref(""),s=l.ref(!1),ee=l.ref([]),pe=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Se=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],fe=se=>{const ve=se.raw;if(!ve)return;const oe=new FileReader;oe.onload=R=>{try{const q=new Uint8Array(R.target.result),Ne=ne.readSync(q,{type:"array"}),Ke=Ne.SheetNames[0],re=Ne.Sheets[Ke],Ue=ne.utils.decode_range(re["!ref"]).e.c+1,J=new Array(Ue).fill(""),v=[];for(const z in re){if(z[0]==="!")continue;const{r:te,c:ke}=ne.utils.decode_cell(z);let Be=re[z].v;if(re[z].t==="n"&&Be>0&&Be<1e6&&(Be=new Date((Be-25569)*86400*1e3).toISOString().split("T")[0]),(Be==null||Be==="")&&(Be=""),te===0)J[ke]=Be;else{if(!v[te-1]){v[te-1]={};for(let Oe=0;Oe<Ue;Oe++)v[te-1][`col_${Oe}`]=""}v[te-1][`col_${ke}`]=Be}}for(let z=0;z<Ue;z++)J[z]===void 0&&(J[z]="");const _e=v==null?void 0:v[0];if(!(_e!=null&&_e.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");H("getImportData",J,v)}catch(q){throw k.ElMessage.error(q.message),new Error(q.message)}},oe.readAsArrayBuffer(ve)},qe=se=>{var oe;const ve=(oe=ee.value)==null?void 0:oe.reduce((R,q,Ne)=>(Ne===0?R[q.label]=se:R[q.label]=q==null?void 0:q.value,R),{});H("filter",ve,se,!0)},Qe=se=>{H("buttonClick",se)},rl=se=>{var ve,oe;ee.value=(oe=(ve=ne.getColumnChild(k.cloneDeep(se)))==null?void 0:ve.filter(R=>(R==null?void 0:R.label)!==""&&(R==null?void 0:R.label)!=="操作"))==null?void 0:oe.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}))},Ae=l.ref(!1),el=se=>{var ve;if((se==null?void 0:se.buttonName)==="确认"&&(H("filter",se==null?void 0:se.content),Ae.value=(se==null?void 0:se.content)&&Object.values(se==null?void 0:se.content).length>0),(se==null?void 0:se.buttonName)==="清空"){const oe=k.cloneDeep(se==null?void 0:se.content);for(const R in oe)oe[R]="";ee.value=(ve=ee.value)==null?void 0:ve.map(R=>({...R,value:""})),H("filter",oe),Ae.value=!1}s.value=!1},ll=()=>{var ve,oe;ee.value=(ve=ee.value)==null?void 0:ve.map(R=>({...R,value:""}));const se=(oe=ee.value)==null?void 0:oe.reduce((R,q)=>(R[q.label]=q.value,R),{});H("filter",se)};return l.onMounted(()=>{rl(P.columns)}),l.watch(()=>P.columns,()=>{rl(P.columns)},{deep:!0,immediate:!0}),(se,ve)=>{var re,Me,Ue,J;const oe=l.resolveComponent("el-icon"),R=l.resolveComponent("svg-icon"),q=l.resolveComponent("el-input"),Ne=l.resolveComponent("el-button"),Ke=l.resolveComponent("el-upload");return U.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",Nn,[l.createElementVNode("div",{class:l.normalizeClass(U.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(U.compName),7),l.createElementVNode("div",Bn,[l.createElementVNode("div",En,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var v,_e,z,te;return[l.createVNode(q,{modelValue:O.value,"onUpdate:modelValue":ve[1]||(ve[1]=ke=>O.value=ke),style:{"min-width":"80px"},placeholder:Ae.value?(z=(_e=(v=U.filterValues)==null?void 0:v.filter(ke=>ke))==null?void 0:_e.slice(0,3))==null?void 0:z.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:qe,disabled:((te=ee.value)==null?void 0:te.length)===0},{suffix:l.withCtx(()=>{var ke,Be;return[!O.value&&((Be=(ke=U.filterValues)==null?void 0:ke.filter(Oe=>Oe))!=null&&Be.join("/"))?(l.openBlock(),l.createBlock(oe,{key:0,style:{cursor:"pointer"},onClick:ll},{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=>s.value=!s.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(He.ssForm,{rowContents:ee.value,buttonValue:pe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:pe.value,isStartJustify:!1,onOnButtonClick:el},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),U.buttons&&((re=U.buttons)==null?void 0:re.length)>0?(l.openBlock(),l.createElementBlock("div",_n,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((Me=U.buttons)==null?void 0:Me.filter(v=>U.isDevMode||(v==null?void 0:v.label)!=="修改模板"),(v,_e)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:_e},[(v==null?void 0:v.type)==="upload"?(l.openBlock(),l.createBlock(Ke,{key:0,class:"upload-button-wrap","on-change":fe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!U.lockingPage},{default:l.withCtx(()=>[l.createVNode(Ne,{disabled:!!U.lockingPage,style:l.normalizeStyle({background:(v==null?void 0:v.background)??"var(--ssbutton-theme-bg)",color:(v==null?void 0:v.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v==null?void 0:v.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(v==null?void 0:v.type)==="popover"?(l.openBlock(),l.createBlock(He._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(v==null?void 0:v.type)==="popover"?(l.openBlock(),l.createBlock(Ne,{key:0,disabled:!!U.lockingPage,style:l.normalizeStyle({background:(v==null?void 0:v.background)??"var(--ssbutton-theme-bg)",color:(v==null?void 0:v.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v==null?void 0:v.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(v==null?void 0:v.contents,z=>(l.openBlock(),l.createBlock(Ne,{key:z==null?void 0:z.label,disabled:!!U.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:te=>Qe(z==null?void 0:z.label)},{default:l.withCtx(()=>{var te,ke;return[l.createTextVNode(l.toDisplayString(z==null?void 0:z.label),1),(te=z==null?void 0:z.label)!=null&&te.includes("选中")?(l.openBlock(),l.createElementBlock("span",Un,"("+l.toDisplayString(U.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=z==null?void 0:z.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",On,"("+l.toDisplayString(U.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),v!=null&&v.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Ne,{key:2,id:"themeButton",disabled:!!U.lockingPage,style:l.normalizeStyle({background:(v==null?void 0:v.background)??"var(--ssbutton-theme-bg)",color:(v==null?void 0:v.color)??"var(--ssbutton-theme-color)"}),onClick:z=>Qe(v==null?void 0:v.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v==null?void 0:v.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:s.value},{reference:l.withCtx(()=>{var v,_e,z,te;return[l.createVNode(q,{modelValue:O.value,"onUpdate:modelValue":ve[3]||(ve[3]=ke=>O.value=ke),style:{"min-width":"80px"},placeholder:Ae.value?(z=(_e=(v=U.filterValues)==null?void 0:v.filter(ke=>ke))==null?void 0:_e.slice(0,3))==null?void 0:z.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:qe,disabled:((te=ee.value)==null?void 0:te.length)===0},{suffix:l.withCtx(()=>{var ke,Be;return[!O.value&&((Be=(ke=U.filterValues)==null?void 0:ke.filter(Oe=>Oe))!=null&&Be.join("/"))?(l.openBlock(),l.createBlock(oe,{key:0,style:{cursor:"pointer"},onClick:ll},{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=>s.value=!s.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(He.ssForm,{rowContents:ee.value,buttonValue:pe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:pe.value,isStartJustify:!1,onOnButtonClick:el},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),U.buttons&&((Ue=U.buttons)==null?void 0:Ue.length)>0?(l.openBlock(),l.createElementBlock("div",Vn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((J=U.buttons)==null?void 0:J.filter(v=>U.isDevMode||(v==null?void 0:v.label)!=="修改模板"),(v,_e)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:_e},[(v==null?void 0:v.type)==="upload"?(l.openBlock(),l.createBlock(Ke,{key:0,class:"upload-button-wrap","on-change":fe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(Ne,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var z;return[l.createVNode(R,{name:(z=Se==null?void 0:Se.find(te=>(te==null?void 0:te.label)===(v==null?void 0:v.label)))==null?void 0:z.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(v==null?void 0:v.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(v==null?void 0:v.type)==="popover"?(l.openBlock(),l.createBlock(He._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(v==null?void 0:v.type)==="popover"?(l.openBlock(),l.createBlock(Ne,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var z;return[l.createVNode(R,{name:(z=Se==null?void 0:Se.find(te=>(te==null?void 0:te.label)===(v==null?void 0:v.label)))==null?void 0:z.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(v==null?void 0:v.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",$n,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v==null?void 0:v.contents,z=>(l.openBlock(),l.createBlock(Ne,{key:z==null?void 0:z.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:te=>Qe(z==null?void 0:z.label)},{default:l.withCtx(()=>{var te,ke;return[l.createTextVNode(l.toDisplayString(z==null?void 0:z.label),1),(te=z==null?void 0:z.label)!=null&&te.includes("选中")?(l.openBlock(),l.createElementBlock("span",Fn,"("+l.toDisplayString(U.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=z==null?void 0:z.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Kn,"("+l.toDisplayString(U.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),v!=null&&v.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Ne,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(v==null?void 0:v.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:z=>Qe(v==null?void 0:v.label)},{icon:l.withCtx(()=>{var z;return[l.createVNode(R,{name:(z=Se==null?void 0:Se.find(te=>(te==null?void 0:te.label)===(v==null?void 0:v.label)))==null?void 0:z.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(v==null?void 0:v.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},qn=$l._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(U,{emit:I}){const H=U,P=I,O=ee=>{P("buttonClick",ee)},s=ee=>{var pe;return ee!=null&&ee.includes("删除")?((pe=H.selectTableItems)==null?void 0:pe.length)>0?"warning-active-type":"warning-type":"default-type"};return(ee,pe)=>{const Se=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(U.buttons,fe=>(l.openBlock(),l.createBlock(Se,{key:fe==null?void 0:fe.label,disabled:!!U.lockingPage,class:l.normalizeClass(s(fe==null?void 0:fe.label)),onClick:qe=>O(fe==null?void 0:fe.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(fe==null?void 0:fe.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Jn=$l._export_sfc(Rn,[["__scopeId","data-v-70b12973"]]),ka=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(U){this.selectArray=U},setSelectString(U){this.selectString=U}}}),Wn={class:"calculator-content"},Gn={class:"calculator-child"},Hn={class:"calculator-child"},Qn=l.defineComponent({__name:"calculator",setup(U){const I=l.ref(),H=l.ref();return l.onMounted(()=>{I.value=[{type:"Upload",label:"输入",name:"input"}],H.value=[{type:"Upload",label:"输出",name:"output"}]}),(P,O)=>(l.openBlock(),l.createElementBlock("div",Wn,[l.createElementVNode("div",Gn,[l.createVNode(He.ssForm,{rowContents:I.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Hn,[l.createVNode(He.ssForm,{rowContents:H.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Xn=$l._export_sfc(Qn,[["__scopeId","data-v-73db0fe7"]]),ma=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(U){this.selectIndex=U},setSelectMenu(U){this.selectMenu=U},setSelectTitle(U){this.selectTitle=U}}}),Ql=(U,I)=>{let H=U,P=I;return Array.isArray(H)&&(H=H==null?void 0:H.map((O,s)=>{if(Array.isArray(O)){let ee={};return O=O==null?void 0:O.forEach((pe,Se)=>{var fe;(fe=P==null?void 0:P[Se])!=null&&fe.prop?ee[P[Se].prop]=pe:Array.isArray(pe)&&(ee.children=Ql(pe,P))}),Object.assign(ee,{id:s})}else return O})),H},Sa=(U,I,H)=>{let P=U,O=I;return P=P==null?void 0:P.map((s,ee)=>{var pe,Se;return!Array.isArray(s)||!((pe=O==null?void 0:O[ee])!=null&&pe.label)&&!H||(s.unshift(((Se=O==null?void 0:O[ee])==null?void 0:Se.label)??""),s.some(fe=>Array.isArray(fe))&&(s=s==null?void 0:s.map(fe=>{var qe;return Array.isArray(fe)&&(fe=Sa(fe,(qe=O==null?void 0:O[ee])==null?void 0:qe.children,H)),fe}))),s}),P},Yn=(U,I,H)=>{if(I==="")return U==null?void 0:U.filter(P=>(P==null?void 0:P.id)!==H);{const P=I.split("-");return Zn(U,P,H)}},Zn=(U,I,H)=>{let P=U,O=I;return(O==null?void 0:O.length)===0?P=P==null?void 0:P.filter(s=>s.id!==H):P=P==null?void 0:P.map(s=>(s.id.toString()===(O==null?void 0:O[0])&&(O==null||O.shift(),s=Ca(s,O,H)),s)),P},Ca=(U,I,H)=>{var s,ee;let P=U,O=I;return(O==null?void 0:O.length)===0?P.children=(s=P.children)==null?void 0:s.filter(pe=>pe.id!==H):P.children=(ee=P.children)==null?void 0:ee.map(pe=>(pe.id.toString()===(O==null?void 0:O[0])&&(O==null||O.shift(),pe=Ca(pe,O,H)),pe)),P},In=(U,I,H)=>{if(I==="")return H;{const P=I.split("-");return er(U,P,H)}},er=(U,I,H)=>{let P=U,O=I;return(O==null?void 0:O.length)===0?P=H:P=P==null?void 0:P.map(s=>(s.id.toString()===(O==null?void 0:O[0])&&(O==null||O.shift(),s=xa(s,O,H)),s)),P},xa=(U,I,H)=>{var s;let P=U,O=I;return(O==null?void 0:O.length)===0?P.children=H:P.children=(s=P.children)==null?void 0:s.map(ee=>(ee.id.toString()===(O==null?void 0:O[0])&&(O==null||O.shift(),ee=xa(ee,O,H)),ee)),P},Da=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(U){this.objUrl=U},setBlobUrls(U){this.blobUrls=U}}}),Xl=async(U,I)=>{var ee,pe,Se,fe,qe,Qe,rl,Ae,el,ll,se,ve,oe,R,q,Ne,Ke;let H=(pe=(ee=k.cloneDeep(U))==null?void 0:ee.optionUrl)==null?void 0:pe.menuSelect,P=[];H==null||H.forEach(re=>{});let O="",s=await ne.menuToParent(H);if(s==null||s.forEach(re=>{var Me,Ue,J,v;(re==null?void 0:re.name)===(((v=(J=(Ue=(Me=k.cloneDeep(U))==null?void 0:Me.optionUrl)==null?void 0:Ue.groupSelect)==null?void 0:J[0])==null?void 0:v.replaceAll("'",""))??"")&&(O=re==null?void 0:re.id)}),I){O=I;const re=await k.getInsofDataApi({id:O}),Me=(Qe=(qe=(fe=(Se=re==null?void 0:re.data)==null?void 0:Se.result)==null?void 0:fe[0])==null?void 0:qe.key)==null?void 0:Qe.pageKey;s=await ne.getItemData(Me,sessionStorage.getItem("systemKey"),"")}if(O!==""){let re;I?re=(rl=s==null?void 0:s.find(J=>(J==null?void 0:J.id)===I))==null?void 0:rl.compData:re=(Ae=s==null?void 0:s.find(J=>{var v,_e,z,te;return(J==null?void 0:J.name)===(((_e=(v=U==null?void 0:U.groupSelect)==null?void 0:v.split(":"))==null?void 0:_e[0])||((te=(z=U==null?void 0:U.optionUrl)==null?void 0:z.groupSelect)==null?void 0:te[0]))}))==null?void 0:Ae.compData;let Me=(ll=(el=re==null?void 0:re.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:el.contents)==null?void 0:ll.map(J=>J==null?void 0:J.label);(ve=(se=re==null?void 0:re.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:se.contents)!=null&&ve.every(J=>Array.isArray(J))&&(Me=(q=ne.getColumnChild((R=(oe=re==null?void 0:re.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:oe.contents)==null?void 0:R[0]))==null?void 0:q.map(J=>J==null?void 0:J.prop));let Ue=(Ke=(Ne=re==null?void 0:re.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:Ne.contents)==null?void 0:Ke.map(J=>(J=J==null?void 0:J.filter(v=>!(v!=null&&v.id)),J));Ue==null||Ue.forEach(J=>{P.push(ne.getValueToObjectValue(J,Me))})}return P},lr={class:"table-content"},ar={class:"menu-config-wrap"},nr=["onClick"],rr={key:0,class:"viewport-wrap"},or=["onClick"],tr={title:"选择显示列信息"},sr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ir=["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(U,{emit:I}){var ha;const H=l.ref([]),P=Da(k.pinia),O=l.ref(null),s=U,ee=l.ref(s==null?void 0:s.allowSelect),pe=l.ref((ha=s==null?void 0:s.config)==null?void 0:ha.showIndex),Se=l.ref(),fe=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),qe=ne.useOriginalState(k.pinia);let Qe="$R";const{originalPath:rl}=k.storeToRefs(qe),Ae=rl.value,el=l.ref(!1),ll=l.ref(!1),se=l.ref(!1),ve=l.reactive({column:{},status:!1,text:"合计"}),oe=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),R=I,q=l.ref([]),Ne=l.reactive({prop:"",order:null}),Ke=l.ref([]),re=l.ref(!1),Me=l.ref(!1),Ue=l.ref(null),{isUseBackdrop:J,initTrackFileType:v,getFileExtension:_e,setData:z,getFileInfo:te,getFilesInfo:ke}=ya.useThreeSystem(),Be=l.ref([]),Oe=l.ref(!1),cl=l.ref(),we=Vl.useMenuState(),{importLoading:xr,activeMenuPath:me,contentLoading:Dr,linkMenuInfo:Ta}=k.storeToRefs(we),Na=ne.useTableComp(k.pinia),xe=Vl.useModelComp(k.pinia),{extraContents:be,cacheUpdatingData:yl,tableViewContents:vl,tableLoading:Tr,pageMapState:dl,lockingPage:Nl}=k.storeToRefs(xe),Q=l.ref([]),Bl=l.ref([]),El=l.ref(new Map);l.ref(!1);const Xe=l.ref("");l.ref();const Al=l.ref(!0),pl=l.ref(0),Yl=l.ref(!0),Re=l.ref(""),Ye=l.ref(!1),Ba=l.ref({label:"查看三维模型"}),_l=l.ref(!1),Fl=l.ref(),ze=l.ref([]),ol=l.ref([]),wl=l.ref(!1),bl=l.ref([]),fl=l.ref([]),tl=l.ref([]),Ee=l.ref([]),Je=l.ref(),Le=l.ref(),Ea=ka(k.pinia),Ul=l.ref(),Kl=l.ref(0),Ol=ma(k.pinia),{selectIndex:Aa,selectMenu:Ie,selectTitle:zl}=k.storeToRefs(Ol),{selectString:sl}=k.storeToRefs(Ea),_a=k.useLoginState(k.pinia),{loginUserInfo:Ze}=k.storeToRefs(_a),wa=l.ref(720),We=l.ref(!1),Ll=l.ref(!1),Ge=l.ref([]),il=l.ref(),kl=l.ref(!0),Zl=l.ref(!0),ul=l.ref([]),Ua=l.inject("contentRef");l.provide("contentRef",Ua),l.watch(()=>{var e;return(e=Q.value)==null?void 0:e.length},e=>{oe.total=e}),l.watch(()=>vl.value,async()=>{var i,u,c,d,g,y,E,w,f,T,x,D,V,L,$,o,m,h;if(((i=vl.value)==null?void 0:i.length)===0||!((u=s==null?void 0:s.itemData)!=null&&u.find(N=>(N==null?void 0:N.key)==="columnPath"))||!((c=s==null?void 0:s.itemData)!=null&&c.find(N=>(N==null?void 0:N.key)==="pageColumn")))return;let e=(f=(w=(E=(y=(g=(d=s==null?void 0:s.itemData)==null?void 0:d.find(N=>(N==null?void 0:N.key)==="pageColumn"))==null?void 0:g.contents)==null?void 0:y.split("["))==null?void 0:E[1])==null?void 0:w.split("]"))==null?void 0:f[0],a=((V=(D=(x=(T=s==null?void 0:s.itemData)==null?void 0:T.find(N=>(N==null?void 0:N.key)==="pageColumn"))==null?void 0:x.contents)==null?void 0:D.split("["))==null?void 0:V[0])+(($=(L=vl.value)==null?void 0:L.find(N=>(N==null?void 0:N.key)===e))==null?void 0:$.value),r=((m=(o=s==null?void 0:s.itemData)==null?void 0:o.find(N=>(N==null?void 0:N.key)==="pageGroup"))==null?void 0:m.contents)??"",n=await ne.getItemData(a,sessionStorage.getItem("systemKey"),""),t=(h=n==null?void 0:n.find(N=>(N==null?void 0:N.name)===(r===""?s==null?void 0:s.compName:r)))==null?void 0:h.compData;fa(t,s.allMapContents)},{deep:!0});const Oa=async(e,a)=>{var r,n,t,i,u;try{const c=await k.getInsofDataApi({id:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index)});let d;((r=c==null?void 0:c.data)==null?void 0:r.code)===200&&(d=((t=(n=c==null?void 0:c.data)==null?void 0:n.result)==null?void 0:t[0])||null);const g={type:"data",pageKey:s!=null&&s.parentTableId?(i=d==null?void 0:d.key)==null?void 0:i.pageKey:me.value,tableId:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index),systemKey:sessionStorage.getItem("systemKey")},y=a==null?void 0:a.map(f=>{const T=Object.keys(f),x={};return T.forEach((D,V)=>{x[e[V]]=f[D]}),x}),E=y==null?void 0:y.map(f=>({key:g,value:{tableData:f}})),w=await k.batchAddInsofDataApi({dataList:E});((u=w==null?void 0:w.data)==null?void 0:u.code)===200?(xe.setRefreshCurStructure(!0),k.ElMessage.success("导入数据成功")):k.ElMessage.error("导入数据响应失败")}catch(c){throw k.ElMessage.error("导入数据处理失败"),new Error(c)}},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"}}),t=new Blob([n.data],{type:"application/octet-stream;charset=UTF-8"});let i=URL.createObjectURL(t);cl.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:i}],Oe.value=!0}};l.onBeforeUnmount(()=>{Zl.value=!1;let e=Kl.value;Kl.value=e+1});const Il=l.computed(()=>{var n,t;const e=(oe.currentPage-1)*oe.pageSize,a=e+oe.pageSize,r=(n=q.value)==null?void 0:n.find(i=>{var u;return(i==null?void 0:i.sortable)&&((u=i==null?void 0:i.label)==null?void 0:u.includes("时间"))});return r&&(Ne.order="descending",Ne.prop=r==null?void 0:r.prop),R("getSliceContLength",oe),(t=Q.value)==null?void 0:t.slice(e,a)}),ja=e=>{oe.currentPage=e,R("getSliceContLength",oe)},Ma=e=>{var a;oe.pageSize=e,e*oe.currentPage>((a=Q.value)==null?void 0:a.length)&&(oe.currentPage=1,oe.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),R("getSliceContLength",oe)},Pa=(e,a)=>{var u,c;const r=(c=(u=q.value)==null?void 0:u.map(d=>d==null?void 0:d.prop))==null?void 0:c.filter(d=>d!=="operate");let n;const t=(e==null?void 0:e.length)===(r==null?void 0:r.length);if(e!=null&&e.includes("序号"))return k.ElMessage.error("导入的数据不需要包含序号列");if(n=t?e:e.slice(0,r==null?void 0:r.length),!(n==null?void 0:n.every(d=>r==null?void 0:r.find(g=>d===g))))return k.ElMessage.error("导入的数据表头不匹配");Oa(n,a)},Va=(e,a)=>{var r;xe.setRefreshCurStructure(!1),((r=q.value)==null?void 0:r.length)===0||Pa(e,a)},$a=(e,a,r,n)=>{const t=[],i=[],u=g=>Object.keys(g).length;for(const g in e)if(e[g]!==void 0){const y=e[g],E=[];for(const[w,f]of Object.entries(y))E.push(f),i.length<u(y)&&i.push(w);t.push(E)}t.unshift(i);const c=ne.utils.aoa_to_sheet(t),d=ne.utils.book_new();ne.utils.book_append_sheet(d,c,n),ne.writeFileSync(d,`${a}.xlsx`),Ge.value=[]},jl=async(e,a,r,n=!1,t)=>{var i,u,c,d,g,y,E,w;try{xe.setRefreshCurStructure(!1);const f=await k.getInsofDataApi({id:s==null?void 0:s.index});if(((i=f==null?void 0:f.data)==null?void 0:i.code)===200){let T=(g=(d=(c=(u=f==null?void 0:f.data)==null?void 0:u.result)==null?void 0:c[0])==null?void 0:d.value)==null?void 0:g.pageData;n?T={...T,compData:(E=T==null?void 0:T.compData)==null?void 0:E.map(D=>{var V;return(D==null?void 0:D.key)==="header"?{...D,contents:(V=D==null?void 0:D.contents)==null?void 0:V.map(L=>({...L,[e]:r}))}:D})}:T={...T,compData:(y=T==null?void 0:T.compData)==null?void 0:y.map(D=>{var V,L;return(D==null?void 0:D.key)==="header"?{...D,contents:(V=D==null?void 0:D.contents)==null?void 0:V.map($=>($==null?void 0:$.prop)===(a==null?void 0:a.prop)?{...$,[e]:r}:$)}:(D==null?void 0:D.key)==="tableToForm"&&t?{...D,contents:(L=D==null?void 0:D.contents)==null?void 0:L.map($=>($==null?void 0:$.prop)===(a==null?void 0:a.prop)?{...$,[t]:r}:$)}:D})};const x=await k.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:T}});((w=x==null?void 0:x.data)==null?void 0:w.code)===200?(k.ElMessage.success("编辑成功"),xe.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(f){k.ElMessage.error(f)}},Fa=async(e,a)=>{await jl("label",a,e)},Ka=async(e,a)=>{await jl("columnType",a,e,!1,"type")},za=()=>{yl.value?We.value=!1:ga()},qa=e=>{Ge.value=e},Ra=(e,a)=>{il.value===a?kl.value=!1:kl.value=!0,il.value=a==null?void 0:a.changeProp},ml=l.computed(()=>{var r,n,t;const e=(r=q.value)==null?void 0:r.some(i=>i==null?void 0:i.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(t=(n=q.value)==null?void 0:n.filter(i=>(i==null?void 0:i.label)!=="操作"))==null?void 0:t.map(i=>({...i,filterable:!!(i!=null&&i.filterable),showSummary:!!(i!=null&&i.showSummary),operable:!!(i!=null&&i.operable)}))}),Ja=async(e,a,r)=>{const n=k.cloneDeep(q.value);await l.nextTick(),q.value=n==null?void 0:n.map(t=>(r==null?void 0:r.label)===(t==null?void 0:t.label)?{...t,[a]:e}:t),await jl(a,r,e)},ql=async(e,a)=>{await jl(a,null,e,!0)},Wa=()=>{Ye.value=!1},Ga=e=>{R("clickTrigger",e)},ea=async e=>{var i,u,c,d,g,y,E,w,f,T,x,D,V,L,$;const a=e==null?void 0:e.row,r=e==null?void 0:e.rowData,n=e==null?void 0:e.suffix;if((i=a==null?void 0:a.toString())!=null&&i.includes(".urdf")||e!=null&&e.isUrdf||n!=null&&n.includes(".urdf")){if(a.includes(",")){k.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(J(a)){const m={files:[te(a)],data:{}};z(m);return}bl.value=[{url:a,extension:_e(a)}],Me.value=!0,Ue.value={data:k.cloneDeep(r)},re.value=!0;return}let t=[];if((u=a==null?void 0:a.toString())!=null&&u.includes(".stl")||(c=a==null?void 0:a.toString())!=null&&c.includes(".STL")||(d=a==null?void 0:a.toString())!=null&&d.includes(".obj")||(g=a==null?void 0:a.toString())!=null&&g.includes(".mtl")){const o=(y=a==null?void 0:a.toString())==null?void 0:y.split(","),m=ke(o),h=m==null?void 0:m[0];if(J(h==null?void 0:h.extension)){z({files:m,data:{}});return}bl.value=m,Me.value=!1,re.value=!0;return}if((E=a==null?void 0:a.toString())!=null&&E.includes(".stl")||(w=a==null?void 0:a.toString())!=null&&w.includes(".STL")||(f=a==null?void 0:a.toString())!=null&&f.includes(".obj")||(T=a==null?void 0:a.toString())!=null&&T.includes(".mtl")||n!=null&&n.includes(".stl")||n!=null&&n.includes(".STL")||n!=null&&n.includes(".obj")||n!=null&&n.includes(".mtl")){let o,m=[],h={};if(Array.isArray(a)?o=a:o=a==null?void 0:a.split(","),o==null||o.forEach(N=>{N.includes(".mtl")?m.push(N):h.blob=h.blob?h.blob+","+N:N}),(m==null?void 0:m.length)>0&&(h.mtlBlobs=m),n&&(h.suffix=n),(D=(x=Object.values(h))==null?void 0:x[0])!=null&&D.includes("http:"))t.push(h);else{const N=new Blob([h.blob],{type:"application/octet-stream;charset=UTF-8"});let C=URL.createObjectURL(N),W="";(V=a==null?void 0:a.split("/"))==null||V.forEach((j,le)=>{var A;le===((A=a==null?void 0:a.split("/"))==null?void 0:A.length)-1&&(W=j)}),(L=h.blob)!=null&&L.includes(".stl")&&(W=(W==null?void 0:W.replaceAll(">",""))+".urdf"),cl.value=[{name:W,blobUrl:C}],Oe.value=!0}}else{const o=await k.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),m=new Blob([o.data],{type:"application/octet-stream;charset=UTF-8"});let h=URL.createObjectURL(m),N="";if(($=a==null?void 0:a.split("/"))==null||$.forEach((C,W)=>{var j;W===((j=a==null?void 0:a.split("/"))==null?void 0:j.length)-1&&(N=C)}),J(N)){const C=v(N),W=te(a);z({files:[W],data:{trackFileType:C}});return}cl.value=[{name:N,blobUrl:h}],Oe.value=!0}(t==null?void 0:t.length)>0&&P.setBlobUrls(t)},Ml=e=>{var n,t,i,u;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(u=(n=e==null?void 0:e.url)==null?void 0:n.split("."))==null?void 0:u[((i=(t=e==null?void 0:e.url)==null?void 0:t.split("."))==null?void 0:i.length)-1];return(e==null?void 0:e.name)+"."+a},Ha=async e=>{let a=null,r=null;if(e!=null&&e.downloadUrl){const t=await Rl(),i=He.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),u=await k.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:t,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{i.close()}),c=new Blob([u.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(c),r=e==null?void 0:e.name}else{const t=await ne.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(t.data),r=Ml(e)):a=e==null?void 0:e.url}if(J(a)){const t={row:`${a}`,suffix:_e(r)};ea(t);return}const n={name:r,blobUrl:a};cl.value=[n],Oe.value=!0},Qa=async e=>{let a=null,r=null;if(e!=null&&e.downloadUrl){const i=await Rl(),u=await k.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:i,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),c=new Blob([u.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(c),r=e==null?void 0:e.name}else{const i=await ne.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(i.data),r=Ml(e)}const n={name:r,blobUrl:a},t=document.createElement("a");t.href=n.blobUrl,t.download=n.name,t.style.display="none",document.body.appendChild(t),t.click(),setTimeout(()=>{document.body.removeChild(t)},100)},Xa=(e,a)=>{var r;if(Object.values(a).length!==0)return Object.values(a).find(n=>{var t,i,u;return((t=n==null?void 0:n.toString())==null?void 0:t.includes(".txt"))||((i=n==null?void 0:n.toString())==null?void 0:i.includes(".cpt"))||((u=n==null?void 0:n.toString())==null?void 0:u.includes(".obj"))})?[...e,Ba.value]:(r=s==null?void 0:s.config)!=null&&r.allowMove?[...e,{label:"迁移"}]:e},Ya=(e,a={})=>[...e==null?void 0:e.values()].filter(r=>Object.keys(a).every(n=>{var u;const t=r[n],i=(u=a[n])==null?void 0:u.toLowerCase();return i&&t&&typeof t=="string"?t.toLowerCase().includes(i):!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(t=>!t)))return Q.value=Bl.value;if(r){Q.value=[...El.value.values()].filter(t=>Object.values(t).some(i=>typeof i=="string"?i==null?void 0:i.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}Q.value=Ya(El.value,e),xe.setTableLoading(!1)}},Ia=async e=>{var u,c,d,g,y,E,w,f,T,x,D,V,L,$,o;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((u=Ze.value)==null?void 0:u.account)||((c=Ze.value)==null?void 0:c.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),r=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((d=Ze.value)==null?void 0:d.account)||((g=Ze.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let n=(E=(y=a==null?void 0:a.data)==null?void 0:y.result)==null?void 0:E.map(m=>m==null?void 0:m.id);const t=(f=(w=r==null?void 0:r.data)==null?void 0:w.result)==null?void 0:f.map(m=>m==null?void 0:m.id);n=[...k.cloneDeep(n),...t],(n==null?void 0:n.length)>0&&(n!=null&&n.every(m=>m!==null&&m))&&await k.batchDeleteInsofDataApi({ids:n});let i=await ne.getItemData(me.value,sessionStorage.getItem("systemKey"),e.id);if(i=i==null?void 0:i.filter(m=>m.comp!=="methodButton"),i&&i.length>0){const m=!Array.isArray(zl.value)&&((T=zl.value)==null?void 0:T.key)!=="main"?[]:zl.value;m.push({key:Ie.value===""?(x=e==null?void 0:e.id)==null?void 0:x.toString():Ie.value+"-"+((D=e==null?void 0:e.id)==null?void 0:D.toString()),value:e[(V=Object.keys(e))==null?void 0:V.filter(h=>h!=="index"&&h!=="id")[0]]}),Ol.setSelectMenu(Ie.value===""?(L=e==null?void 0:e.id)==null?void 0:L.toString():Ie.value+"-"+(($=e==null?void 0:e.id)==null?void 0:$.toString())),Ol.setSelectTitle(m),Ol.setSelectIndex((o=e==null?void 0:e.id)==null?void 0:o.toString()),R("pageChange",i)}},aa=async(e,a,r,n)=>{var t,i,u,c,d,g;if(R("clickMainKey",r),(n==null?void 0:n.isExistChild)===!0){let y=(t=n==null?void 0:n.columnType)==null?void 0:t.prop,E=n==null?void 0:n.data;if(ul.value=await ne.getItemData(me.value,sessionStorage.getItem("systemKey"),""),!ul.value){let f=(c=(u=(i=me.value)==null?void 0:i.split("/"))==null?void 0:u.filter((T,x)=>{var D,V;return x!==((V=(D=me.value)==null?void 0:D.split("/"))==null?void 0:V.length)-1}))==null?void 0:c.join("/");ul.value=await ne.getItemData(f,sessionStorage.getItem("systemKey"),"")}let w=(d=ul.value)==null?void 0:d.filter(f=>(f==null?void 0:f.name)===y);ul.value=w==null?void 0:w.map(f=>{var T;return f.compData=(T=f.compData)==null?void 0:T.map(x=>{var D,V;return(x==null?void 0:x.key)==="tableContents"&&(D=x==null?void 0:x.contents)!=null&&D.every(L=>L==null?void 0:L.find($=>$==null?void 0:$.id))&&(x.contents=(V=x==null?void 0:x.contents)==null?void 0:V.filter(L=>(L==null?void 0:L[1])===E)),x}),f}),R("routeUrl",ul.value,{isEdit:!0,routerUrl:me.value});return}if((n==null?void 0:n.data)==="查看"&&(e!=null&&e.every(y=>(y==null?void 0:y.url)&&(y==null?void 0:y.name)))){let y=k.cloneDeep(e);y=await((g=k.cloneDeep(y))==null?void 0:g.map(async w=>{var x,D,V,L;const f=await ne.downloadAvatarApi({url:w==null?void 0:w.url});let T=URL.createObjectURL(f.data);return{name:(w==null?void 0:w.name)+"."+((L=(x=w==null?void 0:w.url)==null?void 0:x.split("."))==null?void 0:L[((V=(D=w==null?void 0:w.url)==null?void 0:D.split("."))==null?void 0:V.length)-1]),blobUrl:T}}));let E=await Promise.all(y);cl.value=E,Oe.value=!0}k.cloneDeep(q.value),(n==null?void 0:n.isMainKey)===!0&&(we.setActiveMenuPath(void 0),xe.setRouteToChildPath(void 0),xe.setFixMenuStatus(!0),we.setActiveMenuPath(k.cloneDeep(me).value+"/"+(n==null?void 0:n.data)))},en=()=>{Oe.value=!1},ln=e=>{R("rowClick",e)};l.watch(()=>s.changedContent,()=>{var r,n;if(!s.changedContent)return;let e=(r=Q.value)==null?void 0:r.map(t=>{var i;return t.id===((i=s.changedContent)==null?void 0:i.id)&&(t={...s.changedContent,id:s.changedContent.newId?s.changedContent.newId:s.changedContent.id},delete t.newId),t});const a=(n=s.itemData)==null?void 0:n.map(t=>((t==null?void 0:t.key)==="tableContents"&&(t.contents=e),t));Q.value=e,R("contentChange",{contents:a,index:s.index}),R("change",{content:e,index:s==null?void 0:s.index,buttonName:"",id:s==null?void 0:s.index})},{deep:!0,immediate:!0});const an=()=>{},nn=async()=>{const e=me.value,a=sessionStorage.getItem("systemKey"),r=await ne.getItemData(e,a,""),n=(r==null?void 0:r.find(c=>(c==null?void 0:c.name)==="方法明细"))||(r==null?void 0:r[0]),t=(n==null?void 0:n.compData)||[],i=t==null?void 0:t.find(c=>{const d=c==null?void 0:c.key;return d==="formContent"||d==="tableContents"});return i==null?void 0:i.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(t=>(we.setImportLoading(!1),Promise.reject(t))),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 L,$,o,m,h,N,C,W;we.setImportLoading(!0),xe.setFreshContent(!1);let n=await nn().catch(j=>(we.setImportLoading(!1),Promise.reject(j)));n=n==null?void 0:n.filter(j=>{var le;return((le=j==null?void 0:j.find(A=>A==null?void 0:A.id))==null?void 0:le.id)===(a==null?void 0:a.id)});let t=ne.getEqualChild([(L=q.value)==null?void 0:L.filter(j=>(j==null?void 0:j.label)!=="操作")]);const i=(o=($=ne.tableToForm(n,t))==null?void 0:$[0])==null?void 0:o.find(j=>{const le=j==null?void 0:j.key;return le==="算法体"||le==="方法体"}),u=i==null?void 0:i.value;if(!u){console.log("未搜索到isMain, 缺少算法执行接口"),we.setImportLoading(!1);return}const c=q.value?ne.getEqualChild([q.value]):[],d=c.find(j=>{const le=j==null?void 0:j.prop;return le==="输入"||le==="输入数据.输入1"||le==="样本输入数据"}),g=d==null?void 0:d.prop;let y=a==null?void 0:a[g];const E=await Rl().catch(j=>(we.setImportLoading(!1),Promise.reject(j))),w=await rn(u,{token:E,inputData:y}).catch(j=>(we.setImportLoading(!1),Promise.reject(j))),f=(m=w==null?void 0:w.data)==null?void 0:m.data,T=c.find(j=>(j==null?void 0:j.prop)==="输出数据.输出1"),x=T==null?void 0:T.prop;let D=[],V=[];if(((h=Object.values(f))==null?void 0:h.length)>0){let j=[];const le=new FormData,A=(N=on(f))==null?void 0:N.map(async b=>{var G,M;if(!Array.isArray(b)&&(b!=null&&b.includes("http"))){let B=await k.axios.get(b,{responseType:"blob"}),Y=(M=b==null?void 0:b.split("/"))==null?void 0:M[((G=b==null?void 0:b.split("/"))==null?void 0:G.length)-1];le.append("files",B.data,Y)}else j.push(b)});if(await Promise.all(A),!ne.isFormDataEmpty(le)){let b=await ne.uploadAmountApi(le),G=(W=(C=b==null?void 0:b.data)==null?void 0:C.result)==null?void 0:W.map(M=>{var B,Y,K,ae,S,X;return{name:(X=(S=(ae=(B=M==null?void 0:M.url)==null?void 0:B.split("/"))==null?void 0:ae[((K=(Y=M==null?void 0:M.url)==null?void 0:Y.split("/"))==null?void 0:K.length)-1])==null?void 0:S.split("."))==null?void 0:X[0],url:M==null?void 0:M.url}});j=[...j,...G]}let F={};for(let b in a)b!=="id"&&(F[b]=a[b]);F[x]=j,V.push({id:a==null?void 0:a.id,value:{tableData:F}})}(V==null?void 0:V.length)>0&&await k.batchUpdateInsofDataApi({dataList:V}),(D==null?void 0:D.length)>0&&await k.batchAddInsofDataApi({dataList:D}),xl(!0),we.setImportLoading(!1),xe.setFreshContent(!0)},na=(e,a)=>(e=e==null?void 0:e.map(r=>{var n,t;return r!=null&&r.children&&((n=r.children)!=null&&n.find(i=>i.id===(a==null?void 0:a.id))?r.children=(t=r.children)==null?void 0:t.filter(i=>(i==null?void 0:i.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:s==null?void 0:s.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(e,a,r)=>{a===(s==null?void 0:s.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,!(!(s!=null&&s.index)||!((a=De.to)!=null&&a.groupName))&&(s==null?void 0:s.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,t,i,u,c,d,g,y,E,w,f,T,x,D,V;if(Xe.value="",wl.value=!0,Al.value=!0,R("onButtonClick",e,a),e==="删除")Vl.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var L,$;(L=Q.value)!=null&&L.find(o=>(o==null?void 0:o.id)===(a==null?void 0:a.id))?Q.value=($=k.cloneDeep(Q.value))==null?void 0:$.filter(o=>(o==null?void 0:o.id)!==(a==null?void 0:a.id)):Q.value=na(k.cloneDeep(Q.value),a),Yn(Ul.value,Ie.value,a==null?void 0:a.id),xe.setTableLoading(s==null?void 0:s.index),R("change",{content:Q.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:q.value})});else if(e==="批量删除"){if(((n=Ge.value)==null?void 0:n.length)===0)return k.ElMessage.warning("请先勾选操作的数据");Vl.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var $,o;const L=($=Ge.value)==null?void 0:$.map(m=>m.id);Q.value=(o=k.cloneDeep(Q.value))==null?void 0:o.filter(m=>!(L!=null&&L.includes(m.id))),xe.setTableLoading(s==null?void 0:s.index),R("change",{content:Q.value,singleContent:null,selectItems:Ge.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:q.value})})}else if(e==="复制新增"){Re.value="新增";const L=k.cloneDeep(a),$=(t=q.value)==null?void 0:t.find(h=>h==null?void 0:h.isMainKey),o=$||((i=q.value)==null?void 0:i[0]),m=(u=tl.value)==null?void 0:u.find(h=>(h==null?void 0:h.label)==="新建");await oa(!0,m,{data:L,firstCol:o})}else if(e==="新增")Re.value="新增",Cl(""),Ye.value=!0;else if(e==="编辑")Re.value="编辑",Cl(a),Ye.value=!0;else if(e==="查看")Re.value="查看",Cl(a),wl.value=!1,Al.value=!1,Ye.value=!0;else if(e==="查看三维模型"){const L={};for(let o in a)o!=="id"&&(L[o]=a[o]);let $=(c=Object.values(L))==null?void 0:c[1];Na.setTableShowThree($)}else if(((d=r==null?void 0:r.extra)==null?void 0:d.type)==="modelExample")Re.value=e,_l.value=!0;else if(e==="新建"){let L=dl.value,$=[];for(let C in L)C!=null&&C.includes(`loading${((g=Ze.value)==null?void 0:g.account)||((y=Ze.value)==null?void 0:y.账号)}`)&&($=[...$,...C]);let o=[];for(let C in L)C!=null&&C.includes(`updateLoading${((E=Ze.value)==null?void 0:E.account)||((w=Ze.value)==null?void 0:w.账号)}`)&&(o=[...o,...C]);let m=$==null?void 0:$.map(C=>C==null?void 0:C.id);const h=o==null?void 0:o.map(C=>C==null?void 0:C.id);m=[...k.cloneDeep(m),...h],(m==null?void 0:m.length)>0&&(m!=null&&m.every(C=>C!==null&&C))&&await k.batchDeleteInsofDataApi({ids:m});const N=(f=tl.value)==null?void 0:f.find(C=>(C==null?void 0:C.label)==="新建");await oa(!1,N)}else if(e==="修改模板"){let L=k.cloneDeep(me).value;xe.setRouteToChildPath(L),we.setActiveMenuPath(L+Ae)}else if(e==="执行")tn(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((T=Ge.value)==null?void 0:T.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((x=Q.value)==null?void 0:x.length)===0)return k.ElMessage.warning("暂无数据导出");const L=(V=(D=q.value)==null?void 0:D.map(o=>o==null?void 0:o.label))==null?void 0:V.filter(o=>o!=="操作"),$=e==="导出全部"?k.cloneDeep(Q.value):k.cloneDeep(Ge.value);$==null||$.forEach(o=>{o==null||delete o.id}),$a($,s==null?void 0:s.compName,L,s==null?void 0:s.compName)}else e==="迁移"&&(De.selectRow=a,De.show=!0)},cn=async e=>{var r,n,t,i,u,c;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)&&((i=(t=a==null?void 0:a.data)==null?void 0:t.result)==null?void 0:i.length)>0?(c=(u=a==null?void 0:a.data)==null?void 0:u.result)==null?void 0:c.map(d=>{var g;return{id:d==null?void 0:d.id,...(g=d==null?void 0:d.value)==null?void 0:g.pageData}}):[]},dn=async(e,a)=>{var r,n,t,i,u,c,d,g,y,E,w,f,T,x,D,V,L,$,o,m;try{let h,N;const C=(r=dl.value[me.value+Ae])==null?void 0:r.filter(M=>{var B;return((B=M==null?void 0:M.key)==null?void 0:B.type)==="structureMethod"}),W=(n=dl.value[me.value+Ae])==null?void 0:n.filter(M=>{var B;return((B=M==null?void 0:M.key)==null?void 0:B.type)==="structure"}),j=C==null?void 0:C.find(M=>{var B,Y;return((Y=(B=M==null?void 0:M.value)==null?void 0:B.pageData)==null?void 0:Y.method)==="保存"});if(!j)return;const le=(c=(u=dl.value[(i=(t=j==null?void 0:j.value)==null?void 0:t.pageData)==null?void 0:i.path])==null?void 0:u.filter(M=>{var B;return((B=M==null?void 0:M.key)==null?void 0:B.type)==="data"}))==null?void 0:c.find(M=>{var B,Y,K,ae;return((Y=(B=M==null?void 0:M.value)==null?void 0:B.tableData)==null?void 0:Y.算法名称)===((ae=(K=j==null?void 0:j.value)==null?void 0:K.pageData)==null?void 0:ae.method)});if(!le)return;const A={buttonName:(g=(d=j==null?void 0:j.value)==null?void 0:d.pageData)==null?void 0:g.method,api:(E=(y=le==null?void 0:le.value)==null?void 0:y.tableData)==null?void 0:E.算法体,content:W==null?void 0:W.map(M=>{var B;return(B=M==null?void 0:M.value)==null?void 0:B.pageData}),extraContent:[],extraValues:(f=(w=j==null?void 0:j.value)==null?void 0:w.pageData)==null?void 0:f.data,methodName:(x=(T=j==null?void 0:j.value)==null?void 0:T.pageData)==null?void 0:x.path};if(!e)return;const F={...e,compData:(D=e==null?void 0:e.compData)==null?void 0:D.map(M=>{var B;return(M==null?void 0:M.key)==="formContent"?{...M,contents:(B=M==null?void 0:M.contents)==null?void 0:B.map(Y=>(Y==null?void 0:Y.prop)===a?{...Y,value:""}:Y)}:M})},b={key:{pageKey:me.value+Ae,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:F}},G=await k.axios.post(A.api,b,{headers:{"Content-Type":"application/json"}});return((V=G==null?void 0:G.data)==null?void 0:V.code)===200&&(h=($=(L=G==null?void 0:G.data)==null?void 0:L.result)==null?void 0:$.latestReportCode,N=(m=(o=G==null?void 0:G.data)==null?void 0:o.result)==null?void 0:m.status),{newMainKeyValue:h,newStatus:N}}catch(h){throw k.ElMessage.error(h),new Error(h)}},ra=(e,a,r,n)=>{var t;R("contentChange",{contents:(t=e==null?void 0:e.compData)==null?void 0:t.map(i=>{var u;return(i==null?void 0:i.key)==="formContent"?{...i,contents:(u=i==null?void 0:i.contents)==null?void 0:u.map(c=>(c==null?void 0:c.key)===a?{...c,value:r}:Sl.value&&(c==null?void 0:c.prop)===Sl.prop?{...c,value:Sl.value}:c)}:i}),index:e==null?void 0:e.id},n)},Sl=l.reactive({prop:"状态",value:""}),pn=l.ref(["系统自动生成信息","审批意见"]),fn=async(e,a,r)=>{var d,g;let n=e==null?void 0:e[a==null?void 0:a.prop],t=1,i,u;const c=k.cloneDeep(me).value+Ae+n;if(c){Sl.value="",i=(d=dl.value[c])==null?void 0:d.filter(w=>{var f;return((f=w==null?void 0:w.key)==null?void 0:f.type)==="structure"});const y=i==null?void 0:i.find(w=>{var f,T,x;return((x=(T=(f=w==null?void 0:w.value)==null?void 0:f.pageData)==null?void 0:T.comp)==null?void 0:x.toUpperCase())==="FORM"});u={...(g=y==null?void 0:y.value)==null?void 0:g.pageData,id:y==null?void 0:y.id};const E=await dn(u,a==null?void 0:a.prop);if(Sl.value=E==null?void 0:E.newStatus,E!=null&&E.newMainKeyValue)return E==null?void 0:E.newMainKeyValue}if(Q.value.some(y=>(y==null?void 0:y[a==null?void 0:a.prop])===n)){const y=n;for(;Q.value.some(E=>(E==null?void 0:E[a==null?void 0:a.prop])===`${y}(${t})`);)t++;n=`${y}(${t})`}return n},oa=async(e,a,r)=>{var u,c,d,g,y,E,w,f;let n,t;const i=await fn(r==null?void 0:r.data,r==null?void 0:r.firstCol);if(e?(n=k.cloneDeep(me).value+Ae+((g=r==null?void 0:r.data)==null?void 0:g[(d=r==null?void 0:r.firstCol)==null?void 0:d.prop]),t=k.cloneDeep(me).value+Ae+i):(n=k.cloneDeep(me).value+Ae,t=k.cloneDeep(n)+`loading${((u=Ze.value)==null?void 0:u.account)||((c=Ze.value)==null?void 0:c.账号)}`),a){const T=(E=(y=dl.value[t])==null?void 0:y.filter(x=>{var D;return((D=x==null?void 0:x.key)==null?void 0:D.parentTable)===""}))==null?void 0:E.map(x=>{var D;return{id:x==null?void 0:x.id,...(D=x==null?void 0:x.value)==null?void 0:D.pageData}});if((T==null?void 0:T.length)>0)if(e){const x=T==null?void 0:T.find(D=>{var V;return((V=D==null?void 0:D.comp)==null?void 0:V.toUpperCase())==="FORM"});x&&ra(x,(w=r==null?void 0:r.firstCol)==null?void 0:w.label,i,me.value)}else xe.setRouteToChildPath(k.cloneDeep(me).value),we.setActiveMenuPath(t);else if(await ne.loadingConstruct(n,t,null,null,e?pn.value:null),e){const x=await cn(t);if((x==null?void 0:x.length)>0){const D=x==null?void 0:x.find(V=>{var L;return((L=V==null?void 0:V.comp)==null?void 0:L.toUpperCase())==="FORM"});D&&ra(D,(f=r==null?void 0:r.firstCol)==null?void 0:f.label,i,me.value)}}else xe.setRouteToChildPath(k.cloneDeep(me).value),we.setActiveMenuPath(t)}else e?(Xe.value="",Le.value=r==null?void 0:r.data,xl(!0,r==null?void 0:r.firstCol,i)):(xe.setRouteToChildPath(k.cloneDeep(me).value),we.setActiveMenuPath(t))},gn=()=>{re.value=!1,bl.value=[],Me.value=!1},Cl=e=>{var u,c,d,g,y,E,w,f,T,x,D,V,L,$;const a=[];let r=[];for(let o in e)Array.isArray(e==null?void 0:e[o])&&r.push(o);Ke.value=k.cloneDeep(q.value),(c=ne.getColumnChild((u=k.cloneDeep(q.value))==null?void 0:u.filter(o=>(o==null?void 0:o.label)!=="操作")))==null||c.forEach((o,m)=>{var h;r.find(N=>N===(o==null?void 0:o.prop))||(o!=null&&o.formType&&((h=o==null?void 0:o.formType)==null?void 0:h.toUpperCase())==="SELECT"?a.push({label:(o==null?void 0:o.prop)||(o==null?void 0:o.label)||"",name:(o==null?void 0:o.prop)??"t"+m,prop:o==null?void 0:o.prop,type:!(o!=null&&o.formType)||(o==null?void 0:o.formType)===""?"Input":o==null?void 0:o.formType,value:(e==null?void 0:e[o==null?void 0:o.prop])??(o==null?void 0:o.value)??"",id:(o==null?void 0:o.id)??m,contents:(o==null?void 0:o.options)??[],width:1,isFormColHidden:o==null?void 0:o.isFormColHidden,disabled:o==null?void 0:o.disabled,optionUrl:{groupSelect:o==null?void 0:o.groupSelect,menuSelect:o==null?void 0:o.formMenuSelect,type:"Select",selectRelateType:o==null?void 0:o.selectRelateType,allSelectionContents:(o==null?void 0:o.allSelectionContents)??[],selectFilter:o==null?void 0:o.selectFilter}}):a.push({label:(o==null?void 0:o.prop)||(o==null?void 0:o.label)||"",prop:o==null?void 0:o.prop,name:(o==null?void 0:o.prop)??"t"+m,type:!(o!=null&&o.formType)||(o==null?void 0:o.formType)===""?"Input":o==null?void 0:o.formType,value:(e==null?void 0:e[o==null?void 0:o.prop])??(o==null?void 0:o.value)??"",id:(o==null?void 0:o.id)??m,contents:(o==null?void 0:o.options)??[],width:1,isFormColHidden:o==null?void 0:o.isFormColHidden,disabled:o==null?void 0:o.disabled}))}),e===""||!e||(Xe.value=(e==null?void 0:e.id)??"");let n=ne.getColumnChild((d=k.cloneDeep(q.value))==null?void 0:d.filter(o=>(o==null?void 0:o.label)!=="操作"));ze.value&&((g=ze.value)==null?void 0:g.length)>0&&(ze.value=(y=k.cloneDeep(ze).value)==null?void 0:y.map(o=>{var h;let m=(o==null?void 0:o.prop)||((h=n==null?void 0:n.find(N=>(N==null?void 0:N.label)===(o==null?void 0:o.label)))==null?void 0:h.prop);return m&&(o.value=e[m]),o})),Ee.value=ze.value&&((E=ze.value)==null?void 0:E.length)>0?ne.getTableFormToForm(ze.value):a;let t=[],i=(w=s.itemData)==null?void 0:w.filter(o=>(o==null?void 0:o.key)==="filterAllType");if((i==null?void 0:i.length)>0&&(t=(i==null?void 0:i.map(m=>m==null?void 0:m.value)).flat()),(t==null?void 0:t.length)>0){let o=t==null?void 0:t.find(m=>{var h;return(h=m==null?void 0:m.content)==null?void 0:h.includes("@Select")});if(o!=null&&o.content){let m=(x=(T=(f=o==null?void 0:o.content)==null?void 0:f.replace(":",Qe))==null?void 0:T.split(Qe))==null?void 0:x[1];if(((D=m==null?void 0:m.trim())==null?void 0:D.toUpperCase())==="MANUAL"){let h=(L=(V=s.itemData)==null?void 0:V.find(N=>(N==null?void 0:N.key)==="contentTableId"))==null?void 0:L.contents;Ee.value=($=Ee.value)==null?void 0:$.map((N,C)=>{var W;return C===0&&(N.type="Select",(W=N==null?void 0:N.optionUrl)!=null&&W.menuId?(N.optionUrl.menuId=h,N.optionUrl.menuFilter=t):N.optionUrl={menuId:h,menuFilter:t}),N})}}}},hn=()=>{var a;const e=(a=O.value)==null?void 0:a.$el;e&&ne.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:r=>{var u;const{oldIndex:n,newIndex:t}=r;if(n===t)return;const i=ml.value.splice(n,1)[0];ml.value.splice(t,0,i),q.value=(u=q.value)==null?void 0:u.slice().sort((c,d)=>{if(c.label==="操作")return 1;if(d.label==="操作")return-1;const g=ml.value.findIndex(E=>E.label===c.label),y=ml.value.findIndex(E=>E.label===d.label);return g-y})}})};l.onMounted(()=>{Fl.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(t=>{var i,u;if((t==null?void 0:t.id)===Xe.value){let c={};for(let d in t){let g=(i=a==null?void 0:a.find(y=>(y==null?void 0:y.prop)===d))==null?void 0:i.label;g?c[d]=(u=Le.value)==null?void 0:u[g]:c[d]=t[d]}t=Object.assign(c,Le.value),r=t}else{let c=Jl(t,a);t=c==null?void 0:c.contents,r=c==null?void 0:c.currentSelectContents}return t}),{contents:e,currentSelectContents:r}},ta=(e,a)=>{let r,n;return e!=null&&e.find(t=>(t==null?void 0:t.id)===Xe.value)?r=e==null?void 0:e.map(t=>{var i,u;if((t==null?void 0:t.id)===Xe.value){let c={};for(let d in t){let g=(i=a==null?void 0:a.find(y=>(y==null?void 0:y.prop)===d))==null?void 0:i.label;g?c[d]=(u=Le.value)==null?void 0:u[g]:c[d]=t[d]}t=Object.assign(c,Le.value),n=t}return t}):r=e==null?void 0:e.map(t=>{var i,u,c,d;if((t==null?void 0:t.id)===Xe.value){let g={};for(let y in t){let E=(i=a==null?void 0:a.find(w=>(w==null?void 0:w.prop)===y))==null?void 0:i.label;E?g[y]=(u=Le.value)==null?void 0:u[E]:g[y]=t[y]}t=Object.assign(g,Le.value),n=t}else t=(c=Jl(t,a))==null?void 0:c.contents,n=(d=Jl(t,a))==null?void 0:d.currentSelectContents;return t}),{newContents:r,currentSelectContents:n}},sa=(e,a,r)=>{var n,t;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&&((t=e.children)==null?void 0:t.length)>0&&(e.children=e.children.map(sa)),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 t={...n};return delete t.children,t}):[]},xl=(e=!0,a,r)=>{var g,y,E,w,f,T,x,D,V,L,$,o,m,h,N,C,W,j,le,A,F,b,G,M,B,Y;let n=ne.getColumnChild((g=k.cloneDeep(q.value))==null?void 0:g.filter(K=>(K==null?void 0:K.label)!=="操作")),t,i=k.cloneDeep(Q.value);if(!Le.value){Ye.value=!1;return}if(Xe.value===""){pl.value++;let K;a&&r?K={id:pl.value.toString(),[a==null?void 0:a.prop]:r,children:Le.value.children}:K={id:pl.value.toString()},K!=null&&K.children&&(K={...K,children:(y=K.children)==null?void 0:y.map(ae=>sa(ae,a,r))}),i.push(Object.assign(Le.value,K)),t=Object.assign(Le.value,K)}else i=(E=ta(i,n))==null?void 0:E.newContents,t=(w=ta(i,n))==null?void 0:w.currentSelectContents;const u=(f=s.itemData)==null?void 0:f.filter(K=>(K==null?void 0:K.key)==="childTree")[0];if(((T=u==null?void 0:u.contents)==null?void 0:T.length)>0){Re.value="编辑";const K=[];i==null||i.forEach((ae,S)=>{var ie;let X={};if(Array.isArray(ae)){let Z=[];ae==null||ae.filter(ye=>!(ye!=null&&ye.id)).forEach((ye,ge)=>{var _,p,de,ue,ce,Ce,Te;if((p=(_=Je.value)==null?void 0:_[ge])!=null&&p.prop&&!Array.isArray(ye)){let Pe={};Pe[Je.value[ge].column]=ye,be!=null&&be.value&&((de=be==null?void 0:be.value)==null?void 0:de.length)>0&&((ue=be==null?void 0:be.value)!=null&&ue.find(he=>JSON.stringify(he==null?void 0:he[0])===JSON.stringify(Pe)))&&(Z=(ce=be==null?void 0:be.value)==null?void 0:ce.find(he=>JSON.stringify(he==null?void 0:he[0])===JSON.stringify(Pe))),Z&&Z.length>0?X[Je.value[ge].prop]=Z!=null&&Z.find(he=>{var Ve;return((Ve=Object.keys(he))==null?void 0:Ve[0])===Je.value[ge].column})?(Ce=Z==null?void 0:Z.find(he=>{var Ve;return((Ve=Object.keys(he))==null?void 0:Ve[0])===Je.value[ge].column}))==null?void 0:Ce[Je.value[ge].column]:ye:X[Je.value[ge].prop]=ye}else Array.isArray(ye)&&((Te=Je.value[ge])!=null&&Te.prop?X[Je.value[ge].prop]=ye:X.children=Ql(ye,Je.value))})}else X=ae;Array.isArray(ae)&&ae.some(Z=>Z==null?void 0:Z.id)?K.push(Object.assign(X,{id:(ie=ae==null?void 0:ae.find(Z=>Z.id))==null?void 0:ie.id})):X.id?K.push(X):K.push(Object.assign(X,{id:S.toString()}))}),Q.value=pa(K,u,q.value)}else Q.value=i;ca(Q.value),Ul.value=Q.value;const c=In(Ul.value,Ie.value,i);let d=[];if(yl.value?(d=(x=k.cloneDeep(yl).value.singleContent)==null?void 0:x.filter(K=>(K==null?void 0:K.id)!==(t==null?void 0:t.id)),d.push(t)):d=[t],We.value){const K={content:c,singleContent:((D=u==null?void 0:u.contents)==null?void 0:D.length)>0?d==null?void 0:d.flatMap(Wl):d,index:s==null?void 0:s.index,buttonName:"编辑",column:q.value,parentTableId:s==null?void 0:s.parentTableId};xe.setCacheUpdatingData(K)}if(e&&!(($=(L=(V=Ee.value)==null?void 0:V[0])==null?void 0:L.optionUrl)!=null&&$.menuId)){let K=(N=(h=(m=(o=s.itemData)==null?void 0:o.find(S=>(S==null?void 0:S.key)==="filterAllType"))==null?void 0:m.value)==null?void 0:h.find(S=>(S==null?void 0:S.value)==="onConditionContents"))==null?void 0:N.content;const ae={content:c,singleContent:((C=u==null?void 0:u.contents)==null?void 0:C.length)>0?Wl(t):t,index:s==null?void 0:s.index,buttonName:Re.value,column:q.value,parentTableId:s==null?void 0:s.parentTableId,filter:K};xe.setTableLoading(s==null?void 0:s.index),Ye.value=!1,Le.value=void 0,R("change",ae)}if((le=(j=(W=Ee.value)==null?void 0:W[0])==null?void 0:j.optionUrl)!=null&&le.menuId){Ye.value=!1;let K=(A=s.itemData)==null?void 0:A.filter(ae=>(ae==null?void 0:ae.key)==="filterAllType");if((K==null?void 0:K.length)>0){let S=(G=(b=(F=(K==null?void 0:K.map(X=>X==null?void 0:X.value)).flat().find(X=>{var ie;return(ie=X==null?void 0:X.content)==null?void 0:ie.includes("@Num")}))==null?void 0:F.content)==null?void 0:b.split(":"))==null?void 0:G[1];S=parseInt(S),Q.value=(Y=Q.value)==null?void 0:Y.slice(((M=Q.value)==null?void 0:M.length)-S,(B=Q.value)==null?void 0:B.length)}}};l.onUnmounted(()=>{q.value=[],Q.value=[],Ke.value=[],Be.value=[],ze.value=[],ol.value=[],bl.value=[],fl.value=[],Ee.value=[],Ge.value=[],O.value=null});const ia=async(e,a,r)=>{var g,y,E,w,f,T,x,D,V,L,$;il.value=r==null?void 0:r.prop;const n=k.cloneDeep(s.itemData),t=n==null?void 0:n.map(o=>{var m;return(o==null?void 0:o.key)==="header"&&((m=o.contents)==null||m.map((h,N)=>{var C,W,j,le,A,F,b,G,M,B,Y,K,ae,S,X,ie,Z,ye,ge;return h.type=h!=null&&h.type?h.type:(le=(j=(W=(C=h==null?void 0:h.key)==null?void 0:C.split("$"))==null?void 0:W[1])==null?void 0:j.split("("))!=null&&le[0]?(F=(A=ne.FormType)==null?void 0:A.find(_=>{var p,de,ue,ce;return(_==null?void 0:_.key)===((ce=(ue=(de=(p=h==null?void 0:h.key)==null?void 0:p.split("$"))==null?void 0:de[1])==null?void 0:ue.split("("))==null?void 0:ce[0])}))==null?void 0:F.value:"Input",h.options=h!=null&&h.options?h.options:((M=(G=(b=h==null?void 0:h.key)==null?void 0:b.split("$"))==null?void 0:G[1])==null?void 0:M.length)>0?(ae=(K=Hl((Y=(B=h==null?void 0:h.key)==null?void 0:B.split("$"))==null?void 0:Y[1]))==null?void 0:K.split(","))==null?void 0:ae.map(_=>({label:_,value:_})):[],(S=h==null?void 0:h.key)!=null&&S.includes("$")&&(h.key=(ie=(X=h==null?void 0:h.key)==null?void 0:X.split("$"))==null?void 0:ie[0]),h.value=(Z=Object.values(a))==null?void 0:Z[N],h.optionUrl=h!=null&&h.formMenuSelect&&((ye=h==null?void 0:h.formMenuSelect)==null?void 0:ye.length)>0?{groupSelect:(ge=h==null?void 0:h.groupSelect)==null?void 0:ge.split(/[::]/).map(_=>_.trim()),menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":"")}:null,h})),o});let i=k.cloneDeep(Ee.value),u=(y=(g=k.cloneDeep(t))==null?void 0:g.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:y.contents;i=i==null?void 0:i.map(o=>{var m;return o.value=(m=u==null?void 0:u.find((h,N)=>N===(o==null?void 0:o.id)))==null?void 0:m.value,o});let c="",d=(f=(w=(E=k.cloneDeep(t))==null?void 0:E.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:w.contents)==null?void 0:f.find((o,m)=>{var h,N,C;return(o==null?void 0:o.label)===il.value||(m==null?void 0:m.toString())===((C=(N=(h=il.value)==null?void 0:h.split("a"))==null?void 0:N[1])==null?void 0:C.toString())});if((D=(x=(T=k.cloneDeep(t))==null?void 0:T.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:x.contents)==null||D.forEach(o=>{var m,h,N,C,W;c===""&&((N=(h=(m=o==null?void 0:o.optionUrl)==null?void 0:m.groupSelect)==null?void 0:h[1])!=null&&N.includes("["))&&(c=(W=(C=o==null?void 0:o.optionUrl)==null?void 0:C.groupSelect)==null?void 0:W[1])}),(V=d==null?void 0:d.optionUrl)!=null&&V.menuSelect){let o=await Xl(d),m;if(o==null||o.forEach(h=>{var N,C,W,j,le,A,F,b,G,M;c===((C=(N=d==null?void 0:d.optionUrl)==null?void 0:N.groupSelect)==null?void 0:C[1])&&((le=(j=(W=d==null?void 0:d.optionUrl)==null?void 0:W.groupSelect)==null?void 0:j[1])!=null&&le.includes("["))&&((M=k.cloneDeep(h))==null?void 0:M[(G=(b=(F=(A=d==null?void 0:d.optionUrl)==null?void 0:A.groupSelect)==null?void 0:F[1])==null?void 0:b.replaceAll("[",""))==null?void 0:G.replaceAll("]","")])===(d==null?void 0:d.value)&&(m=h)}),m){let h=k.cloneDeep(i);h=h==null?void 0:h.map(C=>{var W,j,le,A,F,b,G,M,B,Y,K;return(m!=null&&m[C==null?void 0:C.label]||m!=null&&m[(A=(le=(j=(W=C==null?void 0:C.optionUrl)==null?void 0:W.groupSelect)==null?void 0:j[1])==null?void 0:le.replaceAll("[",""))==null?void 0:A.replaceAll("]","")])&&((G=(b=(F=C==null?void 0:C.optionUrl)==null?void 0:F.groupSelect)==null?void 0:b[1])!=null&&G.includes("["))&&(C.value=(m==null?void 0:m[C==null?void 0:C.label])||(m==null?void 0:m[(K=(Y=(B=(M=C==null?void 0:C.optionUrl)==null?void 0:M.groupSelect)==null?void 0:B[1])==null?void 0:Y.replaceAll("[",""))==null?void 0:K.replaceAll("]","")])),C}),Q.value=(L=k.cloneDeep(Q.value))==null?void 0:L.map(C=>{if((C==null?void 0:C.id)===(a==null?void 0:a.id)){const W={};return h==null||h.forEach(j=>{W[j.name]=j.value}),W.id=C==null?void 0:C.id,W}return C});let N=k.cloneDeep(h);N=N==null?void 0:N.map(C=>{var W,j,le,A;return(j=(W=C==null?void 0:C.optionUrl)==null?void 0:W.menuSelect)!=null&&j.some(F=>F==null?void 0:F.includes)&&(C.optionUrl.menuSelect=(A=(le=C==null?void 0:C.optionUrl)==null?void 0:le.menuSelect)==null?void 0:A.map(F=>{var b,G,M,B;if(F!=null&&F.includes("[")){let Y=(G=(b=F==null?void 0:F.replaceAll("[","").replaceAll("]",""))==null?void 0:b.split(":"))==null?void 0:G[1];F=(B=(M=k.cloneDeep(h))==null?void 0:M.find(K=>(K==null?void 0:K.label)===Y))==null?void 0:B.value}return F})),C}),Q.value=($=k.cloneDeep(Q.value))==null?void 0:$.map(C=>{if((C==null?void 0:C.id)===(a==null?void 0:a.id)){const W={};return N==null||N.forEach(j=>{W[j.name]=j.value}),W.id=C==null?void 0:C.id,W}return C})}}},vn=async e=>{var y,E,w,f,T,x,D,V,L,$,o,m,h,N,C,W,j,le;if(!e)return;Le.value=e;const a=k.cloneDeep(s.itemData);let r=a==null?void 0:a.map(A=>{var F;return(A==null?void 0:A.key)==="header"&&((F=A.contents)==null||F.map((b,G)=>{var M,B,Y,K,ae,S,X,ie,Z,ye,ge,_,p,de,ue,ce,Ce,Te,Pe;return b.type=b!=null&&b.type?b.type:(K=(Y=(B=(M=b==null?void 0:b.key)==null?void 0:M.split("$"))==null?void 0:B[1])==null?void 0:Y.split("("))!=null&&K[0]?(S=(ae=ne.FormType)==null?void 0:ae.find(he=>{var Ve,$e,al,nl;return(he==null?void 0:he.key)===((nl=(al=($e=(Ve=b==null?void 0:b.key)==null?void 0:Ve.split("$"))==null?void 0:$e[1])==null?void 0:al.split("("))==null?void 0:nl[0])}))==null?void 0:S.value:"Input",b.options=b!=null&&b.options?b.options:((Z=(ie=(X=b==null?void 0:b.key)==null?void 0:X.split("$"))==null?void 0:ie[1])==null?void 0:Z.length)>0?(p=(_=Hl((ge=(ye=b==null?void 0:b.key)==null?void 0:ye.split("$"))==null?void 0:ge[1]))==null?void 0:_.split(","))==null?void 0:p.map(he=>({label:he,value:he})):[],(de=b==null?void 0:b.key)!=null&&de.includes("$")&&(b.key=(ce=(ue=b==null?void 0:b.key)==null?void 0:ue.split("$"))==null?void 0:ce[0]),b.value=(Ce=Object.values(e))==null?void 0:Ce[G],b.optionUrl=b!=null&&b.formMenuSelect&&((Te=b==null?void 0:b.formMenuSelect)==null?void 0:Te.length)>0?{groupSelect:(Pe=b==null?void 0:b.groupSelect)==null?void 0:Pe.split(/[::]/).map(he=>he.trim()),menuSelect:b==null?void 0:b.formMenuSelect,selectRelateType:"",type:(b==null?void 0:b.formType)??(b!=null&&b.groupSelect?"Select":"")}:null,b})),A}),n=Ee.value,t=(E=(y=k.cloneDeep(r))==null?void 0:y.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:E.contents;if(t=t==null?void 0:t.filter(A=>(A==null?void 0:A.label)!=="操作"),t.push({label:"操作",type:"operate"}),n=n==null?void 0:n.map(A=>{var F;return A.value=A.value??((F=t==null?void 0:t.find((b,G)=>(b==null?void 0:b.prop)===(A==null?void 0:A.name)))==null?void 0:F.value),A}),!kl.value)return;let i="",u=(T=(f=(w=k.cloneDeep(r))==null?void 0:w.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:f.contents)==null?void 0:T.find((A,F)=>{var b,G,M;return(A==null?void 0:A.label)===il.value||(F==null?void 0:F.toString())===((M=(G=(b=il.value)==null?void 0:b.split("a"))==null?void 0:G[1])==null?void 0:M.toString())}),c=(x=u==null?void 0:u.optionUrl)==null?void 0:x.menuSelect,d=!0;(L=(V=(D=k.cloneDeep(r))==null?void 0:D.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:V.contents)==null||L.forEach(A=>{var F,b,G,M,B,Y;d&&((G=(b=(F=A==null?void 0:A.optionUrl)==null?void 0:F.groupSelect)==null?void 0:b[1])!=null&&G.includes("["))&&(i=(B=(M=A==null?void 0:A.optionUrl)==null?void 0:M.groupSelect)==null?void 0:B[1],JSON.stringify(c)===JSON.stringify((Y=A==null?void 0:A.optionUrl)==null?void 0:Y.menuSelect)&&(d=!1))});let g=k.cloneDeep(n);if(g=g==null?void 0:g.map(A=>{var F,b;return(A==null?void 0:A.type)==="Select"&&((b=(F=A==null?void 0:A.optionUrl)==null?void 0:F.allSelectionContents)==null?void 0:b.length)>0&&(A.optionUrl.contactValue=e),A.value=e==null?void 0:e[A==null?void 0:A.prop],A}),Ee.value=k.cloneDeep(g),($=u==null?void 0:u.optionUrl)!=null&&$.menuSelect&&kl.value||(h=(m=(o=Ee.value)==null?void 0:o[0])==null?void 0:m.optionUrl)!=null&&h.menuId){let A=await Xl(u,(W=(C=(N=Ee.value)==null?void 0:N[0])==null?void 0:C.optionUrl)==null?void 0:W.menuId),F;if((j=u==null?void 0:u.optionUrl)==null||j.menuSelect,A==null||A.forEach(b=>{var G,M,B,Y,K,ae,S,X,ie,Z,ye,ge,_,p,de,ue,ce;i===((M=(G=u==null?void 0:u.optionUrl)==null?void 0:G.groupSelect)==null?void 0:M[1])&&((K=(Y=(B=u==null?void 0:u.optionUrl)==null?void 0:B.groupSelect)==null?void 0:Y[1])!=null&&K.includes("["))&&((Z=k.cloneDeep(b))==null?void 0:Z[(ie=(X=(S=(ae=u==null?void 0:u.optionUrl)==null?void 0:ae.groupSelect)==null?void 0:S[1])==null?void 0:X.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])===(u==null?void 0:u.value)&&(F=b),(_=(ge=(ye=Ee.value)==null?void 0:ye[0])==null?void 0:ge.optionUrl)!=null&&_.menuId&&b[(de=(p=Ee.value)==null?void 0:p[0])==null?void 0:de.prop]===e[(ce=(ue=Ee.value)==null?void 0:ue[0])==null?void 0:ce.prop]&&(F=b)}),F){let b=k.cloneDeep(n);b=b==null?void 0:b.map(B=>{var Y,K,ae,S,X,ie,Z,ye,ge,_,p,de,ue,ce,Ce,Te,Pe,he;return(F!=null&&F[B==null?void 0:B.label]||F!=null&&F[(S=(ae=(K=(Y=B==null?void 0:B.optionUrl)==null?void 0:Y.groupSelect)==null?void 0:K[1])==null?void 0:ae.replaceAll("[",""))==null?void 0:S.replaceAll("]","")])&&((Z=(ie=(X=B==null?void 0:B.optionUrl)==null?void 0:X.groupSelect)==null?void 0:ie[1])!=null&&Z.includes("["))&&(B.value=(F==null?void 0:F[B==null?void 0:B.label])||(F==null?void 0:F[(p=(_=(ge=(ye=B==null?void 0:B.optionUrl)==null?void 0:ye.groupSelect)==null?void 0:ge[1])==null?void 0:_.replaceAll("[",""))==null?void 0:p.replaceAll("]","")])),(ce=(ue=(de=Ee.value)==null?void 0:de[0])==null?void 0:ue.optionUrl)!=null&&ce.menuId&&(B.value=(F==null?void 0:F[B==null?void 0:B.label])||(F==null?void 0:F[(he=(Pe=(Te=(Ce=B==null?void 0:B.optionUrl)==null?void 0:Ce.groupSelect)==null?void 0:Te[1])==null?void 0:Pe.replaceAll("[",""))==null?void 0:he.replaceAll("]","")])),B}),Ee.value=k.cloneDeep(b);let G=k.cloneDeep(b);G=G==null?void 0:G.map(B=>{var Y,K,ae,S,X,ie;return(K=(Y=B==null?void 0:B.optionUrl)==null?void 0:Y.menuSelect)!=null&&K.some(Z=>Z==null?void 0:Z.includes("["))&&(B.optionUrl.oldMenuSelect=(S=(ae=k.cloneDeep(B))==null?void 0:ae.optionUrl)==null?void 0:S.menuSelect,B.optionUrl.menuSelect=(ie=(X=B==null?void 0:B.optionUrl)==null?void 0:X.menuSelect)==null?void 0:ie.map(Z=>{var ye,ge,_,p;if(Z!=null&&Z.includes("[")){let de=(ge=(ye=Z==null?void 0:Z.replaceAll("[","").replaceAll("]",""))==null?void 0:ye.split(":"))==null?void 0:ge[1];Z=(p=(_=k.cloneDeep(b))==null?void 0:_.find(ue=>(ue==null?void 0:ue.label)===de))==null?void 0:p.value}return Z})),B}),Ee.value=G;let M={};(le=Ee.value)==null||le.forEach(B=>{M[B.prop]=B==null?void 0:B.value}),Le.value=M}}kl.value=!1},bn=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",kn=e=>{var i,u;const a=(u=(i=ze.value)==null?void 0:i.find(c=>(c==null?void 0:c.label)===(e==null?void 0:e.label)))==null?void 0:u.multiple,r=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;Q.value.forEach(c=>{const d=c==null?void 0:c[r];a&&va.isString(d)&&(c[r]=[d]),!a&&!va.isString(d)&&(c[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,t,i,u,c;Cl("");const a=(r=Ee.value)==null?void 0:r.reduce((d,g)=>(d[g.name]=g.value,d),{});if(((n=Object.keys(a))==null?void 0:n.length)>0){Le.value=a,Xe.value="",pl.value=(t=Q.value)==null?void 0:t.length,fl.value=(i=tl.value)==null?void 0:i.filter(g=>(g==null?void 0:g.label)!=="新增");const d=(c=(u=Ke.value)==null?void 0:u.filter(g=>(g==null?void 0:g.label)!=="操作"))==null?void 0:c.map(g=>{var E,w,f;const y=(w=(E=ze.value)==null?void 0:E.find(T=>(T==null?void 0:T.label)===(g==null?void 0:g.label)))==null?void 0:w.multiple;return kn(g),{...g,contents:(g==null?void 0:g.options)??[],optionUrl:g!=null&&g.formMenuSelect&&((f=g==null?void 0:g.formMenuSelect)==null?void 0:f.length)>0?{groupSelect:g==null?void 0:g.groupSelect,menuSelect:g==null?void 0:g.formMenuSelect,selectRelateType:"",type:g==null?void 0:g.formType,multiple:y}:null}});q.value=d==null?void 0:d.map(g=>ua(g,[{prop:"type",value:"edit"},{prop:"columnType",value:bn(g==null?void 0:g.formType)||(g==null?void 0:g.columnType)}])),e==="createClick"&&xl(!1)}},gl={START:"开始时间",END:"结束时间",HOURS:"工时"},mn=(e,a)=>Number(ne.dayjs(a).diff(ne.dayjs(e),"day",!0).toFixed(1)),ca=e=>{var i;const a=s.itemData,r=(i=a==null?void 0:a.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:i.contents,n=new Map;return r==null||r.forEach((u,c)=>{const{label:d}=u;n.set(d,c)}),!n.has(gl.START)||!n.has(gl.END)||!n.has(gl.HOURS)?e:e==null?void 0:e.map(u=>{const c=u==null?void 0:u[gl.START],d=u==null?void 0:u[gl.END],g=mn(c,d);return c&&d&&(u[gl.HOURS]=`${g}天`),u})},da=(e,a,r=0)=>{if(r>((a==null?void 0:a.length)??""))return e;const n=a==null?void 0:a[r],t=new Map;for(const u of e){const c=u[n];t.has(c)||t.set(c,[]),t.get(c)&&t.get(c).push(u)}const i=[];for(const[u,c]of t){const[d,...g]=c,y={...d};r+1===((a==null?void 0:a.length)??"")?y.children=c==null?void 0:c.map(E=>(E.level=k.cloneDeep(r)+1,E)).filter((E,w)=>w!==0):g.length>0&&(y.children=da(g,a,r+1)),y.level=r,i.push(y)}return i},pa=(e,a,r)=>{var t;if(!(a!=null&&a.contents)||((t=a==null?void 0:a.contents)==null?void 0:t.length)===0)return e;let n=[];return n=da(e,a==null?void 0:a.contents,0),n},fa=(e,a)=>{var w,f,T,x,D,V,L,$,o,m,h,N,C,W,j,le,A,F,b,G,M,B,Y,K,ae;const r=e==null?void 0:e.filter(S=>(S==null?void 0:S.key)==="header");e==null||e.filter(S=>(S==null?void 0:S.key)==="tableIndexColumn")[0];const n=e==null?void 0:e.filter(S=>(S==null?void 0:S.key)==="childTree")[0];let t=a;const i=e==null?void 0:e.find(S=>(S==null?void 0:S.key)==="page"),u=e==null?void 0:e.find(S=>(S==null?void 0:S.key)==="rowButton"),c=e==null?void 0:e.find(S=>(S==null?void 0:S.key)==="extraButton"),d=e==null?void 0:e.filter(S=>(S==null?void 0:S.key)==="tableContents"),g=e==null?void 0:e.filter(S=>(S==null?void 0:S.key)==="tableIndex");ze.value=(f=(w=e==null?void 0:e.filter(S=>(S==null?void 0:S.key)==="tableToForm"))==null?void 0:w[0])==null?void 0:f.contents,Yl.value=(i==null?void 0:i.contents)??!0;let y=[];sl.value===""?y=r==null?void 0:r[0]:y=(r==null?void 0:r.find(S=>(S==null?void 0:S.selectLabel)==="("+sl.value+")"))??(r==null?void 0:r.find(S=>!(S!=null&&S.selectLabel)));let E=[];if(sl.value===""?E=g==null?void 0:g[0]:E=(g==null?void 0:g.find(S=>(S==null?void 0:S.selectLabel)==="("+sl.value+")"))??(g==null?void 0:g.find(S=>!(S!=null&&S.selectLabel))),((T=y==null?void 0:y.contents)==null?void 0:T.length)>0){let S=[];if(y!=null&&y.contents.some(_=>Array.isArray(_)&&(_==null?void 0:_.find(p=>p.children))))Ie.value===""?S=(D=(x=ne.getGradeColumns(y==null?void 0:y.contents))==null?void 0:x[0])==null?void 0:D.filter(_=>!Array.isArray(_)):(Ie.value.split("-"),S=(V=ne.getGradeColumns(y==null?void 0:y.contents))==null?void 0:V[0]);else{let _=y!=null&&y.contents.some(p=>Array.isArray(p))?(L=y==null?void 0:y.contents)==null?void 0:L[0]:y==null?void 0:y.contents;_==null||_.forEach((p,de)=>{var Ce,Te,Pe,he,Ve;let ue="";(Te=(Ce=me.value)==null?void 0:Ce.split("/"))==null||Te.forEach($e=>{var al,nl,hl;if($e!==""){let Fe=(hl=(nl=(al=$e==null?void 0:$e.split(Ae+"updateLoading"))==null?void 0:al[0])==null?void 0:nl.split(Ae+"loading"))==null?void 0:hl[0];ue=ue===""?ue+Fe:ue+"/"+Fe}}),ue=ue+Ae+(p==null?void 0:p.directiveLabel);const ce=(Pe=ze.value)==null?void 0:Pe.find($e=>($e==null?void 0:$e.prop)===(p==null?void 0:p.prop));S.push({label:(p==null?void 0:p.label)??"",prop:(p==null?void 0:p.label)==="操作"?"operate":(p==null?void 0:p.prop)??"a"+de,width:p!=null&&p.width?parseInt(p.width):"",fixed:(p==null?void 0:p.fixed)??void 0,sortable:(p==null?void 0:p.sortable)??!1,filterable:(p==null?void 0:p.filterable)??!1,operable:(p==null?void 0:p.operable)??!1,showSummary:(p==null?void 0:p.showSummary)??!1,align:(p==null?void 0:p.align)??"left",showOverflowTooltip:(p==null?void 0:p.showOverflowTooltip)??!0,isNotDrag:(p==null?void 0:p.isNotDrag)??!1,isEditCol:(p==null?void 0:p.isEditCol)??!1,isOperate:(p==null?void 0:p.isOperate)??!1,id:(p==null?void 0:p.id)??de,type:(p==null?void 0:p.label)==="操作"?"operate":void 0,formType:(p==null?void 0:p.formType)??(p!=null&&p.groupSelect?"Select":""),isTableColHidden:p==null?void 0:p.isTableColHidden,isFormColHidden:p==null?void 0:p.isFormColHidden,disabled:p==null?void 0:p.disabled,options:(p==null?void 0:p.options)??[],value:(p==null?void 0:p.value)??"",formMenuSelect:(p==null?void 0:p.formMenuSelect)??[],isRoute:(p==null?void 0:p.isRoute)??!1,groupSelect:p!=null&&p.groupSelect?(he=p==null?void 0:p.groupSelect)==null?void 0:he.replaceAll('"',"").split(":"):[],isMainKey:(p==null?void 0:p.isMainKey)||(p==null?void 0:p.directiveLabel)==="#isMain",columnType:(ce==null?void 0:ce.type)||(p==null?void 0:p.columnType)||"TEXTAREA",directiveLabel:p==null?void 0:p.directiveLabel,isExistChild:!!(p!=null&&p.directiveLabel&&!(t!=null&&t[ue])&&!((Ve=p==null?void 0:p.directiveLabel)!=null&&Ve.includes("@"))&&(p==null?void 0:p.directiveLabel)!=="#isMain"),childPath:ue,allSelectionContents:(p==null?void 0:p.allSelectionContents)??[],selectFilter:p==null?void 0:p.selectFilter})})}q.value=ne.getNewColumnChild(S),Be.value=ne.getNewColumnChild(S),H.value=($=q.value)==null?void 0:$.map(_=>_==null?void 0:_.label),ll.value=(o=q.value)==null?void 0:o.every(_=>_==null?void 0:_.filterable),se.value=(m=q.value)==null?void 0:m.every(_=>_==null?void 0:_.operable),el.value=(h=q.value)==null?void 0:h.every(_=>_==null?void 0:_.sortable);let X=(C=(N=ne.getAllLeafNodes(q.value))==null?void 0:N.filter(_=>(_==null?void 0:_.type)!=="operate"))==null?void 0:C.map((_,p)=>({prop:(_==null?void 0:_.prop)??"a"+p,column:_.label}));Je.value=X;let ie=[];sl.value===""?ie=d==null?void 0:d[0]:ie=(d==null?void 0:d.find(_=>(_==null?void 0:_.selectLabel)==="("+sl.value+")"))??(d==null?void 0:d.find(_=>!(_!=null&&_.selectLabel)));let Z=Array.isArray((W=ie==null?void 0:ie.contents)==null?void 0:W[0])&&((j=ie==null?void 0:ie.contents)!=null&&j[0].every(_=>Array.isArray(_)))?(le=ie==null?void 0:ie.contents)==null?void 0:le[0]:ie==null?void 0:ie.contents;E!=null&&E.contents&&((A=E==null?void 0:E.contents)==null?void 0:A.length)!==0&&(Z=(F=k.cloneDeep(Z))==null?void 0:F.map((_,p)=>{if(!Array.isArray(_)){let de={};for(let ue in _)ue!=="id"&&ue!=="index"&&(de[ue]=_[ue]);_=Object.values(de)}return _}));const ye=!!((b=q.value)!=null&&b.find(_=>_.prop==="index"));Z=Sa(Z,E==null?void 0:E.contents,ye);const ge=[];Z==null||Z.forEach((_,p)=>{var ue;let de={};if(Array.isArray(_)){let ce=[];_==null||_.filter(Ce=>!(Ce!=null&&Ce.id)).forEach((Ce,Te)=>{var Pe,he,Ve,$e,al,nl;if((Pe=X==null?void 0:X[Te])!=null&&Pe.prop&&!Array.isArray(Ce)){let hl={};hl[X[Te].column]=Ce,be!=null&&be.value&&((he=be==null?void 0:be.value)==null?void 0:he.length)>0&&((Ve=be==null?void 0:be.value)!=null&&Ve.find(Fe=>JSON.stringify(Fe==null?void 0:Fe[0])===JSON.stringify(hl)))&&(ce=($e=be==null?void 0:be.value)==null?void 0:$e.find(Fe=>JSON.stringify(Fe==null?void 0:Fe[0])===JSON.stringify(hl))),ce&&ce.length>0?de[X[Te].prop]=ce!=null&&ce.find(Fe=>{var Dl;return((Dl=Object.keys(Fe))==null?void 0:Dl[0])===X[Te].column})?(al=ce==null?void 0:ce.find(Fe=>{var Dl;return((Dl=Object.keys(Fe))==null?void 0:Dl[0])===X[Te].column}))==null?void 0:al[X[Te].column]:Ce:de[X[Te].prop]=Ce}else Array.isArray(Ce)&&((nl=X[Te])!=null&&nl.prop?de[X[Te].prop]=Ce:de.children=Ql(Ce,X))})}else de=_;Array.isArray(_)&&_.some(ce=>ce==null?void 0:ce.id)?ge.push(Object.assign(de,{id:(ue=_==null?void 0:_.find(ce=>ce.id))==null?void 0:ue.id})):de.id?ge.push(de):ge.push(Object.assign(de,{id:p.toString()}))}),Q.value=pa(ge,n,q.value),Bl.value=ge,(G=Bl.value)==null||G.forEach(_=>{var p;(p=El.value)==null||p.set(_.id,_)})}else q.value=[],Ke.value=[],Q.value=[],Bl.value=[],El.value=new Map;((M=u==null?void 0:u.contents)==null?void 0:M.length)>0?ol.value=u==null?void 0:u.contents:ol.value=[],((B=c==null?void 0:c.contents)==null?void 0:B.length)>0?(fl.value=c==null?void 0:c.contents,tl.value=c==null?void 0:c.contents):(fl.value=[],tl.value=[]),pl.value=((Y=Q==null?void 0:Q.value)==null?void 0:Y.length)??0,ca(Q.value),Ul.value=Q.value,We.value&&(q.value=(ae=(K=Ke.value)==null?void 0:K.filter(S=>(S==null?void 0:S.label)!=="操作"))==null?void 0:ae.map(S=>{var X;return{...S,type:"edit",optionUrl:S!=null&&S.formMenuSelect&&((X=S==null?void 0:S.formMenuSelect)==null?void 0:X.length)>0?{groupSelect:S==null?void 0:S.groupSelect,menuSelect:S==null?void 0:S.formMenuSelect,selectRelateType:"",type:S==null?void 0:S.formType}:null}}),Gl())};l.watch(()=>[s.itemData,sl.value,Aa.value,Ie.value,be==null?void 0:be.value],async()=>{var e,a,r,n,t,i;if((e=s==null?void 0:s.itemData)!=null&&e.find(u=>(u==null?void 0:u.key)==="columnPath")&&!((a=vl.value)!=null&&a.find(u=>{var c,d;return(u==null?void 0:u.key)===((d=(c=s==null?void 0:s.itemData)==null?void 0:c.find(g=>(g==null?void 0:g.key)==="columnPath"))==null?void 0:d.contents)}))){let u=vl.value,c={key:(n=(r=s==null?void 0:s.itemData)==null?void 0:r.find(d=>(d==null?void 0:d.key)==="columnPath"))==null?void 0:n.contents,value:(i=(t=s==null?void 0:s.itemData)==null?void 0:t.find(d=>(d==null?void 0:d.key)==="columnUsingPath"))==null?void 0:i.contents};u!=null&&u.find(d=>(d==null?void 0:d.key)===(c==null?void 0:c.key))?u=u==null?void 0:u.map(d=>((d==null?void 0:d.key)===(c==null?void 0:c.key)&&(d.value=c.value),d)):u.push(c),xe.setTableViewContents(u)}fa(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(Cl(e==null?void 0:e.form),Re.value=e==null?void 0:e.dialogTitle,wl.value=!0,Ye.value=!0)},{immediate:!0,deep:!0});const ga=()=>{var e;(e=Se.value)!=null&&e.includes("read")&&(We.value=!We.value)},Sn=()=>{Ll.value=!Ll.value};l.watch(()=>{var e;return(e=s==null?void 0:s.config)==null?void 0:e.viewport},e=>{var a;Se.value=e,(e==null?void 0:e.length)===0?We.value=!1:(e!=null&&e.includes("read")||(We.value=!0),e!=null&&e.includes("edit")||(We.value=!1)),pe.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||We.value},{immediate:!0}),l.watch(()=>We.value,e=>{var a;e?(Gl("viewChange"),xe.setCacheUpdatingData(null)):(fl.value=tl.value,q.value=Be.value,yl.value&&(xe.setTableLoading(s==null?void 0:s.index),R("change",yl.value))),ee.value=e,pe.value=e||((a=s==null?void 0:s.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=Il.value)==null?void 0:e.length},e=>{e===0&&(oe.currentPage=1)}),l.watch(()=>s==null?void 0:s.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===oe.pageSize&&(oe.currentPage=Math.ceil(((r=Q.value)==null?void 0:r.length)/oe.pageSize))},xn=(e,a,r)=>{var n;ia(r,e,a),Le.value=k.cloneDeep(e),Xe.value=e==null?void 0:e.id,pl.value=(n=Q.value)==null?void 0:n.length,Re.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",xl(!1)},je=e=>{var d,g,y,E,w,f,T,x,D,V;const{row:a,column:r,item:n,slotData:t}=e;let i=a!=null&&a[r==null?void 0:r.prop]||(a==null?void 0:a[r==null?void 0:r.prop])===0?((g=(d=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:d[0])==null?void 0:g.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]):((E=(y=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:y[0])==null?void 0:E.contents)??(a==null?void 0:a[n==null?void 0:n.prop])??((f=(w=t==null?void 0:t[n==null?void 0:n.prop])==null?void 0:w[0])==null?void 0:f.contents)??(t==null?void 0:t[n==null?void 0:n.prop])??((D=(x=a==null?void 0:a[(T=n==null?void 0:n.child)==null?void 0:T.prop])==null?void 0:x[0])==null?void 0:D.contents)??(a==null?void 0:a[(V=n==null?void 0:n.child)==null?void 0:V.prop]),c=Array.isArray(i)&&!(i!=null&&i.every(L=>typeof L=="string"||typeof L=="number"))?"查看":i;return c=Array.isArray(c)?c.join(","):c,c},Dn=e=>{var g,y,E,w,f,T,x,D,V,L;const{row:a,column:r,item:n,slotData:t}=e;let i=a!=null&&a[r==null?void 0:r.prop]?((y=(g=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:g[0])==null?void 0:y.contents)??(a==null?void 0:a[r==null?void 0:r.prop]):((w=(E=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:E[0])==null?void 0:w.contents)??(a==null?void 0:a[n==null?void 0:n.prop])??((T=(f=t==null?void 0:t[n==null?void 0:n.prop])==null?void 0:f[0])==null?void 0:T.contents)??(t==null?void 0:t[n==null?void 0:n.prop])??((V=(D=a==null?void 0:a[(x=n==null?void 0:n.child)==null?void 0:x.prop])==null?void 0:D[0])==null?void 0:V.contents)??(a==null?void 0:a[(L=n==null?void 0:n.child)==null?void 0:L.prop]);const c=Array.isArray(i)&&!(i!=null&&i.every($=>typeof $=="string"||typeof $=="number")),d=Array.isArray(i)&&(i==null?void 0:i.find($=>$==null?void 0:$.url));return c&&d},Tn=(e,a)=>e.find(r=>Object.values(r).some(n=>n===a));return l.watch(()=>Ta.value,async e=>{if(e){we.setContentLoading(!0),await l.nextTick();const a=Tn(Q.value,e==null?void 0:e.data);if(!a)return we.setContentLoading(!1);await aa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),we.setContentLoading(!1)}},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.cacheNewData,e=>{var a;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(s==null?void 0:s.index)&&(Q.value=(a=Q.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 g,y,E,w;const r=l.resolveComponent("svg-icon"),n=l.resolveComponent("el-popover"),t=l.resolveComponent("el-switch"),i=l.resolveComponent("el-checkbox"),u=l.resolveComponent("el-checkbox-group"),c=l.resolveComponent("el-button"),d=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",lr,[Zl.value?(l.openBlock(),l.createBlock(He.ssTable,{id:"excel-table",pageObj:oe,showIndex:pe.value,isTree:(g=U.compItem)==null?void 0:g.isTree,summaryInfo:ve,columns:q.value,defaultSort:Ne,isCardViewport:Ll.value,checkedColumns:H.value,key:Kl.value+JSON.stringify(q.value),tableData:Il.value,isEditViewport:We.value,isShowPagination:Yl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ee.value,onDbClickRow:Ia,extraButton:fl.value,rowButton:ol.value,cacheExtraButtons:tl.value,isClearSelection:((y=Ge.value)==null?void 0:y.length)===0,onDoCurrentChange:ja,onDoSizeChange:Ma,onContentClick:aa,onRowClick:ln,onSelectChange:qa,onCellChange:xn,onChange:ia,onPreview:ea,onSubmitEditingTable:za,onHandleColEditChange:Fa,onHandleColTypeChange:Ka,onClickButton:Pl},l.createSlots({headerButton:l.withCtx(f=>{var T,x;return[U.showHeader?(l.openBlock(),l.createBlock(qn,{key:0,pageLayout:U.pageLayout,lockingPage:l.unref(Nl)===l.unref(me),filterValues:la.value,selectNums:(T=Ge.value)==null?void 0:T.length,dataNums:(x=Q.value)==null?void 0:x.length,compName:U.compName,isDevMode:U.isDevMode,buttons:f.buttons,onButtonClick:a[0]||(a[0]=D=>Pl(D,"",{})),columns:q.value,onFilter:Za,onGetImportData:Va,level:U.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var f,T,x,D;return[((f=Q.value)==null?void 0:f.length)>0&&U.allowOperate?(l.openBlock(),l.createElementBlock("div",rr,[(T=Se.value)!=null&&T.includes("read")&&((x=Se.value)!=null&&x.includes("edit"))&&((D=ol.value)!=null&&D.some(V=>(V==null?void 0:V.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:f,index:T})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:x=>Cn(f,T)},[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",sr,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(t,{"model-value":el.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=f=>ql(f,"sortable"))},null,8,["model-value"]),l.createVNode(t,{"model-value":ll.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=f=>ql(f,"filterable"))},null,8,["model-value"]),l.createVNode(t,{"model-value":se.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=f=>ql(f,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(u,{modelValue:H.value,"onUpdate:modelValue":a[5]||(a[5]=f=>H.value=f),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:O},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(ml.value,f=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:f.label},[l.createVNode(i,{value:f.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:f.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(f.label),9,ir)]),_: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 T;return[l.createElementVNode("div",ur,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((T=Object.keys(f))==null?void 0:T.filter(x=>{var D;return(D=fe.value)==null?void 0:D.find(V=>(V==null?void 0:V.value)===x)}),x=>{var D,V;return l.openBlock(),l.createElementBlock("div",{key:x},[l.createVNode(t,{"model-value":f==null?void 0:f[x],"active-text":(V=(D=fe.value)==null?void 0:D.find(L=>(L==null?void 0:L.value)===x))==null?void 0:V.label,onChange:L=>Ja(L,x,f)},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(f=>{var T,x,D,V,L,$,o,m,h,N,C,W,j,le,A,F,b,G;return[Dn(f)?(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(je(f)),1)]),default:l.withCtx(()=>{var M,B;return[l.createElementVNode("div",pr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((B=f==null?void 0:f.row)==null?void 0:B[(M=f==null?void 0:f.column)==null?void 0:M.prop],Y=>(l.openBlock(),l.createElementBlock("div",fr,[l.createElementVNode("div",{class:"prop-url",title:Ml(Y),onClick:K=>Ha(Y)},l.toDisplayString(Ml(Y)),9,gr),l.createElementVNode("div",{class:"prop-download",onClick:K=>Qa(Y)}," 下载 ",8,hr)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(je(f))&&((x=(T=je(f))==null?void 0:T.toString())!=null&&x.includes(".txt")||(V=(D=je(f))==null?void 0:D.toString())!=null&&V.includes(".cpt")||($=(L=je(f))==null?void 0:L.toString())!=null&&$.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(je(f))&&((m=(o=je(f))==null?void 0:o.toString())!=null&&m.includes(".txt")||(N=(h=je(f))==null?void 0:h.toString())!=null&&N.includes(".cpt")||(W=(C=je(f))==null?void 0:C.toString())!=null&&W.includes(".cyd"))?"underline":"",cursor:!Array.isArray(je(f))&&((le=(j=je(f))==null?void 0:j.toString())!=null&&le.includes(".txt")||(F=(A=je(f))==null?void 0:A.toString())!=null&&F.includes(".cpt")||(G=(b=je(f))==null?void 0:b.toString())!=null&&G.includes(".cyd"))?"pointer":"",marginLeft:(f==null?void 0:f.colIndex)===0?`${((f==null?void 0:f.level)??0)*20}px`:0}),onClick:M=>La(je(f))},l.toDisplayString(je(f)===0?"0":je(f)),13,yr))]}),_:2},[((E=ol.value)==null?void 0:E.length)>0&&l.unref(Nl)!==l.unref(me)?{name:"actions",fn:l.withCtx(({item:f})=>[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(ol.value,f),(T,x)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:x,onClick:D=>Pl(T==null?void 0:T.label,f,{extra:T})},[l.createElementVNode("div",{style:l.normalizeStyle({color:T==null?void 0:T.textColor}),class:"extra-button-label"},l.toDisplayString(T==null?void 0:T.label),5)],8,nr))),128))])]),_:2},1024)]),key:"0"}:void 0,((w=Q.value)==null?void 0:w.length)>0?{name:"batchButton",fn:l.withCtx(f=>[l.withDirectives(l.createVNode(Jn,{lockingPage:l.unref(Nl)===l.unref(me),buttons:f.buttons,selectTableItems:Ge.value,onButtonClick:a[1]||(a[1]=T=>Pl(T,"",{}))},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:Re.value,visible:Ye.value,width:wa.value,onBeforeDestroy:Wa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",vr,[l.createVNode(He.ssForm,{rowContents:Ee.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(c,{onClick:a[6]||(a[6]=f=>Ye.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[13]||(a[13]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[13]}),l.createVNode(c,{class:"ok-button",onClick:a[7]||(a[7]=f=>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:Re.value,visible:_l.value,width:Fl.value,onBeforeDestroy:a[9]||(a[9]=f=>_l.value=!1)},{default:l.withCtx(()=>[l.createVNode(Xn)]),footer:l.withCtx(()=>[l.createElementVNode("div",kr,[l.createVNode(c,{onClick:a[8]||(a[8]=f=>_l.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[15]||(a[15]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[15]}),l.createVNode(c,{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"]),Oe.value?(l.openBlock(),l.createBlock(He.ssFilePreview,{key:1,fileDataList:cl.value,onDestroy:en},null,8,["fileDataList"])):l.createCommentVNode("",!0),re.value?(l.openBlock(),l.createBlock(Tl.ssDialog,{key:2,visible:re.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:Ue.value},null,8,["files","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Tl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=f=>e.componentVisible=!1),width:Fl.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(d,{dialogItem:ul.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(He.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=$l._export_sfc(Sr,[["__scopeId","data-v-b1210244"]]);exports.formGetOptions=Hl;exports.getSelectRow=Xl;exports.ssTable=Cr;exports.useFormComp=Da;exports.useFormToTableComp=ka;exports.useUnit=ma;
1
+ "use strict";const l=require("vue"),k=require("./index-C8qRkCgn.cjs"),ne=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B-fXuLTS.cjs"),He=require("./index-Fk0-h7BT.cjs"),ya=require("./threeViewerHost-vo3_msNQ.cjs"),Vl=require("./index-DeBHVrj0.cjs");require("./index.vue_vue_type_style_index_1_lang-BuCtDbIL.cjs");const $l=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Tl=require("./index-DwzobGZ4.cjs");require("./index-CLJYSvkY.cjs");const va=require("./isString--eJE54G5.cjs"),Hl=U=>U.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(U){const I=U,H=l.ref(null),P=l.ref(!1),O=l.ref(null);return l.watch(()=>I==null?void 0:I.isVisible,()=>{P.value=I==null?void 0:I.isVisible},{deep:!0,immediate:!0}),l.watch(()=>O.value,()=>{l.nextTick(()=>{var s,ee;(ee=(s=H.value)==null?void 0:s.updatePopper)==null||ee.call(s)})},{deep:!0,immediate:!0}),(s,ee)=>{const pe=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(pe,{visible:P.value,title:I==null?void 0:I.title,placement:I==null?void 0:I.placement,width:I==null?void 0:I.width,ref_key:"popOverRef",ref:H},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:O})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$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"},Vn={key:0,class:"extra-header"},$n={class:"drop-menu",style:{width:"120px"}},Fn={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(U,{emit:I}){const H=I,P=U,O=l.ref(""),s=l.ref(!1),ee=l.ref([]),pe=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Se=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],fe=se=>{const ve=se.raw;if(!ve)return;const oe=new FileReader;oe.onload=R=>{try{const q=new Uint8Array(R.target.result),Ne=ne.readSync(q,{type:"array"}),Ke=Ne.SheetNames[0],re=Ne.Sheets[Ke],Ue=ne.utils.decode_range(re["!ref"]).e.c+1,J=new Array(Ue).fill(""),v=[];for(const z in re){if(z[0]==="!")continue;const{r:te,c:ke}=ne.utils.decode_cell(z);let Be=re[z].v;if(re[z].t==="n"&&Be>0&&Be<1e6&&(Be=new Date((Be-25569)*86400*1e3).toISOString().split("T")[0]),(Be==null||Be==="")&&(Be=""),te===0)J[ke]=Be;else{if(!v[te-1]){v[te-1]={};for(let Oe=0;Oe<Ue;Oe++)v[te-1][`col_${Oe}`]=""}v[te-1][`col_${ke}`]=Be}}for(let z=0;z<Ue;z++)J[z]===void 0&&(J[z]="");const _e=v==null?void 0:v[0];if(!(_e!=null&&_e.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");H("getImportData",J,v)}catch(q){throw k.ElMessage.error(q.message),new Error(q.message)}},oe.readAsArrayBuffer(ve)},qe=se=>{var oe;const ve=(oe=ee.value)==null?void 0:oe.reduce((R,q,Ne)=>(Ne===0?R[q.label]=se:R[q.label]=q==null?void 0:q.value,R),{});H("filter",ve,se,!0)},Qe=se=>{H("buttonClick",se)},rl=se=>{var ve,oe;ee.value=(oe=(ve=ne.getColumnChild(k.cloneDeep(se)))==null?void 0:ve.filter(R=>(R==null?void 0:R.label)!==""&&(R==null?void 0:R.label)!=="操作"))==null?void 0:oe.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}))},Ae=l.ref(!1),el=se=>{var ve;if((se==null?void 0:se.buttonName)==="确认"&&(H("filter",se==null?void 0:se.content),Ae.value=(se==null?void 0:se.content)&&Object.values(se==null?void 0:se.content).length>0),(se==null?void 0:se.buttonName)==="清空"){const oe=k.cloneDeep(se==null?void 0:se.content);for(const R in oe)oe[R]="";ee.value=(ve=ee.value)==null?void 0:ve.map(R=>({...R,value:""})),H("filter",oe),Ae.value=!1}s.value=!1},ll=()=>{var ve,oe;ee.value=(ve=ee.value)==null?void 0:ve.map(R=>({...R,value:""}));const se=(oe=ee.value)==null?void 0:oe.reduce((R,q)=>(R[q.label]=q.value,R),{});H("filter",se)};return l.onMounted(()=>{rl(P.columns)}),l.watch(()=>P.columns,()=>{rl(P.columns)},{deep:!0,immediate:!0}),(se,ve)=>{var re,Me,Ue,J;const oe=l.resolveComponent("el-icon"),R=l.resolveComponent("svg-icon"),q=l.resolveComponent("el-input"),Ne=l.resolveComponent("el-button"),Ke=l.resolveComponent("el-upload");return U.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",Nn,[l.createElementVNode("div",{class:l.normalizeClass(U.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(U.compName),7),l.createElementVNode("div",Bn,[l.createElementVNode("div",En,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var v,_e,z,te;return[l.createVNode(q,{modelValue:O.value,"onUpdate:modelValue":ve[1]||(ve[1]=ke=>O.value=ke),style:{"min-width":"80px"},placeholder:Ae.value?(z=(_e=(v=U.filterValues)==null?void 0:v.filter(ke=>ke))==null?void 0:_e.slice(0,3))==null?void 0:z.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:qe,disabled:((te=ee.value)==null?void 0:te.length)===0},{suffix:l.withCtx(()=>{var ke,Be;return[!O.value&&((Be=(ke=U.filterValues)==null?void 0:ke.filter(Oe=>Oe))!=null&&Be.join("/"))?(l.openBlock(),l.createBlock(oe,{key:0,style:{cursor:"pointer"},onClick:ll},{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=>s.value=!s.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(He.ssForm,{rowContents:ee.value,buttonValue:pe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:pe.value,isStartJustify:!1,onOnButtonClick:el},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),U.buttons&&((re=U.buttons)==null?void 0:re.length)>0?(l.openBlock(),l.createElementBlock("div",_n,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((Me=U.buttons)==null?void 0:Me.filter(v=>U.isDevMode||(v==null?void 0:v.label)!=="修改模板"),(v,_e)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:_e},[(v==null?void 0:v.type)==="upload"?(l.openBlock(),l.createBlock(Ke,{key:0,class:"upload-button-wrap","on-change":fe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!U.lockingPage},{default:l.withCtx(()=>[l.createVNode(Ne,{disabled:!!U.lockingPage,style:l.normalizeStyle({background:(v==null?void 0:v.background)??"var(--ssbutton-theme-bg)",color:(v==null?void 0:v.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v==null?void 0:v.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(v==null?void 0:v.type)==="popover"?(l.openBlock(),l.createBlock(He._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(v==null?void 0:v.type)==="popover"?(l.openBlock(),l.createBlock(Ne,{key:0,disabled:!!U.lockingPage,style:l.normalizeStyle({background:(v==null?void 0:v.background)??"var(--ssbutton-theme-bg)",color:(v==null?void 0:v.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v==null?void 0:v.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(v==null?void 0:v.contents,z=>(l.openBlock(),l.createBlock(Ne,{key:z==null?void 0:z.label,disabled:!!U.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:te=>Qe(z==null?void 0:z.label)},{default:l.withCtx(()=>{var te,ke;return[l.createTextVNode(l.toDisplayString(z==null?void 0:z.label),1),(te=z==null?void 0:z.label)!=null&&te.includes("选中")?(l.openBlock(),l.createElementBlock("span",Un,"("+l.toDisplayString(U.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=z==null?void 0:z.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",On,"("+l.toDisplayString(U.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),v!=null&&v.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Ne,{key:2,id:"themeButton",disabled:!!U.lockingPage,style:l.normalizeStyle({background:(v==null?void 0:v.background)??"var(--ssbutton-theme-bg)",color:(v==null?void 0:v.color)??"var(--ssbutton-theme-color)"}),onClick:z=>Qe(v==null?void 0:v.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v==null?void 0:v.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:s.value},{reference:l.withCtx(()=>{var v,_e,z,te;return[l.createVNode(q,{modelValue:O.value,"onUpdate:modelValue":ve[3]||(ve[3]=ke=>O.value=ke),style:{"min-width":"80px"},placeholder:Ae.value?(z=(_e=(v=U.filterValues)==null?void 0:v.filter(ke=>ke))==null?void 0:_e.slice(0,3))==null?void 0:z.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:qe,disabled:((te=ee.value)==null?void 0:te.length)===0},{suffix:l.withCtx(()=>{var ke,Be;return[!O.value&&((Be=(ke=U.filterValues)==null?void 0:ke.filter(Oe=>Oe))!=null&&Be.join("/"))?(l.openBlock(),l.createBlock(oe,{key:0,style:{cursor:"pointer"},onClick:ll},{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=>s.value=!s.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(He.ssForm,{rowContents:ee.value,buttonValue:pe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:pe.value,isStartJustify:!1,onOnButtonClick:el},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),U.buttons&&((Ue=U.buttons)==null?void 0:Ue.length)>0?(l.openBlock(),l.createElementBlock("div",Vn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((J=U.buttons)==null?void 0:J.filter(v=>U.isDevMode||(v==null?void 0:v.label)!=="修改模板"),(v,_e)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:_e},[(v==null?void 0:v.type)==="upload"?(l.openBlock(),l.createBlock(Ke,{key:0,class:"upload-button-wrap","on-change":fe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(Ne,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var z;return[l.createVNode(R,{name:(z=Se==null?void 0:Se.find(te=>(te==null?void 0:te.label)===(v==null?void 0:v.label)))==null?void 0:z.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(v==null?void 0:v.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(v==null?void 0:v.type)==="popover"?(l.openBlock(),l.createBlock(He._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(v==null?void 0:v.type)==="popover"?(l.openBlock(),l.createBlock(Ne,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var z;return[l.createVNode(R,{name:(z=Se==null?void 0:Se.find(te=>(te==null?void 0:te.label)===(v==null?void 0:v.label)))==null?void 0:z.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(v==null?void 0:v.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",$n,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v==null?void 0:v.contents,z=>(l.openBlock(),l.createBlock(Ne,{key:z==null?void 0:z.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:te=>Qe(z==null?void 0:z.label)},{default:l.withCtx(()=>{var te,ke;return[l.createTextVNode(l.toDisplayString(z==null?void 0:z.label),1),(te=z==null?void 0:z.label)!=null&&te.includes("选中")?(l.openBlock(),l.createElementBlock("span",Fn,"("+l.toDisplayString(U.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=z==null?void 0:z.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Kn,"("+l.toDisplayString(U.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),v!=null&&v.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Ne,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(v==null?void 0:v.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:z=>Qe(v==null?void 0:v.label)},{icon:l.withCtx(()=>{var z;return[l.createVNode(R,{name:(z=Se==null?void 0:Se.find(te=>(te==null?void 0:te.label)===(v==null?void 0:v.label)))==null?void 0:z.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(v==null?void 0:v.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},qn=$l._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(U,{emit:I}){const H=U,P=I,O=ee=>{P("buttonClick",ee)},s=ee=>{var pe;return ee!=null&&ee.includes("删除")?((pe=H.selectTableItems)==null?void 0:pe.length)>0?"warning-active-type":"warning-type":"default-type"};return(ee,pe)=>{const Se=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(U.buttons,fe=>(l.openBlock(),l.createBlock(Se,{key:fe==null?void 0:fe.label,disabled:!!U.lockingPage,class:l.normalizeClass(s(fe==null?void 0:fe.label)),onClick:qe=>O(fe==null?void 0:fe.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(fe==null?void 0:fe.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Jn=$l._export_sfc(Rn,[["__scopeId","data-v-70b12973"]]),ka=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(U){this.selectArray=U},setSelectString(U){this.selectString=U}}}),Wn={class:"calculator-content"},Gn={class:"calculator-child"},Hn={class:"calculator-child"},Qn=l.defineComponent({__name:"calculator",setup(U){const I=l.ref(),H=l.ref();return l.onMounted(()=>{I.value=[{type:"Upload",label:"输入",name:"input"}],H.value=[{type:"Upload",label:"输出",name:"output"}]}),(P,O)=>(l.openBlock(),l.createElementBlock("div",Wn,[l.createElementVNode("div",Gn,[l.createVNode(He.ssForm,{rowContents:I.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Hn,[l.createVNode(He.ssForm,{rowContents:H.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Xn=$l._export_sfc(Qn,[["__scopeId","data-v-73db0fe7"]]),ma=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(U){this.selectIndex=U},setSelectMenu(U){this.selectMenu=U},setSelectTitle(U){this.selectTitle=U}}}),Ql=(U,I)=>{let H=U,P=I;return Array.isArray(H)&&(H=H==null?void 0:H.map((O,s)=>{if(Array.isArray(O)){let ee={};return O=O==null?void 0:O.forEach((pe,Se)=>{var fe;(fe=P==null?void 0:P[Se])!=null&&fe.prop?ee[P[Se].prop]=pe:Array.isArray(pe)&&(ee.children=Ql(pe,P))}),Object.assign(ee,{id:s})}else return O})),H},Sa=(U,I,H)=>{let P=U,O=I;return P=P==null?void 0:P.map((s,ee)=>{var pe,Se;return!Array.isArray(s)||!((pe=O==null?void 0:O[ee])!=null&&pe.label)&&!H||(s.unshift(((Se=O==null?void 0:O[ee])==null?void 0:Se.label)??""),s.some(fe=>Array.isArray(fe))&&(s=s==null?void 0:s.map(fe=>{var qe;return Array.isArray(fe)&&(fe=Sa(fe,(qe=O==null?void 0:O[ee])==null?void 0:qe.children,H)),fe}))),s}),P},Yn=(U,I,H)=>{if(I==="")return U==null?void 0:U.filter(P=>(P==null?void 0:P.id)!==H);{const P=I.split("-");return Zn(U,P,H)}},Zn=(U,I,H)=>{let P=U,O=I;return(O==null?void 0:O.length)===0?P=P==null?void 0:P.filter(s=>s.id!==H):P=P==null?void 0:P.map(s=>(s.id.toString()===(O==null?void 0:O[0])&&(O==null||O.shift(),s=Ca(s,O,H)),s)),P},Ca=(U,I,H)=>{var s,ee;let P=U,O=I;return(O==null?void 0:O.length)===0?P.children=(s=P.children)==null?void 0:s.filter(pe=>pe.id!==H):P.children=(ee=P.children)==null?void 0:ee.map(pe=>(pe.id.toString()===(O==null?void 0:O[0])&&(O==null||O.shift(),pe=Ca(pe,O,H)),pe)),P},In=(U,I,H)=>{if(I==="")return H;{const P=I.split("-");return er(U,P,H)}},er=(U,I,H)=>{let P=U,O=I;return(O==null?void 0:O.length)===0?P=H:P=P==null?void 0:P.map(s=>(s.id.toString()===(O==null?void 0:O[0])&&(O==null||O.shift(),s=xa(s,O,H)),s)),P},xa=(U,I,H)=>{var s;let P=U,O=I;return(O==null?void 0:O.length)===0?P.children=H:P.children=(s=P.children)==null?void 0:s.map(ee=>(ee.id.toString()===(O==null?void 0:O[0])&&(O==null||O.shift(),ee=xa(ee,O,H)),ee)),P},Da=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(U){this.objUrl=U},setBlobUrls(U){this.blobUrls=U}}}),Xl=async(U,I)=>{var ee,pe,Se,fe,qe,Qe,rl,Ae,el,ll,se,ve,oe,R,q,Ne,Ke;let H=(pe=(ee=k.cloneDeep(U))==null?void 0:ee.optionUrl)==null?void 0:pe.menuSelect,P=[];H==null||H.forEach(re=>{});let O="",s=await ne.menuToParent(H);if(s==null||s.forEach(re=>{var Me,Ue,J,v;(re==null?void 0:re.name)===(((v=(J=(Ue=(Me=k.cloneDeep(U))==null?void 0:Me.optionUrl)==null?void 0:Ue.groupSelect)==null?void 0:J[0])==null?void 0:v.replaceAll("'",""))??"")&&(O=re==null?void 0:re.id)}),I){O=I;const re=await k.getInsofDataApi({id:O}),Me=(Qe=(qe=(fe=(Se=re==null?void 0:re.data)==null?void 0:Se.result)==null?void 0:fe[0])==null?void 0:qe.key)==null?void 0:Qe.pageKey;s=await ne.getItemData(Me,sessionStorage.getItem("systemKey"),"")}if(O!==""){let re;I?re=(rl=s==null?void 0:s.find(J=>(J==null?void 0:J.id)===I))==null?void 0:rl.compData:re=(Ae=s==null?void 0:s.find(J=>{var v,_e,z,te;return(J==null?void 0:J.name)===(((_e=(v=U==null?void 0:U.groupSelect)==null?void 0:v.split(":"))==null?void 0:_e[0])||((te=(z=U==null?void 0:U.optionUrl)==null?void 0:z.groupSelect)==null?void 0:te[0]))}))==null?void 0:Ae.compData;let Me=(ll=(el=re==null?void 0:re.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:el.contents)==null?void 0:ll.map(J=>J==null?void 0:J.label);(ve=(se=re==null?void 0:re.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:se.contents)!=null&&ve.every(J=>Array.isArray(J))&&(Me=(q=ne.getColumnChild((R=(oe=re==null?void 0:re.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:oe.contents)==null?void 0:R[0]))==null?void 0:q.map(J=>J==null?void 0:J.prop));let Ue=(Ke=(Ne=re==null?void 0:re.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:Ne.contents)==null?void 0:Ke.map(J=>(J=J==null?void 0:J.filter(v=>!(v!=null&&v.id)),J));Ue==null||Ue.forEach(J=>{P.push(ne.getValueToObjectValue(J,Me))})}return P},lr={class:"table-content"},ar={class:"menu-config-wrap"},nr=["onClick"],rr={key:0,class:"viewport-wrap"},or=["onClick"],tr={title:"选择显示列信息"},sr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ir=["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(U,{emit:I}){var ha;const H=l.ref([]),P=Da(k.pinia),O=l.ref(null),s=U,ee=l.ref(s==null?void 0:s.allowSelect),pe=l.ref((ha=s==null?void 0:s.config)==null?void 0:ha.showIndex),Se=l.ref(),fe=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),qe=ne.useOriginalState(k.pinia);let Qe="$R";const{originalPath:rl}=k.storeToRefs(qe),Ae=rl.value,el=l.ref(!1),ll=l.ref(!1),se=l.ref(!1),ve=l.reactive({column:{},status:!1,text:"合计"}),oe=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),R=I,q=l.ref([]),Ne=l.reactive({prop:"",order:null}),Ke=l.ref([]),re=l.ref(!1),Me=l.ref(!1),Ue=l.ref(null),{isUseBackdrop:J,initTrackFileType:v,getFileExtension:_e,setData:z,getFileInfo:te,getFilesInfo:ke}=ya.useThreeSystem(),Be=l.ref([]),Oe=l.ref(!1),cl=l.ref(),we=Vl.useMenuState(),{importLoading:xr,activeMenuPath:me,contentLoading:Dr,linkMenuInfo:Ta}=k.storeToRefs(we),Na=ne.useTableComp(k.pinia),xe=Vl.useModelComp(k.pinia),{extraContents:be,cacheUpdatingData:yl,tableViewContents:vl,tableLoading:Tr,pageMapState:dl,lockingPage:Nl}=k.storeToRefs(xe),Q=l.ref([]),Bl=l.ref([]),El=l.ref(new Map);l.ref(!1);const Xe=l.ref("");l.ref();const Al=l.ref(!0),pl=l.ref(0),Yl=l.ref(!0),Re=l.ref(""),Ye=l.ref(!1),Ba=l.ref({label:"查看三维模型"}),_l=l.ref(!1),Fl=l.ref(),ze=l.ref([]),ol=l.ref([]),wl=l.ref(!1),bl=l.ref([]),fl=l.ref([]),tl=l.ref([]),Ee=l.ref([]),Je=l.ref(),Le=l.ref(),Ea=ka(k.pinia),Ul=l.ref(),Kl=l.ref(0),Ol=ma(k.pinia),{selectIndex:Aa,selectMenu:Ie,selectTitle:zl}=k.storeToRefs(Ol),{selectString:sl}=k.storeToRefs(Ea),_a=k.useLoginState(k.pinia),{loginUserInfo:Ze}=k.storeToRefs(_a),wa=l.ref(720),We=l.ref(!1),Ll=l.ref(!1),Ge=l.ref([]),il=l.ref(),kl=l.ref(!0),Zl=l.ref(!0),ul=l.ref([]),Ua=l.inject("contentRef");l.provide("contentRef",Ua),l.watch(()=>{var e;return(e=Q.value)==null?void 0:e.length},e=>{oe.total=e}),l.watch(()=>vl.value,async()=>{var i,u,c,d,g,y,E,w,f,T,x,D,V,L,$,o,m,h;if(((i=vl.value)==null?void 0:i.length)===0||!((u=s==null?void 0:s.itemData)!=null&&u.find(N=>(N==null?void 0:N.key)==="columnPath"))||!((c=s==null?void 0:s.itemData)!=null&&c.find(N=>(N==null?void 0:N.key)==="pageColumn")))return;let e=(f=(w=(E=(y=(g=(d=s==null?void 0:s.itemData)==null?void 0:d.find(N=>(N==null?void 0:N.key)==="pageColumn"))==null?void 0:g.contents)==null?void 0:y.split("["))==null?void 0:E[1])==null?void 0:w.split("]"))==null?void 0:f[0],a=((V=(D=(x=(T=s==null?void 0:s.itemData)==null?void 0:T.find(N=>(N==null?void 0:N.key)==="pageColumn"))==null?void 0:x.contents)==null?void 0:D.split("["))==null?void 0:V[0])+(($=(L=vl.value)==null?void 0:L.find(N=>(N==null?void 0:N.key)===e))==null?void 0:$.value),r=((m=(o=s==null?void 0:s.itemData)==null?void 0:o.find(N=>(N==null?void 0:N.key)==="pageGroup"))==null?void 0:m.contents)??"",n=await ne.getItemData(a,sessionStorage.getItem("systemKey"),""),t=(h=n==null?void 0:n.find(N=>(N==null?void 0:N.name)===(r===""?s==null?void 0:s.compName:r)))==null?void 0:h.compData;fa(t,s.allMapContents)},{deep:!0});const Oa=async(e,a)=>{var r,n,t,i,u;try{const c=await k.getInsofDataApi({id:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index)});let d;((r=c==null?void 0:c.data)==null?void 0:r.code)===200&&(d=((t=(n=c==null?void 0:c.data)==null?void 0:n.result)==null?void 0:t[0])||null);const g={type:"data",pageKey:s!=null&&s.parentTableId?(i=d==null?void 0:d.key)==null?void 0:i.pageKey:me.value,tableId:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index),systemKey:sessionStorage.getItem("systemKey")},y=a==null?void 0:a.map(f=>{const T=Object.keys(f),x={};return T.forEach((D,V)=>{x[e[V]]=f[D]}),x}),E=y==null?void 0:y.map(f=>({key:g,value:{tableData:f}})),w=await k.batchAddInsofDataApi({dataList:E});((u=w==null?void 0:w.data)==null?void 0:u.code)===200?(xe.setRefreshCurStructure(!0),k.ElMessage.success("导入数据成功")):k.ElMessage.error("导入数据响应失败")}catch(c){throw k.ElMessage.error("导入数据处理失败"),new Error(c)}},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"}}),t=new Blob([n.data],{type:"application/octet-stream;charset=UTF-8"});let i=URL.createObjectURL(t);cl.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:i}],Oe.value=!0}};l.onBeforeUnmount(()=>{Zl.value=!1;let e=Kl.value;Kl.value=e+1});const Il=l.computed(()=>{var n,t;const e=(oe.currentPage-1)*oe.pageSize,a=e+oe.pageSize,r=(n=q.value)==null?void 0:n.find(i=>{var u;return(i==null?void 0:i.sortable)&&((u=i==null?void 0:i.label)==null?void 0:u.includes("时间"))});return r&&(Ne.order="descending",Ne.prop=r==null?void 0:r.prop),R("getSliceContLength",oe),(t=Q.value)==null?void 0:t.slice(e,a)}),ja=e=>{oe.currentPage=e,R("getSliceContLength",oe)},Ma=e=>{var a;oe.pageSize=e,e*oe.currentPage>((a=Q.value)==null?void 0:a.length)&&(oe.currentPage=1,oe.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),R("getSliceContLength",oe)},Pa=(e,a)=>{var u,c;const r=(c=(u=q.value)==null?void 0:u.map(d=>d==null?void 0:d.prop))==null?void 0:c.filter(d=>d!=="operate");let n;const t=(e==null?void 0:e.length)===(r==null?void 0:r.length);if(e!=null&&e.includes("序号"))return k.ElMessage.error("导入的数据不需要包含序号列");if(n=t?e:e.slice(0,r==null?void 0:r.length),!(n==null?void 0:n.every(d=>r==null?void 0:r.find(g=>d===g))))return k.ElMessage.error("导入的数据表头不匹配");Oa(n,a)},Va=(e,a)=>{var r;xe.setRefreshCurStructure(!1),((r=q.value)==null?void 0:r.length)===0||Pa(e,a)},$a=(e,a,r,n)=>{const t=[],i=[],u=g=>Object.keys(g).length;for(const g in e)if(e[g]!==void 0){const y=e[g],E=[];for(const[w,f]of Object.entries(y))E.push(f),i.length<u(y)&&i.push(w);t.push(E)}t.unshift(i);const c=ne.utils.aoa_to_sheet(t),d=ne.utils.book_new();ne.utils.book_append_sheet(d,c,n),ne.writeFileSync(d,`${a}.xlsx`),Ge.value=[]},jl=async(e,a,r,n=!1,t)=>{var i,u,c,d,g,y,E,w;try{xe.setRefreshCurStructure(!1);const f=await k.getInsofDataApi({id:s==null?void 0:s.index});if(((i=f==null?void 0:f.data)==null?void 0:i.code)===200){let T=(g=(d=(c=(u=f==null?void 0:f.data)==null?void 0:u.result)==null?void 0:c[0])==null?void 0:d.value)==null?void 0:g.pageData;n?T={...T,compData:(E=T==null?void 0:T.compData)==null?void 0:E.map(D=>{var V;return(D==null?void 0:D.key)==="header"?{...D,contents:(V=D==null?void 0:D.contents)==null?void 0:V.map(L=>({...L,[e]:r}))}:D})}:T={...T,compData:(y=T==null?void 0:T.compData)==null?void 0:y.map(D=>{var V,L;return(D==null?void 0:D.key)==="header"?{...D,contents:(V=D==null?void 0:D.contents)==null?void 0:V.map($=>($==null?void 0:$.prop)===(a==null?void 0:a.prop)?{...$,[e]:r}:$)}:(D==null?void 0:D.key)==="tableToForm"&&t?{...D,contents:(L=D==null?void 0:D.contents)==null?void 0:L.map($=>($==null?void 0:$.prop)===(a==null?void 0:a.prop)?{...$,[t]:r}:$)}:D})};const x=await k.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:T}});((w=x==null?void 0:x.data)==null?void 0:w.code)===200?(k.ElMessage.success("编辑成功"),xe.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(f){k.ElMessage.error(f)}},Fa=async(e,a)=>{await jl("label",a,e)},Ka=async(e,a)=>{await jl("columnType",a,e,!1,"type")},za=()=>{yl.value?We.value=!1:ga()},qa=e=>{Ge.value=e},Ra=(e,a)=>{il.value===a?kl.value=!1:kl.value=!0,il.value=a==null?void 0:a.changeProp},ml=l.computed(()=>{var r,n,t;const e=(r=q.value)==null?void 0:r.some(i=>i==null?void 0:i.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(t=(n=q.value)==null?void 0:n.filter(i=>(i==null?void 0:i.label)!=="操作"))==null?void 0:t.map(i=>({...i,filterable:!!(i!=null&&i.filterable),showSummary:!!(i!=null&&i.showSummary),operable:!!(i!=null&&i.operable)}))}),Ja=async(e,a,r)=>{const n=k.cloneDeep(q.value);await l.nextTick(),q.value=n==null?void 0:n.map(t=>(r==null?void 0:r.label)===(t==null?void 0:t.label)?{...t,[a]:e}:t),await jl(a,r,e)},ql=async(e,a)=>{await jl(a,null,e,!0)},Wa=()=>{Ye.value=!1},Ga=e=>{R("clickTrigger",e)},ea=async e=>{var i,u,c,d,g,y,E,w,f,T,x,D,V,L,$;const a=e==null?void 0:e.row,r=e==null?void 0:e.rowData,n=e==null?void 0:e.suffix;if((i=a==null?void 0:a.toString())!=null&&i.includes(".urdf")||e!=null&&e.isUrdf||n!=null&&n.includes(".urdf")){if(a.includes(",")){k.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(J(a)){const m={files:[te(a)],data:{}};z(m);return}bl.value=[{url:a,extension:_e(a)}],Me.value=!0,Ue.value={data:k.cloneDeep(r)},re.value=!0;return}let t=[];if((u=a==null?void 0:a.toString())!=null&&u.includes(".stl")||(c=a==null?void 0:a.toString())!=null&&c.includes(".STL")||(d=a==null?void 0:a.toString())!=null&&d.includes(".obj")||(g=a==null?void 0:a.toString())!=null&&g.includes(".mtl")){const o=(y=a==null?void 0:a.toString())==null?void 0:y.split(","),m=ke(o),h=m==null?void 0:m[0];if(J(h==null?void 0:h.extension)){z({files:m,data:{}});return}bl.value=m,Me.value=!1,re.value=!0;return}if((E=a==null?void 0:a.toString())!=null&&E.includes(".stl")||(w=a==null?void 0:a.toString())!=null&&w.includes(".STL")||(f=a==null?void 0:a.toString())!=null&&f.includes(".obj")||(T=a==null?void 0:a.toString())!=null&&T.includes(".mtl")||n!=null&&n.includes(".stl")||n!=null&&n.includes(".STL")||n!=null&&n.includes(".obj")||n!=null&&n.includes(".mtl")){let o,m=[],h={};if(Array.isArray(a)?o=a:o=a==null?void 0:a.split(","),o==null||o.forEach(N=>{N.includes(".mtl")?m.push(N):h.blob=h.blob?h.blob+","+N:N}),(m==null?void 0:m.length)>0&&(h.mtlBlobs=m),n&&(h.suffix=n),(D=(x=Object.values(h))==null?void 0:x[0])!=null&&D.includes("http:"))t.push(h);else{const N=new Blob([h.blob],{type:"application/octet-stream;charset=UTF-8"});let C=URL.createObjectURL(N),W="";(V=a==null?void 0:a.split("/"))==null||V.forEach((j,le)=>{var A;le===((A=a==null?void 0:a.split("/"))==null?void 0:A.length)-1&&(W=j)}),(L=h.blob)!=null&&L.includes(".stl")&&(W=(W==null?void 0:W.replaceAll(">",""))+".urdf"),cl.value=[{name:W,blobUrl:C}],Oe.value=!0}}else{const o=await k.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),m=new Blob([o.data],{type:"application/octet-stream;charset=UTF-8"});let h=URL.createObjectURL(m),N="";if(($=a==null?void 0:a.split("/"))==null||$.forEach((C,W)=>{var j;W===((j=a==null?void 0:a.split("/"))==null?void 0:j.length)-1&&(N=C)}),J(N)){const C=v(N),W=te(a);z({files:[W],data:{trackFileType:C}});return}cl.value=[{name:N,blobUrl:h}],Oe.value=!0}(t==null?void 0:t.length)>0&&P.setBlobUrls(t)},Ml=e=>{var n,t,i,u;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(u=(n=e==null?void 0:e.url)==null?void 0:n.split("."))==null?void 0:u[((i=(t=e==null?void 0:e.url)==null?void 0:t.split("."))==null?void 0:i.length)-1];return(e==null?void 0:e.name)+"."+a},Ha=async e=>{let a=null,r=null;if(e!=null&&e.downloadUrl){const t=await Rl(),i=He.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),u=await k.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:t,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{i.close()}),c=new Blob([u.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(c),r=e==null?void 0:e.name}else{const t=await ne.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(t.data),r=Ml(e)):a=e==null?void 0:e.url}if(J(a)){const t={row:`${a}`,suffix:_e(r)};ea(t);return}const n={name:r,blobUrl:a};cl.value=[n],Oe.value=!0},Qa=async e=>{let a=null,r=null;if(e!=null&&e.downloadUrl){const i=await Rl(),u=await k.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:i,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),c=new Blob([u.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(c),r=e==null?void 0:e.name}else{const i=await ne.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(i.data),r=Ml(e)}const n={name:r,blobUrl:a},t=document.createElement("a");t.href=n.blobUrl,t.download=n.name,t.style.display="none",document.body.appendChild(t),t.click(),setTimeout(()=>{document.body.removeChild(t)},100)},Xa=(e,a)=>{var r;if(Object.values(a).length!==0)return Object.values(a).find(n=>{var t,i,u;return((t=n==null?void 0:n.toString())==null?void 0:t.includes(".txt"))||((i=n==null?void 0:n.toString())==null?void 0:i.includes(".cpt"))||((u=n==null?void 0:n.toString())==null?void 0:u.includes(".obj"))})?[...e,Ba.value]:(r=s==null?void 0:s.config)!=null&&r.allowMove?[...e,{label:"迁移"}]:e},Ya=(e,a={})=>[...e==null?void 0:e.values()].filter(r=>Object.keys(a).every(n=>{var u;const t=r[n],i=(u=a[n])==null?void 0:u.toLowerCase();return i&&t&&typeof t=="string"?t.toLowerCase().includes(i):!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(t=>!t)))return Q.value=Bl.value;if(r){Q.value=[...El.value.values()].filter(t=>Object.values(t).some(i=>typeof i=="string"?i==null?void 0:i.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}Q.value=Ya(El.value,e),xe.setTableLoading(!1)}},Ia=async e=>{var u,c,d,g,y,E,w,f,T,x,D,V,L,$,o;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((u=Ze.value)==null?void 0:u.account)||((c=Ze.value)==null?void 0:c.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),r=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((d=Ze.value)==null?void 0:d.account)||((g=Ze.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let n=(E=(y=a==null?void 0:a.data)==null?void 0:y.result)==null?void 0:E.map(m=>m==null?void 0:m.id);const t=(f=(w=r==null?void 0:r.data)==null?void 0:w.result)==null?void 0:f.map(m=>m==null?void 0:m.id);n=[...k.cloneDeep(n),...t],(n==null?void 0:n.length)>0&&(n!=null&&n.every(m=>m!==null&&m))&&await k.batchDeleteInsofDataApi({ids:n});let i=await ne.getItemData(me.value,sessionStorage.getItem("systemKey"),e.id);if(i=i==null?void 0:i.filter(m=>m.comp!=="methodButton"),i&&i.length>0){const m=!Array.isArray(zl.value)&&((T=zl.value)==null?void 0:T.key)!=="main"?[]:zl.value;m.push({key:Ie.value===""?(x=e==null?void 0:e.id)==null?void 0:x.toString():Ie.value+"-"+((D=e==null?void 0:e.id)==null?void 0:D.toString()),value:e[(V=Object.keys(e))==null?void 0:V.filter(h=>h!=="index"&&h!=="id")[0]]}),Ol.setSelectMenu(Ie.value===""?(L=e==null?void 0:e.id)==null?void 0:L.toString():Ie.value+"-"+(($=e==null?void 0:e.id)==null?void 0:$.toString())),Ol.setSelectTitle(m),Ol.setSelectIndex((o=e==null?void 0:e.id)==null?void 0:o.toString()),R("pageChange",i)}},aa=async(e,a,r,n)=>{var t,i,u,c,d,g;if(R("clickMainKey",r),(n==null?void 0:n.isExistChild)===!0){let y=(t=n==null?void 0:n.columnType)==null?void 0:t.prop,E=n==null?void 0:n.data;if(ul.value=await ne.getItemData(me.value,sessionStorage.getItem("systemKey"),""),!ul.value){let f=(c=(u=(i=me.value)==null?void 0:i.split("/"))==null?void 0:u.filter((T,x)=>{var D,V;return x!==((V=(D=me.value)==null?void 0:D.split("/"))==null?void 0:V.length)-1}))==null?void 0:c.join("/");ul.value=await ne.getItemData(f,sessionStorage.getItem("systemKey"),"")}let w=(d=ul.value)==null?void 0:d.filter(f=>(f==null?void 0:f.name)===y);ul.value=w==null?void 0:w.map(f=>{var T;return f.compData=(T=f.compData)==null?void 0:T.map(x=>{var D,V;return(x==null?void 0:x.key)==="tableContents"&&(D=x==null?void 0:x.contents)!=null&&D.every(L=>L==null?void 0:L.find($=>$==null?void 0:$.id))&&(x.contents=(V=x==null?void 0:x.contents)==null?void 0:V.filter(L=>(L==null?void 0:L[1])===E)),x}),f}),R("routeUrl",ul.value,{isEdit:!0,routerUrl:me.value});return}if((n==null?void 0:n.data)==="查看"&&(e!=null&&e.every(y=>(y==null?void 0:y.url)&&(y==null?void 0:y.name)))){let y=k.cloneDeep(e);y=await((g=k.cloneDeep(y))==null?void 0:g.map(async w=>{var x,D,V,L;const f=await ne.downloadAvatarApi({url:w==null?void 0:w.url});let T=URL.createObjectURL(f.data);return{name:(w==null?void 0:w.name)+"."+((L=(x=w==null?void 0:w.url)==null?void 0:x.split("."))==null?void 0:L[((V=(D=w==null?void 0:w.url)==null?void 0:D.split("."))==null?void 0:V.length)-1]),blobUrl:T}}));let E=await Promise.all(y);cl.value=E,Oe.value=!0}k.cloneDeep(q.value),(n==null?void 0:n.isMainKey)===!0&&(we.setActiveMenuPath(void 0),xe.setRouteToChildPath(void 0),xe.setFixMenuStatus(!0),we.setActiveMenuPath(k.cloneDeep(me).value+"/"+(n==null?void 0:n.data)))},en=()=>{Oe.value=!1},ln=e=>{R("rowClick",e)};l.watch(()=>s.changedContent,()=>{var r,n;if(!s.changedContent)return;let e=(r=Q.value)==null?void 0:r.map(t=>{var i;return t.id===((i=s.changedContent)==null?void 0:i.id)&&(t={...s.changedContent,id:s.changedContent.newId?s.changedContent.newId:s.changedContent.id},delete t.newId),t});const a=(n=s.itemData)==null?void 0:n.map(t=>((t==null?void 0:t.key)==="tableContents"&&(t.contents=e),t));Q.value=e,R("contentChange",{contents:a,index:s.index}),R("change",{content:e,index:s==null?void 0:s.index,buttonName:"",id:s==null?void 0:s.index})},{deep:!0,immediate:!0});const an=()=>{},nn=async()=>{const e=me.value,a=sessionStorage.getItem("systemKey"),r=await ne.getItemData(e,a,""),n=(r==null?void 0:r.find(c=>(c==null?void 0:c.name)==="方法明细"))||(r==null?void 0:r[0]),t=(n==null?void 0:n.compData)||[],i=t==null?void 0:t.find(c=>{const d=c==null?void 0:c.key;return d==="formContent"||d==="tableContents"});return i==null?void 0:i.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(t=>(we.setImportLoading(!1),Promise.reject(t))),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 L,$,o,m,h,N,C,W;we.setImportLoading(!0),xe.setFreshContent(!1);let n=await nn().catch(j=>(we.setImportLoading(!1),Promise.reject(j)));n=n==null?void 0:n.filter(j=>{var le;return((le=j==null?void 0:j.find(A=>A==null?void 0:A.id))==null?void 0:le.id)===(a==null?void 0:a.id)});let t=ne.getEqualChild([(L=q.value)==null?void 0:L.filter(j=>(j==null?void 0:j.label)!=="操作")]);const i=(o=($=ne.tableToForm(n,t))==null?void 0:$[0])==null?void 0:o.find(j=>{const le=j==null?void 0:j.key;return le==="算法体"||le==="方法体"}),u=i==null?void 0:i.value;if(!u){console.log("未搜索到isMain, 缺少算法执行接口"),we.setImportLoading(!1);return}const c=q.value?ne.getEqualChild([q.value]):[],d=c.find(j=>{const le=j==null?void 0:j.prop;return le==="输入"||le==="输入数据.输入1"||le==="样本输入数据"}),g=d==null?void 0:d.prop;let y=a==null?void 0:a[g];const E=await Rl().catch(j=>(we.setImportLoading(!1),Promise.reject(j))),w=await rn(u,{token:E,inputData:y}).catch(j=>(we.setImportLoading(!1),Promise.reject(j))),f=(m=w==null?void 0:w.data)==null?void 0:m.data,T=c.find(j=>(j==null?void 0:j.prop)==="输出数据.输出1"),x=T==null?void 0:T.prop;let D=[],V=[];if(((h=Object.values(f))==null?void 0:h.length)>0){let j=[];const le=new FormData,A=(N=on(f))==null?void 0:N.map(async b=>{var G,M;if(!Array.isArray(b)&&(b!=null&&b.includes("http"))){let B=await k.axios.get(b,{responseType:"blob"}),Y=(M=b==null?void 0:b.split("/"))==null?void 0:M[((G=b==null?void 0:b.split("/"))==null?void 0:G.length)-1];le.append("files",B.data,Y)}else j.push(b)});if(await Promise.all(A),!ne.isFormDataEmpty(le)){let b=await ne.uploadAmountApi(le),G=(W=(C=b==null?void 0:b.data)==null?void 0:C.result)==null?void 0:W.map(M=>{var B,Y,K,ae,S,X;return{name:(X=(S=(ae=(B=M==null?void 0:M.url)==null?void 0:B.split("/"))==null?void 0:ae[((K=(Y=M==null?void 0:M.url)==null?void 0:Y.split("/"))==null?void 0:K.length)-1])==null?void 0:S.split("."))==null?void 0:X[0],url:M==null?void 0:M.url}});j=[...j,...G]}let F={};for(let b in a)b!=="id"&&(F[b]=a[b]);F[x]=j,V.push({id:a==null?void 0:a.id,value:{tableData:F}})}(V==null?void 0:V.length)>0&&await k.batchUpdateInsofDataApi({dataList:V}),(D==null?void 0:D.length)>0&&await k.batchAddInsofDataApi({dataList:D}),xl(!0),we.setImportLoading(!1),xe.setFreshContent(!0)},na=(e,a)=>(e=e==null?void 0:e.map(r=>{var n,t;return r!=null&&r.children&&((n=r.children)!=null&&n.find(i=>i.id===(a==null?void 0:a.id))?r.children=(t=r.children)==null?void 0:t.filter(i=>(i==null?void 0:i.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:s==null?void 0:s.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(e,a,r)=>{a===(s==null?void 0:s.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,!(!(s!=null&&s.index)||!((a=De.to)!=null&&a.groupName))&&(s==null?void 0:s.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,t,i,u,c,d,g,y,E,w,f,T,x,D,V;if(Xe.value="",wl.value=!0,Al.value=!0,R("onButtonClick",e,a),e==="删除")Vl.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var L,$;(L=Q.value)!=null&&L.find(o=>(o==null?void 0:o.id)===(a==null?void 0:a.id))?Q.value=($=k.cloneDeep(Q.value))==null?void 0:$.filter(o=>(o==null?void 0:o.id)!==(a==null?void 0:a.id)):Q.value=na(k.cloneDeep(Q.value),a),Yn(Ul.value,Ie.value,a==null?void 0:a.id),xe.setTableLoading(s==null?void 0:s.index),R("change",{content:Q.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:q.value})});else if(e==="批量删除"){if(((n=Ge.value)==null?void 0:n.length)===0)return k.ElMessage.warning("请先勾选操作的数据");Vl.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var $,o;const L=($=Ge.value)==null?void 0:$.map(m=>m.id);Q.value=(o=k.cloneDeep(Q.value))==null?void 0:o.filter(m=>!(L!=null&&L.includes(m.id))),xe.setTableLoading(s==null?void 0:s.index),R("change",{content:Q.value,singleContent:null,selectItems:Ge.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:q.value})})}else if(e==="复制新增"){Re.value="新增";const L=k.cloneDeep(a),$=(t=q.value)==null?void 0:t.find(h=>h==null?void 0:h.isMainKey),o=$||((i=q.value)==null?void 0:i[0]),m=(u=tl.value)==null?void 0:u.find(h=>(h==null?void 0:h.label)==="新建");await oa(!0,m,{data:L,firstCol:o})}else if(e==="新增")Re.value="新增",Cl(""),Ye.value=!0;else if(e==="编辑")Re.value="编辑",Cl(a),Ye.value=!0;else if(e==="查看")Re.value="查看",Cl(a),wl.value=!1,Al.value=!1,Ye.value=!0;else if(e==="查看三维模型"){const L={};for(let o in a)o!=="id"&&(L[o]=a[o]);let $=(c=Object.values(L))==null?void 0:c[1];Na.setTableShowThree($)}else if(((d=r==null?void 0:r.extra)==null?void 0:d.type)==="modelExample")Re.value=e,_l.value=!0;else if(e==="新建"){let L=dl.value,$=[];for(let C in L)C!=null&&C.includes(`loading${((g=Ze.value)==null?void 0:g.account)||((y=Ze.value)==null?void 0:y.账号)}`)&&($=[...$,...C]);let o=[];for(let C in L)C!=null&&C.includes(`updateLoading${((E=Ze.value)==null?void 0:E.account)||((w=Ze.value)==null?void 0:w.账号)}`)&&(o=[...o,...C]);let m=$==null?void 0:$.map(C=>C==null?void 0:C.id);const h=o==null?void 0:o.map(C=>C==null?void 0:C.id);m=[...k.cloneDeep(m),...h],(m==null?void 0:m.length)>0&&(m!=null&&m.every(C=>C!==null&&C))&&await k.batchDeleteInsofDataApi({ids:m});const N=(f=tl.value)==null?void 0:f.find(C=>(C==null?void 0:C.label)==="新建");await oa(!1,N)}else if(e==="修改模板"){let L=k.cloneDeep(me).value;xe.setRouteToChildPath(L),we.setActiveMenuPath(L+Ae)}else if(e==="执行")tn(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((T=Ge.value)==null?void 0:T.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((x=Q.value)==null?void 0:x.length)===0)return k.ElMessage.warning("暂无数据导出");const L=(V=(D=q.value)==null?void 0:D.map(o=>o==null?void 0:o.label))==null?void 0:V.filter(o=>o!=="操作"),$=e==="导出全部"?k.cloneDeep(Q.value):k.cloneDeep(Ge.value);$==null||$.forEach(o=>{o==null||delete o.id}),$a($,s==null?void 0:s.compName,L,s==null?void 0:s.compName)}else e==="迁移"&&(De.selectRow=a,De.show=!0)},cn=async e=>{var r,n,t,i,u,c;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)&&((i=(t=a==null?void 0:a.data)==null?void 0:t.result)==null?void 0:i.length)>0?(c=(u=a==null?void 0:a.data)==null?void 0:u.result)==null?void 0:c.map(d=>{var g;return{id:d==null?void 0:d.id,...(g=d==null?void 0:d.value)==null?void 0:g.pageData}}):[]},dn=async(e,a)=>{var r,n,t,i,u,c,d,g,y,E,w,f,T,x,D,V,L,$,o,m;try{let h,N;const C=(r=dl.value[me.value+Ae])==null?void 0:r.filter(M=>{var B;return((B=M==null?void 0:M.key)==null?void 0:B.type)==="structureMethod"}),W=(n=dl.value[me.value+Ae])==null?void 0:n.filter(M=>{var B;return((B=M==null?void 0:M.key)==null?void 0:B.type)==="structure"}),j=C==null?void 0:C.find(M=>{var B,Y;return((Y=(B=M==null?void 0:M.value)==null?void 0:B.pageData)==null?void 0:Y.method)==="保存"});if(!j)return;const le=(c=(u=dl.value[(i=(t=j==null?void 0:j.value)==null?void 0:t.pageData)==null?void 0:i.path])==null?void 0:u.filter(M=>{var B;return((B=M==null?void 0:M.key)==null?void 0:B.type)==="data"}))==null?void 0:c.find(M=>{var B,Y,K,ae;return((Y=(B=M==null?void 0:M.value)==null?void 0:B.tableData)==null?void 0:Y.算法名称)===((ae=(K=j==null?void 0:j.value)==null?void 0:K.pageData)==null?void 0:ae.method)});if(!le)return;const A={buttonName:(g=(d=j==null?void 0:j.value)==null?void 0:d.pageData)==null?void 0:g.method,api:(E=(y=le==null?void 0:le.value)==null?void 0:y.tableData)==null?void 0:E.算法体,content:W==null?void 0:W.map(M=>{var B;return(B=M==null?void 0:M.value)==null?void 0:B.pageData}),extraContent:[],extraValues:(f=(w=j==null?void 0:j.value)==null?void 0:w.pageData)==null?void 0:f.data,methodName:(x=(T=j==null?void 0:j.value)==null?void 0:T.pageData)==null?void 0:x.path};if(!e)return;const F={...e,compData:(D=e==null?void 0:e.compData)==null?void 0:D.map(M=>{var B;return(M==null?void 0:M.key)==="formContent"?{...M,contents:(B=M==null?void 0:M.contents)==null?void 0:B.map(Y=>(Y==null?void 0:Y.prop)===a?{...Y,value:""}:Y)}:M})},b={key:{pageKey:me.value+Ae,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:F}},G=await k.axios.post(A.api,b,{headers:{"Content-Type":"application/json"}});return((V=G==null?void 0:G.data)==null?void 0:V.code)===200&&(h=($=(L=G==null?void 0:G.data)==null?void 0:L.result)==null?void 0:$.latestReportCode,N=(m=(o=G==null?void 0:G.data)==null?void 0:o.result)==null?void 0:m.status),{newMainKeyValue:h,newStatus:N}}catch(h){throw k.ElMessage.error(h),new Error(h)}},ra=(e,a,r,n)=>{var t;R("contentChange",{contents:(t=e==null?void 0:e.compData)==null?void 0:t.map(i=>{var u;return(i==null?void 0:i.key)==="formContent"?{...i,contents:(u=i==null?void 0:i.contents)==null?void 0:u.map(c=>(c==null?void 0:c.key)===a?{...c,value:r}:Sl.value&&(c==null?void 0:c.prop)===Sl.prop?{...c,value:Sl.value}:c)}:i}),index:e==null?void 0:e.id},n)},Sl=l.reactive({prop:"状态",value:""}),pn=l.ref(["系统自动生成信息","审批意见"]),fn=async(e,a,r)=>{var d,g;let n=e==null?void 0:e[a==null?void 0:a.prop],t=1,i,u;const c=k.cloneDeep(me).value+Ae+n;if(c){Sl.value="",i=(d=dl.value[c])==null?void 0:d.filter(w=>{var f;return((f=w==null?void 0:w.key)==null?void 0:f.type)==="structure"});const y=i==null?void 0:i.find(w=>{var f,T,x;return((x=(T=(f=w==null?void 0:w.value)==null?void 0:f.pageData)==null?void 0:T.comp)==null?void 0:x.toUpperCase())==="FORM"});u={...(g=y==null?void 0:y.value)==null?void 0:g.pageData,id:y==null?void 0:y.id};const E=await dn(u,a==null?void 0:a.prop);if(Sl.value=E==null?void 0:E.newStatus,E!=null&&E.newMainKeyValue)return E==null?void 0:E.newMainKeyValue}if(Q.value.some(y=>(y==null?void 0:y[a==null?void 0:a.prop])===n)){const y=n;for(;Q.value.some(E=>(E==null?void 0:E[a==null?void 0:a.prop])===`${y}(${t})`);)t++;n=`${y}(${t})`}return n},oa=async(e,a,r)=>{var u,c,d,g,y,E,w,f;let n,t;const i=await fn(r==null?void 0:r.data,r==null?void 0:r.firstCol);if(e?(n=k.cloneDeep(me).value+Ae+((g=r==null?void 0:r.data)==null?void 0:g[(d=r==null?void 0:r.firstCol)==null?void 0:d.prop]),t=k.cloneDeep(me).value+Ae+i):(n=k.cloneDeep(me).value+Ae,t=k.cloneDeep(n)+`loading${((u=Ze.value)==null?void 0:u.account)||((c=Ze.value)==null?void 0:c.账号)}`),a){const T=(E=(y=dl.value[t])==null?void 0:y.filter(x=>{var D;return((D=x==null?void 0:x.key)==null?void 0:D.parentTable)===""}))==null?void 0:E.map(x=>{var D;return{id:x==null?void 0:x.id,...(D=x==null?void 0:x.value)==null?void 0:D.pageData}});if((T==null?void 0:T.length)>0)if(e){const x=T==null?void 0:T.find(D=>{var V;return((V=D==null?void 0:D.comp)==null?void 0:V.toUpperCase())==="FORM"});x&&ra(x,(w=r==null?void 0:r.firstCol)==null?void 0:w.label,i,me.value)}else xe.setRouteToChildPath(k.cloneDeep(me).value),we.setActiveMenuPath(t);else if(await ne.loadingConstruct(n,t,null,null,e?pn.value:null),e){const x=await cn(t);if((x==null?void 0:x.length)>0){const D=x==null?void 0:x.find(V=>{var L;return((L=V==null?void 0:V.comp)==null?void 0:L.toUpperCase())==="FORM"});D&&ra(D,(f=r==null?void 0:r.firstCol)==null?void 0:f.label,i,me.value)}}else xe.setRouteToChildPath(k.cloneDeep(me).value),we.setActiveMenuPath(t)}else e?(Xe.value="",Le.value=r==null?void 0:r.data,xl(!0,r==null?void 0:r.firstCol,i)):(xe.setRouteToChildPath(k.cloneDeep(me).value),we.setActiveMenuPath(t))},gn=()=>{re.value=!1,bl.value=[],Me.value=!1},Cl=e=>{var u,c,d,g,y,E,w,f,T,x,D,V,L,$;const a=[];let r=[];for(let o in e)Array.isArray(e==null?void 0:e[o])&&r.push(o);Ke.value=k.cloneDeep(q.value),(c=ne.getColumnChild((u=k.cloneDeep(q.value))==null?void 0:u.filter(o=>(o==null?void 0:o.label)!=="操作")))==null||c.forEach((o,m)=>{var h;r.find(N=>N===(o==null?void 0:o.prop))||(o!=null&&o.formType&&((h=o==null?void 0:o.formType)==null?void 0:h.toUpperCase())==="SELECT"?a.push({label:(o==null?void 0:o.prop)||(o==null?void 0:o.label)||"",name:(o==null?void 0:o.prop)??"t"+m,prop:o==null?void 0:o.prop,type:!(o!=null&&o.formType)||(o==null?void 0:o.formType)===""?"Input":o==null?void 0:o.formType,value:(e==null?void 0:e[o==null?void 0:o.prop])??(o==null?void 0:o.value)??"",id:(o==null?void 0:o.id)??m,contents:(o==null?void 0:o.options)??[],width:1,isFormColHidden:o==null?void 0:o.isFormColHidden,disabled:o==null?void 0:o.disabled,optionUrl:{groupSelect:o==null?void 0:o.groupSelect,menuSelect:o==null?void 0:o.formMenuSelect,type:"Select",selectRelateType:o==null?void 0:o.selectRelateType,allSelectionContents:(o==null?void 0:o.allSelectionContents)??[],selectFilter:o==null?void 0:o.selectFilter}}):a.push({label:(o==null?void 0:o.prop)||(o==null?void 0:o.label)||"",prop:o==null?void 0:o.prop,name:(o==null?void 0:o.prop)??"t"+m,type:!(o!=null&&o.formType)||(o==null?void 0:o.formType)===""?"Input":o==null?void 0:o.formType,value:(e==null?void 0:e[o==null?void 0:o.prop])??(o==null?void 0:o.value)??"",id:(o==null?void 0:o.id)??m,contents:(o==null?void 0:o.options)??[],width:1,isFormColHidden:o==null?void 0:o.isFormColHidden,disabled:o==null?void 0:o.disabled}))}),e===""||!e||(Xe.value=(e==null?void 0:e.id)??"");let n=ne.getColumnChild((d=k.cloneDeep(q.value))==null?void 0:d.filter(o=>(o==null?void 0:o.label)!=="操作"));ze.value&&((g=ze.value)==null?void 0:g.length)>0&&(ze.value=(y=k.cloneDeep(ze).value)==null?void 0:y.map(o=>{var h;let m=(o==null?void 0:o.prop)||((h=n==null?void 0:n.find(N=>(N==null?void 0:N.label)===(o==null?void 0:o.label)))==null?void 0:h.prop);return m&&(o.value=e[m]),o})),Ee.value=ze.value&&((E=ze.value)==null?void 0:E.length)>0?ne.getTableFormToForm(ze.value):a;let t=[],i=(w=s.itemData)==null?void 0:w.filter(o=>(o==null?void 0:o.key)==="filterAllType");if((i==null?void 0:i.length)>0&&(t=(i==null?void 0:i.map(m=>m==null?void 0:m.value)).flat()),(t==null?void 0:t.length)>0){let o=t==null?void 0:t.find(m=>{var h;return(h=m==null?void 0:m.content)==null?void 0:h.includes("@Select")});if(o!=null&&o.content){let m=(x=(T=(f=o==null?void 0:o.content)==null?void 0:f.replace(":",Qe))==null?void 0:T.split(Qe))==null?void 0:x[1];if(((D=m==null?void 0:m.trim())==null?void 0:D.toUpperCase())==="MANUAL"){let h=(L=(V=s.itemData)==null?void 0:V.find(N=>(N==null?void 0:N.key)==="contentTableId"))==null?void 0:L.contents;Ee.value=($=Ee.value)==null?void 0:$.map((N,C)=>{var W;return C===0&&(N.type="Select",(W=N==null?void 0:N.optionUrl)!=null&&W.menuId?(N.optionUrl.menuId=h,N.optionUrl.menuFilter=t):N.optionUrl={menuId:h,menuFilter:t}),N})}}}},hn=()=>{var a;const e=(a=O.value)==null?void 0:a.$el;e&&ne.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:r=>{var u;const{oldIndex:n,newIndex:t}=r;if(n===t)return;const i=ml.value.splice(n,1)[0];ml.value.splice(t,0,i),q.value=(u=q.value)==null?void 0:u.slice().sort((c,d)=>{if(c.label==="操作")return 1;if(d.label==="操作")return-1;const g=ml.value.findIndex(E=>E.label===c.label),y=ml.value.findIndex(E=>E.label===d.label);return g-y})}})};l.onMounted(()=>{Fl.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(t=>{var i,u;if((t==null?void 0:t.id)===Xe.value){let c={};for(let d in t){let g=(i=a==null?void 0:a.find(y=>(y==null?void 0:y.prop)===d))==null?void 0:i.label;g?c[d]=(u=Le.value)==null?void 0:u[g]:c[d]=t[d]}t=Object.assign(c,Le.value),r=t}else{let c=Jl(t,a);t=c==null?void 0:c.contents,r=c==null?void 0:c.currentSelectContents}return t}),{contents:e,currentSelectContents:r}},ta=(e,a)=>{let r,n;return e!=null&&e.find(t=>(t==null?void 0:t.id)===Xe.value)?r=e==null?void 0:e.map(t=>{var i,u;if((t==null?void 0:t.id)===Xe.value){let c={};for(let d in t){let g=(i=a==null?void 0:a.find(y=>(y==null?void 0:y.prop)===d))==null?void 0:i.label;g?c[d]=(u=Le.value)==null?void 0:u[g]:c[d]=t[d]}t=Object.assign(c,Le.value),n=t}return t}):r=e==null?void 0:e.map(t=>{var i,u,c,d;if((t==null?void 0:t.id)===Xe.value){let g={};for(let y in t){let E=(i=a==null?void 0:a.find(w=>(w==null?void 0:w.prop)===y))==null?void 0:i.label;E?g[y]=(u=Le.value)==null?void 0:u[E]:g[y]=t[y]}t=Object.assign(g,Le.value),n=t}else t=(c=Jl(t,a))==null?void 0:c.contents,n=(d=Jl(t,a))==null?void 0:d.currentSelectContents;return t}),{newContents:r,currentSelectContents:n}},sa=(e,a,r)=>{var n,t;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&&((t=e.children)==null?void 0:t.length)>0&&(e.children=e.children.map(sa)),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 t={...n};return delete t.children,t}):[]},xl=(e=!0,a,r)=>{var g,y,E,w,f,T,x,D,V,L,$,o,m,h,N,C,W,j,le,A,F,b,G,M,B,Y;let n=ne.getColumnChild((g=k.cloneDeep(q.value))==null?void 0:g.filter(K=>(K==null?void 0:K.label)!=="操作")),t,i=k.cloneDeep(Q.value);if(!Le.value){Ye.value=!1;return}if(Xe.value===""){pl.value++;let K;a&&r?K={id:pl.value.toString(),[a==null?void 0:a.prop]:r,children:Le.value.children}:K={id:pl.value.toString()},K!=null&&K.children&&(K={...K,children:(y=K.children)==null?void 0:y.map(ae=>sa(ae,a,r))}),i.push(Object.assign(Le.value,K)),t=Object.assign(Le.value,K)}else i=(E=ta(i,n))==null?void 0:E.newContents,t=(w=ta(i,n))==null?void 0:w.currentSelectContents;const u=(f=s.itemData)==null?void 0:f.filter(K=>(K==null?void 0:K.key)==="childTree")[0];if(((T=u==null?void 0:u.contents)==null?void 0:T.length)>0){Re.value="编辑";const K=[];i==null||i.forEach((ae,S)=>{var ie;let X={};if(Array.isArray(ae)){let Z=[];ae==null||ae.filter(ye=>!(ye!=null&&ye.id)).forEach((ye,ge)=>{var _,p,de,ue,ce,Ce,Te;if((p=(_=Je.value)==null?void 0:_[ge])!=null&&p.prop&&!Array.isArray(ye)){let Pe={};Pe[Je.value[ge].column]=ye,be!=null&&be.value&&((de=be==null?void 0:be.value)==null?void 0:de.length)>0&&((ue=be==null?void 0:be.value)!=null&&ue.find(he=>JSON.stringify(he==null?void 0:he[0])===JSON.stringify(Pe)))&&(Z=(ce=be==null?void 0:be.value)==null?void 0:ce.find(he=>JSON.stringify(he==null?void 0:he[0])===JSON.stringify(Pe))),Z&&Z.length>0?X[Je.value[ge].prop]=Z!=null&&Z.find(he=>{var Ve;return((Ve=Object.keys(he))==null?void 0:Ve[0])===Je.value[ge].column})?(Ce=Z==null?void 0:Z.find(he=>{var Ve;return((Ve=Object.keys(he))==null?void 0:Ve[0])===Je.value[ge].column}))==null?void 0:Ce[Je.value[ge].column]:ye:X[Je.value[ge].prop]=ye}else Array.isArray(ye)&&((Te=Je.value[ge])!=null&&Te.prop?X[Je.value[ge].prop]=ye:X.children=Ql(ye,Je.value))})}else X=ae;Array.isArray(ae)&&ae.some(Z=>Z==null?void 0:Z.id)?K.push(Object.assign(X,{id:(ie=ae==null?void 0:ae.find(Z=>Z.id))==null?void 0:ie.id})):X.id?K.push(X):K.push(Object.assign(X,{id:S.toString()}))}),Q.value=pa(K,u,q.value)}else Q.value=i;ca(Q.value),Ul.value=Q.value;const c=In(Ul.value,Ie.value,i);let d=[];if(yl.value?(d=(x=k.cloneDeep(yl).value.singleContent)==null?void 0:x.filter(K=>(K==null?void 0:K.id)!==(t==null?void 0:t.id)),d.push(t)):d=[t],We.value){const K={content:c,singleContent:((D=u==null?void 0:u.contents)==null?void 0:D.length)>0?d==null?void 0:d.flatMap(Wl):d,index:s==null?void 0:s.index,buttonName:"编辑",column:q.value,parentTableId:s==null?void 0:s.parentTableId};xe.setCacheUpdatingData(K)}if(e&&!(($=(L=(V=Ee.value)==null?void 0:V[0])==null?void 0:L.optionUrl)!=null&&$.menuId)){let K=(N=(h=(m=(o=s.itemData)==null?void 0:o.find(S=>(S==null?void 0:S.key)==="filterAllType"))==null?void 0:m.value)==null?void 0:h.find(S=>(S==null?void 0:S.value)==="onConditionContents"))==null?void 0:N.content;const ae={content:c,singleContent:((C=u==null?void 0:u.contents)==null?void 0:C.length)>0?Wl(t):t,index:s==null?void 0:s.index,buttonName:Re.value,column:q.value,parentTableId:s==null?void 0:s.parentTableId,filter:K};xe.setTableLoading(s==null?void 0:s.index),Ye.value=!1,Le.value=void 0,R("change",ae)}if((le=(j=(W=Ee.value)==null?void 0:W[0])==null?void 0:j.optionUrl)!=null&&le.menuId){Ye.value=!1;let K=(A=s.itemData)==null?void 0:A.filter(ae=>(ae==null?void 0:ae.key)==="filterAllType");if((K==null?void 0:K.length)>0){let S=(G=(b=(F=(K==null?void 0:K.map(X=>X==null?void 0:X.value)).flat().find(X=>{var ie;return(ie=X==null?void 0:X.content)==null?void 0:ie.includes("@Num")}))==null?void 0:F.content)==null?void 0:b.split(":"))==null?void 0:G[1];S=parseInt(S),Q.value=(Y=Q.value)==null?void 0:Y.slice(((M=Q.value)==null?void 0:M.length)-S,(B=Q.value)==null?void 0:B.length)}}};l.onUnmounted(()=>{q.value=[],Q.value=[],Ke.value=[],Be.value=[],ze.value=[],ol.value=[],bl.value=[],fl.value=[],Ee.value=[],Ge.value=[],O.value=null});const ia=async(e,a,r)=>{var g,y,E,w,f,T,x,D,V,L,$;il.value=r==null?void 0:r.prop;const n=k.cloneDeep(s.itemData),t=n==null?void 0:n.map(o=>{var m;return(o==null?void 0:o.key)==="header"&&((m=o.contents)==null||m.map((h,N)=>{var C,W,j,le,A,F,b,G,M,B,Y,K,ae,S,X,ie,Z,ye,ge;return h.type=h!=null&&h.type?h.type:(le=(j=(W=(C=h==null?void 0:h.key)==null?void 0:C.split("$"))==null?void 0:W[1])==null?void 0:j.split("("))!=null&&le[0]?(F=(A=ne.FormType)==null?void 0:A.find(_=>{var p,de,ue,ce;return(_==null?void 0:_.key)===((ce=(ue=(de=(p=h==null?void 0:h.key)==null?void 0:p.split("$"))==null?void 0:de[1])==null?void 0:ue.split("("))==null?void 0:ce[0])}))==null?void 0:F.value:"Input",h.options=h!=null&&h.options?h.options:((M=(G=(b=h==null?void 0:h.key)==null?void 0:b.split("$"))==null?void 0:G[1])==null?void 0:M.length)>0?(ae=(K=Hl((Y=(B=h==null?void 0:h.key)==null?void 0:B.split("$"))==null?void 0:Y[1]))==null?void 0:K.split(","))==null?void 0:ae.map(_=>({label:_,value:_})):[],(S=h==null?void 0:h.key)!=null&&S.includes("$")&&(h.key=(ie=(X=h==null?void 0:h.key)==null?void 0:X.split("$"))==null?void 0:ie[0]),h.value=(Z=Object.values(a))==null?void 0:Z[N],h.optionUrl=h!=null&&h.formMenuSelect&&((ye=h==null?void 0:h.formMenuSelect)==null?void 0:ye.length)>0?{groupSelect:(ge=h==null?void 0:h.groupSelect)==null?void 0:ge.split(/[::]/).map(_=>_.trim()),menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":"")}:null,h})),o});let i=k.cloneDeep(Ee.value),u=(y=(g=k.cloneDeep(t))==null?void 0:g.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:y.contents;i=i==null?void 0:i.map(o=>{var m;return o.value=(m=u==null?void 0:u.find((h,N)=>N===(o==null?void 0:o.id)))==null?void 0:m.value,o});let c="",d=(f=(w=(E=k.cloneDeep(t))==null?void 0:E.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:w.contents)==null?void 0:f.find((o,m)=>{var h,N,C;return(o==null?void 0:o.label)===il.value||(m==null?void 0:m.toString())===((C=(N=(h=il.value)==null?void 0:h.split("a"))==null?void 0:N[1])==null?void 0:C.toString())});if((D=(x=(T=k.cloneDeep(t))==null?void 0:T.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:x.contents)==null||D.forEach(o=>{var m,h,N,C,W;c===""&&((N=(h=(m=o==null?void 0:o.optionUrl)==null?void 0:m.groupSelect)==null?void 0:h[1])!=null&&N.includes("["))&&(c=(W=(C=o==null?void 0:o.optionUrl)==null?void 0:C.groupSelect)==null?void 0:W[1])}),(V=d==null?void 0:d.optionUrl)!=null&&V.menuSelect){let o=await Xl(d),m;if(o==null||o.forEach(h=>{var N,C,W,j,le,A,F,b,G,M;c===((C=(N=d==null?void 0:d.optionUrl)==null?void 0:N.groupSelect)==null?void 0:C[1])&&((le=(j=(W=d==null?void 0:d.optionUrl)==null?void 0:W.groupSelect)==null?void 0:j[1])!=null&&le.includes("["))&&((M=k.cloneDeep(h))==null?void 0:M[(G=(b=(F=(A=d==null?void 0:d.optionUrl)==null?void 0:A.groupSelect)==null?void 0:F[1])==null?void 0:b.replaceAll("[",""))==null?void 0:G.replaceAll("]","")])===(d==null?void 0:d.value)&&(m=h)}),m){let h=k.cloneDeep(i);h=h==null?void 0:h.map(C=>{var W,j,le,A,F,b,G,M,B,Y,K;return(m!=null&&m[C==null?void 0:C.label]||m!=null&&m[(A=(le=(j=(W=C==null?void 0:C.optionUrl)==null?void 0:W.groupSelect)==null?void 0:j[1])==null?void 0:le.replaceAll("[",""))==null?void 0:A.replaceAll("]","")])&&((G=(b=(F=C==null?void 0:C.optionUrl)==null?void 0:F.groupSelect)==null?void 0:b[1])!=null&&G.includes("["))&&(C.value=(m==null?void 0:m[C==null?void 0:C.label])||(m==null?void 0:m[(K=(Y=(B=(M=C==null?void 0:C.optionUrl)==null?void 0:M.groupSelect)==null?void 0:B[1])==null?void 0:Y.replaceAll("[",""))==null?void 0:K.replaceAll("]","")])),C}),Q.value=(L=k.cloneDeep(Q.value))==null?void 0:L.map(C=>{if((C==null?void 0:C.id)===(a==null?void 0:a.id)){const W={};return h==null||h.forEach(j=>{W[j.name]=j.value}),W.id=C==null?void 0:C.id,W}return C});let N=k.cloneDeep(h);N=N==null?void 0:N.map(C=>{var W,j,le,A;return(j=(W=C==null?void 0:C.optionUrl)==null?void 0:W.menuSelect)!=null&&j.some(F=>F==null?void 0:F.includes)&&(C.optionUrl.menuSelect=(A=(le=C==null?void 0:C.optionUrl)==null?void 0:le.menuSelect)==null?void 0:A.map(F=>{var b,G,M,B;if(F!=null&&F.includes("[")){let Y=(G=(b=F==null?void 0:F.replaceAll("[","").replaceAll("]",""))==null?void 0:b.split(":"))==null?void 0:G[1];F=(B=(M=k.cloneDeep(h))==null?void 0:M.find(K=>(K==null?void 0:K.label)===Y))==null?void 0:B.value}return F})),C}),Q.value=($=k.cloneDeep(Q.value))==null?void 0:$.map(C=>{if((C==null?void 0:C.id)===(a==null?void 0:a.id)){const W={};return N==null||N.forEach(j=>{W[j.name]=j.value}),W.id=C==null?void 0:C.id,W}return C})}}},vn=async e=>{var y,E,w,f,T,x,D,V,L,$,o,m,h,N,C,W,j,le;if(!e)return;Le.value=e;const a=k.cloneDeep(s.itemData);let r=a==null?void 0:a.map(A=>{var F;return(A==null?void 0:A.key)==="header"&&((F=A.contents)==null||F.map((b,G)=>{var M,B,Y,K,ae,S,X,ie,Z,ye,ge,_,p,de,ue,ce,Ce,Te,Pe;return b.type=b!=null&&b.type?b.type:(K=(Y=(B=(M=b==null?void 0:b.key)==null?void 0:M.split("$"))==null?void 0:B[1])==null?void 0:Y.split("("))!=null&&K[0]?(S=(ae=ne.FormType)==null?void 0:ae.find(he=>{var Ve,$e,al,nl;return(he==null?void 0:he.key)===((nl=(al=($e=(Ve=b==null?void 0:b.key)==null?void 0:Ve.split("$"))==null?void 0:$e[1])==null?void 0:al.split("("))==null?void 0:nl[0])}))==null?void 0:S.value:"Input",b.options=b!=null&&b.options?b.options:((Z=(ie=(X=b==null?void 0:b.key)==null?void 0:X.split("$"))==null?void 0:ie[1])==null?void 0:Z.length)>0?(p=(_=Hl((ge=(ye=b==null?void 0:b.key)==null?void 0:ye.split("$"))==null?void 0:ge[1]))==null?void 0:_.split(","))==null?void 0:p.map(he=>({label:he,value:he})):[],(de=b==null?void 0:b.key)!=null&&de.includes("$")&&(b.key=(ce=(ue=b==null?void 0:b.key)==null?void 0:ue.split("$"))==null?void 0:ce[0]),b.value=(Ce=Object.values(e))==null?void 0:Ce[G],b.optionUrl=b!=null&&b.formMenuSelect&&((Te=b==null?void 0:b.formMenuSelect)==null?void 0:Te.length)>0?{groupSelect:(Pe=b==null?void 0:b.groupSelect)==null?void 0:Pe.split(/[::]/).map(he=>he.trim()),menuSelect:b==null?void 0:b.formMenuSelect,selectRelateType:"",type:(b==null?void 0:b.formType)??(b!=null&&b.groupSelect?"Select":"")}:null,b})),A}),n=Ee.value,t=(E=(y=k.cloneDeep(r))==null?void 0:y.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:E.contents;if(t=t==null?void 0:t.filter(A=>(A==null?void 0:A.label)!=="操作"),t.push({label:"操作",type:"operate"}),n=n==null?void 0:n.map(A=>{var F;return A.value=A.value??((F=t==null?void 0:t.find((b,G)=>(b==null?void 0:b.prop)===(A==null?void 0:A.name)))==null?void 0:F.value),A}),!kl.value)return;let i="",u=(T=(f=(w=k.cloneDeep(r))==null?void 0:w.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:f.contents)==null?void 0:T.find((A,F)=>{var b,G,M;return(A==null?void 0:A.label)===il.value||(F==null?void 0:F.toString())===((M=(G=(b=il.value)==null?void 0:b.split("a"))==null?void 0:G[1])==null?void 0:M.toString())}),c=(x=u==null?void 0:u.optionUrl)==null?void 0:x.menuSelect,d=!0;(L=(V=(D=k.cloneDeep(r))==null?void 0:D.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:V.contents)==null||L.forEach(A=>{var F,b,G,M,B,Y;d&&((G=(b=(F=A==null?void 0:A.optionUrl)==null?void 0:F.groupSelect)==null?void 0:b[1])!=null&&G.includes("["))&&(i=(B=(M=A==null?void 0:A.optionUrl)==null?void 0:M.groupSelect)==null?void 0:B[1],JSON.stringify(c)===JSON.stringify((Y=A==null?void 0:A.optionUrl)==null?void 0:Y.menuSelect)&&(d=!1))});let g=k.cloneDeep(n);if(g=g==null?void 0:g.map(A=>{var F,b;return(A==null?void 0:A.type)==="Select"&&((b=(F=A==null?void 0:A.optionUrl)==null?void 0:F.allSelectionContents)==null?void 0:b.length)>0&&(A.optionUrl.contactValue=e),A.value=e==null?void 0:e[A==null?void 0:A.prop],A}),Ee.value=k.cloneDeep(g),($=u==null?void 0:u.optionUrl)!=null&&$.menuSelect&&kl.value||(h=(m=(o=Ee.value)==null?void 0:o[0])==null?void 0:m.optionUrl)!=null&&h.menuId){let A=await Xl(u,(W=(C=(N=Ee.value)==null?void 0:N[0])==null?void 0:C.optionUrl)==null?void 0:W.menuId),F;if((j=u==null?void 0:u.optionUrl)==null||j.menuSelect,A==null||A.forEach(b=>{var G,M,B,Y,K,ae,S,X,ie,Z,ye,ge,_,p,de,ue,ce;i===((M=(G=u==null?void 0:u.optionUrl)==null?void 0:G.groupSelect)==null?void 0:M[1])&&((K=(Y=(B=u==null?void 0:u.optionUrl)==null?void 0:B.groupSelect)==null?void 0:Y[1])!=null&&K.includes("["))&&((Z=k.cloneDeep(b))==null?void 0:Z[(ie=(X=(S=(ae=u==null?void 0:u.optionUrl)==null?void 0:ae.groupSelect)==null?void 0:S[1])==null?void 0:X.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])===(u==null?void 0:u.value)&&(F=b),(_=(ge=(ye=Ee.value)==null?void 0:ye[0])==null?void 0:ge.optionUrl)!=null&&_.menuId&&b[(de=(p=Ee.value)==null?void 0:p[0])==null?void 0:de.prop]===e[(ce=(ue=Ee.value)==null?void 0:ue[0])==null?void 0:ce.prop]&&(F=b)}),F){let b=k.cloneDeep(n);b=b==null?void 0:b.map(B=>{var Y,K,ae,S,X,ie,Z,ye,ge,_,p,de,ue,ce,Ce,Te,Pe,he;return(F!=null&&F[B==null?void 0:B.label]||F!=null&&F[(S=(ae=(K=(Y=B==null?void 0:B.optionUrl)==null?void 0:Y.groupSelect)==null?void 0:K[1])==null?void 0:ae.replaceAll("[",""))==null?void 0:S.replaceAll("]","")])&&((Z=(ie=(X=B==null?void 0:B.optionUrl)==null?void 0:X.groupSelect)==null?void 0:ie[1])!=null&&Z.includes("["))&&(B.value=(F==null?void 0:F[B==null?void 0:B.label])||(F==null?void 0:F[(p=(_=(ge=(ye=B==null?void 0:B.optionUrl)==null?void 0:ye.groupSelect)==null?void 0:ge[1])==null?void 0:_.replaceAll("[",""))==null?void 0:p.replaceAll("]","")])),(ce=(ue=(de=Ee.value)==null?void 0:de[0])==null?void 0:ue.optionUrl)!=null&&ce.menuId&&(B.value=(F==null?void 0:F[B==null?void 0:B.label])||(F==null?void 0:F[(he=(Pe=(Te=(Ce=B==null?void 0:B.optionUrl)==null?void 0:Ce.groupSelect)==null?void 0:Te[1])==null?void 0:Pe.replaceAll("[",""))==null?void 0:he.replaceAll("]","")])),B}),Ee.value=k.cloneDeep(b);let G=k.cloneDeep(b);G=G==null?void 0:G.map(B=>{var Y,K,ae,S,X,ie;return(K=(Y=B==null?void 0:B.optionUrl)==null?void 0:Y.menuSelect)!=null&&K.some(Z=>Z==null?void 0:Z.includes("["))&&(B.optionUrl.oldMenuSelect=(S=(ae=k.cloneDeep(B))==null?void 0:ae.optionUrl)==null?void 0:S.menuSelect,B.optionUrl.menuSelect=(ie=(X=B==null?void 0:B.optionUrl)==null?void 0:X.menuSelect)==null?void 0:ie.map(Z=>{var ye,ge,_,p;if(Z!=null&&Z.includes("[")){let de=(ge=(ye=Z==null?void 0:Z.replaceAll("[","").replaceAll("]",""))==null?void 0:ye.split(":"))==null?void 0:ge[1];Z=(p=(_=k.cloneDeep(b))==null?void 0:_.find(ue=>(ue==null?void 0:ue.label)===de))==null?void 0:p.value}return Z})),B}),Ee.value=G;let M={};(le=Ee.value)==null||le.forEach(B=>{M[B.prop]=B==null?void 0:B.value}),Le.value=M}}kl.value=!1},bn=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",kn=e=>{var i,u;const a=(u=(i=ze.value)==null?void 0:i.find(c=>(c==null?void 0:c.label)===(e==null?void 0:e.label)))==null?void 0:u.multiple,r=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;Q.value.forEach(c=>{const d=c==null?void 0:c[r];a&&va.isString(d)&&(c[r]=[d]),!a&&!va.isString(d)&&(c[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,t,i,u,c;Cl("");const a=(r=Ee.value)==null?void 0:r.reduce((d,g)=>(d[g.name]=g.value,d),{});if(((n=Object.keys(a))==null?void 0:n.length)>0){Le.value=a,Xe.value="",pl.value=(t=Q.value)==null?void 0:t.length,fl.value=(i=tl.value)==null?void 0:i.filter(g=>(g==null?void 0:g.label)!=="新增");const d=(c=(u=Ke.value)==null?void 0:u.filter(g=>(g==null?void 0:g.label)!=="操作"))==null?void 0:c.map(g=>{var E,w,f;const y=(w=(E=ze.value)==null?void 0:E.find(T=>(T==null?void 0:T.label)===(g==null?void 0:g.label)))==null?void 0:w.multiple;return kn(g),{...g,contents:(g==null?void 0:g.options)??[],optionUrl:g!=null&&g.formMenuSelect&&((f=g==null?void 0:g.formMenuSelect)==null?void 0:f.length)>0?{groupSelect:g==null?void 0:g.groupSelect,menuSelect:g==null?void 0:g.formMenuSelect,selectRelateType:"",type:g==null?void 0:g.formType,multiple:y}:null}});q.value=d==null?void 0:d.map(g=>ua(g,[{prop:"type",value:"edit"},{prop:"columnType",value:bn(g==null?void 0:g.formType)||(g==null?void 0:g.columnType)}])),e==="createClick"&&xl(!1)}},gl={START:"开始时间",END:"结束时间",HOURS:"工时"},mn=(e,a)=>Number(ne.dayjs(a).diff(ne.dayjs(e),"day",!0).toFixed(1)),ca=e=>{var i;const a=s.itemData,r=(i=a==null?void 0:a.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:i.contents,n=new Map;return r==null||r.forEach((u,c)=>{const{label:d}=u;n.set(d,c)}),!n.has(gl.START)||!n.has(gl.END)||!n.has(gl.HOURS)?e:e==null?void 0:e.map(u=>{const c=u==null?void 0:u[gl.START],d=u==null?void 0:u[gl.END],g=mn(c,d);return c&&d&&(u[gl.HOURS]=`${g}天`),u})},da=(e,a,r=0)=>{if(r>((a==null?void 0:a.length)??""))return e;const n=a==null?void 0:a[r],t=new Map;for(const u of e){const c=u[n];t.has(c)||t.set(c,[]),t.get(c)&&t.get(c).push(u)}const i=[];for(const[u,c]of t){const[d,...g]=c,y={...d};r+1===((a==null?void 0:a.length)??"")?y.children=c==null?void 0:c.map(E=>(E.level=k.cloneDeep(r)+1,E)).filter((E,w)=>w!==0):g.length>0&&(y.children=da(g,a,r+1)),y.level=r,i.push(y)}return i},pa=(e,a,r)=>{var t;if(!(a!=null&&a.contents)||((t=a==null?void 0:a.contents)==null?void 0:t.length)===0)return e;let n=[];return n=da(e,a==null?void 0:a.contents,0),n},fa=(e,a)=>{var w,f,T,x,D,V,L,$,o,m,h,N,C,W,j,le,A,F,b,G,M,B,Y,K,ae;const r=e==null?void 0:e.filter(S=>(S==null?void 0:S.key)==="header");e==null||e.filter(S=>(S==null?void 0:S.key)==="tableIndexColumn")[0];const n=e==null?void 0:e.filter(S=>(S==null?void 0:S.key)==="childTree")[0];let t=a;const i=e==null?void 0:e.find(S=>(S==null?void 0:S.key)==="page"),u=e==null?void 0:e.find(S=>(S==null?void 0:S.key)==="rowButton"),c=e==null?void 0:e.find(S=>(S==null?void 0:S.key)==="extraButton"),d=e==null?void 0:e.filter(S=>(S==null?void 0:S.key)==="tableContents"),g=e==null?void 0:e.filter(S=>(S==null?void 0:S.key)==="tableIndex");ze.value=(f=(w=e==null?void 0:e.filter(S=>(S==null?void 0:S.key)==="tableToForm"))==null?void 0:w[0])==null?void 0:f.contents,Yl.value=(i==null?void 0:i.contents)??!0;let y=[];sl.value===""?y=r==null?void 0:r[0]:y=(r==null?void 0:r.find(S=>(S==null?void 0:S.selectLabel)==="("+sl.value+")"))??(r==null?void 0:r.find(S=>!(S!=null&&S.selectLabel)));let E=[];if(sl.value===""?E=g==null?void 0:g[0]:E=(g==null?void 0:g.find(S=>(S==null?void 0:S.selectLabel)==="("+sl.value+")"))??(g==null?void 0:g.find(S=>!(S!=null&&S.selectLabel))),((T=y==null?void 0:y.contents)==null?void 0:T.length)>0){let S=[];if(y!=null&&y.contents.some(_=>Array.isArray(_)&&(_==null?void 0:_.find(p=>p.children))))Ie.value===""?S=(D=(x=ne.getGradeColumns(y==null?void 0:y.contents))==null?void 0:x[0])==null?void 0:D.filter(_=>!Array.isArray(_)):(Ie.value.split("-"),S=(V=ne.getGradeColumns(y==null?void 0:y.contents))==null?void 0:V[0]);else{let _=y!=null&&y.contents.some(p=>Array.isArray(p))?(L=y==null?void 0:y.contents)==null?void 0:L[0]:y==null?void 0:y.contents;_==null||_.forEach((p,de)=>{var Ce,Te,Pe,he,Ve;let ue="";(Te=(Ce=me.value)==null?void 0:Ce.split("/"))==null||Te.forEach($e=>{var al,nl,hl;if($e!==""){let Fe=(hl=(nl=(al=$e==null?void 0:$e.split(Ae+"updateLoading"))==null?void 0:al[0])==null?void 0:nl.split(Ae+"loading"))==null?void 0:hl[0];ue=ue===""?ue+Fe:ue+"/"+Fe}}),ue=ue+Ae+(p==null?void 0:p.directiveLabel);const ce=(Pe=ze.value)==null?void 0:Pe.find($e=>($e==null?void 0:$e.prop)===(p==null?void 0:p.prop));S.push({label:(p==null?void 0:p.label)??"",prop:(p==null?void 0:p.label)==="操作"?"operate":(p==null?void 0:p.prop)??"a"+de,width:p!=null&&p.width?parseInt(p.width):"",fixed:(p==null?void 0:p.fixed)??void 0,sortable:(p==null?void 0:p.sortable)??!1,filterable:(p==null?void 0:p.filterable)??!1,operable:(p==null?void 0:p.operable)??!1,showSummary:(p==null?void 0:p.showSummary)??!1,align:(p==null?void 0:p.align)??"left",showOverflowTooltip:(p==null?void 0:p.showOverflowTooltip)??!0,isNotDrag:(p==null?void 0:p.isNotDrag)??!1,isEditCol:(p==null?void 0:p.isEditCol)??!1,isOperate:(p==null?void 0:p.isOperate)??!1,id:(p==null?void 0:p.id)??de,type:(p==null?void 0:p.label)==="操作"?"operate":void 0,formType:(p==null?void 0:p.formType)??(p!=null&&p.groupSelect?"Select":""),isTableColHidden:p==null?void 0:p.isTableColHidden,isFormColHidden:p==null?void 0:p.isFormColHidden,disabled:p==null?void 0:p.disabled,options:(p==null?void 0:p.options)??[],value:(p==null?void 0:p.value)??"",formMenuSelect:(p==null?void 0:p.formMenuSelect)??[],isRoute:(p==null?void 0:p.isRoute)??!1,groupSelect:p!=null&&p.groupSelect?(he=p==null?void 0:p.groupSelect)==null?void 0:he.replaceAll('"',"").split(":"):[],isMainKey:(p==null?void 0:p.isMainKey)||(p==null?void 0:p.directiveLabel)==="#isMain",columnType:(ce==null?void 0:ce.type)||(p==null?void 0:p.columnType)||"TEXTAREA",directiveLabel:p==null?void 0:p.directiveLabel,isExistChild:!!(p!=null&&p.directiveLabel&&!(t!=null&&t[ue])&&!((Ve=p==null?void 0:p.directiveLabel)!=null&&Ve.includes("@"))&&(p==null?void 0:p.directiveLabel)!=="#isMain"),childPath:ue,allSelectionContents:(p==null?void 0:p.allSelectionContents)??[],selectFilter:p==null?void 0:p.selectFilter})})}q.value=ne.getNewColumnChild(S),Be.value=ne.getNewColumnChild(S),H.value=($=q.value)==null?void 0:$.map(_=>_==null?void 0:_.label),ll.value=(o=q.value)==null?void 0:o.every(_=>_==null?void 0:_.filterable),se.value=(m=q.value)==null?void 0:m.every(_=>_==null?void 0:_.operable),el.value=(h=q.value)==null?void 0:h.every(_=>_==null?void 0:_.sortable);let X=(C=(N=ne.getAllLeafNodes(q.value))==null?void 0:N.filter(_=>(_==null?void 0:_.type)!=="operate"))==null?void 0:C.map((_,p)=>({prop:(_==null?void 0:_.prop)??"a"+p,column:_.label}));Je.value=X;let ie=[];sl.value===""?ie=d==null?void 0:d[0]:ie=(d==null?void 0:d.find(_=>(_==null?void 0:_.selectLabel)==="("+sl.value+")"))??(d==null?void 0:d.find(_=>!(_!=null&&_.selectLabel)));let Z=Array.isArray((W=ie==null?void 0:ie.contents)==null?void 0:W[0])&&((j=ie==null?void 0:ie.contents)!=null&&j[0].every(_=>Array.isArray(_)))?(le=ie==null?void 0:ie.contents)==null?void 0:le[0]:ie==null?void 0:ie.contents;E!=null&&E.contents&&((A=E==null?void 0:E.contents)==null?void 0:A.length)!==0&&(Z=(F=k.cloneDeep(Z))==null?void 0:F.map((_,p)=>{if(!Array.isArray(_)){let de={};for(let ue in _)ue!=="id"&&ue!=="index"&&(de[ue]=_[ue]);_=Object.values(de)}return _}));const ye=!!((b=q.value)!=null&&b.find(_=>_.prop==="index"));Z=Sa(Z,E==null?void 0:E.contents,ye);const ge=[];Z==null||Z.forEach((_,p)=>{var ue;let de={};if(Array.isArray(_)){let ce=[];_==null||_.filter(Ce=>!(Ce!=null&&Ce.id)).forEach((Ce,Te)=>{var Pe,he,Ve,$e,al,nl;if((Pe=X==null?void 0:X[Te])!=null&&Pe.prop&&!Array.isArray(Ce)){let hl={};hl[X[Te].column]=Ce,be!=null&&be.value&&((he=be==null?void 0:be.value)==null?void 0:he.length)>0&&((Ve=be==null?void 0:be.value)!=null&&Ve.find(Fe=>JSON.stringify(Fe==null?void 0:Fe[0])===JSON.stringify(hl)))&&(ce=($e=be==null?void 0:be.value)==null?void 0:$e.find(Fe=>JSON.stringify(Fe==null?void 0:Fe[0])===JSON.stringify(hl))),ce&&ce.length>0?de[X[Te].prop]=ce!=null&&ce.find(Fe=>{var Dl;return((Dl=Object.keys(Fe))==null?void 0:Dl[0])===X[Te].column})?(al=ce==null?void 0:ce.find(Fe=>{var Dl;return((Dl=Object.keys(Fe))==null?void 0:Dl[0])===X[Te].column}))==null?void 0:al[X[Te].column]:Ce:de[X[Te].prop]=Ce}else Array.isArray(Ce)&&((nl=X[Te])!=null&&nl.prop?de[X[Te].prop]=Ce:de.children=Ql(Ce,X))})}else de=_;Array.isArray(_)&&_.some(ce=>ce==null?void 0:ce.id)?ge.push(Object.assign(de,{id:(ue=_==null?void 0:_.find(ce=>ce.id))==null?void 0:ue.id})):de.id?ge.push(de):ge.push(Object.assign(de,{id:p.toString()}))}),Q.value=pa(ge,n,q.value),Bl.value=ge,(G=Bl.value)==null||G.forEach(_=>{var p;(p=El.value)==null||p.set(_.id,_)})}else q.value=[],Ke.value=[],Q.value=[],Bl.value=[],El.value=new Map;((M=u==null?void 0:u.contents)==null?void 0:M.length)>0?ol.value=u==null?void 0:u.contents:ol.value=[],((B=c==null?void 0:c.contents)==null?void 0:B.length)>0?(fl.value=c==null?void 0:c.contents,tl.value=c==null?void 0:c.contents):(fl.value=[],tl.value=[]),pl.value=((Y=Q==null?void 0:Q.value)==null?void 0:Y.length)??0,ca(Q.value),Ul.value=Q.value,We.value&&(q.value=(ae=(K=Ke.value)==null?void 0:K.filter(S=>(S==null?void 0:S.label)!=="操作"))==null?void 0:ae.map(S=>{var X;return{...S,type:"edit",optionUrl:S!=null&&S.formMenuSelect&&((X=S==null?void 0:S.formMenuSelect)==null?void 0:X.length)>0?{groupSelect:S==null?void 0:S.groupSelect,menuSelect:S==null?void 0:S.formMenuSelect,selectRelateType:"",type:S==null?void 0:S.formType}:null}}),Gl())};l.watch(()=>[s.itemData,sl.value,Aa.value,Ie.value,be==null?void 0:be.value],async()=>{var e,a,r,n,t,i;if((e=s==null?void 0:s.itemData)!=null&&e.find(u=>(u==null?void 0:u.key)==="columnPath")&&!((a=vl.value)!=null&&a.find(u=>{var c,d;return(u==null?void 0:u.key)===((d=(c=s==null?void 0:s.itemData)==null?void 0:c.find(g=>(g==null?void 0:g.key)==="columnPath"))==null?void 0:d.contents)}))){let u=vl.value,c={key:(n=(r=s==null?void 0:s.itemData)==null?void 0:r.find(d=>(d==null?void 0:d.key)==="columnPath"))==null?void 0:n.contents,value:(i=(t=s==null?void 0:s.itemData)==null?void 0:t.find(d=>(d==null?void 0:d.key)==="columnUsingPath"))==null?void 0:i.contents};u!=null&&u.find(d=>(d==null?void 0:d.key)===(c==null?void 0:c.key))?u=u==null?void 0:u.map(d=>((d==null?void 0:d.key)===(c==null?void 0:c.key)&&(d.value=c.value),d)):u.push(c),xe.setTableViewContents(u)}fa(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(Cl(e==null?void 0:e.form),Re.value=e==null?void 0:e.dialogTitle,wl.value=!0,Ye.value=!0)},{immediate:!0,deep:!0});const ga=()=>{var e;(e=Se.value)!=null&&e.includes("read")&&(We.value=!We.value)},Sn=()=>{Ll.value=!Ll.value};l.watch(()=>{var e;return(e=s==null?void 0:s.config)==null?void 0:e.viewport},e=>{var a;Se.value=e,(e==null?void 0:e.length)===0?We.value=!1:(e!=null&&e.includes("read")||(We.value=!0),e!=null&&e.includes("edit")||(We.value=!1)),pe.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||We.value},{immediate:!0}),l.watch(()=>We.value,e=>{var a;e?(Gl("viewChange"),xe.setCacheUpdatingData(null)):(fl.value=tl.value,q.value=Be.value,yl.value&&(xe.setTableLoading(s==null?void 0:s.index),R("change",yl.value))),ee.value=e,pe.value=e||((a=s==null?void 0:s.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=Il.value)==null?void 0:e.length},e=>{e===0&&(oe.currentPage=1)}),l.watch(()=>s==null?void 0:s.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===oe.pageSize&&(oe.currentPage=Math.ceil(((r=Q.value)==null?void 0:r.length)/oe.pageSize))},xn=(e,a,r)=>{var n;ia(r,e,a),Le.value=k.cloneDeep(e),Xe.value=e==null?void 0:e.id,pl.value=(n=Q.value)==null?void 0:n.length,Re.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",xl(!1)},je=e=>{var d,g,y,E,w,f,T,x,D,V;const{row:a,column:r,item:n,slotData:t}=e;let i=a!=null&&a[r==null?void 0:r.prop]||(a==null?void 0:a[r==null?void 0:r.prop])===0?((g=(d=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:d[0])==null?void 0:g.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]):((E=(y=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:y[0])==null?void 0:E.contents)??(a==null?void 0:a[n==null?void 0:n.prop])??((f=(w=t==null?void 0:t[n==null?void 0:n.prop])==null?void 0:w[0])==null?void 0:f.contents)??(t==null?void 0:t[n==null?void 0:n.prop])??((D=(x=a==null?void 0:a[(T=n==null?void 0:n.child)==null?void 0:T.prop])==null?void 0:x[0])==null?void 0:D.contents)??(a==null?void 0:a[(V=n==null?void 0:n.child)==null?void 0:V.prop]),c=Array.isArray(i)&&!(i!=null&&i.every(L=>typeof L=="string"||typeof L=="number"))?"查看":i;return c=Array.isArray(c)?c.join(","):c,c},Dn=e=>{var g,y,E,w,f,T,x,D,V,L;const{row:a,column:r,item:n,slotData:t}=e;let i=a!=null&&a[r==null?void 0:r.prop]?((y=(g=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:g[0])==null?void 0:y.contents)??(a==null?void 0:a[r==null?void 0:r.prop]):((w=(E=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:E[0])==null?void 0:w.contents)??(a==null?void 0:a[n==null?void 0:n.prop])??((T=(f=t==null?void 0:t[n==null?void 0:n.prop])==null?void 0:f[0])==null?void 0:T.contents)??(t==null?void 0:t[n==null?void 0:n.prop])??((V=(D=a==null?void 0:a[(x=n==null?void 0:n.child)==null?void 0:x.prop])==null?void 0:D[0])==null?void 0:V.contents)??(a==null?void 0:a[(L=n==null?void 0:n.child)==null?void 0:L.prop]);const c=Array.isArray(i)&&!(i!=null&&i.every($=>typeof $=="string"||typeof $=="number")),d=Array.isArray(i)&&(i==null?void 0:i.find($=>$==null?void 0:$.url));return c&&d},Tn=(e,a)=>e.find(r=>Object.values(r).some(n=>n===a));return l.watch(()=>Ta.value,async e=>{if(e){we.setContentLoading(!0),await l.nextTick();const a=Tn(Q.value,e==null?void 0:e.data);if(!a)return we.setContentLoading(!1);await aa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),we.setContentLoading(!1)}},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.cacheNewData,e=>{var a;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(s==null?void 0:s.index)&&(Q.value=(a=Q.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 g,y,E,w;const r=l.resolveComponent("svg-icon"),n=l.resolveComponent("el-popover"),t=l.resolveComponent("el-switch"),i=l.resolveComponent("el-checkbox"),u=l.resolveComponent("el-checkbox-group"),c=l.resolveComponent("el-button"),d=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",lr,[Zl.value?(l.openBlock(),l.createBlock(He.ssTable,{id:"excel-table",pageObj:oe,showIndex:pe.value,isTree:(g=U.compItem)==null?void 0:g.isTree,summaryInfo:ve,columns:q.value,defaultSort:Ne,isCardViewport:Ll.value,checkedColumns:H.value,key:Kl.value+JSON.stringify(q.value),tableData:Il.value,isEditViewport:We.value,isShowPagination:Yl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ee.value,onDbClickRow:Ia,extraButton:fl.value,rowButton:ol.value,cacheExtraButtons:tl.value,isClearSelection:((y=Ge.value)==null?void 0:y.length)===0,onDoCurrentChange:ja,onDoSizeChange:Ma,onContentClick:aa,onRowClick:ln,onSelectChange:qa,onCellChange:xn,onChange:ia,onPreview:ea,onSubmitEditingTable:za,onHandleColEditChange:Fa,onHandleColTypeChange:Ka,onClickButton:Pl},l.createSlots({headerButton:l.withCtx(f=>{var T,x;return[U.showHeader?(l.openBlock(),l.createBlock(qn,{key:0,pageLayout:U.pageLayout,lockingPage:l.unref(Nl)===l.unref(me),filterValues:la.value,selectNums:(T=Ge.value)==null?void 0:T.length,dataNums:(x=Q.value)==null?void 0:x.length,compName:U.compName,isDevMode:U.isDevMode,buttons:f.buttons,onButtonClick:a[0]||(a[0]=D=>Pl(D,"",{})),columns:q.value,onFilter:Za,onGetImportData:Va,level:U.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var f,T,x,D;return[((f=Q.value)==null?void 0:f.length)>0&&U.allowOperate?(l.openBlock(),l.createElementBlock("div",rr,[(T=Se.value)!=null&&T.includes("read")&&((x=Se.value)!=null&&x.includes("edit"))&&((D=ol.value)!=null&&D.some(V=>(V==null?void 0:V.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:f,index:T})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:x=>Cn(f,T)},[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",sr,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(t,{"model-value":el.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=f=>ql(f,"sortable"))},null,8,["model-value"]),l.createVNode(t,{"model-value":ll.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=f=>ql(f,"filterable"))},null,8,["model-value"]),l.createVNode(t,{"model-value":se.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=f=>ql(f,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(u,{modelValue:H.value,"onUpdate:modelValue":a[5]||(a[5]=f=>H.value=f),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:O},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(ml.value,f=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:f.label},[l.createVNode(i,{value:f.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:f.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(f.label),9,ir)]),_: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 T;return[l.createElementVNode("div",ur,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((T=Object.keys(f))==null?void 0:T.filter(x=>{var D;return(D=fe.value)==null?void 0:D.find(V=>(V==null?void 0:V.value)===x)}),x=>{var D,V;return l.openBlock(),l.createElementBlock("div",{key:x},[l.createVNode(t,{"model-value":f==null?void 0:f[x],"active-text":(V=(D=fe.value)==null?void 0:D.find(L=>(L==null?void 0:L.value)===x))==null?void 0:V.label,onChange:L=>Ja(L,x,f)},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(f=>{var T,x,D,V,L,$,o,m,h,N,C,W,j,le,A,F,b,G;return[Dn(f)?(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(je(f)),1)]),default:l.withCtx(()=>{var M,B;return[l.createElementVNode("div",pr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((B=f==null?void 0:f.row)==null?void 0:B[(M=f==null?void 0:f.column)==null?void 0:M.prop],Y=>(l.openBlock(),l.createElementBlock("div",fr,[l.createElementVNode("div",{class:"prop-url",title:Ml(Y),onClick:K=>Ha(Y)},l.toDisplayString(Ml(Y)),9,gr),l.createElementVNode("div",{class:"prop-download",onClick:K=>Qa(Y)}," 下载 ",8,hr)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(je(f))&&((x=(T=je(f))==null?void 0:T.toString())!=null&&x.includes(".txt")||(V=(D=je(f))==null?void 0:D.toString())!=null&&V.includes(".cpt")||($=(L=je(f))==null?void 0:L.toString())!=null&&$.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(je(f))&&((m=(o=je(f))==null?void 0:o.toString())!=null&&m.includes(".txt")||(N=(h=je(f))==null?void 0:h.toString())!=null&&N.includes(".cpt")||(W=(C=je(f))==null?void 0:C.toString())!=null&&W.includes(".cyd"))?"underline":"",cursor:!Array.isArray(je(f))&&((le=(j=je(f))==null?void 0:j.toString())!=null&&le.includes(".txt")||(F=(A=je(f))==null?void 0:A.toString())!=null&&F.includes(".cpt")||(G=(b=je(f))==null?void 0:b.toString())!=null&&G.includes(".cyd"))?"pointer":"",marginLeft:(f==null?void 0:f.colIndex)===0?`${((f==null?void 0:f.level)??0)*20}px`:0}),onClick:M=>La(je(f))},l.toDisplayString(je(f)===0?"0":je(f)),13,yr))]}),_:2},[((E=ol.value)==null?void 0:E.length)>0&&l.unref(Nl)!==l.unref(me)?{name:"actions",fn:l.withCtx(({item:f})=>[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(ol.value,f),(T,x)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:x,onClick:D=>Pl(T==null?void 0:T.label,f,{extra:T})},[l.createElementVNode("div",{style:l.normalizeStyle({color:T==null?void 0:T.textColor}),class:"extra-button-label"},l.toDisplayString(T==null?void 0:T.label),5)],8,nr))),128))])]),_:2},1024)]),key:"0"}:void 0,((w=Q.value)==null?void 0:w.length)>0?{name:"batchButton",fn:l.withCtx(f=>[l.withDirectives(l.createVNode(Jn,{lockingPage:l.unref(Nl)===l.unref(me),buttons:f.buttons,selectTableItems:Ge.value,onButtonClick:a[1]||(a[1]=T=>Pl(T,"",{}))},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:Re.value,visible:Ye.value,width:wa.value,onBeforeDestroy:Wa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",vr,[l.createVNode(He.ssForm,{rowContents:Ee.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(c,{onClick:a[6]||(a[6]=f=>Ye.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[13]||(a[13]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[13]}),l.createVNode(c,{class:"ok-button",onClick:a[7]||(a[7]=f=>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:Re.value,visible:_l.value,width:Fl.value,onBeforeDestroy:a[9]||(a[9]=f=>_l.value=!1)},{default:l.withCtx(()=>[l.createVNode(Xn)]),footer:l.withCtx(()=>[l.createElementVNode("div",kr,[l.createVNode(c,{onClick:a[8]||(a[8]=f=>_l.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[15]||(a[15]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[15]}),l.createVNode(c,{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"]),Oe.value?(l.openBlock(),l.createBlock(He.ssFilePreview,{key:1,fileDataList:cl.value,onDestroy:en},null,8,["fileDataList"])):l.createCommentVNode("",!0),re.value?(l.openBlock(),l.createBlock(Tl.ssDialog,{key:2,visible:re.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:Ue.value},null,8,["files","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Tl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=f=>e.componentVisible=!1),width:Fl.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(d,{dialogItem:ul.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(He.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=$l._export_sfc(Sr,[["__scopeId","data-v-b1210244"]]);exports.formGetOptions=Hl;exports.getSelectRow=Xl;exports.ssTable=Cr;exports.useFormComp=Da;exports.useFormToTableComp=ka;exports.useUnit=ma;