ss-component-new 1.2.68 → 1.2.70

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-Dff_B7xF.js → MTLLoader-BjmWyviD.js} +1 -1
  2. package/dist/{MTLLoader-DTpBm9Vk.cjs → MTLLoader-DBBidgmx.cjs} +1 -1
  3. package/dist/{OrbitControls-DXXNOXGl.js → OrbitControls-DXmNlVYH.js} +1 -1
  4. package/dist/{OrbitControls-DFa4s5a8.cjs → OrbitControls-DxV_6hpG.cjs} +1 -1
  5. package/dist/{URDFLoader-C6xxlaU3.js → URDFLoader-CcBxQ1c0.js} +2 -2
  6. package/dist/{URDFLoader-DbwRdSS4.cjs → URDFLoader-Cco_Lcwb.cjs} +1 -1
  7. package/dist/{animationData-BvlM2zDW.cjs → animationData-2jq1YxE6.cjs} +1 -1
  8. package/dist/{animationData-CXHnaV3S.js → animationData-Uoa72jZ_.js} +1 -1
  9. package/dist/{array-BZPjwBCt.cjs → array-CYRaUJ1t.cjs} +1 -1
  10. package/dist/{array-DDwPiu09.js → array-JcPpBayM.js} +1 -1
  11. package/dist/{iconfont-vRzTGZ8l.cjs → iconfont-DUxgt1se.cjs} +1 -1
  12. package/dist/{iconfont-Dyf-cOh7.js → iconfont-j0Nysio3.js} +2 -2
  13. package/dist/{index-DT4pWRUl.cjs → index-3PJxn2WQ.cjs} +1 -1
  14. package/dist/{index-CFilN9vs.cjs → index-BB7O7Rte.cjs} +1 -1
  15. package/dist/{index-V1_f5BGG.js → index-BCteAWvZ.js} +1 -1
  16. package/dist/{index-Bmo6kZuf.js → index-BONDASGh.js} +1 -1
  17. package/dist/{index-nbIqq1fG.js → index-BTZ3Pq6e.js} +1 -1
  18. package/dist/{index-BNKv0_As.js → index-BXsIGK-B.js} +1 -1
  19. package/dist/{index-NdG_9SdU.cjs → index-BaEWbMSn.cjs} +1 -1
  20. package/dist/{index-30skmX_7.cjs → index-BaOJkZDg.cjs} +1 -1
  21. package/dist/{index-Da45zhS2.cjs → index-BaWiLzpY.cjs} +1 -1
  22. package/dist/{index-PNxWoDJ4.cjs → index-BkUBCWJp.cjs} +1 -1
  23. package/dist/{index-BkotnzPJ.cjs → index-BmUcSRI3.cjs} +1 -1
  24. package/dist/{index-Q1fpICM1.js → index-Bont3QS5.js} +1 -1
  25. package/dist/{index-mK9UuOTB.js → index-Bpswj9pH.js} +7 -7
  26. package/dist/{index-Ctpe0D31.cjs → index-Bs5Qn2CE.cjs} +1 -1
  27. package/dist/{index-D9sqt63X.cjs → index-BwXUkfCd.cjs} +1 -1
  28. package/dist/{index-PwgUqhIl.cjs → index-CQbo2kEK.cjs} +1 -1
  29. package/dist/{index-B3HZp29h.cjs → index-CiTW8KaP.cjs} +1 -1
  30. package/dist/{index-Bd2zyeMk.cjs → index-CjsgHn_-.cjs} +1 -1
  31. package/dist/{index-DkMN2apf.cjs → index-CoG5ETzW.cjs} +1 -1
  32. package/dist/{index-Bos-wgC4.js → index-CqV07DKI.js} +5 -5
  33. package/dist/{index-BM8Y4Bo1.js → index-Cqafg-Dj.js} +1 -1
  34. package/dist/{index-C-asVqwd.js → index-CunKHiRY.js} +3 -3
  35. package/dist/{index-Rz_Q-zx_.cjs → index-Curm849s.cjs} +1 -1
  36. package/dist/{index-BNN9n1vx.js → index-CvyYBi73.js} +2 -2
  37. package/dist/{index-cg-oDvzQ.js → index-D3M8fQ4y.js} +7 -7
  38. package/dist/{index-Cwval6pk.js → index-D3sqTSa-.js} +3 -3
  39. package/dist/{index-DJuSvVT5.js → index-DEg3SYFk.js} +1 -1
  40. package/dist/{index-iuOCGvB5.js → index-DHxcjKwh.js} +1 -1
  41. package/dist/{index-DEQnYcr7.js → index-DOq4yWxs.js} +1 -1
  42. package/dist/{index-Ce_UgscV.cjs → index-DUJAQZQ_.cjs} +1 -1
  43. package/dist/{index-ryaiVglV.js → index-DfQLRst9.js} +16 -16
  44. package/dist/{index-ONdzK05n.cjs → index-Dh_4l8VQ.cjs} +1 -1
  45. package/dist/{index-95hwevJ2.cjs → index-DrFpWuel.cjs} +1 -1
  46. package/dist/{index-dLTD3Pse.js → index-DtJNBd93.js} +4 -4
  47. package/dist/{index-ZP3RSjjk.cjs → index-HjQKPdcM.cjs} +1 -1
  48. package/dist/{index-CluIo8C8.cjs → index-IE2Uria8.cjs} +1 -1
  49. package/dist/{index-BeYemfkN.cjs → index-JPzhvq_L.cjs} +1 -1
  50. package/dist/{index-C5w7m7fc.js → index-SO9EFGi9.js} +4 -4
  51. package/dist/{index-MeBA7ABA.cjs → index-_yRWJD4L.cjs} +1 -1
  52. package/dist/{index-4PATTKX4.js → index-duy78Se4.js} +1 -1
  53. package/dist/{index-B-GNomtx.cjs → index-fmOKsPMg.cjs} +1 -1
  54. package/dist/{index-0YtgDe3c.js → index-rawFAPBx.js} +1 -1
  55. package/dist/{index-CA2zWfSZ.js → index-wa-KcD0x.js} +4 -4
  56. package/dist/{index-DOkSOzJ8.js → index-wyImPEww.js} +2 -2
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-joxO_ES-.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Dkmm1LDr.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B6Eq8Gdj.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DobE6Kxy.js} +8 -8
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-XWIIvD_H.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BXBIXUC2.cjs} +1 -1
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CF41uWE3.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DtPGaddg.js} +49 -46
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-DcZnoTRU.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-BOLDF7ZW.cjs} +1 -1
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-BJBivlOS.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-cOKt3tH5.js} +5 -5
  63. package/dist/{index.vue_vue_type_style_index_1_lang-DlhZrx-3.js → index.vue_vue_type_style_index_1_lang-CNhpv89t.js} +3 -3
  64. package/dist/{index.vue_vue_type_style_index_1_lang-DZgpl5eS.cjs → index.vue_vue_type_style_index_1_lang-anh9YB-q.cjs} +1 -1
  65. package/dist/{main-aYEH8lkq.cjs → main-CByXRt0H.cjs} +1 -1
  66. package/dist/{main-BGHIc-EP.js → main-CdCAHd8p.js} +3 -3
  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-Bg82tY-8.cjs → threeModel-BFg5IKxj.cjs} +1 -1
  72. package/dist/{threeModel-qRZ33jgS.js → threeModel-CGnw4nlf.js} +4 -4
  73. package/dist/{threePreview-DeaWpRNi.js → threePreview-BRp-vNQ4.js} +3 -3
  74. package/dist/{threePreview-DY5PyzED.cjs → threePreview-DK3UPu_o.cjs} +1 -1
  75. package/dist/{threeSceneView-BumErHEB.cjs → threeSceneView-BmXUoJXD.cjs} +1 -1
  76. package/dist/{threeSceneView-COBvaJuf.js → threeSceneView-_zm5H9TM.js} +8 -8
  77. package/dist/{threeSceneViewForCPMPIP-KwqCVsYg.js → threeSceneViewForCPMPIP-6xf7Qyr7.js} +7 -7
  78. package/dist/{threeSceneViewForCPMPIP-BTfpUkh5.cjs → threeSceneViewForCPMPIP-BR86xSRr.cjs} +1 -1
  79. package/dist/{threeTrackPathView-DvYoRpQU.cjs → threeTrackPathView-CvXUecFw.cjs} +1 -1
  80. package/dist/{threeTrackPathView-DZBTew28.js → threeTrackPathView-DpderxqO.js} +3 -3
  81. package/dist/{threeViewerHost-CQxeUBDo.js → threeViewerHost-BQ81ASnp.js} +2 -2
  82. package/dist/{threeViewerHost-DQGYfKK5.cjs → threeViewerHost-CwSjbBmp.cjs} +1 -1
  83. package/dist/{urdfTree-KNt7kr7G.cjs → urdfTree-CCkUOAkZ.cjs} +1 -1
  84. package/dist/{urdfTree-CxP953hj.js → urdfTree-Vh6Oy_BA.js} +1 -1
  85. package/dist/{workpieceTreePanel-B_HJg1Z_.cjs → workpieceTreePanel-313k4lC2.cjs} +1 -1
  86. package/dist/{workpieceTreePanel-BRbucako.js → workpieceTreePanel-Ox8IiCtW.js} +4 -4
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const l=require("vue"),k=require("./index-C8qRkCgn.cjs"),ae=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-XWIIvD_H.cjs"),Qe=require("./index-B-GNomtx.cjs"),ya=require("./threeViewerHost-DQGYfKK5.cjs"),Vl=require("./index-CxUHJyzF.cjs");require("./index.vue_vue_type_style_index_1_lang-DZgpl5eS.cjs");const Pl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Tl=require("./index-D9sqt63X.cjs");require("./index-DNbT4lhP.cjs");const va=require("./isString--eJE54G5.cjs"),Hl=L=>L.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(L){const le=L,Y=l.ref(null),M=l.ref(!1),$=l.ref(null);return l.watch(()=>le==null?void 0:le.isVisible,()=>{M.value=le==null?void 0:le.isVisible},{deep:!0,immediate:!0}),l.watch(()=>$.value,()=>{l.nextTick(()=>{var s,ne;(ne=(s=Y.value)==null?void 0:s.updatePopper)==null||ne.call(s)})},{deep:!0,immediate:!0}),(s,ne)=>{const pe=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(pe,{visible:M.value,title:le==null?void 0:le.title,placement:le==null?void 0:le.placement,width:le==null?void 0:le.width,ref_key:"popOverRef",ref:Y},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:$})])]),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"},$n={class:"extra-button-filter"},Mn={class:"form-content-value"},Vn={key:0,class:"extra-header"},Pn={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(L,{emit:le}){const Y=le,M=L,$=l.ref(""),s=l.ref(!1),ne=l.ref([]),pe=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Ce=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],fe=se=>{const ke=se.raw;if(!ke)return;const oe=new FileReader;oe.onload=G=>{try{const W=new Uint8Array(G.target.result),Be=ae.readSync(W,{type:"array"}),ze=Be.SheetNames[0],re=Be.Sheets[ze],Oe=ae.utils.decode_range(re["!ref"]).e.c+1,Q=new Array(Oe).fill(""),b=[];for(const J in re){if(J[0]==="!")continue;const{r:te,c:Se}=ae.utils.decode_cell(J);let Ee=re[J].v;if(re[J].t==="n"&&Ee>0&&Ee<1e6&&(Ee=new Date((Ee-25569)*86400*1e3).toISOString().split("T")[0]),(Ee==null||Ee==="")&&(Ee=""),te===0)Q[Se]=Ee;else{if(!b[te-1]){b[te-1]={};for(let Le=0;Le<Oe;Le++)b[te-1][`col_${Le}`]=""}b[te-1][`col_${Se}`]=Ee}}for(let J=0;J<Oe;J++)Q[J]===void 0&&(Q[J]="");const we=b==null?void 0:b[0];if(!(we!=null&&we.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");Y("getImportData",Q,b)}catch(W){throw k.ElMessage.error(W.message),new Error(W.message)}},oe.readAsArrayBuffer(ke)},Re=se=>{var oe;const ke=(oe=ne.value)==null?void 0:oe.reduce((G,W,Be)=>(Be===0?G[W.label]=se:G[W.label]=W==null?void 0:W.value,G),{});Y("filter",ke,se,!0)},Xe=se=>{Y("buttonClick",se)},rl=se=>{var ke,oe;ne.value=(oe=(ke=ae.getColumnChild(k.cloneDeep(se)))==null?void 0:ke.filter(G=>(G==null?void 0:G.label)!==""&&(G==null?void 0:G.label)!=="操作"))==null?void 0:oe.map(G=>({label:(G==null?void 0:G.label)??"",value:"",name:(G==null?void 0:G.label)??"",isFormColHidden:G==null?void 0:G.isTableColHidden,width:2}))},ge=l.ref(!1),el=se=>{var ke;if((se==null?void 0:se.buttonName)==="确认"&&(Y("filter",se==null?void 0:se.content),ge.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 G in oe)oe[G]="";ne.value=(ke=ne.value)==null?void 0:ke.map(G=>({...G,value:""})),Y("filter",oe),ge.value=!1}s.value=!1},ll=()=>{var ke,oe;ne.value=(ke=ne.value)==null?void 0:ke.map(G=>({...G,value:""}));const se=(oe=ne.value)==null?void 0:oe.reduce((G,W)=>(G[W.label]=W.value,G),{});Y("filter",se)};return l.onMounted(()=>{rl(M.columns)}),l.watch(()=>M.columns,()=>{rl(M.columns)},{deep:!0,immediate:!0}),(se,ke)=>{var re,Me,Oe,Q;const oe=l.resolveComponent("el-icon"),G=l.resolveComponent("svg-icon"),W=l.resolveComponent("el-input"),Be=l.resolveComponent("el-button"),ze=l.resolveComponent("el-upload");return L.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",Nn,[l.createElementVNode("div",{class:l.normalizeClass(L.compName?"table-name-wrap":""),style:l.normalizeStyle({background:(M==null?void 0:M.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((M==null?void 0:M.level)-1)*12+"px",fontWeight:600-((M==null?void 0:M.level)-1)*100>=400?600-((M==null?void 0:M.level)-1)*100:400,fontSize:17-(M==null?void 0:M.level)>=14?17-(M==null?void 0:M.level)+"px":"14px"})},l.toDisplayString(L.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 b,we,J,te;return[l.createVNode(W,{modelValue:$.value,"onUpdate:modelValue":ke[1]||(ke[1]=Se=>$.value=Se),style:{"min-width":"80px"},placeholder:ge.value?(J=(we=(b=L.filterValues)==null?void 0:b.filter(Se=>Se))==null?void 0:we.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:Re,disabled:((te=ne.value)==null?void 0:te.length)===0},{suffix:l.withCtx(()=>{var Se,Ee;return[!$.value&&((Ee=(Se=L.filterValues)==null?void 0:Se.filter(Le=>Le))!=null&&Ee.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:ke[0]||(ke[0]=Se=>s.value=!s.value)},[l.createVNode(G,{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(Qe.ssForm,{rowContents:ne.value,buttonValue:pe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:pe.value,isStartJustify:!1,onOnButtonClick:el},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),L.buttons&&((re=L.buttons)==null?void 0:re.length)>0?(l.openBlock(),l.createElementBlock("div",_n,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((Me=L.buttons)==null?void 0:Me.filter(b=>L.isDevMode||(b==null?void 0:b.label)!=="修改模板"),(b,we)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:we},[(b==null?void 0:b.type)==="upload"?(l.openBlock(),l.createBlock(ze,{key:0,class:"upload-button-wrap","on-change":fe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!L.lockingPage},{default:l.withCtx(()=>[l.createVNode(Be,{disabled:!!L.lockingPage,style:l.normalizeStyle({background:(b==null?void 0:b.background)??"var(--ssbutton-theme-bg)",color:(b==null?void 0:b.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Qe._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Be,{key:0,disabled:!!L.lockingPage,style:l.normalizeStyle({background:(b==null?void 0:b.background)??"var(--ssbutton-theme-bg)",color:(b==null?void 0:b.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["disabled","style"])):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",wn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b==null?void 0:b.contents,J=>(l.openBlock(),l.createBlock(Be,{key:J==null?void 0:J.label,disabled:!!L.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:te=>Xe(J==null?void 0:J.label)},{default:l.withCtx(()=>{var te,Se;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(te=J==null?void 0:J.label)!=null&&te.includes("选中")?(l.openBlock(),l.createElementBlock("span",Un,"("+l.toDisplayString(L.selectNums)+")",1)):l.createCommentVNode("",!0),(Se=J==null?void 0:J.label)!=null&&Se.includes("全部")?(l.openBlock(),l.createElementBlock("span",On,"("+l.toDisplayString(L.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),b!=null&&b.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Be,{key:2,id:"themeButton",disabled:!!L.lockingPage,style:l.normalizeStyle({background:(b==null?void 0:b.background)??"var(--ssbutton-theme-bg)",color:(b==null?void 0:b.color)??"var(--ssbutton-theme-color)"}),onClick:J=>Xe(b==null?void 0:b.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])])):(l.openBlock(),l.createElementBlock("div",Ln,[l.createElementVNode("div",jn,[l.createElementVNode("div",$n,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var b,we,J,te;return[l.createVNode(W,{modelValue:$.value,"onUpdate:modelValue":ke[3]||(ke[3]=Se=>$.value=Se),style:{"min-width":"80px"},placeholder:ge.value?(J=(we=(b=L.filterValues)==null?void 0:b.filter(Se=>Se))==null?void 0:we.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:Re,disabled:((te=ne.value)==null?void 0:te.length)===0},{suffix:l.withCtx(()=>{var Se,Ee;return[!$.value&&((Ee=(Se=L.filterValues)==null?void 0:Se.filter(Le=>Le))!=null&&Ee.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:ke[2]||(ke[2]=Se=>s.value=!s.value)},[l.createVNode(G,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Mn,[(l.openBlock(),l.createBlock(Qe.ssForm,{rowContents:ne.value,buttonValue:pe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:pe.value,isStartJustify:!1,onOnButtonClick:el},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),L.buttons&&((Oe=L.buttons)==null?void 0:Oe.length)>0?(l.openBlock(),l.createElementBlock("div",Vn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((Q=L.buttons)==null?void 0:Q.filter(b=>L.isDevMode||(b==null?void 0:b.label)!=="修改模板"),(b,we)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:we},[(b==null?void 0:b.type)==="upload"?(l.openBlock(),l.createBlock(ze,{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(Be,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(G,{name:(J=Ce==null?void 0:Ce.find(te=>(te==null?void 0:te.label)===(b==null?void 0:b.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Qe._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Be,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(G,{name:(J=Ce==null?void 0:Ce.find(te=>(te==null?void 0:te.label)===(b==null?void 0:b.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",Pn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b==null?void 0:b.contents,J=>(l.openBlock(),l.createBlock(Be,{key:J==null?void 0:J.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:te=>Xe(J==null?void 0:J.label)},{default:l.withCtx(()=>{var te,Se;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(te=J==null?void 0:J.label)!=null&&te.includes("选中")?(l.openBlock(),l.createElementBlock("span",Fn,"("+l.toDisplayString(L.selectNums)+")",1)):l.createCommentVNode("",!0),(Se=J==null?void 0:J.label)!=null&&Se.includes("全部")?(l.openBlock(),l.createElementBlock("span",Kn,"("+l.toDisplayString(L.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),b!=null&&b.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Be,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(b==null?void 0:b.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:J=>Xe(b==null?void 0:b.label)},{icon:l.withCtx(()=>{var J;return[l.createVNode(G,{name:(J=Ce==null?void 0:Ce.find(te=>(te==null?void 0:te.label)===(b==null?void 0:b.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},qn=Pl._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(L,{emit:le}){const Y=L,M=le,$=ne=>{M("buttonClick",ne)},s=ne=>{var pe;return ne!=null&&ne.includes("删除")?((pe=Y.selectTableItems)==null?void 0:pe.length)>0?"warning-active-type":"warning-type":"default-type"};return(ne,pe)=>{const Ce=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(L.buttons,fe=>(l.openBlock(),l.createBlock(Ce,{key:fe==null?void 0:fe.label,disabled:!!L.lockingPage,class:l.normalizeClass(s(fe==null?void 0:fe.label)),onClick:Re=>$(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=Pl._export_sfc(Rn,[["__scopeId","data-v-70b12973"]]),ka=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(L){this.selectArray=L},setSelectString(L){this.selectString=L}}}),Wn={class:"calculator-content"},Gn={class:"calculator-child"},Hn={class:"calculator-child"},Qn=l.defineComponent({__name:"calculator",setup(L){const le=l.ref(),Y=l.ref();return l.onMounted(()=>{le.value=[{type:"Upload",label:"输入",name:"input"}],Y.value=[{type:"Upload",label:"输出",name:"output"}]}),(M,$)=>(l.openBlock(),l.createElementBlock("div",Wn,[l.createElementVNode("div",Gn,[l.createVNode(Qe.ssForm,{rowContents:le.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Hn,[l.createVNode(Qe.ssForm,{rowContents:Y.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Xn=Pl._export_sfc(Qn,[["__scopeId","data-v-73db0fe7"]]),ma=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(L){this.selectIndex=L},setSelectMenu(L){this.selectMenu=L},setSelectTitle(L){this.selectTitle=L}}}),Ql=(L,le)=>{let Y=L,M=le;return Array.isArray(Y)&&(Y=Y==null?void 0:Y.map(($,s)=>{if(Array.isArray($)){let ne={};return $=$==null?void 0:$.forEach((pe,Ce)=>{var fe;(fe=M==null?void 0:M[Ce])!=null&&fe.prop?ne[M[Ce].prop]=pe:Array.isArray(pe)&&(ne.children=Ql(pe,M))}),Object.assign(ne,{id:s})}else return $})),Y},Sa=(L,le,Y)=>{let M=L,$=le;return M=M==null?void 0:M.map((s,ne)=>{var pe,Ce;return!Array.isArray(s)||!((pe=$==null?void 0:$[ne])!=null&&pe.label)&&!Y||(s.unshift(((Ce=$==null?void 0:$[ne])==null?void 0:Ce.label)??""),s.some(fe=>Array.isArray(fe))&&(s=s==null?void 0:s.map(fe=>{var Re;return Array.isArray(fe)&&(fe=Sa(fe,(Re=$==null?void 0:$[ne])==null?void 0:Re.children,Y)),fe}))),s}),M},Yn=(L,le,Y)=>{if(le==="")return L==null?void 0:L.filter(M=>(M==null?void 0:M.id)!==Y);{const M=le.split("-");return Zn(L,M,Y)}},Zn=(L,le,Y)=>{let M=L,$=le;return($==null?void 0:$.length)===0?M=M==null?void 0:M.filter(s=>s.id!==Y):M=M==null?void 0:M.map(s=>(s.id.toString()===($==null?void 0:$[0])&&($==null||$.shift(),s=Ca(s,$,Y)),s)),M},Ca=(L,le,Y)=>{var s,ne;let M=L,$=le;return($==null?void 0:$.length)===0?M.children=(s=M.children)==null?void 0:s.filter(pe=>pe.id!==Y):M.children=(ne=M.children)==null?void 0:ne.map(pe=>(pe.id.toString()===($==null?void 0:$[0])&&($==null||$.shift(),pe=Ca(pe,$,Y)),pe)),M},In=(L,le,Y)=>{if(le==="")return Y;{const M=le.split("-");return er(L,M,Y)}},er=(L,le,Y)=>{let M=L,$=le;return($==null?void 0:$.length)===0?M=Y:M=M==null?void 0:M.map(s=>(s.id.toString()===($==null?void 0:$[0])&&($==null||$.shift(),s=xa(s,$,Y)),s)),M},xa=(L,le,Y)=>{var s;let M=L,$=le;return($==null?void 0:$.length)===0?M.children=Y:M.children=(s=M.children)==null?void 0:s.map(ne=>(ne.id.toString()===($==null?void 0:$[0])&&($==null||$.shift(),ne=xa(ne,$,Y)),ne)),M},Da=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(L){this.objUrl=L},setBlobUrls(L){this.blobUrls=L}}}),Xl=async(L,le)=>{var ne,pe,Ce,fe,Re,Xe,rl,ge,el,ll,se,ke,oe,G,W,Be,ze;let Y=(pe=(ne=k.cloneDeep(L))==null?void 0:ne.optionUrl)==null?void 0:pe.menuSelect,M=[];Y==null||Y.forEach(re=>{});let $="",s=await ae.menuToParent(Y);if(s==null||s.forEach(re=>{var Me,Oe,Q,b;(re==null?void 0:re.name)===(((b=(Q=(Oe=(Me=k.cloneDeep(L))==null?void 0:Me.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:Q[0])==null?void 0:b.replaceAll("'",""))??"")&&($=re==null?void 0:re.id)}),le){$=le;const re=await k.getInsofDataApi({id:$}),Me=(Xe=(Re=(fe=(Ce=re==null?void 0:re.data)==null?void 0:Ce.result)==null?void 0:fe[0])==null?void 0:Re.key)==null?void 0:Xe.pageKey;s=await ae.getItemData(Me,sessionStorage.getItem("systemKey"),"")}if($!==""){let re;le?re=(rl=s==null?void 0:s.find(Q=>(Q==null?void 0:Q.id)===le))==null?void 0:rl.compData:re=(ge=s==null?void 0:s.find(Q=>{var b,we,J,te;return(Q==null?void 0:Q.name)===(((we=(b=L==null?void 0:L.groupSelect)==null?void 0:b.split(":"))==null?void 0:we[0])||((te=(J=L==null?void 0:L.optionUrl)==null?void 0:J.groupSelect)==null?void 0:te[0]))}))==null?void 0:ge.compData;let Me=(ll=(el=re==null?void 0:re.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:el.contents)==null?void 0:ll.map(Q=>Q==null?void 0:Q.label);(ke=(se=re==null?void 0:re.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:se.contents)!=null&&ke.every(Q=>Array.isArray(Q))&&(Me=(W=ae.getColumnChild((G=(oe=re==null?void 0:re.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:oe.contents)==null?void 0:G[0]))==null?void 0:W.map(Q=>Q==null?void 0:Q.prop));let Oe=(ze=(Be=re==null?void 0:re.find(Q=>(Q==null?void 0:Q.key)==="tableContents"))==null?void 0:Be.contents)==null?void 0:ze.map(Q=>(Q=Q==null?void 0:Q.filter(b=>!(b!=null&&b.id)),Q));Oe==null||Oe.forEach(Q=>{M.push(ae.getValueToObjectValue(Q,Me))})}return M},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(L,{emit:le}){var ha;const Y=l.ref([]),M=Da(k.pinia),$=l.ref(null),s=L,ne=l.ref(s==null?void 0:s.allowSelect),pe=l.ref((ha=s==null?void 0:s.config)==null?void 0:ha.showIndex),Ce=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}]),Re=ae.useOriginalState(k.pinia);let Xe="$R";const{originalPath:rl}=k.storeToRefs(Re),ge=rl.value,el=l.ref(!1),ll=l.ref(!1),se=l.ref(!1),ke=l.reactive({column:{},status:!1,text:"合计"}),oe=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),G=le,W=l.ref([]),Be=l.reactive({prop:"",order:null}),ze=l.ref([]),re=l.ref(!1),Me=l.ref(!1),Oe=l.ref(null),{isUseBackdrop:Q,initTrackFileType:b,getFileExtension:we,setData:J,getFileInfo:te,getFilesInfo:Se}=ya.useThreeSystem(),Ee=l.ref([]),Le=l.ref(!1),dl=l.ref(),Ue=Vl.useMenuState(),{importLoading:xr,activeMenuPath:ye,contentLoading:Dr,linkMenuInfo:Ta}=k.storeToRefs(Ue),Na=ae.useTableComp(k.pinia),De=Vl.useModelComp(k.pinia),{extraContents:me,cacheUpdatingData:yl,tableViewContents:vl,tableLoading:Tr,pageMapState:ol,lockingPage:Nl}=k.storeToRefs(De),Z=l.ref([]),Bl=l.ref([]),El=l.ref(new Map);l.ref(!1);const Ye=l.ref("");l.ref();const Al=l.ref(!0),pl=l.ref(0),Yl=l.ref(!0),Je=l.ref(""),Ze=l.ref(!1),Ba=l.ref({label:"查看三维模型"}),_l=l.ref(!1),Fl=l.ref(),qe=l.ref([]),tl=l.ref([]),wl=l.ref(!1),bl=l.ref([]),fl=l.ref([]),sl=l.ref([]),Ae=l.ref([]),We=l.ref(),je=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:il}=k.storeToRefs(Ea),_a=k.useLoginState(k.pinia),{loginUserInfo:_e}=k.storeToRefs(_a),wa=l.ref(720),Ge=l.ref(!1),Ll=l.ref(!1),He=l.ref([]),ul=l.ref(),kl=l.ref(!0),Zl=l.ref(!0),cl=l.ref([]),Ua=l.inject("contentRef");l.provide("contentRef",Ua),l.watch(()=>{var e;return(e=Z.value)==null?void 0:e.length},e=>{oe.total=e}),l.watch(()=>vl.value,async()=>{var i,u,c,d,f,S,w,F,h,A,O,E,z,P,V,o,m,g;if(((i=vl.value)==null?void 0:i.length)===0||!((u=s==null?void 0:s.itemData)!=null&&u.find(T=>(T==null?void 0:T.key)==="columnPath"))||!((c=s==null?void 0:s.itemData)!=null&&c.find(T=>(T==null?void 0:T.key)==="pageColumn")))return;let e=(h=(F=(w=(S=(f=(d=s==null?void 0:s.itemData)==null?void 0:d.find(T=>(T==null?void 0:T.key)==="pageColumn"))==null?void 0:f.contents)==null?void 0:S.split("["))==null?void 0:w[1])==null?void 0:F.split("]"))==null?void 0:h[0],a=((z=(E=(O=(A=s==null?void 0:s.itemData)==null?void 0:A.find(T=>(T==null?void 0:T.key)==="pageColumn"))==null?void 0:O.contents)==null?void 0:E.split("["))==null?void 0:z[0])+((V=(P=vl.value)==null?void 0:P.find(T=>(T==null?void 0:T.key)===e))==null?void 0:V.value),r=((m=(o=s==null?void 0:s.itemData)==null?void 0:o.find(T=>(T==null?void 0:T.key)==="pageGroup"))==null?void 0:m.contents)??"",n=await ae.getItemData(a,sessionStorage.getItem("systemKey"),""),t=(g=n==null?void 0:n.find(T=>(T==null?void 0:T.name)===(r===""?s==null?void 0:s.compName:r)))==null?void 0:g.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 f={type:"data",pageKey:s!=null&&s.parentTableId?(i=d==null?void 0:d.key)==null?void 0:i.pageKey:ye.value,tableId:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index),systemKey:sessionStorage.getItem("systemKey")},S=a==null?void 0:a.map(h=>{const A=Object.keys(h),O={};return A.forEach((E,z)=>{O[e[z]]=h[E]}),O}),w=S==null?void 0:S.map(h=>({key:f,value:{tableData:h}})),F=await k.batchAddInsofDataApi({dataList:w});((u=F==null?void 0:F.data)==null?void 0:u.code)===200?(De.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);dl.value=[{name:(r=e==null?void 0:e.split("/"))==null?void 0:r[((a=e==null?void 0:e.split("/"))==null?void 0:a.length)-1],blobUrl:i}],Le.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=W.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&&(Be.order="descending",Be.prop=r==null?void 0:r.prop),G("getSliceContLength",oe),(t=Z.value)==null?void 0:t.slice(e,a)}),ja=e=>{oe.currentPage=e,G("getSliceContLength",oe)},$a=e=>{var a;oe.pageSize=e,e*oe.currentPage>((a=Z.value)==null?void 0:a.length)&&(oe.currentPage=1,oe.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),G("getSliceContLength",oe)},Ma=(e,a)=>{var u,c;const r=(c=(u=W.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(f=>d===f))))return k.ElMessage.error("导入的数据表头不匹配");Oa(n,a)},Va=(e,a)=>{var r;De.setRefreshCurStructure(!1),((r=W.value)==null?void 0:r.length)===0||Ma(e,a)},Pa=(e,a,r,n)=>{const t=[],i=[],u=f=>Object.keys(f).length;for(const f in e)if(e[f]!==void 0){const S=e[f],w=[];for(const[F,h]of Object.entries(S))w.push(h),i.length<u(S)&&i.push(F);t.push(w)}t.unshift(i);const c=ae.utils.aoa_to_sheet(t),d=ae.utils.book_new();ae.utils.book_append_sheet(d,c,n),ae.writeFileSync(d,`${a}.xlsx`),He.value=[]},jl=async(e,a,r,n=!1,t)=>{var i,u,c,d,f,S,w,F;try{De.setRefreshCurStructure(!1);const h=await k.getInsofDataApi({id:s==null?void 0:s.index});if(((i=h==null?void 0:h.data)==null?void 0:i.code)===200){let A=(f=(d=(c=(u=h==null?void 0:h.data)==null?void 0:u.result)==null?void 0:c[0])==null?void 0:d.value)==null?void 0:f.pageData;n?A={...A,compData:(w=A==null?void 0:A.compData)==null?void 0:w.map(E=>{var z;return(E==null?void 0:E.key)==="header"?{...E,contents:(z=E==null?void 0:E.contents)==null?void 0:z.map(P=>({...P,[e]:r}))}:E})}:A={...A,compData:(S=A==null?void 0:A.compData)==null?void 0:S.map(E=>{var z,P;return(E==null?void 0:E.key)==="header"?{...E,contents:(z=E==null?void 0:E.contents)==null?void 0:z.map(V=>(V==null?void 0:V.prop)===(a==null?void 0:a.prop)?{...V,[e]:r}:V)}:(E==null?void 0:E.key)==="tableToForm"&&t?{...E,contents:(P=E==null?void 0:E.contents)==null?void 0:P.map(V=>(V==null?void 0:V.prop)===(a==null?void 0:a.prop)?{...V,[t]:r}:V)}:E})};const O=await k.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:A}});((F=O==null?void 0:O.data)==null?void 0:F.code)===200?(k.ElMessage.success("编辑成功"),De.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(h){k.ElMessage.error(h)}},Fa=async(e,a)=>{await jl("label",a,e)},Ka=async(e,a)=>{await jl("columnType",a,e,!1,"type")},za=()=>{yl.value?Ge.value=!1:ga()},qa=e=>{He.value=e},Ra=(e,a)=>{ul.value===a?kl.value=!1:kl.value=!0,ul.value=a==null?void 0:a.changeProp},ml=l.computed(()=>{var r,n,t;const e=(r=W.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=W.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(W.value);await l.nextTick(),W.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=()=>{Ze.value=!1},Ga=e=>{G("clickTrigger",e)},ea=async e=>{var i,u,c,d,f,S,w,F,h,A,O,E,z,P,V;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(Q(a)){const m={files:[te(a)],data:{}};J(m);return}bl.value=[{url:a,extension:we(a)}],Me.value=!0,Oe.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")||(f=a==null?void 0:a.toString())!=null&&f.includes(".mtl")){const o=(S=a==null?void 0:a.toString())==null?void 0:S.split(","),m=Se(o),g=m==null?void 0:m[0];if(Q(g==null?void 0:g.extension)){J({files:m,data:{}});return}bl.value=m,Me.value=!1,re.value=!0;return}if((w=a==null?void 0:a.toString())!=null&&w.includes(".stl")||(F=a==null?void 0:a.toString())!=null&&F.includes(".STL")||(h=a==null?void 0:a.toString())!=null&&h.includes(".obj")||(A=a==null?void 0:a.toString())!=null&&A.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=[],g={};if(Array.isArray(a)?o=a:o=a==null?void 0:a.split(","),o==null||o.forEach(T=>{T.includes(".mtl")?m.push(T):g.blob=g.blob?g.blob+","+T:T}),(m==null?void 0:m.length)>0&&(g.mtlBlobs=m),n&&(g.suffix=n),(E=(O=Object.values(g))==null?void 0:O[0])!=null&&E.includes("http:"))t.push(g);else{const T=new Blob([g.blob],{type:"application/octet-stream;charset=UTF-8"});let x=URL.createObjectURL(T),H="";(z=a==null?void 0:a.split("/"))==null||z.forEach((j,I)=>{var _;I===((_=a==null?void 0:a.split("/"))==null?void 0:_.length)-1&&(H=j)}),(P=g.blob)!=null&&P.includes(".stl")&&(H=(H==null?void 0:H.replaceAll(">",""))+".urdf"),dl.value=[{name:H,blobUrl:x}],Le.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 g=URL.createObjectURL(m),T="";if((V=a==null?void 0:a.split("/"))==null||V.forEach((x,H)=>{var j;H===((j=a==null?void 0:a.split("/"))==null?void 0:j.length)-1&&(T=x)}),Q(T)){const x=b(T),H=te(a);J({files:[H],data:{trackFileType:x}});return}dl.value=[{name:T,blobUrl:g}],Le.value=!0}(t==null?void 0:t.length)>0&&M.setBlobUrls(t)},$l=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=Qe.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 ae.downloadAvatarApi({url:e==null?void 0:e.url});!e.url.toUpperCase().includes(".OBJ")&&!e.url.toUpperCase().includes(".STL")&&!e.url.toUpperCase().includes(".MTL")&&!e.url.toUpperCase().includes(".URDF")?(a=URL.createObjectURL(t.data),r=$l(e)):a=e==null?void 0:e.url}if(Q(a)){const t={row:`${a}`,suffix:we(r)};ea(t);return}const n={name:r,blobUrl:a};dl.value=[n],Le.value=!0},Qa=async e=>{let a=null,r=null;if(e!=null&&e.downloadUrl){const 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 ae.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(i.data),r=$l(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(De.setTableLoading(!0),la.value=Object.values(e),e&&((n=Object.values(e))!=null&&n.every(t=>!t)))return Z.value=Bl.value;if(r){Z.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}Z.value=Ya(El.value,e),De.setTableLoading(!1)}},Ia=async e=>{var u,c,d,f,S,w,F,h,A,O,E,z,P,V,o;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((u=_e.value)==null?void 0:u.account)||((c=_e.value)==null?void 0:c.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),r=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((d=_e.value)==null?void 0:d.account)||((f=_e.value)==null?void 0:f.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let n=(w=(S=a==null?void 0:a.data)==null?void 0:S.result)==null?void 0:w.map(m=>m==null?void 0:m.id);const t=(h=(F=r==null?void 0:r.data)==null?void 0:F.result)==null?void 0:h.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 ae.getItemData(ye.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)&&((A=zl.value)==null?void 0:A.key)!=="main"?[]:zl.value;m.push({key:Ie.value===""?(O=e==null?void 0:e.id)==null?void 0:O.toString():Ie.value+"-"+((E=e==null?void 0:e.id)==null?void 0:E.toString()),value:e[(z=Object.keys(e))==null?void 0:z.filter(g=>g!=="index"&&g!=="id")[0]]}),Ol.setSelectMenu(Ie.value===""?(P=e==null?void 0:e.id)==null?void 0:P.toString():Ie.value+"-"+((V=e==null?void 0:e.id)==null?void 0:V.toString())),Ol.setSelectTitle(m),Ol.setSelectIndex((o=e==null?void 0:e.id)==null?void 0:o.toString()),G("pageChange",i)}},aa=async(e,a,r,n)=>{var i,u,c,d,f,S,w,F,h,A,O,E,z,P,V,o,m,g,T,x,H,j,I,_;if(G("clickMainKey",r),(n==null?void 0:n.isExistChild)===!0){let N=(i=n==null?void 0:n.columnType)==null?void 0:i.prop,v=n==null?void 0:n.data;if(cl.value=await ae.getItemData(ye.value,sessionStorage.getItem("systemKey"),""),!cl.value){let B=(d=(c=(u=ye.value)==null?void 0:u.split("/"))==null?void 0:c.filter((D,q)=>{var C,R;return q!==((R=(C=ye.value)==null?void 0:C.split("/"))==null?void 0:R.length)-1}))==null?void 0:d.join("/");cl.value=await ae.getItemData(B,sessionStorage.getItem("systemKey"),"")}let K=(f=cl.value)==null?void 0:f.filter(B=>(B==null?void 0:B.name)===N);cl.value=K==null?void 0:K.map(B=>{var D;return B.compData=(D=B.compData)==null?void 0:D.map(q=>{var C,R;return(q==null?void 0:q.key)==="tableContents"&&(C=q==null?void 0:q.contents)!=null&&C.every(y=>y==null?void 0:y.find(X=>X==null?void 0:X.id))&&(q.contents=(R=q==null?void 0:q.contents)==null?void 0:R.filter(y=>(y==null?void 0:y[1])===v)),q}),B}),G("routeUrl",cl.value,{isEdit:!0,routerUrl:ye.value});return}if((n==null?void 0:n.data)==="查看"&&(e!=null&&e.every(N=>(N==null?void 0:N.url)&&(N==null?void 0:N.name)))){let N=k.cloneDeep(e);N=await((S=k.cloneDeep(N))==null?void 0:S.map(async K=>{var q,C,R,y;const B=await ae.downloadAvatarApi({url:K==null?void 0:K.url});let D=URL.createObjectURL(B.data);return{name:(K==null?void 0:K.name)+"."+((y=(q=K==null?void 0:K.url)==null?void 0:q.split("."))==null?void 0:y[((R=(C=K==null?void 0:K.url)==null?void 0:C.split("."))==null?void 0:R.length)-1]),blobUrl:D}}));let v=await Promise.all(N);dl.value=v,Le.value=!0}const t=k.cloneDeep(W.value);if((n==null?void 0:n.isMainKey)===!0&&(t==null?void 0:t.length)>0){(w=t==null?void 0:t[0])==null||w.prop;let N=k.cloneDeep(ye).value+ge+(n==null?void 0:n.data),v=k.cloneDeep(ye).value,K=(h=(F=ol.value[N])==null?void 0:F.filter(C=>{var R,y;return((R=C==null?void 0:C.key)==null?void 0:R.type)==="structure"&&((y=C==null?void 0:C.key)==null?void 0:y.parentTable)===""}))==null?void 0:h.map(C=>{var R;return(R=C==null?void 0:C.value)==null?void 0:R.pageData}),B={};(A=W.value)==null||A.forEach(C=>{(C==null?void 0:C.label)!=="操作"&&(B[C.label]=r[C.prop]??r[C.label])});let D=(E=(O=s==null?void 0:s.itemData)==null?void 0:O.find(C=>(C==null?void 0:C.key)==="mainRouters"))==null?void 0:E.contents,q;if((D==null?void 0:D.length)>0){let C=N==null?void 0:N.split(ge)[((z=N==null?void 0:N.split(ge))==null?void 0:z.length)-1],R=D==null?void 0:D.find(y=>(y==null?void 0:y.key)===C);q=(R==null?void 0:R.routerContent)+ge+(R==null?void 0:R.key)}if((K==null?void 0:K.length)>0)await ae.getItemData(N+ge+`updateLoading${((P=_e.value)==null?void 0:P.account)||((V=_e.value)==null?void 0:V.账号)}`,sessionStorage.getItem("systemKey"),"")||await ae.loadingConstruct(N,N+ge+`updateLoading${((o=_e.value)==null?void 0:o.account)||((m=_e.value)==null?void 0:m.账号)}`,B,q),De.setRouteToChildPath(v),Ue.setActiveMenuPath(N+ge+`updateLoading${((g=_e.value)==null?void 0:g.account)||((T=_e.value)==null?void 0:T.账号)}`);else{(x=t==null?void 0:t[0])==null||x.prop;let C=k.cloneDeep(ye).value+ge+(n==null?void 0:n.data),R=k.cloneDeep(ye).value;await ae.getItemData(R+ge,sessionStorage.getItem("systemKey"),""),await ae.loadingConstruct(R+ge,C,B),await ae.loadingConstruct(C,C+ge+`updateLoading${((H=_e.value)==null?void 0:H.account)||((j=_e.value)==null?void 0:j.账号)}`,B,q),De.setRouteToChildPath(R),Ue.setActiveMenuPath(C+ge+`updateLoading${((I=_e.value)==null?void 0:I.account)||((_=_e.value)==null?void 0:_.账号)}`)}}},en=()=>{Le.value=!1},ln=e=>{G("rowClick",e)};l.watch(()=>s.changedContent,()=>{var r,n;if(!s.changedContent)return;let e=(r=Z.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));Z.value=e,G("contentChange",{contents:a,index:s.index}),G("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=ye.value,a=sessionStorage.getItem("systemKey"),r=await ae.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=>(Ue.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 P,V,o,m,g,T,x,H;Ue.setImportLoading(!0),De.setFreshContent(!1);let n=await nn().catch(j=>(Ue.setImportLoading(!1),Promise.reject(j)));n=n==null?void 0:n.filter(j=>{var I;return((I=j==null?void 0:j.find(_=>_==null?void 0:_.id))==null?void 0:I.id)===(a==null?void 0:a.id)});let t=ae.getEqualChild([(P=W.value)==null?void 0:P.filter(j=>(j==null?void 0:j.label)!=="操作")]);const i=(o=(V=ae.tableToForm(n,t))==null?void 0:V[0])==null?void 0:o.find(j=>{const I=j==null?void 0:j.key;return I==="算法体"||I==="方法体"}),u=i==null?void 0:i.value;if(!u){console.log("未搜索到isMain, 缺少算法执行接口"),Ue.setImportLoading(!1);return}const c=W.value?ae.getEqualChild([W.value]):[],d=c.find(j=>{const I=j==null?void 0:j.prop;return I==="输入"||I==="输入数据.输入1"||I==="样本输入数据"}),f=d==null?void 0:d.prop;let S=a==null?void 0:a[f];const w=await Rl().catch(j=>(Ue.setImportLoading(!1),Promise.reject(j))),F=await rn(u,{token:w,inputData:S}).catch(j=>(Ue.setImportLoading(!1),Promise.reject(j))),h=(m=F==null?void 0:F.data)==null?void 0:m.data,A=c.find(j=>(j==null?void 0:j.prop)==="输出数据.输出1"),O=A==null?void 0:A.prop;let E=[],z=[];if(((g=Object.values(h))==null?void 0:g.length)>0){let j=[];const I=new FormData,_=(T=on(h))==null?void 0:T.map(async v=>{var K,B;if(!Array.isArray(v)&&(v!=null&&v.includes("http"))){let D=await k.axios.get(v,{responseType:"blob"}),q=(B=v==null?void 0:v.split("/"))==null?void 0:B[((K=v==null?void 0:v.split("/"))==null?void 0:K.length)-1];I.append("files",D.data,q)}else j.push(v)});if(await Promise.all(_),!ae.isFormDataEmpty(I)){let v=await ae.uploadAmountApi(I),K=(H=(x=v==null?void 0:v.data)==null?void 0:x.result)==null?void 0:H.map(B=>{var D,q,C,R,y,X;return{name:(X=(y=(R=(D=B==null?void 0:B.url)==null?void 0:D.split("/"))==null?void 0:R[((C=(q=B==null?void 0:B.url)==null?void 0:q.split("/"))==null?void 0:C.length)-1])==null?void 0:y.split("."))==null?void 0:X[0],url:B==null?void 0:B.url}});j=[...j,...K]}let N={};for(let v in a)v!=="id"&&(N[v]=a[v]);N[O]=j,z.push({id:a==null?void 0:a.id,value:{tableData:N}})}(z==null?void 0:z.length)>0&&await k.batchUpdateInsofDataApi({dataList:z}),(E==null?void 0:E.length)>0&&await k.batchAddInsofDataApi({dataList:E}),xl(!0),Ue.setImportLoading(!1),De.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),Te=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=()=>{Te.show=!1},un=e=>{var a,r;if((e==null?void 0:e.buttonName)==="取消")return Te.show=!1;Te.to=e==null?void 0:e.content,!(!(s!=null&&s.index)||!((a=Te.to)!=null&&a.groupName))&&(s==null?void 0:s.index)!==((r=Te.to)==null?void 0:r.groupName)&&(G("change",{buttonName:"迁移",value:{from:Te.from,to:Te.to,data:Te.selectRow}}),Te.show=!1)},Ml=async(e,a,r)=>{var n,t,i,u,c,d,f,S,w,F,h,A,O,E,z;if(Ye.value="",wl.value=!0,Al.value=!0,G("onButtonClick",e,a),e==="删除")Vl.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var P,V;(P=Z.value)!=null&&P.find(o=>(o==null?void 0:o.id)===(a==null?void 0:a.id))?Z.value=(V=k.cloneDeep(Z.value))==null?void 0:V.filter(o=>(o==null?void 0:o.id)!==(a==null?void 0:a.id)):Z.value=na(k.cloneDeep(Z.value),a),Yn(Ul.value,Ie.value,a==null?void 0:a.id),De.setTableLoading(s==null?void 0:s.index),G("change",{content:Z.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:W.value})});else if(e==="批量删除"){if(((n=He.value)==null?void 0:n.length)===0)return k.ElMessage.warning("请先勾选操作的数据");Vl.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,o;const P=(V=He.value)==null?void 0:V.map(m=>m.id);Z.value=(o=k.cloneDeep(Z.value))==null?void 0:o.filter(m=>!(P!=null&&P.includes(m.id))),De.setTableLoading(s==null?void 0:s.index),G("change",{content:Z.value,singleContent:null,selectItems:He.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:W.value})})}else if(e==="复制新增"){Je.value="新增";const P=k.cloneDeep(a),V=(t=W.value)==null?void 0:t.find(g=>g==null?void 0:g.isMainKey),o=V||((i=W.value)==null?void 0:i[0]),m=(u=sl.value)==null?void 0:u.find(g=>(g==null?void 0:g.label)==="新建");await oa(!0,m,{data:P,firstCol:o})}else if(e==="新增")Je.value="新增",Cl(""),Ze.value=!0;else if(e==="编辑")Je.value="编辑",Cl(a),Ze.value=!0;else if(e==="查看")Je.value="查看",Cl(a),wl.value=!1,Al.value=!1,Ze.value=!0;else if(e==="查看三维模型"){const P={};for(let o in a)o!=="id"&&(P[o]=a[o]);let V=(c=Object.values(P))==null?void 0:c[1];Na.setTableShowThree(V)}else if(((d=r==null?void 0:r.extra)==null?void 0:d.type)==="modelExample")Je.value=e,_l.value=!0;else if(e==="新建"){let P=ol.value,V=[];for(let x in P)x!=null&&x.includes(`loading${((f=_e.value)==null?void 0:f.account)||((S=_e.value)==null?void 0:S.账号)}`)&&(V=[...V,...x]);let o=[];for(let x in P)x!=null&&x.includes(`updateLoading${((w=_e.value)==null?void 0:w.account)||((F=_e.value)==null?void 0:F.账号)}`)&&(o=[...o,...x]);let m=V==null?void 0:V.map(x=>x==null?void 0:x.id);const g=o==null?void 0:o.map(x=>x==null?void 0:x.id);m=[...k.cloneDeep(m),...g],(m==null?void 0:m.length)>0&&(m!=null&&m.every(x=>x!==null&&x))&&await k.batchDeleteInsofDataApi({ids:m});const T=(h=sl.value)==null?void 0:h.find(x=>(x==null?void 0:x.label)==="新建");await oa(!1,T)}else if(e==="修改模板"){let P=k.cloneDeep(ye).value;De.setRouteToChildPath(P),Ue.setActiveMenuPath(P+ge)}else if(e==="执行")tn(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((A=He.value)==null?void 0:A.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((O=Z.value)==null?void 0:O.length)===0)return k.ElMessage.warning("暂无数据导出");const P=(z=(E=W.value)==null?void 0:E.map(o=>o==null?void 0:o.label))==null?void 0:z.filter(o=>o!=="操作"),V=e==="导出全部"?k.cloneDeep(Z.value):k.cloneDeep(He.value);V==null||V.forEach(o=>{o==null||delete o.id}),Pa(V,s==null?void 0:s.compName,P,s==null?void 0:s.compName)}else e==="迁移"&&(Te.selectRow=a,Te.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 f;return{id:d==null?void 0:d.id,...(f=d==null?void 0:d.value)==null?void 0:f.pageData}}):[]},dn=async(e,a)=>{var r,n,t,i,u,c,d,f,S,w,F,h,A,O,E,z,P,V,o,m;try{let g,T;const x=(r=ol.value[ye.value+ge])==null?void 0:r.filter(B=>{var D;return((D=B==null?void 0:B.key)==null?void 0:D.type)==="structureMethod"}),H=(n=ol.value[ye.value+ge])==null?void 0:n.filter(B=>{var D;return((D=B==null?void 0:B.key)==null?void 0:D.type)==="structure"}),j=x==null?void 0:x.find(B=>{var D,q;return((q=(D=B==null?void 0:B.value)==null?void 0:D.pageData)==null?void 0:q.method)==="保存"});if(!j)return;const I=(c=(u=ol.value[(i=(t=j==null?void 0:j.value)==null?void 0:t.pageData)==null?void 0:i.path])==null?void 0:u.filter(B=>{var D;return((D=B==null?void 0:B.key)==null?void 0:D.type)==="data"}))==null?void 0:c.find(B=>{var D,q,C,R;return((q=(D=B==null?void 0:B.value)==null?void 0:D.tableData)==null?void 0:q.算法名称)===((R=(C=j==null?void 0:j.value)==null?void 0:C.pageData)==null?void 0:R.method)});if(!I)return;const _={buttonName:(f=(d=j==null?void 0:j.value)==null?void 0:d.pageData)==null?void 0:f.method,api:(w=(S=I==null?void 0:I.value)==null?void 0:S.tableData)==null?void 0:w.算法体,content:H==null?void 0:H.map(B=>{var D;return(D=B==null?void 0:B.value)==null?void 0:D.pageData}),extraContent:[],extraValues:(h=(F=j==null?void 0:j.value)==null?void 0:F.pageData)==null?void 0:h.data,methodName:(O=(A=j==null?void 0:j.value)==null?void 0:A.pageData)==null?void 0:O.path};if(!e)return;const N={...e,compData:(E=e==null?void 0:e.compData)==null?void 0:E.map(B=>{var D;return(B==null?void 0:B.key)==="formContent"?{...B,contents:(D=B==null?void 0:B.contents)==null?void 0:D.map(q=>(q==null?void 0:q.prop)===a?{...q,value:""}:q)}:B})},v={key:{pageKey:ye.value+ge,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:N}},K=await k.axios.post(_.api,v,{headers:{"Content-Type":"application/json"}});return((z=K==null?void 0:K.data)==null?void 0:z.code)===200&&(g=(V=(P=K==null?void 0:K.data)==null?void 0:P.result)==null?void 0:V.latestReportCode,T=(m=(o=K==null?void 0:K.data)==null?void 0:o.result)==null?void 0:m.status),{newMainKeyValue:g,newStatus:T}}catch(g){throw k.ElMessage.error(g),new Error(g)}},ra=(e,a,r,n)=>{var t;G("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,f;let n=e==null?void 0:e[a==null?void 0:a.prop],t=1,i,u;const c=k.cloneDeep(ye).value+ge+n;if(c){Sl.value="",i=(d=ol.value[c])==null?void 0:d.filter(F=>{var h;return((h=F==null?void 0:F.key)==null?void 0:h.type)==="structure"});const S=i==null?void 0:i.find(F=>{var h,A,O;return((O=(A=(h=F==null?void 0:F.value)==null?void 0:h.pageData)==null?void 0:A.comp)==null?void 0:O.toUpperCase())==="FORM"});u={...(f=S==null?void 0:S.value)==null?void 0:f.pageData,id:S==null?void 0:S.id};const w=await dn(u,a==null?void 0:a.prop);if(Sl.value=w==null?void 0:w.newStatus,w!=null&&w.newMainKeyValue)return w==null?void 0:w.newMainKeyValue}if(Z.value.some(S=>(S==null?void 0:S[a==null?void 0:a.prop])===n)){const S=n;for(;Z.value.some(w=>(w==null?void 0:w[a==null?void 0:a.prop])===`${S}(${t})`);)t++;n=`${S}(${t})`}return n},oa=async(e,a,r)=>{var u,c,d,f,S,w,F,h;let n,t;const i=await fn(r==null?void 0:r.data,r==null?void 0:r.firstCol);if(e?(n=k.cloneDeep(ye).value+ge+((f=r==null?void 0:r.data)==null?void 0:f[(d=r==null?void 0:r.firstCol)==null?void 0:d.prop]),t=k.cloneDeep(ye).value+ge+i):(n=k.cloneDeep(ye).value+ge,t=k.cloneDeep(n)+`loading${((u=_e.value)==null?void 0:u.account)||((c=_e.value)==null?void 0:c.账号)}`),a){const A=(w=(S=ol.value[t])==null?void 0:S.filter(O=>{var E;return((E=O==null?void 0:O.key)==null?void 0:E.parentTable)===""}))==null?void 0:w.map(O=>{var E;return{id:O==null?void 0:O.id,...(E=O==null?void 0:O.value)==null?void 0:E.pageData}});if((A==null?void 0:A.length)>0)if(e){const O=A==null?void 0:A.find(E=>{var z;return((z=E==null?void 0:E.comp)==null?void 0:z.toUpperCase())==="FORM"});O&&ra(O,(F=r==null?void 0:r.firstCol)==null?void 0:F.label,i,ye.value)}else De.setRouteToChildPath(k.cloneDeep(ye).value),Ue.setActiveMenuPath(t);else if(await ae.loadingConstruct(n,t,null,null,e?pn.value:null),e){const O=await cn(t);if((O==null?void 0:O.length)>0){const E=O==null?void 0:O.find(z=>{var P;return((P=z==null?void 0:z.comp)==null?void 0:P.toUpperCase())==="FORM"});E&&ra(E,(h=r==null?void 0:r.firstCol)==null?void 0:h.label,i,ye.value)}}else De.setRouteToChildPath(k.cloneDeep(ye).value),Ue.setActiveMenuPath(t)}else e?(Ye.value="",je.value=r==null?void 0:r.data,xl(!0,r==null?void 0:r.firstCol,i)):(De.setRouteToChildPath(k.cloneDeep(ye).value),Ue.setActiveMenuPath(t))},gn=()=>{re.value=!1,bl.value=[],Me.value=!1},Cl=e=>{var u,c,d,f,S,w,F,h,A,O,E,z,P,V;const a=[];let r=[];for(let o in e)Array.isArray(e==null?void 0:e[o])&&r.push(o);ze.value=k.cloneDeep(W.value),(c=ae.getColumnChild((u=k.cloneDeep(W.value))==null?void 0:u.filter(o=>(o==null?void 0:o.label)!=="操作")))==null||c.forEach((o,m)=>{var g;r.find(T=>T===(o==null?void 0:o.prop))||(o!=null&&o.formType&&((g=o==null?void 0:o.formType)==null?void 0:g.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||(Ye.value=(e==null?void 0:e.id)??"");let n=ae.getColumnChild((d=k.cloneDeep(W.value))==null?void 0:d.filter(o=>(o==null?void 0:o.label)!=="操作"));qe.value&&((f=qe.value)==null?void 0:f.length)>0&&(qe.value=(S=k.cloneDeep(qe).value)==null?void 0:S.map(o=>{var g;let m=(o==null?void 0:o.prop)||((g=n==null?void 0:n.find(T=>(T==null?void 0:T.label)===(o==null?void 0:o.label)))==null?void 0:g.prop);return m&&(o.value=e[m]),o})),Ae.value=qe.value&&((w=qe.value)==null?void 0:w.length)>0?ae.getTableFormToForm(qe.value):a;let t=[],i=(F=s.itemData)==null?void 0:F.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 g;return(g=m==null?void 0:m.content)==null?void 0:g.includes("@Select")});if(o!=null&&o.content){let m=(O=(A=(h=o==null?void 0:o.content)==null?void 0:h.replace(":",Xe))==null?void 0:A.split(Xe))==null?void 0:O[1];if(((E=m==null?void 0:m.trim())==null?void 0:E.toUpperCase())==="MANUAL"){let g=(P=(z=s.itemData)==null?void 0:z.find(T=>(T==null?void 0:T.key)==="contentTableId"))==null?void 0:P.contents;Ae.value=(V=Ae.value)==null?void 0:V.map((T,x)=>{var H;return x===0&&(T.type="Select",(H=T==null?void 0:T.optionUrl)!=null&&H.menuId?(T.optionUrl.menuId=g,T.optionUrl.menuFilter=t):T.optionUrl={menuId:g,menuFilter:t}),T})}}}},hn=()=>{var a;const e=(a=$.value)==null?void 0:a.$el;e&&ae.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),W.value=(u=W.value)==null?void 0:u.slice().sort((c,d)=>{if(c.label==="操作")return 1;if(d.label==="操作")return-1;const f=ml.value.findIndex(w=>w.label===c.label),S=ml.value.findIndex(w=>w.label===d.label);return f-S})}})};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)===Ye.value){let c={};for(let d in t){let f=(i=a==null?void 0:a.find(S=>(S==null?void 0:S.prop)===d))==null?void 0:i.label;f?c[d]=(u=je.value)==null?void 0:u[f]:c[d]=t[d]}t=Object.assign(c,je.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)===Ye.value)?r=e==null?void 0:e.map(t=>{var i,u;if((t==null?void 0:t.id)===Ye.value){let c={};for(let d in t){let f=(i=a==null?void 0:a.find(S=>(S==null?void 0:S.prop)===d))==null?void 0:i.label;f?c[d]=(u=je.value)==null?void 0:u[f]:c[d]=t[d]}t=Object.assign(c,je.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)===Ye.value){let f={};for(let S in t){let w=(i=a==null?void 0:a.find(F=>(F==null?void 0:F.prop)===S))==null?void 0:i.label;w?f[S]=(u=je.value)==null?void 0:u[w]:f[S]=t[S]}t=Object.assign(f,je.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 f,S,w,F,h,A,O,E,z,P,V,o,m,g,T,x,H,j,I,_,N,v,K,B,D,q;let n=ae.getColumnChild((f=k.cloneDeep(W.value))==null?void 0:f.filter(C=>(C==null?void 0:C.label)!=="操作")),t,i=k.cloneDeep(Z.value);if(!je.value){Ze.value=!1;return}if(Ye.value===""){pl.value++;let C;a&&r?C={id:pl.value.toString(),[a==null?void 0:a.prop]:r,children:je.value.children}:C={id:pl.value.toString()},C!=null&&C.children&&(C={...C,children:(S=C.children)==null?void 0:S.map(R=>sa(R,a,r))}),i.push(Object.assign(je.value,C)),t=Object.assign(je.value,C)}else i=(w=ta(i,n))==null?void 0:w.newContents,t=(F=ta(i,n))==null?void 0:F.currentSelectContents;const u=(h=s.itemData)==null?void 0:h.filter(C=>(C==null?void 0:C.key)==="childTree")[0];if(((A=u==null?void 0:u.contents)==null?void 0:A.length)>0){Je.value="编辑";const C=[];i==null||i.forEach((R,y)=>{var ie;let X={};if(Array.isArray(R)){let ee=[];R==null||R.filter(be=>!(be!=null&&be.id)).forEach((be,he)=>{var U,p,de,ue,ce,xe,Ne;if((p=(U=We.value)==null?void 0:U[he])!=null&&p.prop&&!Array.isArray(be)){let Ve={};Ve[We.value[he].column]=be,me!=null&&me.value&&((de=me==null?void 0:me.value)==null?void 0:de.length)>0&&((ue=me==null?void 0:me.value)!=null&&ue.find(ve=>JSON.stringify(ve==null?void 0:ve[0])===JSON.stringify(Ve)))&&(ee=(ce=me==null?void 0:me.value)==null?void 0:ce.find(ve=>JSON.stringify(ve==null?void 0:ve[0])===JSON.stringify(Ve))),ee&&ee.length>0?X[We.value[he].prop]=ee!=null&&ee.find(ve=>{var Pe;return((Pe=Object.keys(ve))==null?void 0:Pe[0])===We.value[he].column})?(xe=ee==null?void 0:ee.find(ve=>{var Pe;return((Pe=Object.keys(ve))==null?void 0:Pe[0])===We.value[he].column}))==null?void 0:xe[We.value[he].column]:be:X[We.value[he].prop]=be}else Array.isArray(be)&&((Ne=We.value[he])!=null&&Ne.prop?X[We.value[he].prop]=be:X.children=Ql(be,We.value))})}else X=R;Array.isArray(R)&&R.some(ee=>ee==null?void 0:ee.id)?C.push(Object.assign(X,{id:(ie=R==null?void 0:R.find(ee=>ee.id))==null?void 0:ie.id})):X.id?C.push(X):C.push(Object.assign(X,{id:y.toString()}))}),Z.value=pa(C,u,W.value)}else Z.value=i;ca(Z.value),Ul.value=Z.value;const c=In(Ul.value,Ie.value,i);let d=[];if(yl.value?(d=(O=k.cloneDeep(yl).value.singleContent)==null?void 0:O.filter(C=>(C==null?void 0:C.id)!==(t==null?void 0:t.id)),d.push(t)):d=[t],Ge.value){const C={content:c,singleContent:((E=u==null?void 0:u.contents)==null?void 0:E.length)>0?d==null?void 0:d.flatMap(Wl):d,index:s==null?void 0:s.index,buttonName:"编辑",column:W.value,parentTableId:s==null?void 0:s.parentTableId};De.setCacheUpdatingData(C)}if(e&&!((V=(P=(z=Ae.value)==null?void 0:z[0])==null?void 0:P.optionUrl)!=null&&V.menuId)){let C=(T=(g=(m=(o=s.itemData)==null?void 0:o.find(y=>(y==null?void 0:y.key)==="filterAllType"))==null?void 0:m.value)==null?void 0:g.find(y=>(y==null?void 0:y.value)==="onConditionContents"))==null?void 0:T.content;const R={content:c,singleContent:((x=u==null?void 0:u.contents)==null?void 0:x.length)>0?Wl(t):t,index:s==null?void 0:s.index,buttonName:Je.value,column:W.value,parentTableId:s==null?void 0:s.parentTableId,filter:C};De.setTableLoading(s==null?void 0:s.index),Ze.value=!1,je.value=void 0,G("change",R)}if((I=(j=(H=Ae.value)==null?void 0:H[0])==null?void 0:j.optionUrl)!=null&&I.menuId){Ze.value=!1;let C=(_=s.itemData)==null?void 0:_.filter(R=>(R==null?void 0:R.key)==="filterAllType");if((C==null?void 0:C.length)>0){let y=(K=(v=(N=(C==null?void 0:C.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:N.content)==null?void 0:v.split(":"))==null?void 0:K[1];y=parseInt(y),Z.value=(q=Z.value)==null?void 0:q.slice(((B=Z.value)==null?void 0:B.length)-y,(D=Z.value)==null?void 0:D.length)}}};l.onUnmounted(()=>{W.value=[],Z.value=[],ze.value=[],Ee.value=[],qe.value=[],tl.value=[],bl.value=[],fl.value=[],Ae.value=[],He.value=[],$.value=null});const ia=async(e,a,r)=>{var f,S,w,F,h,A,O,E,z,P,V;ul.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((g,T)=>{var x,H,j,I,_,N,v,K,B,D,q,C,R,y,X,ie,ee,be,he;return g.type=g!=null&&g.type?g.type:(I=(j=(H=(x=g==null?void 0:g.key)==null?void 0:x.split("$"))==null?void 0:H[1])==null?void 0:j.split("("))!=null&&I[0]?(N=(_=ae.FormType)==null?void 0:_.find(U=>{var p,de,ue,ce;return(U==null?void 0:U.key)===((ce=(ue=(de=(p=g==null?void 0:g.key)==null?void 0:p.split("$"))==null?void 0:de[1])==null?void 0:ue.split("("))==null?void 0:ce[0])}))==null?void 0:N.value:"Input",g.options=g!=null&&g.options?g.options:((B=(K=(v=g==null?void 0:g.key)==null?void 0:v.split("$"))==null?void 0:K[1])==null?void 0:B.length)>0?(R=(C=Hl((q=(D=g==null?void 0:g.key)==null?void 0:D.split("$"))==null?void 0:q[1]))==null?void 0:C.split(","))==null?void 0:R.map(U=>({label:U,value:U})):[],(y=g==null?void 0:g.key)!=null&&y.includes("$")&&(g.key=(ie=(X=g==null?void 0:g.key)==null?void 0:X.split("$"))==null?void 0:ie[0]),g.value=(ee=Object.values(a))==null?void 0:ee[T],g.optionUrl=g!=null&&g.formMenuSelect&&((be=g==null?void 0:g.formMenuSelect)==null?void 0:be.length)>0?{groupSelect:(he=g==null?void 0:g.groupSelect)==null?void 0:he.split(/[::]/).map(U=>U.trim()),menuSelect:g==null?void 0:g.formMenuSelect,selectRelateType:"",type:(g==null?void 0:g.formType)??(g!=null&&g.groupSelect?"Select":"")}:null,g})),o});let i=k.cloneDeep(Ae.value),u=(S=(f=k.cloneDeep(t))==null?void 0:f.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:S.contents;i=i==null?void 0:i.map(o=>{var m;return o.value=(m=u==null?void 0:u.find((g,T)=>T===(o==null?void 0:o.id)))==null?void 0:m.value,o});let c="",d=(h=(F=(w=k.cloneDeep(t))==null?void 0:w.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:F.contents)==null?void 0:h.find((o,m)=>{var g,T,x;return(o==null?void 0:o.label)===ul.value||(m==null?void 0:m.toString())===((x=(T=(g=ul.value)==null?void 0:g.split("a"))==null?void 0:T[1])==null?void 0:x.toString())});if((E=(O=(A=k.cloneDeep(t))==null?void 0:A.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:O.contents)==null||E.forEach(o=>{var m,g,T,x,H;c===""&&((T=(g=(m=o==null?void 0:o.optionUrl)==null?void 0:m.groupSelect)==null?void 0:g[1])!=null&&T.includes("["))&&(c=(H=(x=o==null?void 0:o.optionUrl)==null?void 0:x.groupSelect)==null?void 0:H[1])}),(z=d==null?void 0:d.optionUrl)!=null&&z.menuSelect){let o=await Xl(d),m;if(o==null||o.forEach(g=>{var T,x,H,j,I,_,N,v,K,B;c===((x=(T=d==null?void 0:d.optionUrl)==null?void 0:T.groupSelect)==null?void 0:x[1])&&((I=(j=(H=d==null?void 0:d.optionUrl)==null?void 0:H.groupSelect)==null?void 0:j[1])!=null&&I.includes("["))&&((B=k.cloneDeep(g))==null?void 0:B[(K=(v=(N=(_=d==null?void 0:d.optionUrl)==null?void 0:_.groupSelect)==null?void 0:N[1])==null?void 0:v.replaceAll("[",""))==null?void 0:K.replaceAll("]","")])===(d==null?void 0:d.value)&&(m=g)}),m){let g=k.cloneDeep(i);g=g==null?void 0:g.map(x=>{var H,j,I,_,N,v,K,B,D,q,C;return(m!=null&&m[x==null?void 0:x.label]||m!=null&&m[(_=(I=(j=(H=x==null?void 0:x.optionUrl)==null?void 0:H.groupSelect)==null?void 0:j[1])==null?void 0:I.replaceAll("[",""))==null?void 0:_.replaceAll("]","")])&&((K=(v=(N=x==null?void 0:x.optionUrl)==null?void 0:N.groupSelect)==null?void 0:v[1])!=null&&K.includes("["))&&(x.value=(m==null?void 0:m[x==null?void 0:x.label])||(m==null?void 0:m[(C=(q=(D=(B=x==null?void 0:x.optionUrl)==null?void 0:B.groupSelect)==null?void 0:D[1])==null?void 0:q.replaceAll("[",""))==null?void 0:C.replaceAll("]","")])),x}),Z.value=(P=k.cloneDeep(Z.value))==null?void 0:P.map(x=>{if((x==null?void 0:x.id)===(a==null?void 0:a.id)){const H={};return g==null||g.forEach(j=>{H[j.name]=j.value}),H.id=x==null?void 0:x.id,H}return x});let T=k.cloneDeep(g);T=T==null?void 0:T.map(x=>{var H,j,I,_;return(j=(H=x==null?void 0:x.optionUrl)==null?void 0:H.menuSelect)!=null&&j.some(N=>N==null?void 0:N.includes)&&(x.optionUrl.menuSelect=(_=(I=x==null?void 0:x.optionUrl)==null?void 0:I.menuSelect)==null?void 0:_.map(N=>{var v,K,B,D;if(N!=null&&N.includes("[")){let q=(K=(v=N==null?void 0:N.replaceAll("[","").replaceAll("]",""))==null?void 0:v.split(":"))==null?void 0:K[1];N=(D=(B=k.cloneDeep(g))==null?void 0:B.find(C=>(C==null?void 0:C.label)===q))==null?void 0:D.value}return N})),x}),Z.value=(V=k.cloneDeep(Z.value))==null?void 0:V.map(x=>{if((x==null?void 0:x.id)===(a==null?void 0:a.id)){const H={};return T==null||T.forEach(j=>{H[j.name]=j.value}),H.id=x==null?void 0:x.id,H}return x})}}},vn=async e=>{var S,w,F,h,A,O,E,z,P,V,o,m,g,T,x,H,j,I;if(!e)return;je.value=e;const a=k.cloneDeep(s.itemData);let r=a==null?void 0:a.map(_=>{var N;return(_==null?void 0:_.key)==="header"&&((N=_.contents)==null||N.map((v,K)=>{var B,D,q,C,R,y,X,ie,ee,be,he,U,p,de,ue,ce,xe,Ne,Ve;return v.type=v!=null&&v.type?v.type:(C=(q=(D=(B=v==null?void 0:v.key)==null?void 0:B.split("$"))==null?void 0:D[1])==null?void 0:q.split("("))!=null&&C[0]?(y=(R=ae.FormType)==null?void 0:R.find(ve=>{var Pe,Fe,al,nl;return(ve==null?void 0:ve.key)===((nl=(al=(Fe=(Pe=v==null?void 0:v.key)==null?void 0:Pe.split("$"))==null?void 0:Fe[1])==null?void 0:al.split("("))==null?void 0:nl[0])}))==null?void 0:y.value:"Input",v.options=v!=null&&v.options?v.options:((ee=(ie=(X=v==null?void 0:v.key)==null?void 0:X.split("$"))==null?void 0:ie[1])==null?void 0:ee.length)>0?(p=(U=Hl((he=(be=v==null?void 0:v.key)==null?void 0:be.split("$"))==null?void 0:he[1]))==null?void 0:U.split(","))==null?void 0:p.map(ve=>({label:ve,value:ve})):[],(de=v==null?void 0:v.key)!=null&&de.includes("$")&&(v.key=(ce=(ue=v==null?void 0:v.key)==null?void 0:ue.split("$"))==null?void 0:ce[0]),v.value=(xe=Object.values(e))==null?void 0:xe[K],v.optionUrl=v!=null&&v.formMenuSelect&&((Ne=v==null?void 0:v.formMenuSelect)==null?void 0:Ne.length)>0?{groupSelect:(Ve=v==null?void 0:v.groupSelect)==null?void 0:Ve.split(/[::]/).map(ve=>ve.trim()),menuSelect:v==null?void 0:v.formMenuSelect,selectRelateType:"",type:(v==null?void 0:v.formType)??(v!=null&&v.groupSelect?"Select":"")}:null,v})),_}),n=Ae.value,t=(w=(S=k.cloneDeep(r))==null?void 0:S.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:w.contents;if(t=t==null?void 0:t.filter(_=>(_==null?void 0:_.label)!=="操作"),t.push({label:"操作",type:"operate"}),n=n==null?void 0:n.map(_=>{var N;return _.value=_.value??((N=t==null?void 0:t.find((v,K)=>(v==null?void 0:v.prop)===(_==null?void 0:_.name)))==null?void 0:N.value),_}),!kl.value)return;let i="",u=(A=(h=(F=k.cloneDeep(r))==null?void 0:F.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:h.contents)==null?void 0:A.find((_,N)=>{var v,K,B;return(_==null?void 0:_.label)===ul.value||(N==null?void 0:N.toString())===((B=(K=(v=ul.value)==null?void 0:v.split("a"))==null?void 0:K[1])==null?void 0:B.toString())}),c=(O=u==null?void 0:u.optionUrl)==null?void 0:O.menuSelect,d=!0;(P=(z=(E=k.cloneDeep(r))==null?void 0:E.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:z.contents)==null||P.forEach(_=>{var N,v,K,B,D,q;d&&((K=(v=(N=_==null?void 0:_.optionUrl)==null?void 0:N.groupSelect)==null?void 0:v[1])!=null&&K.includes("["))&&(i=(D=(B=_==null?void 0:_.optionUrl)==null?void 0:B.groupSelect)==null?void 0:D[1],JSON.stringify(c)===JSON.stringify((q=_==null?void 0:_.optionUrl)==null?void 0:q.menuSelect)&&(d=!1))});let f=k.cloneDeep(n);if(f=f==null?void 0:f.map(_=>{var N,v;return(_==null?void 0:_.type)==="Select"&&((v=(N=_==null?void 0:_.optionUrl)==null?void 0:N.allSelectionContents)==null?void 0:v.length)>0&&(_.optionUrl.contactValue=e),_.value=e==null?void 0:e[_==null?void 0:_.prop],_}),Ae.value=k.cloneDeep(f),(V=u==null?void 0:u.optionUrl)!=null&&V.menuSelect&&kl.value||(g=(m=(o=Ae.value)==null?void 0:o[0])==null?void 0:m.optionUrl)!=null&&g.menuId){let _=await Xl(u,(H=(x=(T=Ae.value)==null?void 0:T[0])==null?void 0:x.optionUrl)==null?void 0:H.menuId),N;if((j=u==null?void 0:u.optionUrl)==null||j.menuSelect,_==null||_.forEach(v=>{var K,B,D,q,C,R,y,X,ie,ee,be,he,U,p,de,ue,ce;i===((B=(K=u==null?void 0:u.optionUrl)==null?void 0:K.groupSelect)==null?void 0:B[1])&&((C=(q=(D=u==null?void 0:u.optionUrl)==null?void 0:D.groupSelect)==null?void 0:q[1])!=null&&C.includes("["))&&((ee=k.cloneDeep(v))==null?void 0:ee[(ie=(X=(y=(R=u==null?void 0:u.optionUrl)==null?void 0:R.groupSelect)==null?void 0:y[1])==null?void 0:X.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])===(u==null?void 0:u.value)&&(N=v),(U=(he=(be=Ae.value)==null?void 0:be[0])==null?void 0:he.optionUrl)!=null&&U.menuId&&v[(de=(p=Ae.value)==null?void 0:p[0])==null?void 0:de.prop]===e[(ce=(ue=Ae.value)==null?void 0:ue[0])==null?void 0:ce.prop]&&(N=v)}),N){let v=k.cloneDeep(n);v=v==null?void 0:v.map(D=>{var q,C,R,y,X,ie,ee,be,he,U,p,de,ue,ce,xe,Ne,Ve,ve;return(N!=null&&N[D==null?void 0:D.label]||N!=null&&N[(y=(R=(C=(q=D==null?void 0:D.optionUrl)==null?void 0:q.groupSelect)==null?void 0:C[1])==null?void 0:R.replaceAll("[",""))==null?void 0:y.replaceAll("]","")])&&((ee=(ie=(X=D==null?void 0:D.optionUrl)==null?void 0:X.groupSelect)==null?void 0:ie[1])!=null&&ee.includes("["))&&(D.value=(N==null?void 0:N[D==null?void 0:D.label])||(N==null?void 0:N[(p=(U=(he=(be=D==null?void 0:D.optionUrl)==null?void 0:be.groupSelect)==null?void 0:he[1])==null?void 0:U.replaceAll("[",""))==null?void 0:p.replaceAll("]","")])),(ce=(ue=(de=Ae.value)==null?void 0:de[0])==null?void 0:ue.optionUrl)!=null&&ce.menuId&&(D.value=(N==null?void 0:N[D==null?void 0:D.label])||(N==null?void 0:N[(ve=(Ve=(Ne=(xe=D==null?void 0:D.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:Ne[1])==null?void 0:Ve.replaceAll("[",""))==null?void 0:ve.replaceAll("]","")])),D}),Ae.value=k.cloneDeep(v);let K=k.cloneDeep(v);K=K==null?void 0:K.map(D=>{var q,C,R,y,X,ie;return(C=(q=D==null?void 0:D.optionUrl)==null?void 0:q.menuSelect)!=null&&C.some(ee=>ee==null?void 0:ee.includes("["))&&(D.optionUrl.oldMenuSelect=(y=(R=k.cloneDeep(D))==null?void 0:R.optionUrl)==null?void 0:y.menuSelect,D.optionUrl.menuSelect=(ie=(X=D==null?void 0:D.optionUrl)==null?void 0:X.menuSelect)==null?void 0:ie.map(ee=>{var be,he,U,p;if(ee!=null&&ee.includes("[")){let de=(he=(be=ee==null?void 0:ee.replaceAll("[","").replaceAll("]",""))==null?void 0:be.split(":"))==null?void 0:he[1];ee=(p=(U=k.cloneDeep(v))==null?void 0:U.find(ue=>(ue==null?void 0:ue.label)===de))==null?void 0:p.value}return ee})),D}),Ae.value=K;let B={};(I=Ae.value)==null||I.forEach(D=>{B[D.prop]=D==null?void 0:D.value}),je.value=B}}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=qe.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;Z.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=Ae.value)==null?void 0:r.reduce((d,f)=>(d[f.name]=f.value,d),{});if(((n=Object.keys(a))==null?void 0:n.length)>0){je.value=a,Ye.value="",pl.value=(t=Z.value)==null?void 0:t.length,fl.value=(i=sl.value)==null?void 0:i.filter(f=>(f==null?void 0:f.label)!=="新增");const d=(c=(u=ze.value)==null?void 0:u.filter(f=>(f==null?void 0:f.label)!=="操作"))==null?void 0:c.map(f=>{var w,F,h;const S=(F=(w=qe.value)==null?void 0:w.find(A=>(A==null?void 0:A.label)===(f==null?void 0:f.label)))==null?void 0:F.multiple;return kn(f),{...f,contents:(f==null?void 0:f.options)??[],optionUrl:f!=null&&f.formMenuSelect&&((h=f==null?void 0:f.formMenuSelect)==null?void 0:h.length)>0?{groupSelect:f==null?void 0:f.groupSelect,menuSelect:f==null?void 0:f.formMenuSelect,selectRelateType:"",type:f==null?void 0:f.formType,multiple:S}:null}});W.value=d==null?void 0:d.map(f=>ua(f,[{prop:"type",value:"edit"},{prop:"columnType",value:bn(f==null?void 0:f.formType)||(f==null?void 0:f.columnType)}])),e==="createClick"&&xl(!1)}},gl={START:"开始时间",END:"结束时间",HOURS:"工时"},mn=(e,a)=>Number(ae.dayjs(a).diff(ae.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],f=mn(c,d);return c&&d&&(u[gl.HOURS]=`${f}天`),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,...f]=c,S={...d};r+1===((a==null?void 0:a.length)??"")?S.children=c==null?void 0:c.map(w=>(w.level=k.cloneDeep(r)+1,w)).filter((w,F)=>F!==0):f.length>0&&(S.children=da(f,a,r+1)),S.level=r,i.push(S)}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 F,h,A,O,E,z,P,V,o,m,g,T,x,H,j,I,_,N,v,K,B,D,q,C,R;const r=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="header");e==null||e.filter(y=>(y==null?void 0:y.key)==="tableIndexColumn")[0];const n=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="childTree")[0];let t=a;const i=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="page"),u=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="rowButton"),c=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="extraButton"),d=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableContents"),f=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableIndex");qe.value=(h=(F=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableToForm"))==null?void 0:F[0])==null?void 0:h.contents,Yl.value=(i==null?void 0:i.contents)??!0;let S=[];il.value===""?S=r==null?void 0:r[0]:S=(r==null?void 0:r.find(y=>(y==null?void 0:y.selectLabel)==="("+il.value+")"))??(r==null?void 0:r.find(y=>!(y!=null&&y.selectLabel)));let w=[];if(il.value===""?w=f==null?void 0:f[0]:w=(f==null?void 0:f.find(y=>(y==null?void 0:y.selectLabel)==="("+il.value+")"))??(f==null?void 0:f.find(y=>!(y!=null&&y.selectLabel))),((A=S==null?void 0:S.contents)==null?void 0:A.length)>0){let y=[];if(S!=null&&S.contents.some(U=>Array.isArray(U)&&(U==null?void 0:U.find(p=>p.children))))Ie.value===""?y=(E=(O=ae.getGradeColumns(S==null?void 0:S.contents))==null?void 0:O[0])==null?void 0:E.filter(U=>!Array.isArray(U)):(Ie.value.split("-"),y=(z=ae.getGradeColumns(S==null?void 0:S.contents))==null?void 0:z[0]);else{let U=S!=null&&S.contents.some(p=>Array.isArray(p))?(P=S==null?void 0:S.contents)==null?void 0:P[0]:S==null?void 0:S.contents;U==null||U.forEach((p,de)=>{var xe,Ne,Ve,ve,Pe;let ue="";(Ne=(xe=ye.value)==null?void 0:xe.split("/"))==null||Ne.forEach(Fe=>{var al,nl,hl;if(Fe!==""){let Ke=(hl=(nl=(al=Fe==null?void 0:Fe.split(ge+"updateLoading"))==null?void 0:al[0])==null?void 0:nl.split(ge+"loading"))==null?void 0:hl[0];ue=ue===""?ue+Ke:ue+"/"+Ke}}),ue=ue+ge+(p==null?void 0:p.directiveLabel);const ce=(Ve=qe.value)==null?void 0:Ve.find(Fe=>(Fe==null?void 0:Fe.prop)===(p==null?void 0:p.prop));y.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?(ve=p==null?void 0:p.groupSelect)==null?void 0:ve.replaceAll('"',"").split(":"):[],isMainKey:p==null?void 0:p.isMainKey,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])&&!((Pe=p==null?void 0:p.directiveLabel)!=null&&Pe.includes("@"))),childPath:ue,allSelectionContents:(p==null?void 0:p.allSelectionContents)??[],selectFilter:p==null?void 0:p.selectFilter})})}W.value=ae.getNewColumnChild(y),Ee.value=ae.getNewColumnChild(y),Y.value=(V=W.value)==null?void 0:V.map(U=>U==null?void 0:U.label),ll.value=(o=W.value)==null?void 0:o.every(U=>U==null?void 0:U.filterable),se.value=(m=W.value)==null?void 0:m.every(U=>U==null?void 0:U.operable),el.value=(g=W.value)==null?void 0:g.every(U=>U==null?void 0:U.sortable);let X=(x=(T=ae.getAllLeafNodes(W.value))==null?void 0:T.filter(U=>(U==null?void 0:U.type)!=="operate"))==null?void 0:x.map((U,p)=>({prop:(U==null?void 0:U.prop)??"a"+p,column:U.label}));We.value=X;let ie=[];il.value===""?ie=d==null?void 0:d[0]:ie=(d==null?void 0:d.find(U=>(U==null?void 0:U.selectLabel)==="("+il.value+")"))??(d==null?void 0:d.find(U=>!(U!=null&&U.selectLabel)));let ee=Array.isArray((H=ie==null?void 0:ie.contents)==null?void 0:H[0])&&((j=ie==null?void 0:ie.contents)!=null&&j[0].every(U=>Array.isArray(U)))?(I=ie==null?void 0:ie.contents)==null?void 0:I[0]:ie==null?void 0:ie.contents;w!=null&&w.contents&&((_=w==null?void 0:w.contents)==null?void 0:_.length)!==0&&(ee=(N=k.cloneDeep(ee))==null?void 0:N.map((U,p)=>{if(!Array.isArray(U)){let de={};for(let ue in U)ue!=="id"&&ue!=="index"&&(de[ue]=U[ue]);U=Object.values(de)}return U}));const be=!!((v=W.value)!=null&&v.find(U=>U.prop==="index"));ee=Sa(ee,w==null?void 0:w.contents,be);const he=[];ee==null||ee.forEach((U,p)=>{var ue;let de={};if(Array.isArray(U)){let ce=[];U==null||U.filter(xe=>!(xe!=null&&xe.id)).forEach((xe,Ne)=>{var Ve,ve,Pe,Fe,al,nl;if((Ve=X==null?void 0:X[Ne])!=null&&Ve.prop&&!Array.isArray(xe)){let hl={};hl[X[Ne].column]=xe,me!=null&&me.value&&((ve=me==null?void 0:me.value)==null?void 0:ve.length)>0&&((Pe=me==null?void 0:me.value)!=null&&Pe.find(Ke=>JSON.stringify(Ke==null?void 0:Ke[0])===JSON.stringify(hl)))&&(ce=(Fe=me==null?void 0:me.value)==null?void 0:Fe.find(Ke=>JSON.stringify(Ke==null?void 0:Ke[0])===JSON.stringify(hl))),ce&&ce.length>0?de[X[Ne].prop]=ce!=null&&ce.find(Ke=>{var Dl;return((Dl=Object.keys(Ke))==null?void 0:Dl[0])===X[Ne].column})?(al=ce==null?void 0:ce.find(Ke=>{var Dl;return((Dl=Object.keys(Ke))==null?void 0:Dl[0])===X[Ne].column}))==null?void 0:al[X[Ne].column]:xe:de[X[Ne].prop]=xe}else Array.isArray(xe)&&((nl=X[Ne])!=null&&nl.prop?de[X[Ne].prop]=xe:de.children=Ql(xe,X))})}else de=U;Array.isArray(U)&&U.some(ce=>ce==null?void 0:ce.id)?he.push(Object.assign(de,{id:(ue=U==null?void 0:U.find(ce=>ce.id))==null?void 0:ue.id})):de.id?he.push(de):he.push(Object.assign(de,{id:p.toString()}))}),Z.value=pa(he,n,W.value),Bl.value=he,(K=Bl.value)==null||K.forEach(U=>{var p;(p=El.value)==null||p.set(U.id,U)})}else W.value=[],ze.value=[],Z.value=[],Bl.value=[],El.value=new Map;((B=u==null?void 0:u.contents)==null?void 0:B.length)>0?tl.value=u==null?void 0:u.contents:tl.value=[],((D=c==null?void 0:c.contents)==null?void 0:D.length)>0?(fl.value=c==null?void 0:c.contents,sl.value=c==null?void 0:c.contents):(fl.value=[],sl.value=[]),pl.value=((q=Z==null?void 0:Z.value)==null?void 0:q.length)??0,ca(Z.value),Ul.value=Z.value,Ge.value&&(W.value=(R=(C=ze.value)==null?void 0:C.filter(y=>(y==null?void 0:y.label)!=="操作"))==null?void 0:R.map(y=>{var X;return{...y,type:"edit",optionUrl:y!=null&&y.formMenuSelect&&((X=y==null?void 0:y.formMenuSelect)==null?void 0:X.length)>0?{groupSelect:y==null?void 0:y.groupSelect,menuSelect:y==null?void 0:y.formMenuSelect,selectRelateType:"",type:y==null?void 0:y.formType}:null}}),Gl())};l.watch(()=>[s.itemData,il.value,Aa.value,Ie.value,me==null?void 0:me.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(f=>(f==null?void 0:f.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),De.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),Je.value=e==null?void 0:e.dialogTitle,wl.value=!0,Ze.value=!0)},{immediate:!0,deep:!0});const ga=()=>{var e;(e=Ce.value)!=null&&e.includes("read")&&(Ge.value=!Ge.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;Ce.value=e,(e==null?void 0:e.length)===0?Ge.value=!1:(e!=null&&e.includes("read")||(Ge.value=!0),e!=null&&e.includes("edit")||(Ge.value=!1)),pe.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||Ge.value},{immediate:!0}),l.watch(()=>Ge.value,e=>{var a;e?(Gl("viewChange"),De.setCacheUpdatingData(null)):(fl.value=sl.value,W.value=Ee.value,yl.value&&(De.setTableLoading(s==null?void 0:s.index),G("change",yl.value))),ne.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=>{Te.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=Z.value)==null?void 0:r.length)/oe.pageSize))},xn=(e,a,r)=>{var n;ia(r,e,a),je.value=k.cloneDeep(e),Ye.value=e==null?void 0:e.id,pl.value=(n=Z.value)==null?void 0:n.length,Je.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",xl(!1)},$e=e=>{var d,f,S,w,F,h,A,O,E,z;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?((f=(d=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:d[0])==null?void 0:f.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]):((w=(S=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:S[0])==null?void 0:w.contents)??(a==null?void 0:a[n==null?void 0:n.prop])??((h=(F=t==null?void 0:t[n==null?void 0:n.prop])==null?void 0:F[0])==null?void 0:h.contents)??(t==null?void 0:t[n==null?void 0:n.prop])??((E=(O=a==null?void 0:a[(A=n==null?void 0:n.child)==null?void 0:A.prop])==null?void 0:O[0])==null?void 0:E.contents)??(a==null?void 0:a[(z=n==null?void 0:n.child)==null?void 0:z.prop]),c=Array.isArray(i)&&!(i!=null&&i.every(P=>typeof P=="string"||typeof P=="number"))?"查看":i;return c=Array.isArray(c)?c.join(","):c,c},Dn=e=>{var f,S,w,F,h,A,O,E,z,P;const{row:a,column:r,item:n,slotData:t}=e;let i=a!=null&&a[r==null?void 0:r.prop]?((S=(f=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:f[0])==null?void 0:S.contents)??(a==null?void 0:a[r==null?void 0:r.prop]):((F=(w=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:w[0])==null?void 0:F.contents)??(a==null?void 0:a[n==null?void 0:n.prop])??((A=(h=t==null?void 0:t[n==null?void 0:n.prop])==null?void 0:h[0])==null?void 0:A.contents)??(t==null?void 0:t[n==null?void 0:n.prop])??((z=(E=a==null?void 0:a[(O=n==null?void 0:n.child)==null?void 0:O.prop])==null?void 0:E[0])==null?void 0:z.contents)??(a==null?void 0:a[(P=n==null?void 0:n.child)==null?void 0:P.prop]);const c=Array.isArray(i)&&!(i!=null&&i.every(V=>typeof V=="string"||typeof V=="number")),d=Array.isArray(i)&&(i==null?void 0:i.find(V=>V==null?void 0:V.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){Ue.setContentLoading(!0),await l.nextTick();const a=Tn(Z.value,e==null?void 0:e.data);if(!a)return Ue.setContentLoading(!1);await aa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),Ue.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)&&(Z.value=(a=Z.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 f,S,w,F;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(Qe.ssTable,{id:"excel-table",pageObj:oe,showIndex:pe.value,isTree:(f=L.compItem)==null?void 0:f.isTree,summaryInfo:ke,columns:W.value,defaultSort:Be,isCardViewport:Ll.value,checkedColumns:Y.value,key:Kl.value+JSON.stringify(W.value),tableData:Il.value,isEditViewport:Ge.value,isShowPagination:Yl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ne.value,onDbClickRow:Ia,extraButton:fl.value,rowButton:tl.value,cacheExtraButtons:sl.value,isClearSelection:((S=He.value)==null?void 0:S.length)===0,onDoCurrentChange:ja,onDoSizeChange:$a,onContentClick:aa,onRowClick:ln,onSelectChange:qa,onCellChange:xn,onChange:ia,onPreview:ea,onSubmitEditingTable:za,onHandleColEditChange:Fa,onHandleColTypeChange:Ka,onClickButton:Ml},l.createSlots({headerButton:l.withCtx(h=>{var A,O;return[L.showHeader?(l.openBlock(),l.createBlock(qn,{key:0,pageLayout:L.pageLayout,lockingPage:l.unref(Nl)===l.unref(ye),filterValues:la.value,selectNums:(A=He.value)==null?void 0:A.length,dataNums:(O=Z.value)==null?void 0:O.length,compName:L.compName,isDevMode:L.isDevMode,buttons:h.buttons,onButtonClick:a[0]||(a[0]=E=>Ml(E,"",{})),columns:W.value,onFilter:Za,onGetImportData:Va,level:L.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var h,A,O,E;return[((h=Z.value)==null?void 0:h.length)>0&&L.allowOperate?(l.openBlock(),l.createElementBlock("div",rr,[(A=Ce.value)!=null&&A.includes("read")&&((O=Ce.value)!=null&&O.includes("edit"))&&((E=tl.value)!=null&&E.some(z=>(z==null?void 0:z.label)==="编辑"))&&!Ll.value&&l.unref(Nl)!==l.unref(ye)?(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:h,index:A})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:O=>Cn(h,A)},[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]=h=>ql(h,"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]=h=>ql(h,"filterable"))},null,8,["model-value"]),l.createVNode(t,{"model-value":se.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=h=>ql(h,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(u,{modelValue:Y.value,"onUpdate:modelValue":a[5]||(a[5]=h=>Y.value=h),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:$},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(ml.value,h=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:h.label},[l.createVNode(i,{value:h.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:h.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(h.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 A;return[l.createElementVNode("div",ur,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((A=Object.keys(h))==null?void 0:A.filter(O=>{var E;return(E=fe.value)==null?void 0:E.find(z=>(z==null?void 0:z.value)===O)}),O=>{var E,z;return l.openBlock(),l.createElementBlock("div",{key:O},[l.createVNode(t,{"model-value":h==null?void 0:h[O],"active-text":(z=(E=fe.value)==null?void 0:E.find(P=>(P==null?void 0:P.value)===O))==null?void 0:z.label,onChange:P=>Ja(P,O,h)},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(h=>{var A,O,E,z,P,V,o,m,g,T,x,H,j,I,_,N,v,K;return[Dn(h)?(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($e(h)),1)]),default:l.withCtx(()=>{var B,D;return[l.createElementVNode("div",pr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((D=h==null?void 0:h.row)==null?void 0:D[(B=h==null?void 0:h.column)==null?void 0:B.prop],q=>(l.openBlock(),l.createElementBlock("div",fr,[l.createElementVNode("div",{class:"prop-url",title:$l(q),onClick:C=>Ha(q)},l.toDisplayString($l(q)),9,gr),l.createElementVNode("div",{class:"prop-download",onClick:C=>Qa(q)}," 下载 ",8,hr)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray($e(h))&&((O=(A=$e(h))==null?void 0:A.toString())!=null&&O.includes(".txt")||(z=(E=$e(h))==null?void 0:E.toString())!=null&&z.includes(".cpt")||(V=(P=$e(h))==null?void 0:P.toString())!=null&&V.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray($e(h))&&((m=(o=$e(h))==null?void 0:o.toString())!=null&&m.includes(".txt")||(T=(g=$e(h))==null?void 0:g.toString())!=null&&T.includes(".cpt")||(H=(x=$e(h))==null?void 0:x.toString())!=null&&H.includes(".cyd"))?"underline":"",cursor:!Array.isArray($e(h))&&((I=(j=$e(h))==null?void 0:j.toString())!=null&&I.includes(".txt")||(N=(_=$e(h))==null?void 0:_.toString())!=null&&N.includes(".cpt")||(K=(v=$e(h))==null?void 0:v.toString())!=null&&K.includes(".cyd"))?"pointer":"",marginLeft:(h==null?void 0:h.colIndex)===0?`${((h==null?void 0:h.level)??0)*20}px`:0}),onClick:B=>La($e(h))},l.toDisplayString($e(h)===0?"0":$e(h)),13,yr))]}),_:2},[((w=tl.value)==null?void 0:w.length)>0&&l.unref(Nl)!==l.unref(ye)?{name:"actions",fn:l.withCtx(({item:h})=>[l.createVNode(n,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:l.withCtx(()=>[l.createVNode(r,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:l.withCtx(()=>[l.createElementVNode("div",ar,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Xa(tl.value,h),(A,O)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:O,onClick:E=>Ml(A==null?void 0:A.label,h,{extra:A})},[l.createElementVNode("div",{style:l.normalizeStyle({color:A==null?void 0:A.textColor}),class:"extra-button-label"},l.toDisplayString(A==null?void 0:A.label),5)],8,nr))),128))])]),_:2},1024)]),key:"0"}:void 0,((F=Z.value)==null?void 0:F.length)>0?{name:"batchButton",fn:l.withCtx(h=>[l.withDirectives(l.createVNode(Jn,{lockingPage:l.unref(Nl)===l.unref(ye),buttons:h.buttons,selectTableItems:He.value,onButtonClick:a[1]||(a[1]=A=>Ml(A,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,ne.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!ne.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:Je.value,visible:Ze.value,width:wa.value,onBeforeDestroy:Wa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",vr,[l.createVNode(Qe.ssForm,{rowContents:Ae.value,isEnableWrap:!1,showOperator:!1,onChange:vn,onClickTrigger:Ga,isEdit:Al.value,onBlurChange:Ra},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[wl.value?(l.openBlock(),l.createElementBlock("div",br,[l.createVNode(c,{onClick:a[6]||(a[6]=h=>Ze.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]=h=>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:Je.value,visible:_l.value,width:Fl.value,onBeforeDestroy:a[9]||(a[9]=h=>_l.value=!1)},{default:l.withCtx(()=>[l.createVNode(Xn)]),footer:l.withCtx(()=>[l.createElementVNode("div",kr,[l.createVNode(c,{onClick:a[8]||(a[8]=h=>_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"]),Le.value?(l.openBlock(),l.createBlock(Qe.ssFilePreview,{key:1,fileDataList:dl.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:Oe.value},null,8,["files","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Tl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=h=>e.componentVisible=!1),width:Fl.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(d,{dialogItem:cl.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(Tl.ssDialog,{title:Te.title,visible:Te.show,width:Te.width,onBeforeDestroy:sn},{default:l.withCtx(()=>[l.createElementVNode("div",mr,[l.createVNode(Qe.ssForm,{rowContents:Te==null?void 0:Te.contents,formRules:Te==null?void 0:Te.formRules,showOperator:!1,buttonValue:Te.buttonValue,isEdit:Al.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:un},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},Cr=Pl._export_sfc(Sr,[["__scopeId","data-v-9f164bbe"]]);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"),ae=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BXBIXUC2.cjs"),Qe=require("./index-fmOKsPMg.cjs"),ya=require("./threeViewerHost-CwSjbBmp.cjs"),Vl=require("./index-CxUHJyzF.cjs");require("./index.vue_vue_type_style_index_1_lang-anh9YB-q.cjs");const Pl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Tl=require("./index-BwXUkfCd.cjs");require("./index-DNbT4lhP.cjs");const va=require("./isString--eJE54G5.cjs"),Hl=L=>L.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(L){const le=L,Y=l.ref(null),M=l.ref(!1),$=l.ref(null);return l.watch(()=>le==null?void 0:le.isVisible,()=>{M.value=le==null?void 0:le.isVisible},{deep:!0,immediate:!0}),l.watch(()=>$.value,()=>{l.nextTick(()=>{var s,ne;(ne=(s=Y.value)==null?void 0:s.updatePopper)==null||ne.call(s)})},{deep:!0,immediate:!0}),(s,ne)=>{const pe=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(pe,{visible:M.value,title:le==null?void 0:le.title,placement:le==null?void 0:le.placement,width:le==null?void 0:le.width,ref_key:"popOverRef",ref:Y},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:$})])]),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"},$n={class:"extra-button-filter"},Mn={class:"form-content-value"},Vn={key:0,class:"extra-header"},Pn={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(L,{emit:le}){const Y=le,M=L,$=l.ref(""),s=l.ref(!1),ne=l.ref([]),pe=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Ce=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],fe=se=>{const ke=se.raw;if(!ke)return;const oe=new FileReader;oe.onload=G=>{try{const W=new Uint8Array(G.target.result),Be=ae.readSync(W,{type:"array"}),ze=Be.SheetNames[0],re=Be.Sheets[ze],Oe=ae.utils.decode_range(re["!ref"]).e.c+1,Q=new Array(Oe).fill(""),b=[];for(const J in re){if(J[0]==="!")continue;const{r:te,c:Se}=ae.utils.decode_cell(J);let Ee=re[J].v;if(re[J].t==="n"&&Ee>0&&Ee<1e6&&(Ee=new Date((Ee-25569)*86400*1e3).toISOString().split("T")[0]),(Ee==null||Ee==="")&&(Ee=""),te===0)Q[Se]=Ee;else{if(!b[te-1]){b[te-1]={};for(let Le=0;Le<Oe;Le++)b[te-1][`col_${Le}`]=""}b[te-1][`col_${Se}`]=Ee}}for(let J=0;J<Oe;J++)Q[J]===void 0&&(Q[J]="");const we=b==null?void 0:b[0];if(!(we!=null&&we.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");Y("getImportData",Q,b)}catch(W){throw k.ElMessage.error(W.message),new Error(W.message)}},oe.readAsArrayBuffer(ke)},Re=se=>{var oe;const ke=(oe=ne.value)==null?void 0:oe.reduce((G,W,Be)=>(Be===0?G[W.label]=se:G[W.label]=W==null?void 0:W.value,G),{});Y("filter",ke,se,!0)},Xe=se=>{Y("buttonClick",se)},rl=se=>{var ke,oe;ne.value=(oe=(ke=ae.getColumnChild(k.cloneDeep(se)))==null?void 0:ke.filter(G=>(G==null?void 0:G.label)!==""&&(G==null?void 0:G.label)!=="操作"))==null?void 0:oe.map(G=>({label:(G==null?void 0:G.label)??"",value:"",name:(G==null?void 0:G.label)??"",isFormColHidden:G==null?void 0:G.isTableColHidden,width:2}))},ge=l.ref(!1),el=se=>{var ke;if((se==null?void 0:se.buttonName)==="确认"&&(Y("filter",se==null?void 0:se.content),ge.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 G in oe)oe[G]="";ne.value=(ke=ne.value)==null?void 0:ke.map(G=>({...G,value:""})),Y("filter",oe),ge.value=!1}s.value=!1},ll=()=>{var ke,oe;ne.value=(ke=ne.value)==null?void 0:ke.map(G=>({...G,value:""}));const se=(oe=ne.value)==null?void 0:oe.reduce((G,W)=>(G[W.label]=W.value,G),{});Y("filter",se)};return l.onMounted(()=>{rl(M.columns)}),l.watch(()=>M.columns,()=>{rl(M.columns)},{deep:!0,immediate:!0}),(se,ke)=>{var re,Me,Oe,Q;const oe=l.resolveComponent("el-icon"),G=l.resolveComponent("svg-icon"),W=l.resolveComponent("el-input"),Be=l.resolveComponent("el-button"),ze=l.resolveComponent("el-upload");return L.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",Nn,[l.createElementVNode("div",{class:l.normalizeClass(L.compName?"table-name-wrap":""),style:l.normalizeStyle({background:(M==null?void 0:M.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((M==null?void 0:M.level)-1)*12+"px",fontWeight:600-((M==null?void 0:M.level)-1)*100>=400?600-((M==null?void 0:M.level)-1)*100:400,fontSize:17-(M==null?void 0:M.level)>=14?17-(M==null?void 0:M.level)+"px":"14px"})},l.toDisplayString(L.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 b,we,J,te;return[l.createVNode(W,{modelValue:$.value,"onUpdate:modelValue":ke[1]||(ke[1]=Se=>$.value=Se),style:{"min-width":"80px"},placeholder:ge.value?(J=(we=(b=L.filterValues)==null?void 0:b.filter(Se=>Se))==null?void 0:we.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:Re,disabled:((te=ne.value)==null?void 0:te.length)===0},{suffix:l.withCtx(()=>{var Se,Ee;return[!$.value&&((Ee=(Se=L.filterValues)==null?void 0:Se.filter(Le=>Le))!=null&&Ee.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:ke[0]||(ke[0]=Se=>s.value=!s.value)},[l.createVNode(G,{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(Qe.ssForm,{rowContents:ne.value,buttonValue:pe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:pe.value,isStartJustify:!1,onOnButtonClick:el},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),L.buttons&&((re=L.buttons)==null?void 0:re.length)>0?(l.openBlock(),l.createElementBlock("div",_n,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((Me=L.buttons)==null?void 0:Me.filter(b=>L.isDevMode||(b==null?void 0:b.label)!=="修改模板"),(b,we)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:we},[(b==null?void 0:b.type)==="upload"?(l.openBlock(),l.createBlock(ze,{key:0,class:"upload-button-wrap","on-change":fe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!L.lockingPage},{default:l.withCtx(()=>[l.createVNode(Be,{disabled:!!L.lockingPage,style:l.normalizeStyle({background:(b==null?void 0:b.background)??"var(--ssbutton-theme-bg)",color:(b==null?void 0:b.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Qe._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Be,{key:0,disabled:!!L.lockingPage,style:l.normalizeStyle({background:(b==null?void 0:b.background)??"var(--ssbutton-theme-bg)",color:(b==null?void 0:b.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["disabled","style"])):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",wn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b==null?void 0:b.contents,J=>(l.openBlock(),l.createBlock(Be,{key:J==null?void 0:J.label,disabled:!!L.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:te=>Xe(J==null?void 0:J.label)},{default:l.withCtx(()=>{var te,Se;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(te=J==null?void 0:J.label)!=null&&te.includes("选中")?(l.openBlock(),l.createElementBlock("span",Un,"("+l.toDisplayString(L.selectNums)+")",1)):l.createCommentVNode("",!0),(Se=J==null?void 0:J.label)!=null&&Se.includes("全部")?(l.openBlock(),l.createElementBlock("span",On,"("+l.toDisplayString(L.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),b!=null&&b.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Be,{key:2,id:"themeButton",disabled:!!L.lockingPage,style:l.normalizeStyle({background:(b==null?void 0:b.background)??"var(--ssbutton-theme-bg)",color:(b==null?void 0:b.color)??"var(--ssbutton-theme-color)"}),onClick:J=>Xe(b==null?void 0:b.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])])):(l.openBlock(),l.createElementBlock("div",Ln,[l.createElementVNode("div",jn,[l.createElementVNode("div",$n,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var b,we,J,te;return[l.createVNode(W,{modelValue:$.value,"onUpdate:modelValue":ke[3]||(ke[3]=Se=>$.value=Se),style:{"min-width":"80px"},placeholder:ge.value?(J=(we=(b=L.filterValues)==null?void 0:b.filter(Se=>Se))==null?void 0:we.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:Re,disabled:((te=ne.value)==null?void 0:te.length)===0},{suffix:l.withCtx(()=>{var Se,Ee;return[!$.value&&((Ee=(Se=L.filterValues)==null?void 0:Se.filter(Le=>Le))!=null&&Ee.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:ke[2]||(ke[2]=Se=>s.value=!s.value)},[l.createVNode(G,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Mn,[(l.openBlock(),l.createBlock(Qe.ssForm,{rowContents:ne.value,buttonValue:pe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:pe.value,isStartJustify:!1,onOnButtonClick:el},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),L.buttons&&((Oe=L.buttons)==null?void 0:Oe.length)>0?(l.openBlock(),l.createElementBlock("div",Vn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((Q=L.buttons)==null?void 0:Q.filter(b=>L.isDevMode||(b==null?void 0:b.label)!=="修改模板"),(b,we)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:we},[(b==null?void 0:b.type)==="upload"?(l.openBlock(),l.createBlock(ze,{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(Be,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(G,{name:(J=Ce==null?void 0:Ce.find(te=>(te==null?void 0:te.label)===(b==null?void 0:b.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Qe._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Be,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(G,{name:(J=Ce==null?void 0:Ce.find(te=>(te==null?void 0:te.label)===(b==null?void 0:b.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",Pn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b==null?void 0:b.contents,J=>(l.openBlock(),l.createBlock(Be,{key:J==null?void 0:J.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:te=>Xe(J==null?void 0:J.label)},{default:l.withCtx(()=>{var te,Se;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(te=J==null?void 0:J.label)!=null&&te.includes("选中")?(l.openBlock(),l.createElementBlock("span",Fn,"("+l.toDisplayString(L.selectNums)+")",1)):l.createCommentVNode("",!0),(Se=J==null?void 0:J.label)!=null&&Se.includes("全部")?(l.openBlock(),l.createElementBlock("span",Kn,"("+l.toDisplayString(L.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),b!=null&&b.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Be,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(b==null?void 0:b.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:J=>Xe(b==null?void 0:b.label)},{icon:l.withCtx(()=>{var J;return[l.createVNode(G,{name:(J=Ce==null?void 0:Ce.find(te=>(te==null?void 0:te.label)===(b==null?void 0:b.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},qn=Pl._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(L,{emit:le}){const Y=L,M=le,$=ne=>{M("buttonClick",ne)},s=ne=>{var pe;return ne!=null&&ne.includes("删除")?((pe=Y.selectTableItems)==null?void 0:pe.length)>0?"warning-active-type":"warning-type":"default-type"};return(ne,pe)=>{const Ce=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(L.buttons,fe=>(l.openBlock(),l.createBlock(Ce,{key:fe==null?void 0:fe.label,disabled:!!L.lockingPage,class:l.normalizeClass(s(fe==null?void 0:fe.label)),onClick:Re=>$(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=Pl._export_sfc(Rn,[["__scopeId","data-v-70b12973"]]),ka=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(L){this.selectArray=L},setSelectString(L){this.selectString=L}}}),Wn={class:"calculator-content"},Gn={class:"calculator-child"},Hn={class:"calculator-child"},Qn=l.defineComponent({__name:"calculator",setup(L){const le=l.ref(),Y=l.ref();return l.onMounted(()=>{le.value=[{type:"Upload",label:"输入",name:"input"}],Y.value=[{type:"Upload",label:"输出",name:"output"}]}),(M,$)=>(l.openBlock(),l.createElementBlock("div",Wn,[l.createElementVNode("div",Gn,[l.createVNode(Qe.ssForm,{rowContents:le.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Hn,[l.createVNode(Qe.ssForm,{rowContents:Y.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Xn=Pl._export_sfc(Qn,[["__scopeId","data-v-73db0fe7"]]),ma=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(L){this.selectIndex=L},setSelectMenu(L){this.selectMenu=L},setSelectTitle(L){this.selectTitle=L}}}),Ql=(L,le)=>{let Y=L,M=le;return Array.isArray(Y)&&(Y=Y==null?void 0:Y.map(($,s)=>{if(Array.isArray($)){let ne={};return $=$==null?void 0:$.forEach((pe,Ce)=>{var fe;(fe=M==null?void 0:M[Ce])!=null&&fe.prop?ne[M[Ce].prop]=pe:Array.isArray(pe)&&(ne.children=Ql(pe,M))}),Object.assign(ne,{id:s})}else return $})),Y},Sa=(L,le,Y)=>{let M=L,$=le;return M=M==null?void 0:M.map((s,ne)=>{var pe,Ce;return!Array.isArray(s)||!((pe=$==null?void 0:$[ne])!=null&&pe.label)&&!Y||(s.unshift(((Ce=$==null?void 0:$[ne])==null?void 0:Ce.label)??""),s.some(fe=>Array.isArray(fe))&&(s=s==null?void 0:s.map(fe=>{var Re;return Array.isArray(fe)&&(fe=Sa(fe,(Re=$==null?void 0:$[ne])==null?void 0:Re.children,Y)),fe}))),s}),M},Yn=(L,le,Y)=>{if(le==="")return L==null?void 0:L.filter(M=>(M==null?void 0:M.id)!==Y);{const M=le.split("-");return Zn(L,M,Y)}},Zn=(L,le,Y)=>{let M=L,$=le;return($==null?void 0:$.length)===0?M=M==null?void 0:M.filter(s=>s.id!==Y):M=M==null?void 0:M.map(s=>(s.id.toString()===($==null?void 0:$[0])&&($==null||$.shift(),s=Ca(s,$,Y)),s)),M},Ca=(L,le,Y)=>{var s,ne;let M=L,$=le;return($==null?void 0:$.length)===0?M.children=(s=M.children)==null?void 0:s.filter(pe=>pe.id!==Y):M.children=(ne=M.children)==null?void 0:ne.map(pe=>(pe.id.toString()===($==null?void 0:$[0])&&($==null||$.shift(),pe=Ca(pe,$,Y)),pe)),M},In=(L,le,Y)=>{if(le==="")return Y;{const M=le.split("-");return er(L,M,Y)}},er=(L,le,Y)=>{let M=L,$=le;return($==null?void 0:$.length)===0?M=Y:M=M==null?void 0:M.map(s=>(s.id.toString()===($==null?void 0:$[0])&&($==null||$.shift(),s=xa(s,$,Y)),s)),M},xa=(L,le,Y)=>{var s;let M=L,$=le;return($==null?void 0:$.length)===0?M.children=Y:M.children=(s=M.children)==null?void 0:s.map(ne=>(ne.id.toString()===($==null?void 0:$[0])&&($==null||$.shift(),ne=xa(ne,$,Y)),ne)),M},Da=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(L){this.objUrl=L},setBlobUrls(L){this.blobUrls=L}}}),Xl=async(L,le)=>{var ne,pe,Ce,fe,Re,Xe,rl,ge,el,ll,se,ke,oe,G,W,Be,ze;let Y=(pe=(ne=k.cloneDeep(L))==null?void 0:ne.optionUrl)==null?void 0:pe.menuSelect,M=[];Y==null||Y.forEach(re=>{});let $="",s=await ae.menuToParent(Y);if(s==null||s.forEach(re=>{var Me,Oe,Q,b;(re==null?void 0:re.name)===(((b=(Q=(Oe=(Me=k.cloneDeep(L))==null?void 0:Me.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:Q[0])==null?void 0:b.replaceAll("'",""))??"")&&($=re==null?void 0:re.id)}),le){$=le;const re=await k.getInsofDataApi({id:$}),Me=(Xe=(Re=(fe=(Ce=re==null?void 0:re.data)==null?void 0:Ce.result)==null?void 0:fe[0])==null?void 0:Re.key)==null?void 0:Xe.pageKey;s=await ae.getItemData(Me,sessionStorage.getItem("systemKey"),"")}if($!==""){let re;le?re=(rl=s==null?void 0:s.find(Q=>(Q==null?void 0:Q.id)===le))==null?void 0:rl.compData:re=(ge=s==null?void 0:s.find(Q=>{var b,we,J,te;return(Q==null?void 0:Q.name)===(((we=(b=L==null?void 0:L.groupSelect)==null?void 0:b.split(":"))==null?void 0:we[0])||((te=(J=L==null?void 0:L.optionUrl)==null?void 0:J.groupSelect)==null?void 0:te[0]))}))==null?void 0:ge.compData;let Me=(ll=(el=re==null?void 0:re.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:el.contents)==null?void 0:ll.map(Q=>Q==null?void 0:Q.label);(ke=(se=re==null?void 0:re.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:se.contents)!=null&&ke.every(Q=>Array.isArray(Q))&&(Me=(W=ae.getColumnChild((G=(oe=re==null?void 0:re.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:oe.contents)==null?void 0:G[0]))==null?void 0:W.map(Q=>Q==null?void 0:Q.prop));let Oe=(ze=(Be=re==null?void 0:re.find(Q=>(Q==null?void 0:Q.key)==="tableContents"))==null?void 0:Be.contents)==null?void 0:ze.map(Q=>(Q=Q==null?void 0:Q.filter(b=>!(b!=null&&b.id)),Q));Oe==null||Oe.forEach(Q=>{M.push(ae.getValueToObjectValue(Q,Me))})}return M},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(L,{emit:le}){var ha;const Y=l.ref([]),M=Da(k.pinia),$=l.ref(null),s=L,ne=l.ref(s==null?void 0:s.allowSelect),pe=l.ref((ha=s==null?void 0:s.config)==null?void 0:ha.showIndex),Ce=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}]),Re=ae.useOriginalState(k.pinia);let Xe="$R";const{originalPath:rl}=k.storeToRefs(Re),ge=rl.value,el=l.ref(!1),ll=l.ref(!1),se=l.ref(!1),ke=l.reactive({column:{},status:!1,text:"合计"}),oe=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),G=le,W=l.ref([]),Be=l.reactive({prop:"",order:null}),ze=l.ref([]),re=l.ref(!1),Me=l.ref(!1),Oe=l.ref(null),{isUseBackdrop:Q,initTrackFileType:b,getFileExtension:we,setData:J,getFileInfo:te,getFilesInfo:Se}=ya.useThreeSystem(),Ee=l.ref([]),Le=l.ref(!1),dl=l.ref(),Ue=Vl.useMenuState(),{importLoading:xr,activeMenuPath:ye,contentLoading:Dr,linkMenuInfo:Ta}=k.storeToRefs(Ue),Na=ae.useTableComp(k.pinia),De=Vl.useModelComp(k.pinia),{extraContents:me,cacheUpdatingData:yl,tableViewContents:vl,tableLoading:Tr,pageMapState:ol,lockingPage:Nl}=k.storeToRefs(De),Z=l.ref([]),Bl=l.ref([]),El=l.ref(new Map);l.ref(!1);const Ye=l.ref("");l.ref();const Al=l.ref(!0),pl=l.ref(0),Yl=l.ref(!0),Je=l.ref(""),Ze=l.ref(!1),Ba=l.ref({label:"查看三维模型"}),_l=l.ref(!1),Fl=l.ref(),qe=l.ref([]),tl=l.ref([]),wl=l.ref(!1),bl=l.ref([]),fl=l.ref([]),sl=l.ref([]),Ae=l.ref([]),We=l.ref(),je=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:il}=k.storeToRefs(Ea),_a=k.useLoginState(k.pinia),{loginUserInfo:_e}=k.storeToRefs(_a),wa=l.ref(720),Ge=l.ref(!1),Ll=l.ref(!1),He=l.ref([]),ul=l.ref(),kl=l.ref(!0),Zl=l.ref(!0),cl=l.ref([]),Ua=l.inject("contentRef");l.provide("contentRef",Ua),l.watch(()=>{var e;return(e=Z.value)==null?void 0:e.length},e=>{oe.total=e}),l.watch(()=>vl.value,async()=>{var i,u,c,d,f,S,w,F,h,A,O,E,z,P,V,o,m,g;if(((i=vl.value)==null?void 0:i.length)===0||!((u=s==null?void 0:s.itemData)!=null&&u.find(T=>(T==null?void 0:T.key)==="columnPath"))||!((c=s==null?void 0:s.itemData)!=null&&c.find(T=>(T==null?void 0:T.key)==="pageColumn")))return;let e=(h=(F=(w=(S=(f=(d=s==null?void 0:s.itemData)==null?void 0:d.find(T=>(T==null?void 0:T.key)==="pageColumn"))==null?void 0:f.contents)==null?void 0:S.split("["))==null?void 0:w[1])==null?void 0:F.split("]"))==null?void 0:h[0],a=((z=(E=(O=(A=s==null?void 0:s.itemData)==null?void 0:A.find(T=>(T==null?void 0:T.key)==="pageColumn"))==null?void 0:O.contents)==null?void 0:E.split("["))==null?void 0:z[0])+((V=(P=vl.value)==null?void 0:P.find(T=>(T==null?void 0:T.key)===e))==null?void 0:V.value),r=((m=(o=s==null?void 0:s.itemData)==null?void 0:o.find(T=>(T==null?void 0:T.key)==="pageGroup"))==null?void 0:m.contents)??"",n=await ae.getItemData(a,sessionStorage.getItem("systemKey"),""),t=(g=n==null?void 0:n.find(T=>(T==null?void 0:T.name)===(r===""?s==null?void 0:s.compName:r)))==null?void 0:g.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 f={type:"data",pageKey:s!=null&&s.parentTableId?(i=d==null?void 0:d.key)==null?void 0:i.pageKey:ye.value,tableId:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index),systemKey:sessionStorage.getItem("systemKey")},S=a==null?void 0:a.map(h=>{const A=Object.keys(h),O={};return A.forEach((E,z)=>{O[e[z]]=h[E]}),O}),w=S==null?void 0:S.map(h=>({key:f,value:{tableData:h}})),F=await k.batchAddInsofDataApi({dataList:w});((u=F==null?void 0:F.data)==null?void 0:u.code)===200?(De.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);dl.value=[{name:(r=e==null?void 0:e.split("/"))==null?void 0:r[((a=e==null?void 0:e.split("/"))==null?void 0:a.length)-1],blobUrl:i}],Le.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=W.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&&(Be.order="descending",Be.prop=r==null?void 0:r.prop),G("getSliceContLength",oe),(t=Z.value)==null?void 0:t.slice(e,a)}),ja=e=>{oe.currentPage=e,G("getSliceContLength",oe)},$a=e=>{var a;oe.pageSize=e,e*oe.currentPage>((a=Z.value)==null?void 0:a.length)&&(oe.currentPage=1,oe.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),G("getSliceContLength",oe)},Ma=(e,a)=>{var u,c;const r=(c=(u=W.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(f=>d===f))))return k.ElMessage.error("导入的数据表头不匹配");Oa(n,a)},Va=(e,a)=>{var r;De.setRefreshCurStructure(!1),((r=W.value)==null?void 0:r.length)===0||Ma(e,a)},Pa=(e,a,r,n)=>{const t=[],i=[],u=f=>Object.keys(f).length;for(const f in e)if(e[f]!==void 0){const S=e[f],w=[];for(const[F,h]of Object.entries(S))w.push(h),i.length<u(S)&&i.push(F);t.push(w)}t.unshift(i);const c=ae.utils.aoa_to_sheet(t),d=ae.utils.book_new();ae.utils.book_append_sheet(d,c,n),ae.writeFileSync(d,`${a}.xlsx`),He.value=[]},jl=async(e,a,r,n=!1,t)=>{var i,u,c,d,f,S,w,F;try{De.setRefreshCurStructure(!1);const h=await k.getInsofDataApi({id:s==null?void 0:s.index});if(((i=h==null?void 0:h.data)==null?void 0:i.code)===200){let A=(f=(d=(c=(u=h==null?void 0:h.data)==null?void 0:u.result)==null?void 0:c[0])==null?void 0:d.value)==null?void 0:f.pageData;n?A={...A,compData:(w=A==null?void 0:A.compData)==null?void 0:w.map(E=>{var z;return(E==null?void 0:E.key)==="header"?{...E,contents:(z=E==null?void 0:E.contents)==null?void 0:z.map(P=>({...P,[e]:r}))}:E})}:A={...A,compData:(S=A==null?void 0:A.compData)==null?void 0:S.map(E=>{var z,P;return(E==null?void 0:E.key)==="header"?{...E,contents:(z=E==null?void 0:E.contents)==null?void 0:z.map(V=>(V==null?void 0:V.prop)===(a==null?void 0:a.prop)?{...V,[e]:r}:V)}:(E==null?void 0:E.key)==="tableToForm"&&t?{...E,contents:(P=E==null?void 0:E.contents)==null?void 0:P.map(V=>(V==null?void 0:V.prop)===(a==null?void 0:a.prop)?{...V,[t]:r}:V)}:E})};const O=await k.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:A}});((F=O==null?void 0:O.data)==null?void 0:F.code)===200?(k.ElMessage.success("编辑成功"),De.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(h){k.ElMessage.error(h)}},Fa=async(e,a)=>{await jl("label",a,e)},Ka=async(e,a)=>{await jl("columnType",a,e,!1,"type")},za=()=>{yl.value?Ge.value=!1:ga()},qa=e=>{He.value=e},Ra=(e,a)=>{ul.value===a?kl.value=!1:kl.value=!0,ul.value=a==null?void 0:a.changeProp},ml=l.computed(()=>{var r,n,t;const e=(r=W.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=W.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(W.value);await l.nextTick(),W.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=()=>{Ze.value=!1},Ga=e=>{G("clickTrigger",e)},ea=async e=>{var i,u,c,d,f,S,w,F,h,A,O,E,z,P,V;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(Q(a)){const m={files:[te(a)],data:{}};J(m);return}bl.value=[{url:a,extension:we(a)}],Me.value=!0,Oe.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")||(f=a==null?void 0:a.toString())!=null&&f.includes(".mtl")){const o=(S=a==null?void 0:a.toString())==null?void 0:S.split(","),m=Se(o),g=m==null?void 0:m[0];if(Q(g==null?void 0:g.extension)){J({files:m,data:{}});return}bl.value=m,Me.value=!1,re.value=!0;return}if((w=a==null?void 0:a.toString())!=null&&w.includes(".stl")||(F=a==null?void 0:a.toString())!=null&&F.includes(".STL")||(h=a==null?void 0:a.toString())!=null&&h.includes(".obj")||(A=a==null?void 0:a.toString())!=null&&A.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=[],g={};if(Array.isArray(a)?o=a:o=a==null?void 0:a.split(","),o==null||o.forEach(T=>{T.includes(".mtl")?m.push(T):g.blob=g.blob?g.blob+","+T:T}),(m==null?void 0:m.length)>0&&(g.mtlBlobs=m),n&&(g.suffix=n),(E=(O=Object.values(g))==null?void 0:O[0])!=null&&E.includes("http:"))t.push(g);else{const T=new Blob([g.blob],{type:"application/octet-stream;charset=UTF-8"});let x=URL.createObjectURL(T),H="";(z=a==null?void 0:a.split("/"))==null||z.forEach((j,I)=>{var _;I===((_=a==null?void 0:a.split("/"))==null?void 0:_.length)-1&&(H=j)}),(P=g.blob)!=null&&P.includes(".stl")&&(H=(H==null?void 0:H.replaceAll(">",""))+".urdf"),dl.value=[{name:H,blobUrl:x}],Le.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 g=URL.createObjectURL(m),T="";if((V=a==null?void 0:a.split("/"))==null||V.forEach((x,H)=>{var j;H===((j=a==null?void 0:a.split("/"))==null?void 0:j.length)-1&&(T=x)}),Q(T)){const x=b(T),H=te(a);J({files:[H],data:{trackFileType:x}});return}dl.value=[{name:T,blobUrl:g}],Le.value=!0}(t==null?void 0:t.length)>0&&M.setBlobUrls(t)},$l=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=Qe.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 ae.downloadAvatarApi({url:e==null?void 0:e.url});!e.url.toUpperCase().includes(".OBJ")&&!e.url.toUpperCase().includes(".STL")&&!e.url.toUpperCase().includes(".MTL")&&!e.url.toUpperCase().includes(".URDF")?(a=URL.createObjectURL(t.data),r=$l(e)):a=e==null?void 0:e.url}if(Q(a)){const t={row:`${a}`,suffix:we(r)};ea(t);return}const n={name:r,blobUrl:a};dl.value=[n],Le.value=!0},Qa=async e=>{let a=null,r=null;if(e!=null&&e.downloadUrl){const 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 ae.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(i.data),r=$l(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(De.setTableLoading(!0),la.value=Object.values(e),e&&((n=Object.values(e))!=null&&n.every(t=>!t)))return Z.value=Bl.value;if(r){Z.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}Z.value=Ya(El.value,e),De.setTableLoading(!1)}},Ia=async e=>{var u,c,d,f,S,w,F,h,A,O,E,z,P,V,o;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((u=_e.value)==null?void 0:u.account)||((c=_e.value)==null?void 0:c.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),r=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((d=_e.value)==null?void 0:d.account)||((f=_e.value)==null?void 0:f.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let n=(w=(S=a==null?void 0:a.data)==null?void 0:S.result)==null?void 0:w.map(m=>m==null?void 0:m.id);const t=(h=(F=r==null?void 0:r.data)==null?void 0:F.result)==null?void 0:h.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 ae.getItemData(ye.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)&&((A=zl.value)==null?void 0:A.key)!=="main"?[]:zl.value;m.push({key:Ie.value===""?(O=e==null?void 0:e.id)==null?void 0:O.toString():Ie.value+"-"+((E=e==null?void 0:e.id)==null?void 0:E.toString()),value:e[(z=Object.keys(e))==null?void 0:z.filter(g=>g!=="index"&&g!=="id")[0]]}),Ol.setSelectMenu(Ie.value===""?(P=e==null?void 0:e.id)==null?void 0:P.toString():Ie.value+"-"+((V=e==null?void 0:e.id)==null?void 0:V.toString())),Ol.setSelectTitle(m),Ol.setSelectIndex((o=e==null?void 0:e.id)==null?void 0:o.toString()),G("pageChange",i)}},aa=async(e,a,r,n)=>{var i,u,c,d,f,S,w,F,h,A,O,E,z,P,V,o,m,g,T,x,H,j,I,_;if(G("clickMainKey",r),(n==null?void 0:n.isExistChild)===!0){let N=(i=n==null?void 0:n.columnType)==null?void 0:i.prop,v=n==null?void 0:n.data;if(cl.value=await ae.getItemData(ye.value,sessionStorage.getItem("systemKey"),""),!cl.value){let B=(d=(c=(u=ye.value)==null?void 0:u.split("/"))==null?void 0:c.filter((D,q)=>{var C,R;return q!==((R=(C=ye.value)==null?void 0:C.split("/"))==null?void 0:R.length)-1}))==null?void 0:d.join("/");cl.value=await ae.getItemData(B,sessionStorage.getItem("systemKey"),"")}let K=(f=cl.value)==null?void 0:f.filter(B=>(B==null?void 0:B.name)===N);cl.value=K==null?void 0:K.map(B=>{var D;return B.compData=(D=B.compData)==null?void 0:D.map(q=>{var C,R;return(q==null?void 0:q.key)==="tableContents"&&(C=q==null?void 0:q.contents)!=null&&C.every(y=>y==null?void 0:y.find(X=>X==null?void 0:X.id))&&(q.contents=(R=q==null?void 0:q.contents)==null?void 0:R.filter(y=>(y==null?void 0:y[1])===v)),q}),B}),G("routeUrl",cl.value,{isEdit:!0,routerUrl:ye.value});return}if((n==null?void 0:n.data)==="查看"&&(e!=null&&e.every(N=>(N==null?void 0:N.url)&&(N==null?void 0:N.name)))){let N=k.cloneDeep(e);N=await((S=k.cloneDeep(N))==null?void 0:S.map(async K=>{var q,C,R,y;const B=await ae.downloadAvatarApi({url:K==null?void 0:K.url});let D=URL.createObjectURL(B.data);return{name:(K==null?void 0:K.name)+"."+((y=(q=K==null?void 0:K.url)==null?void 0:q.split("."))==null?void 0:y[((R=(C=K==null?void 0:K.url)==null?void 0:C.split("."))==null?void 0:R.length)-1]),blobUrl:D}}));let v=await Promise.all(N);dl.value=v,Le.value=!0}const t=k.cloneDeep(W.value);if((n==null?void 0:n.isMainKey)===!0&&(t==null?void 0:t.length)>0){(w=t==null?void 0:t[0])==null||w.prop;let N=k.cloneDeep(ye).value+ge+(n==null?void 0:n.data),v=k.cloneDeep(ye).value,K=(h=(F=ol.value[N])==null?void 0:F.filter(C=>{var R,y;return((R=C==null?void 0:C.key)==null?void 0:R.type)==="structure"&&((y=C==null?void 0:C.key)==null?void 0:y.parentTable)===""}))==null?void 0:h.map(C=>{var R;return(R=C==null?void 0:C.value)==null?void 0:R.pageData}),B={};(A=W.value)==null||A.forEach(C=>{(C==null?void 0:C.label)!=="操作"&&(B[C.label]=r[C.prop]??r[C.label])});let D=(E=(O=s==null?void 0:s.itemData)==null?void 0:O.find(C=>(C==null?void 0:C.key)==="mainRouters"))==null?void 0:E.contents,q;if((D==null?void 0:D.length)>0){let C=N==null?void 0:N.split(ge)[((z=N==null?void 0:N.split(ge))==null?void 0:z.length)-1],R=D==null?void 0:D.find(y=>(y==null?void 0:y.key)===C);q=(R==null?void 0:R.routerContent)+ge+(R==null?void 0:R.key)}if((K==null?void 0:K.length)>0)await ae.getItemData(N+ge+`updateLoading${((P=_e.value)==null?void 0:P.account)||((V=_e.value)==null?void 0:V.账号)}`,sessionStorage.getItem("systemKey"),"")||await ae.loadingConstruct(N,N+ge+`updateLoading${((o=_e.value)==null?void 0:o.account)||((m=_e.value)==null?void 0:m.账号)}`,B,q),De.setRouteToChildPath(v),Ue.setActiveMenuPath(N+ge+`updateLoading${((g=_e.value)==null?void 0:g.account)||((T=_e.value)==null?void 0:T.账号)}`);else{(x=t==null?void 0:t[0])==null||x.prop;let C=k.cloneDeep(ye).value+ge+(n==null?void 0:n.data),R=k.cloneDeep(ye).value;await ae.getItemData(R+ge,sessionStorage.getItem("systemKey"),""),await ae.loadingConstruct(R+ge,C,B),await ae.loadingConstruct(C,C+ge+`updateLoading${((H=_e.value)==null?void 0:H.account)||((j=_e.value)==null?void 0:j.账号)}`,B,q),De.setRouteToChildPath(R),Ue.setActiveMenuPath(C+ge+`updateLoading${((I=_e.value)==null?void 0:I.account)||((_=_e.value)==null?void 0:_.账号)}`)}}},en=()=>{Le.value=!1},ln=e=>{G("rowClick",e)};l.watch(()=>s.changedContent,()=>{var r,n;if(!s.changedContent)return;let e=(r=Z.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));Z.value=e,G("contentChange",{contents:a,index:s.index}),G("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=ye.value,a=sessionStorage.getItem("systemKey"),r=await ae.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=>(Ue.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 P,V,o,m,g,T,x,H;Ue.setImportLoading(!0),De.setFreshContent(!1);let n=await nn().catch(j=>(Ue.setImportLoading(!1),Promise.reject(j)));n=n==null?void 0:n.filter(j=>{var I;return((I=j==null?void 0:j.find(_=>_==null?void 0:_.id))==null?void 0:I.id)===(a==null?void 0:a.id)});let t=ae.getEqualChild([(P=W.value)==null?void 0:P.filter(j=>(j==null?void 0:j.label)!=="操作")]);const i=(o=(V=ae.tableToForm(n,t))==null?void 0:V[0])==null?void 0:o.find(j=>{const I=j==null?void 0:j.key;return I==="算法体"||I==="方法体"}),u=i==null?void 0:i.value;if(!u){console.log("未搜索到isMain, 缺少算法执行接口"),Ue.setImportLoading(!1);return}const c=W.value?ae.getEqualChild([W.value]):[],d=c.find(j=>{const I=j==null?void 0:j.prop;return I==="输入"||I==="输入数据.输入1"||I==="样本输入数据"}),f=d==null?void 0:d.prop;let S=a==null?void 0:a[f];const w=await Rl().catch(j=>(Ue.setImportLoading(!1),Promise.reject(j))),F=await rn(u,{token:w,inputData:S}).catch(j=>(Ue.setImportLoading(!1),Promise.reject(j))),h=(m=F==null?void 0:F.data)==null?void 0:m.data,A=c.find(j=>(j==null?void 0:j.prop)==="输出数据.输出1"),O=A==null?void 0:A.prop;let E=[],z=[];if(((g=Object.values(h))==null?void 0:g.length)>0){let j=[];const I=new FormData,_=(T=on(h))==null?void 0:T.map(async v=>{var K,B;if(!Array.isArray(v)&&(v!=null&&v.includes("http"))){let D=await k.axios.get(v,{responseType:"blob"}),q=(B=v==null?void 0:v.split("/"))==null?void 0:B[((K=v==null?void 0:v.split("/"))==null?void 0:K.length)-1];I.append("files",D.data,q)}else j.push(v)});if(await Promise.all(_),!ae.isFormDataEmpty(I)){let v=await ae.uploadAmountApi(I),K=(H=(x=v==null?void 0:v.data)==null?void 0:x.result)==null?void 0:H.map(B=>{var D,q,C,R,y,X;return{name:(X=(y=(R=(D=B==null?void 0:B.url)==null?void 0:D.split("/"))==null?void 0:R[((C=(q=B==null?void 0:B.url)==null?void 0:q.split("/"))==null?void 0:C.length)-1])==null?void 0:y.split("."))==null?void 0:X[0],url:B==null?void 0:B.url}});j=[...j,...K]}let N={};for(let v in a)v!=="id"&&(N[v]=a[v]);N[O]=j,z.push({id:a==null?void 0:a.id,value:{tableData:N}})}(z==null?void 0:z.length)>0&&await k.batchUpdateInsofDataApi({dataList:z}),(E==null?void 0:E.length)>0&&await k.batchAddInsofDataApi({dataList:E}),xl(!0),Ue.setImportLoading(!1),De.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),Te=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=()=>{Te.show=!1},un=e=>{var a,r;if((e==null?void 0:e.buttonName)==="取消")return Te.show=!1;Te.to=e==null?void 0:e.content,!(!(s!=null&&s.index)||!((a=Te.to)!=null&&a.groupName))&&(s==null?void 0:s.index)!==((r=Te.to)==null?void 0:r.groupName)&&(G("change",{buttonName:"迁移",value:{from:Te.from,to:Te.to,data:Te.selectRow}}),Te.show=!1)},Ml=async(e,a,r)=>{var n,t,i,u,c,d,f,S,w,F,h,A,O,E,z;if(Ye.value="",wl.value=!0,Al.value=!0,G("onButtonClick",e,a),e==="删除")Vl.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var P,V;(P=Z.value)!=null&&P.find(o=>(o==null?void 0:o.id)===(a==null?void 0:a.id))?Z.value=(V=k.cloneDeep(Z.value))==null?void 0:V.filter(o=>(o==null?void 0:o.id)!==(a==null?void 0:a.id)):Z.value=na(k.cloneDeep(Z.value),a),Yn(Ul.value,Ie.value,a==null?void 0:a.id),De.setTableLoading(s==null?void 0:s.index),G("change",{content:Z.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:W.value})});else if(e==="批量删除"){if(((n=He.value)==null?void 0:n.length)===0)return k.ElMessage.warning("请先勾选操作的数据");Vl.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,o;const P=(V=He.value)==null?void 0:V.map(m=>m.id);Z.value=(o=k.cloneDeep(Z.value))==null?void 0:o.filter(m=>!(P!=null&&P.includes(m.id))),De.setTableLoading(s==null?void 0:s.index),G("change",{content:Z.value,singleContent:null,selectItems:He.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:W.value})})}else if(e==="复制新增"){Je.value="新增";const P=k.cloneDeep(a),V=(t=W.value)==null?void 0:t.find(g=>g==null?void 0:g.isMainKey),o=V||((i=W.value)==null?void 0:i[0]),m=(u=sl.value)==null?void 0:u.find(g=>(g==null?void 0:g.label)==="新建");await oa(!0,m,{data:P,firstCol:o})}else if(e==="新增")Je.value="新增",Cl(""),Ze.value=!0;else if(e==="编辑")Je.value="编辑",Cl(a),Ze.value=!0;else if(e==="查看")Je.value="查看",Cl(a),wl.value=!1,Al.value=!1,Ze.value=!0;else if(e==="查看三维模型"){const P={};for(let o in a)o!=="id"&&(P[o]=a[o]);let V=(c=Object.values(P))==null?void 0:c[1];Na.setTableShowThree(V)}else if(((d=r==null?void 0:r.extra)==null?void 0:d.type)==="modelExample")Je.value=e,_l.value=!0;else if(e==="新建"){let P=ol.value,V=[];for(let x in P)x!=null&&x.includes(`loading${((f=_e.value)==null?void 0:f.account)||((S=_e.value)==null?void 0:S.账号)}`)&&(V=[...V,...x]);let o=[];for(let x in P)x!=null&&x.includes(`updateLoading${((w=_e.value)==null?void 0:w.account)||((F=_e.value)==null?void 0:F.账号)}`)&&(o=[...o,...x]);let m=V==null?void 0:V.map(x=>x==null?void 0:x.id);const g=o==null?void 0:o.map(x=>x==null?void 0:x.id);m=[...k.cloneDeep(m),...g],(m==null?void 0:m.length)>0&&(m!=null&&m.every(x=>x!==null&&x))&&await k.batchDeleteInsofDataApi({ids:m});const T=(h=sl.value)==null?void 0:h.find(x=>(x==null?void 0:x.label)==="新建");await oa(!1,T)}else if(e==="修改模板"){let P=k.cloneDeep(ye).value;De.setRouteToChildPath(P),Ue.setActiveMenuPath(P+ge)}else if(e==="执行")tn(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((A=He.value)==null?void 0:A.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((O=Z.value)==null?void 0:O.length)===0)return k.ElMessage.warning("暂无数据导出");const P=(z=(E=W.value)==null?void 0:E.map(o=>o==null?void 0:o.label))==null?void 0:z.filter(o=>o!=="操作"),V=e==="导出全部"?k.cloneDeep(Z.value):k.cloneDeep(He.value);V==null||V.forEach(o=>{o==null||delete o.id}),Pa(V,s==null?void 0:s.compName,P,s==null?void 0:s.compName)}else e==="迁移"&&(Te.selectRow=a,Te.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 f;return{id:d==null?void 0:d.id,...(f=d==null?void 0:d.value)==null?void 0:f.pageData}}):[]},dn=async(e,a)=>{var r,n,t,i,u,c,d,f,S,w,F,h,A,O,E,z,P,V,o,m;try{let g,T;const x=(r=ol.value[ye.value+ge])==null?void 0:r.filter(B=>{var D;return((D=B==null?void 0:B.key)==null?void 0:D.type)==="structureMethod"}),H=(n=ol.value[ye.value+ge])==null?void 0:n.filter(B=>{var D;return((D=B==null?void 0:B.key)==null?void 0:D.type)==="structure"}),j=x==null?void 0:x.find(B=>{var D,q;return((q=(D=B==null?void 0:B.value)==null?void 0:D.pageData)==null?void 0:q.method)==="保存"});if(!j)return;const I=(c=(u=ol.value[(i=(t=j==null?void 0:j.value)==null?void 0:t.pageData)==null?void 0:i.path])==null?void 0:u.filter(B=>{var D;return((D=B==null?void 0:B.key)==null?void 0:D.type)==="data"}))==null?void 0:c.find(B=>{var D,q,C,R;return((q=(D=B==null?void 0:B.value)==null?void 0:D.tableData)==null?void 0:q.算法名称)===((R=(C=j==null?void 0:j.value)==null?void 0:C.pageData)==null?void 0:R.method)});if(!I)return;const _={buttonName:(f=(d=j==null?void 0:j.value)==null?void 0:d.pageData)==null?void 0:f.method,api:(w=(S=I==null?void 0:I.value)==null?void 0:S.tableData)==null?void 0:w.算法体,content:H==null?void 0:H.map(B=>{var D;return(D=B==null?void 0:B.value)==null?void 0:D.pageData}),extraContent:[],extraValues:(h=(F=j==null?void 0:j.value)==null?void 0:F.pageData)==null?void 0:h.data,methodName:(O=(A=j==null?void 0:j.value)==null?void 0:A.pageData)==null?void 0:O.path};if(!e)return;const N={...e,compData:(E=e==null?void 0:e.compData)==null?void 0:E.map(B=>{var D;return(B==null?void 0:B.key)==="formContent"?{...B,contents:(D=B==null?void 0:B.contents)==null?void 0:D.map(q=>(q==null?void 0:q.prop)===a?{...q,value:""}:q)}:B})},v={key:{pageKey:ye.value+ge,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:N}},K=await k.axios.post(_.api,v,{headers:{"Content-Type":"application/json"}});return((z=K==null?void 0:K.data)==null?void 0:z.code)===200&&(g=(V=(P=K==null?void 0:K.data)==null?void 0:P.result)==null?void 0:V.latestReportCode,T=(m=(o=K==null?void 0:K.data)==null?void 0:o.result)==null?void 0:m.status),{newMainKeyValue:g,newStatus:T}}catch(g){throw k.ElMessage.error(g),new Error(g)}},ra=(e,a,r,n)=>{var t;G("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,f;let n=e==null?void 0:e[a==null?void 0:a.prop],t=1,i,u;const c=k.cloneDeep(ye).value+ge+n;if(c){Sl.value="",i=(d=ol.value[c])==null?void 0:d.filter(F=>{var h;return((h=F==null?void 0:F.key)==null?void 0:h.type)==="structure"});const S=i==null?void 0:i.find(F=>{var h,A,O;return((O=(A=(h=F==null?void 0:F.value)==null?void 0:h.pageData)==null?void 0:A.comp)==null?void 0:O.toUpperCase())==="FORM"});u={...(f=S==null?void 0:S.value)==null?void 0:f.pageData,id:S==null?void 0:S.id};const w=await dn(u,a==null?void 0:a.prop);if(Sl.value=w==null?void 0:w.newStatus,w!=null&&w.newMainKeyValue)return w==null?void 0:w.newMainKeyValue}if(Z.value.some(S=>(S==null?void 0:S[a==null?void 0:a.prop])===n)){const S=n;for(;Z.value.some(w=>(w==null?void 0:w[a==null?void 0:a.prop])===`${S}(${t})`);)t++;n=`${S}(${t})`}return n},oa=async(e,a,r)=>{var u,c,d,f,S,w,F,h;let n,t;const i=await fn(r==null?void 0:r.data,r==null?void 0:r.firstCol);if(e?(n=k.cloneDeep(ye).value+ge+((f=r==null?void 0:r.data)==null?void 0:f[(d=r==null?void 0:r.firstCol)==null?void 0:d.prop]),t=k.cloneDeep(ye).value+ge+i):(n=k.cloneDeep(ye).value+ge,t=k.cloneDeep(n)+`loading${((u=_e.value)==null?void 0:u.account)||((c=_e.value)==null?void 0:c.账号)}`),a){const A=(w=(S=ol.value[t])==null?void 0:S.filter(O=>{var E;return((E=O==null?void 0:O.key)==null?void 0:E.parentTable)===""}))==null?void 0:w.map(O=>{var E;return{id:O==null?void 0:O.id,...(E=O==null?void 0:O.value)==null?void 0:E.pageData}});if((A==null?void 0:A.length)>0)if(e){const O=A==null?void 0:A.find(E=>{var z;return((z=E==null?void 0:E.comp)==null?void 0:z.toUpperCase())==="FORM"});O&&ra(O,(F=r==null?void 0:r.firstCol)==null?void 0:F.label,i,ye.value)}else De.setRouteToChildPath(k.cloneDeep(ye).value),Ue.setActiveMenuPath(t);else if(await ae.loadingConstruct(n,t,null,null,e?pn.value:null),e){const O=await cn(t);if((O==null?void 0:O.length)>0){const E=O==null?void 0:O.find(z=>{var P;return((P=z==null?void 0:z.comp)==null?void 0:P.toUpperCase())==="FORM"});E&&ra(E,(h=r==null?void 0:r.firstCol)==null?void 0:h.label,i,ye.value)}}else De.setRouteToChildPath(k.cloneDeep(ye).value),Ue.setActiveMenuPath(t)}else e?(Ye.value="",je.value=r==null?void 0:r.data,xl(!0,r==null?void 0:r.firstCol,i)):(De.setRouteToChildPath(k.cloneDeep(ye).value),Ue.setActiveMenuPath(t))},gn=()=>{re.value=!1,bl.value=[],Me.value=!1},Cl=e=>{var u,c,d,f,S,w,F,h,A,O,E,z,P,V;const a=[];let r=[];for(let o in e)Array.isArray(e==null?void 0:e[o])&&r.push(o);ze.value=k.cloneDeep(W.value),(c=ae.getColumnChild((u=k.cloneDeep(W.value))==null?void 0:u.filter(o=>(o==null?void 0:o.label)!=="操作")))==null||c.forEach((o,m)=>{var g;r.find(T=>T===(o==null?void 0:o.prop))||(o!=null&&o.formType&&((g=o==null?void 0:o.formType)==null?void 0:g.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||(Ye.value=(e==null?void 0:e.id)??"");let n=ae.getColumnChild((d=k.cloneDeep(W.value))==null?void 0:d.filter(o=>(o==null?void 0:o.label)!=="操作"));qe.value&&((f=qe.value)==null?void 0:f.length)>0&&(qe.value=(S=k.cloneDeep(qe).value)==null?void 0:S.map(o=>{var g;let m=(o==null?void 0:o.prop)||((g=n==null?void 0:n.find(T=>(T==null?void 0:T.label)===(o==null?void 0:o.label)))==null?void 0:g.prop);return m&&(o.value=e[m]),o})),Ae.value=qe.value&&((w=qe.value)==null?void 0:w.length)>0?ae.getTableFormToForm(qe.value):a;let t=[],i=(F=s.itemData)==null?void 0:F.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 g;return(g=m==null?void 0:m.content)==null?void 0:g.includes("@Select")});if(o!=null&&o.content){let m=(O=(A=(h=o==null?void 0:o.content)==null?void 0:h.replace(":",Xe))==null?void 0:A.split(Xe))==null?void 0:O[1];if(((E=m==null?void 0:m.trim())==null?void 0:E.toUpperCase())==="MANUAL"){let g=(P=(z=s.itemData)==null?void 0:z.find(T=>(T==null?void 0:T.key)==="contentTableId"))==null?void 0:P.contents;Ae.value=(V=Ae.value)==null?void 0:V.map((T,x)=>{var H;return x===0&&(T.type="Select",(H=T==null?void 0:T.optionUrl)!=null&&H.menuId?(T.optionUrl.menuId=g,T.optionUrl.menuFilter=t):T.optionUrl={menuId:g,menuFilter:t}),T})}}}},hn=()=>{var a;const e=(a=$.value)==null?void 0:a.$el;e&&ae.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),W.value=(u=W.value)==null?void 0:u.slice().sort((c,d)=>{if(c.label==="操作")return 1;if(d.label==="操作")return-1;const f=ml.value.findIndex(w=>w.label===c.label),S=ml.value.findIndex(w=>w.label===d.label);return f-S})}})};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)===Ye.value){let c={};for(let d in t){let f=(i=a==null?void 0:a.find(S=>(S==null?void 0:S.prop)===d))==null?void 0:i.label;f?c[d]=(u=je.value)==null?void 0:u[f]:c[d]=t[d]}t=Object.assign(c,je.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)===Ye.value)?r=e==null?void 0:e.map(t=>{var i,u;if((t==null?void 0:t.id)===Ye.value){let c={};for(let d in t){let f=(i=a==null?void 0:a.find(S=>(S==null?void 0:S.prop)===d))==null?void 0:i.label;f?c[d]=(u=je.value)==null?void 0:u[f]:c[d]=t[d]}t=Object.assign(c,je.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)===Ye.value){let f={};for(let S in t){let w=(i=a==null?void 0:a.find(F=>(F==null?void 0:F.prop)===S))==null?void 0:i.label;w?f[S]=(u=je.value)==null?void 0:u[w]:f[S]=t[S]}t=Object.assign(f,je.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 f,S,w,F,h,A,O,E,z,P,V,o,m,g,T,x,H,j,I,_,N,v,K,B,D,q;let n=ae.getColumnChild((f=k.cloneDeep(W.value))==null?void 0:f.filter(C=>(C==null?void 0:C.label)!=="操作")),t,i=k.cloneDeep(Z.value);if(!je.value){Ze.value=!1;return}if(Ye.value===""){pl.value++;let C;a&&r?C={id:pl.value.toString(),[a==null?void 0:a.prop]:r,children:je.value.children}:C={id:pl.value.toString()},C!=null&&C.children&&(C={...C,children:(S=C.children)==null?void 0:S.map(R=>sa(R,a,r))}),i.push(Object.assign(je.value,C)),t=Object.assign(je.value,C)}else i=(w=ta(i,n))==null?void 0:w.newContents,t=(F=ta(i,n))==null?void 0:F.currentSelectContents;const u=(h=s.itemData)==null?void 0:h.filter(C=>(C==null?void 0:C.key)==="childTree")[0];if(((A=u==null?void 0:u.contents)==null?void 0:A.length)>0){Je.value="编辑";const C=[];i==null||i.forEach((R,y)=>{var ie;let X={};if(Array.isArray(R)){let ee=[];R==null||R.filter(be=>!(be!=null&&be.id)).forEach((be,he)=>{var U,p,de,ue,ce,xe,Ne;if((p=(U=We.value)==null?void 0:U[he])!=null&&p.prop&&!Array.isArray(be)){let Ve={};Ve[We.value[he].column]=be,me!=null&&me.value&&((de=me==null?void 0:me.value)==null?void 0:de.length)>0&&((ue=me==null?void 0:me.value)!=null&&ue.find(ve=>JSON.stringify(ve==null?void 0:ve[0])===JSON.stringify(Ve)))&&(ee=(ce=me==null?void 0:me.value)==null?void 0:ce.find(ve=>JSON.stringify(ve==null?void 0:ve[0])===JSON.stringify(Ve))),ee&&ee.length>0?X[We.value[he].prop]=ee!=null&&ee.find(ve=>{var Pe;return((Pe=Object.keys(ve))==null?void 0:Pe[0])===We.value[he].column})?(xe=ee==null?void 0:ee.find(ve=>{var Pe;return((Pe=Object.keys(ve))==null?void 0:Pe[0])===We.value[he].column}))==null?void 0:xe[We.value[he].column]:be:X[We.value[he].prop]=be}else Array.isArray(be)&&((Ne=We.value[he])!=null&&Ne.prop?X[We.value[he].prop]=be:X.children=Ql(be,We.value))})}else X=R;Array.isArray(R)&&R.some(ee=>ee==null?void 0:ee.id)?C.push(Object.assign(X,{id:(ie=R==null?void 0:R.find(ee=>ee.id))==null?void 0:ie.id})):X.id?C.push(X):C.push(Object.assign(X,{id:y.toString()}))}),Z.value=pa(C,u,W.value)}else Z.value=i;ca(Z.value),Ul.value=Z.value;const c=In(Ul.value,Ie.value,i);let d=[];if(yl.value?(d=(O=k.cloneDeep(yl).value.singleContent)==null?void 0:O.filter(C=>(C==null?void 0:C.id)!==(t==null?void 0:t.id)),d.push(t)):d=[t],Ge.value){const C={content:c,singleContent:((E=u==null?void 0:u.contents)==null?void 0:E.length)>0?d==null?void 0:d.flatMap(Wl):d,index:s==null?void 0:s.index,buttonName:"编辑",column:W.value,parentTableId:s==null?void 0:s.parentTableId};De.setCacheUpdatingData(C)}if(e&&!((V=(P=(z=Ae.value)==null?void 0:z[0])==null?void 0:P.optionUrl)!=null&&V.menuId)){let C=(T=(g=(m=(o=s.itemData)==null?void 0:o.find(y=>(y==null?void 0:y.key)==="filterAllType"))==null?void 0:m.value)==null?void 0:g.find(y=>(y==null?void 0:y.value)==="onConditionContents"))==null?void 0:T.content;const R={content:c,singleContent:((x=u==null?void 0:u.contents)==null?void 0:x.length)>0?Wl(t):t,index:s==null?void 0:s.index,buttonName:Je.value,column:W.value,parentTableId:s==null?void 0:s.parentTableId,filter:C};De.setTableLoading(s==null?void 0:s.index),Ze.value=!1,je.value=void 0,G("change",R)}if((I=(j=(H=Ae.value)==null?void 0:H[0])==null?void 0:j.optionUrl)!=null&&I.menuId){Ze.value=!1;let C=(_=s.itemData)==null?void 0:_.filter(R=>(R==null?void 0:R.key)==="filterAllType");if((C==null?void 0:C.length)>0){let y=(K=(v=(N=(C==null?void 0:C.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:N.content)==null?void 0:v.split(":"))==null?void 0:K[1];y=parseInt(y),Z.value=(q=Z.value)==null?void 0:q.slice(((B=Z.value)==null?void 0:B.length)-y,(D=Z.value)==null?void 0:D.length)}}};l.onUnmounted(()=>{W.value=[],Z.value=[],ze.value=[],Ee.value=[],qe.value=[],tl.value=[],bl.value=[],fl.value=[],Ae.value=[],He.value=[],$.value=null});const ia=async(e,a,r)=>{var f,S,w,F,h,A,O,E,z,P,V;ul.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((g,T)=>{var x,H,j,I,_,N,v,K,B,D,q,C,R,y,X,ie,ee,be,he;return g.type=g!=null&&g.type?g.type:(I=(j=(H=(x=g==null?void 0:g.key)==null?void 0:x.split("$"))==null?void 0:H[1])==null?void 0:j.split("("))!=null&&I[0]?(N=(_=ae.FormType)==null?void 0:_.find(U=>{var p,de,ue,ce;return(U==null?void 0:U.key)===((ce=(ue=(de=(p=g==null?void 0:g.key)==null?void 0:p.split("$"))==null?void 0:de[1])==null?void 0:ue.split("("))==null?void 0:ce[0])}))==null?void 0:N.value:"Input",g.options=g!=null&&g.options?g.options:((B=(K=(v=g==null?void 0:g.key)==null?void 0:v.split("$"))==null?void 0:K[1])==null?void 0:B.length)>0?(R=(C=Hl((q=(D=g==null?void 0:g.key)==null?void 0:D.split("$"))==null?void 0:q[1]))==null?void 0:C.split(","))==null?void 0:R.map(U=>({label:U,value:U})):[],(y=g==null?void 0:g.key)!=null&&y.includes("$")&&(g.key=(ie=(X=g==null?void 0:g.key)==null?void 0:X.split("$"))==null?void 0:ie[0]),g.value=(ee=Object.values(a))==null?void 0:ee[T],g.optionUrl=g!=null&&g.formMenuSelect&&((be=g==null?void 0:g.formMenuSelect)==null?void 0:be.length)>0?{groupSelect:(he=g==null?void 0:g.groupSelect)==null?void 0:he.split(/[::]/).map(U=>U.trim()),menuSelect:g==null?void 0:g.formMenuSelect,selectRelateType:"",type:(g==null?void 0:g.formType)??(g!=null&&g.groupSelect?"Select":"")}:null,g})),o});let i=k.cloneDeep(Ae.value),u=(S=(f=k.cloneDeep(t))==null?void 0:f.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:S.contents;i=i==null?void 0:i.map(o=>{var m;return o.value=(m=u==null?void 0:u.find((g,T)=>T===(o==null?void 0:o.id)))==null?void 0:m.value,o});let c="",d=(h=(F=(w=k.cloneDeep(t))==null?void 0:w.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:F.contents)==null?void 0:h.find((o,m)=>{var g,T,x;return(o==null?void 0:o.label)===ul.value||(m==null?void 0:m.toString())===((x=(T=(g=ul.value)==null?void 0:g.split("a"))==null?void 0:T[1])==null?void 0:x.toString())});if((E=(O=(A=k.cloneDeep(t))==null?void 0:A.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:O.contents)==null||E.forEach(o=>{var m,g,T,x,H;c===""&&((T=(g=(m=o==null?void 0:o.optionUrl)==null?void 0:m.groupSelect)==null?void 0:g[1])!=null&&T.includes("["))&&(c=(H=(x=o==null?void 0:o.optionUrl)==null?void 0:x.groupSelect)==null?void 0:H[1])}),(z=d==null?void 0:d.optionUrl)!=null&&z.menuSelect){let o=await Xl(d),m;if(o==null||o.forEach(g=>{var T,x,H,j,I,_,N,v,K,B;c===((x=(T=d==null?void 0:d.optionUrl)==null?void 0:T.groupSelect)==null?void 0:x[1])&&((I=(j=(H=d==null?void 0:d.optionUrl)==null?void 0:H.groupSelect)==null?void 0:j[1])!=null&&I.includes("["))&&((B=k.cloneDeep(g))==null?void 0:B[(K=(v=(N=(_=d==null?void 0:d.optionUrl)==null?void 0:_.groupSelect)==null?void 0:N[1])==null?void 0:v.replaceAll("[",""))==null?void 0:K.replaceAll("]","")])===(d==null?void 0:d.value)&&(m=g)}),m){let g=k.cloneDeep(i);g=g==null?void 0:g.map(x=>{var H,j,I,_,N,v,K,B,D,q,C;return(m!=null&&m[x==null?void 0:x.label]||m!=null&&m[(_=(I=(j=(H=x==null?void 0:x.optionUrl)==null?void 0:H.groupSelect)==null?void 0:j[1])==null?void 0:I.replaceAll("[",""))==null?void 0:_.replaceAll("]","")])&&((K=(v=(N=x==null?void 0:x.optionUrl)==null?void 0:N.groupSelect)==null?void 0:v[1])!=null&&K.includes("["))&&(x.value=(m==null?void 0:m[x==null?void 0:x.label])||(m==null?void 0:m[(C=(q=(D=(B=x==null?void 0:x.optionUrl)==null?void 0:B.groupSelect)==null?void 0:D[1])==null?void 0:q.replaceAll("[",""))==null?void 0:C.replaceAll("]","")])),x}),Z.value=(P=k.cloneDeep(Z.value))==null?void 0:P.map(x=>{if((x==null?void 0:x.id)===(a==null?void 0:a.id)){const H={};return g==null||g.forEach(j=>{H[j.name]=j.value}),H.id=x==null?void 0:x.id,H}return x});let T=k.cloneDeep(g);T=T==null?void 0:T.map(x=>{var H,j,I,_;return(j=(H=x==null?void 0:x.optionUrl)==null?void 0:H.menuSelect)!=null&&j.some(N=>N==null?void 0:N.includes)&&(x.optionUrl.menuSelect=(_=(I=x==null?void 0:x.optionUrl)==null?void 0:I.menuSelect)==null?void 0:_.map(N=>{var v,K,B,D;if(N!=null&&N.includes("[")){let q=(K=(v=N==null?void 0:N.replaceAll("[","").replaceAll("]",""))==null?void 0:v.split(":"))==null?void 0:K[1];N=(D=(B=k.cloneDeep(g))==null?void 0:B.find(C=>(C==null?void 0:C.label)===q))==null?void 0:D.value}return N})),x}),Z.value=(V=k.cloneDeep(Z.value))==null?void 0:V.map(x=>{if((x==null?void 0:x.id)===(a==null?void 0:a.id)){const H={};return T==null||T.forEach(j=>{H[j.name]=j.value}),H.id=x==null?void 0:x.id,H}return x})}}},vn=async e=>{var S,w,F,h,A,O,E,z,P,V,o,m,g,T,x,H,j,I;if(!e)return;je.value=e;const a=k.cloneDeep(s.itemData);let r=a==null?void 0:a.map(_=>{var N;return(_==null?void 0:_.key)==="header"&&((N=_.contents)==null||N.map((v,K)=>{var B,D,q,C,R,y,X,ie,ee,be,he,U,p,de,ue,ce,xe,Ne,Ve;return v.type=v!=null&&v.type?v.type:(C=(q=(D=(B=v==null?void 0:v.key)==null?void 0:B.split("$"))==null?void 0:D[1])==null?void 0:q.split("("))!=null&&C[0]?(y=(R=ae.FormType)==null?void 0:R.find(ve=>{var Pe,Fe,al,nl;return(ve==null?void 0:ve.key)===((nl=(al=(Fe=(Pe=v==null?void 0:v.key)==null?void 0:Pe.split("$"))==null?void 0:Fe[1])==null?void 0:al.split("("))==null?void 0:nl[0])}))==null?void 0:y.value:"Input",v.options=v!=null&&v.options?v.options:((ee=(ie=(X=v==null?void 0:v.key)==null?void 0:X.split("$"))==null?void 0:ie[1])==null?void 0:ee.length)>0?(p=(U=Hl((he=(be=v==null?void 0:v.key)==null?void 0:be.split("$"))==null?void 0:he[1]))==null?void 0:U.split(","))==null?void 0:p.map(ve=>({label:ve,value:ve})):[],(de=v==null?void 0:v.key)!=null&&de.includes("$")&&(v.key=(ce=(ue=v==null?void 0:v.key)==null?void 0:ue.split("$"))==null?void 0:ce[0]),v.value=(xe=Object.values(e))==null?void 0:xe[K],v.optionUrl=v!=null&&v.formMenuSelect&&((Ne=v==null?void 0:v.formMenuSelect)==null?void 0:Ne.length)>0?{groupSelect:(Ve=v==null?void 0:v.groupSelect)==null?void 0:Ve.split(/[::]/).map(ve=>ve.trim()),menuSelect:v==null?void 0:v.formMenuSelect,selectRelateType:"",type:(v==null?void 0:v.formType)??(v!=null&&v.groupSelect?"Select":"")}:null,v})),_}),n=Ae.value,t=(w=(S=k.cloneDeep(r))==null?void 0:S.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:w.contents;if(t=t==null?void 0:t.filter(_=>(_==null?void 0:_.label)!=="操作"),t.push({label:"操作",type:"operate"}),n=n==null?void 0:n.map(_=>{var N;return _.value=_.value??((N=t==null?void 0:t.find((v,K)=>(v==null?void 0:v.prop)===(_==null?void 0:_.name)))==null?void 0:N.value),_}),!kl.value)return;let i="",u=(A=(h=(F=k.cloneDeep(r))==null?void 0:F.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:h.contents)==null?void 0:A.find((_,N)=>{var v,K,B;return(_==null?void 0:_.label)===ul.value||(N==null?void 0:N.toString())===((B=(K=(v=ul.value)==null?void 0:v.split("a"))==null?void 0:K[1])==null?void 0:B.toString())}),c=(O=u==null?void 0:u.optionUrl)==null?void 0:O.menuSelect,d=!0;(P=(z=(E=k.cloneDeep(r))==null?void 0:E.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:z.contents)==null||P.forEach(_=>{var N,v,K,B,D,q;d&&((K=(v=(N=_==null?void 0:_.optionUrl)==null?void 0:N.groupSelect)==null?void 0:v[1])!=null&&K.includes("["))&&(i=(D=(B=_==null?void 0:_.optionUrl)==null?void 0:B.groupSelect)==null?void 0:D[1],JSON.stringify(c)===JSON.stringify((q=_==null?void 0:_.optionUrl)==null?void 0:q.menuSelect)&&(d=!1))});let f=k.cloneDeep(n);if(f=f==null?void 0:f.map(_=>{var N,v;return(_==null?void 0:_.type)==="Select"&&((v=(N=_==null?void 0:_.optionUrl)==null?void 0:N.allSelectionContents)==null?void 0:v.length)>0&&(_.optionUrl.contactValue=e),_.value=e==null?void 0:e[_==null?void 0:_.prop],_}),Ae.value=k.cloneDeep(f),(V=u==null?void 0:u.optionUrl)!=null&&V.menuSelect&&kl.value||(g=(m=(o=Ae.value)==null?void 0:o[0])==null?void 0:m.optionUrl)!=null&&g.menuId){let _=await Xl(u,(H=(x=(T=Ae.value)==null?void 0:T[0])==null?void 0:x.optionUrl)==null?void 0:H.menuId),N;if((j=u==null?void 0:u.optionUrl)==null||j.menuSelect,_==null||_.forEach(v=>{var K,B,D,q,C,R,y,X,ie,ee,be,he,U,p,de,ue,ce;i===((B=(K=u==null?void 0:u.optionUrl)==null?void 0:K.groupSelect)==null?void 0:B[1])&&((C=(q=(D=u==null?void 0:u.optionUrl)==null?void 0:D.groupSelect)==null?void 0:q[1])!=null&&C.includes("["))&&((ee=k.cloneDeep(v))==null?void 0:ee[(ie=(X=(y=(R=u==null?void 0:u.optionUrl)==null?void 0:R.groupSelect)==null?void 0:y[1])==null?void 0:X.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])===(u==null?void 0:u.value)&&(N=v),(U=(he=(be=Ae.value)==null?void 0:be[0])==null?void 0:he.optionUrl)!=null&&U.menuId&&v[(de=(p=Ae.value)==null?void 0:p[0])==null?void 0:de.prop]===e[(ce=(ue=Ae.value)==null?void 0:ue[0])==null?void 0:ce.prop]&&(N=v)}),N){let v=k.cloneDeep(n);v=v==null?void 0:v.map(D=>{var q,C,R,y,X,ie,ee,be,he,U,p,de,ue,ce,xe,Ne,Ve,ve;return(N!=null&&N[D==null?void 0:D.label]||N!=null&&N[(y=(R=(C=(q=D==null?void 0:D.optionUrl)==null?void 0:q.groupSelect)==null?void 0:C[1])==null?void 0:R.replaceAll("[",""))==null?void 0:y.replaceAll("]","")])&&((ee=(ie=(X=D==null?void 0:D.optionUrl)==null?void 0:X.groupSelect)==null?void 0:ie[1])!=null&&ee.includes("["))&&(D.value=(N==null?void 0:N[D==null?void 0:D.label])||(N==null?void 0:N[(p=(U=(he=(be=D==null?void 0:D.optionUrl)==null?void 0:be.groupSelect)==null?void 0:he[1])==null?void 0:U.replaceAll("[",""))==null?void 0:p.replaceAll("]","")])),(ce=(ue=(de=Ae.value)==null?void 0:de[0])==null?void 0:ue.optionUrl)!=null&&ce.menuId&&(D.value=(N==null?void 0:N[D==null?void 0:D.label])||(N==null?void 0:N[(ve=(Ve=(Ne=(xe=D==null?void 0:D.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:Ne[1])==null?void 0:Ve.replaceAll("[",""))==null?void 0:ve.replaceAll("]","")])),D}),Ae.value=k.cloneDeep(v);let K=k.cloneDeep(v);K=K==null?void 0:K.map(D=>{var q,C,R,y,X,ie;return(C=(q=D==null?void 0:D.optionUrl)==null?void 0:q.menuSelect)!=null&&C.some(ee=>ee==null?void 0:ee.includes("["))&&(D.optionUrl.oldMenuSelect=(y=(R=k.cloneDeep(D))==null?void 0:R.optionUrl)==null?void 0:y.menuSelect,D.optionUrl.menuSelect=(ie=(X=D==null?void 0:D.optionUrl)==null?void 0:X.menuSelect)==null?void 0:ie.map(ee=>{var be,he,U,p;if(ee!=null&&ee.includes("[")){let de=(he=(be=ee==null?void 0:ee.replaceAll("[","").replaceAll("]",""))==null?void 0:be.split(":"))==null?void 0:he[1];ee=(p=(U=k.cloneDeep(v))==null?void 0:U.find(ue=>(ue==null?void 0:ue.label)===de))==null?void 0:p.value}return ee})),D}),Ae.value=K;let B={};(I=Ae.value)==null||I.forEach(D=>{B[D.prop]=D==null?void 0:D.value}),je.value=B}}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=qe.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;Z.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=Ae.value)==null?void 0:r.reduce((d,f)=>(d[f.name]=f.value,d),{});if(((n=Object.keys(a))==null?void 0:n.length)>0){je.value=a,Ye.value="",pl.value=(t=Z.value)==null?void 0:t.length,fl.value=(i=sl.value)==null?void 0:i.filter(f=>(f==null?void 0:f.label)!=="新增");const d=(c=(u=ze.value)==null?void 0:u.filter(f=>(f==null?void 0:f.label)!=="操作"))==null?void 0:c.map(f=>{var w,F,h;const S=(F=(w=qe.value)==null?void 0:w.find(A=>(A==null?void 0:A.label)===(f==null?void 0:f.label)))==null?void 0:F.multiple;return kn(f),{...f,contents:(f==null?void 0:f.options)??[],optionUrl:f!=null&&f.formMenuSelect&&((h=f==null?void 0:f.formMenuSelect)==null?void 0:h.length)>0?{groupSelect:f==null?void 0:f.groupSelect,menuSelect:f==null?void 0:f.formMenuSelect,selectRelateType:"",type:f==null?void 0:f.formType,multiple:S}:null}});W.value=d==null?void 0:d.map(f=>ua(f,[{prop:"type",value:"edit"},{prop:"columnType",value:bn(f==null?void 0:f.formType)||(f==null?void 0:f.columnType)}])),e==="createClick"&&xl(!1)}},gl={START:"开始时间",END:"结束时间",HOURS:"工时"},mn=(e,a)=>Number(ae.dayjs(a).diff(ae.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],f=mn(c,d);return c&&d&&(u[gl.HOURS]=`${f}天`),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,...f]=c,S={...d};r+1===((a==null?void 0:a.length)??"")?S.children=c==null?void 0:c.map(w=>(w.level=k.cloneDeep(r)+1,w)).filter((w,F)=>F!==0):f.length>0&&(S.children=da(f,a,r+1)),S.level=r,i.push(S)}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 F,h,A,O,E,z,P,V,o,m,g,T,x,H,j,I,_,N,v,K,B,D,q,C,R;const r=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="header");e==null||e.filter(y=>(y==null?void 0:y.key)==="tableIndexColumn")[0];const n=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="childTree")[0];let t=a;const i=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="page"),u=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="rowButton"),c=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="extraButton"),d=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableContents"),f=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableIndex");qe.value=(h=(F=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableToForm"))==null?void 0:F[0])==null?void 0:h.contents,Yl.value=(i==null?void 0:i.contents)??!0;let S=[];il.value===""?S=r==null?void 0:r[0]:S=(r==null?void 0:r.find(y=>(y==null?void 0:y.selectLabel)==="("+il.value+")"))??(r==null?void 0:r.find(y=>!(y!=null&&y.selectLabel)));let w=[];if(il.value===""?w=f==null?void 0:f[0]:w=(f==null?void 0:f.find(y=>(y==null?void 0:y.selectLabel)==="("+il.value+")"))??(f==null?void 0:f.find(y=>!(y!=null&&y.selectLabel))),((A=S==null?void 0:S.contents)==null?void 0:A.length)>0){let y=[];if(S!=null&&S.contents.some(U=>Array.isArray(U)&&(U==null?void 0:U.find(p=>p.children))))Ie.value===""?y=(E=(O=ae.getGradeColumns(S==null?void 0:S.contents))==null?void 0:O[0])==null?void 0:E.filter(U=>!Array.isArray(U)):(Ie.value.split("-"),y=(z=ae.getGradeColumns(S==null?void 0:S.contents))==null?void 0:z[0]);else{let U=S!=null&&S.contents.some(p=>Array.isArray(p))?(P=S==null?void 0:S.contents)==null?void 0:P[0]:S==null?void 0:S.contents;U==null||U.forEach((p,de)=>{var xe,Ne,Ve,ve,Pe;let ue="";(Ne=(xe=ye.value)==null?void 0:xe.split("/"))==null||Ne.forEach(Fe=>{var al,nl,hl;if(Fe!==""){let Ke=(hl=(nl=(al=Fe==null?void 0:Fe.split(ge+"updateLoading"))==null?void 0:al[0])==null?void 0:nl.split(ge+"loading"))==null?void 0:hl[0];ue=ue===""?ue+Ke:ue+"/"+Ke}}),ue=ue+ge+(p==null?void 0:p.directiveLabel);const ce=(Ve=qe.value)==null?void 0:Ve.find(Fe=>(Fe==null?void 0:Fe.prop)===(p==null?void 0:p.prop));y.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?(ve=p==null?void 0:p.groupSelect)==null?void 0:ve.replaceAll('"',"").split(":"):[],isMainKey:p==null?void 0:p.isMainKey,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])&&!((Pe=p==null?void 0:p.directiveLabel)!=null&&Pe.includes("@"))),childPath:ue,allSelectionContents:(p==null?void 0:p.allSelectionContents)??[],selectFilter:p==null?void 0:p.selectFilter})})}W.value=ae.getNewColumnChild(y),Ee.value=ae.getNewColumnChild(y),Y.value=(V=W.value)==null?void 0:V.map(U=>U==null?void 0:U.label),ll.value=(o=W.value)==null?void 0:o.every(U=>U==null?void 0:U.filterable),se.value=(m=W.value)==null?void 0:m.every(U=>U==null?void 0:U.operable),el.value=(g=W.value)==null?void 0:g.every(U=>U==null?void 0:U.sortable);let X=(x=(T=ae.getAllLeafNodes(W.value))==null?void 0:T.filter(U=>(U==null?void 0:U.type)!=="operate"))==null?void 0:x.map((U,p)=>({prop:(U==null?void 0:U.prop)??"a"+p,column:U.label}));We.value=X;let ie=[];il.value===""?ie=d==null?void 0:d[0]:ie=(d==null?void 0:d.find(U=>(U==null?void 0:U.selectLabel)==="("+il.value+")"))??(d==null?void 0:d.find(U=>!(U!=null&&U.selectLabel)));let ee=Array.isArray((H=ie==null?void 0:ie.contents)==null?void 0:H[0])&&((j=ie==null?void 0:ie.contents)!=null&&j[0].every(U=>Array.isArray(U)))?(I=ie==null?void 0:ie.contents)==null?void 0:I[0]:ie==null?void 0:ie.contents;w!=null&&w.contents&&((_=w==null?void 0:w.contents)==null?void 0:_.length)!==0&&(ee=(N=k.cloneDeep(ee))==null?void 0:N.map((U,p)=>{if(!Array.isArray(U)){let de={};for(let ue in U)ue!=="id"&&ue!=="index"&&(de[ue]=U[ue]);U=Object.values(de)}return U}));const be=!!((v=W.value)!=null&&v.find(U=>U.prop==="index"));ee=Sa(ee,w==null?void 0:w.contents,be);const he=[];ee==null||ee.forEach((U,p)=>{var ue;let de={};if(Array.isArray(U)){let ce=[];U==null||U.filter(xe=>!(xe!=null&&xe.id)).forEach((xe,Ne)=>{var Ve,ve,Pe,Fe,al,nl;if((Ve=X==null?void 0:X[Ne])!=null&&Ve.prop&&!Array.isArray(xe)){let hl={};hl[X[Ne].column]=xe,me!=null&&me.value&&((ve=me==null?void 0:me.value)==null?void 0:ve.length)>0&&((Pe=me==null?void 0:me.value)!=null&&Pe.find(Ke=>JSON.stringify(Ke==null?void 0:Ke[0])===JSON.stringify(hl)))&&(ce=(Fe=me==null?void 0:me.value)==null?void 0:Fe.find(Ke=>JSON.stringify(Ke==null?void 0:Ke[0])===JSON.stringify(hl))),ce&&ce.length>0?de[X[Ne].prop]=ce!=null&&ce.find(Ke=>{var Dl;return((Dl=Object.keys(Ke))==null?void 0:Dl[0])===X[Ne].column})?(al=ce==null?void 0:ce.find(Ke=>{var Dl;return((Dl=Object.keys(Ke))==null?void 0:Dl[0])===X[Ne].column}))==null?void 0:al[X[Ne].column]:xe:de[X[Ne].prop]=xe}else Array.isArray(xe)&&((nl=X[Ne])!=null&&nl.prop?de[X[Ne].prop]=xe:de.children=Ql(xe,X))})}else de=U;Array.isArray(U)&&U.some(ce=>ce==null?void 0:ce.id)?he.push(Object.assign(de,{id:(ue=U==null?void 0:U.find(ce=>ce.id))==null?void 0:ue.id})):de.id?he.push(de):he.push(Object.assign(de,{id:p.toString()}))}),Z.value=pa(he,n,W.value),Bl.value=he,(K=Bl.value)==null||K.forEach(U=>{var p;(p=El.value)==null||p.set(U.id,U)})}else W.value=[],ze.value=[],Z.value=[],Bl.value=[],El.value=new Map;((B=u==null?void 0:u.contents)==null?void 0:B.length)>0?tl.value=u==null?void 0:u.contents:tl.value=[],((D=c==null?void 0:c.contents)==null?void 0:D.length)>0?(fl.value=c==null?void 0:c.contents,sl.value=c==null?void 0:c.contents):(fl.value=[],sl.value=[]),pl.value=((q=Z==null?void 0:Z.value)==null?void 0:q.length)??0,ca(Z.value),Ul.value=Z.value,Ge.value&&(W.value=(R=(C=ze.value)==null?void 0:C.filter(y=>(y==null?void 0:y.label)!=="操作"))==null?void 0:R.map(y=>{var X;return{...y,type:"edit",optionUrl:y!=null&&y.formMenuSelect&&((X=y==null?void 0:y.formMenuSelect)==null?void 0:X.length)>0?{groupSelect:y==null?void 0:y.groupSelect,menuSelect:y==null?void 0:y.formMenuSelect,selectRelateType:"",type:y==null?void 0:y.formType}:null}}),Gl())};l.watch(()=>[s.itemData,il.value,Aa.value,Ie.value,me==null?void 0:me.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(f=>(f==null?void 0:f.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),De.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),Je.value=e==null?void 0:e.dialogTitle,wl.value=!0,Ze.value=!0)},{immediate:!0,deep:!0});const ga=()=>{var e;(e=Ce.value)!=null&&e.includes("read")&&(Ge.value=!Ge.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;Ce.value=e,(e==null?void 0:e.length)===0?Ge.value=!1:(e!=null&&e.includes("read")||(Ge.value=!0),e!=null&&e.includes("edit")||(Ge.value=!1)),pe.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||Ge.value},{immediate:!0}),l.watch(()=>Ge.value,e=>{var a;e?(Gl("viewChange"),De.setCacheUpdatingData(null)):(fl.value=sl.value,W.value=Ee.value,yl.value&&(De.setTableLoading(s==null?void 0:s.index),G("change",yl.value))),ne.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=>{Te.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=Z.value)==null?void 0:r.length)/oe.pageSize))},xn=(e,a,r)=>{var n;ia(r,e,a),je.value=k.cloneDeep(e),Ye.value=e==null?void 0:e.id,pl.value=(n=Z.value)==null?void 0:n.length,Je.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",xl(!1)},$e=e=>{var d,f,S,w,F,h,A,O,E,z;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?((f=(d=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:d[0])==null?void 0:f.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]):((w=(S=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:S[0])==null?void 0:w.contents)??(a==null?void 0:a[n==null?void 0:n.prop])??((h=(F=t==null?void 0:t[n==null?void 0:n.prop])==null?void 0:F[0])==null?void 0:h.contents)??(t==null?void 0:t[n==null?void 0:n.prop])??((E=(O=a==null?void 0:a[(A=n==null?void 0:n.child)==null?void 0:A.prop])==null?void 0:O[0])==null?void 0:E.contents)??(a==null?void 0:a[(z=n==null?void 0:n.child)==null?void 0:z.prop]),c=Array.isArray(i)&&!(i!=null&&i.every(P=>typeof P=="string"||typeof P=="number"))?"查看":i;return c=Array.isArray(c)?c.join(","):c,c},Dn=e=>{var f,S,w,F,h,A,O,E,z,P;const{row:a,column:r,item:n,slotData:t}=e;let i=a!=null&&a[r==null?void 0:r.prop]?((S=(f=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:f[0])==null?void 0:S.contents)??(a==null?void 0:a[r==null?void 0:r.prop]):((F=(w=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:w[0])==null?void 0:F.contents)??(a==null?void 0:a[n==null?void 0:n.prop])??((A=(h=t==null?void 0:t[n==null?void 0:n.prop])==null?void 0:h[0])==null?void 0:A.contents)??(t==null?void 0:t[n==null?void 0:n.prop])??((z=(E=a==null?void 0:a[(O=n==null?void 0:n.child)==null?void 0:O.prop])==null?void 0:E[0])==null?void 0:z.contents)??(a==null?void 0:a[(P=n==null?void 0:n.child)==null?void 0:P.prop]);const c=Array.isArray(i)&&!(i!=null&&i.every(V=>typeof V=="string"||typeof V=="number")),d=Array.isArray(i)&&(i==null?void 0:i.find(V=>V==null?void 0:V.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){Ue.setContentLoading(!0),await l.nextTick();const a=Tn(Z.value,e==null?void 0:e.data);if(!a)return Ue.setContentLoading(!1);await aa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),Ue.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)&&(Z.value=(a=Z.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 f,S,w,F;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(Qe.ssTable,{id:"excel-table",pageObj:oe,showIndex:pe.value,isTree:(f=L.compItem)==null?void 0:f.isTree,summaryInfo:ke,columns:W.value,defaultSort:Be,isCardViewport:Ll.value,checkedColumns:Y.value,key:Kl.value+JSON.stringify(W.value),tableData:Il.value,isEditViewport:Ge.value,isShowPagination:Yl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ne.value,onDbClickRow:Ia,extraButton:fl.value,rowButton:tl.value,cacheExtraButtons:sl.value,isClearSelection:((S=He.value)==null?void 0:S.length)===0,onDoCurrentChange:ja,onDoSizeChange:$a,onContentClick:aa,onRowClick:ln,onSelectChange:qa,onCellChange:xn,onChange:ia,onPreview:ea,onSubmitEditingTable:za,onHandleColEditChange:Fa,onHandleColTypeChange:Ka,onClickButton:Ml},l.createSlots({headerButton:l.withCtx(h=>{var A,O;return[L.showHeader?(l.openBlock(),l.createBlock(qn,{key:0,pageLayout:L.pageLayout,lockingPage:l.unref(Nl)===l.unref(ye),filterValues:la.value,selectNums:(A=He.value)==null?void 0:A.length,dataNums:(O=Z.value)==null?void 0:O.length,compName:L.compName,isDevMode:L.isDevMode,buttons:h.buttons,onButtonClick:a[0]||(a[0]=E=>Ml(E,"",{})),columns:W.value,onFilter:Za,onGetImportData:Va,level:L.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var h,A,O,E;return[((h=Z.value)==null?void 0:h.length)>0&&L.allowOperate?(l.openBlock(),l.createElementBlock("div",rr,[(A=Ce.value)!=null&&A.includes("read")&&((O=Ce.value)!=null&&O.includes("edit"))&&((E=tl.value)!=null&&E.some(z=>(z==null?void 0:z.label)==="编辑"))&&!Ll.value&&l.unref(Nl)!==l.unref(ye)?(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:h,index:A})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:O=>Cn(h,A)},[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]=h=>ql(h,"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]=h=>ql(h,"filterable"))},null,8,["model-value"]),l.createVNode(t,{"model-value":se.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=h=>ql(h,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(u,{modelValue:Y.value,"onUpdate:modelValue":a[5]||(a[5]=h=>Y.value=h),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:$},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(ml.value,h=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:h.label},[l.createVNode(i,{value:h.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:h.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(h.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 A;return[l.createElementVNode("div",ur,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((A=Object.keys(h))==null?void 0:A.filter(O=>{var E;return(E=fe.value)==null?void 0:E.find(z=>(z==null?void 0:z.value)===O)}),O=>{var E,z;return l.openBlock(),l.createElementBlock("div",{key:O},[l.createVNode(t,{"model-value":h==null?void 0:h[O],"active-text":(z=(E=fe.value)==null?void 0:E.find(P=>(P==null?void 0:P.value)===O))==null?void 0:z.label,onChange:P=>Ja(P,O,h)},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(h=>{var A,O,E,z,P,V,o,m,g,T,x,H,j,I,_,N,v,K;return[Dn(h)?(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($e(h)),1)]),default:l.withCtx(()=>{var B,D;return[l.createElementVNode("div",pr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((D=h==null?void 0:h.row)==null?void 0:D[(B=h==null?void 0:h.column)==null?void 0:B.prop],q=>(l.openBlock(),l.createElementBlock("div",fr,[l.createElementVNode("div",{class:"prop-url",title:$l(q),onClick:C=>Ha(q)},l.toDisplayString($l(q)),9,gr),l.createElementVNode("div",{class:"prop-download",onClick:C=>Qa(q)}," 下载 ",8,hr)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray($e(h))&&((O=(A=$e(h))==null?void 0:A.toString())!=null&&O.includes(".txt")||(z=(E=$e(h))==null?void 0:E.toString())!=null&&z.includes(".cpt")||(V=(P=$e(h))==null?void 0:P.toString())!=null&&V.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray($e(h))&&((m=(o=$e(h))==null?void 0:o.toString())!=null&&m.includes(".txt")||(T=(g=$e(h))==null?void 0:g.toString())!=null&&T.includes(".cpt")||(H=(x=$e(h))==null?void 0:x.toString())!=null&&H.includes(".cyd"))?"underline":"",cursor:!Array.isArray($e(h))&&((I=(j=$e(h))==null?void 0:j.toString())!=null&&I.includes(".txt")||(N=(_=$e(h))==null?void 0:_.toString())!=null&&N.includes(".cpt")||(K=(v=$e(h))==null?void 0:v.toString())!=null&&K.includes(".cyd"))?"pointer":"",marginLeft:(h==null?void 0:h.colIndex)===0?`${((h==null?void 0:h.level)??0)*20}px`:0}),onClick:B=>La($e(h))},l.toDisplayString($e(h)===0?"0":$e(h)),13,yr))]}),_:2},[((w=tl.value)==null?void 0:w.length)>0&&l.unref(Nl)!==l.unref(ye)?{name:"actions",fn:l.withCtx(({item:h})=>[l.createVNode(n,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:l.withCtx(()=>[l.createVNode(r,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:l.withCtx(()=>[l.createElementVNode("div",ar,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Xa(tl.value,h),(A,O)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:O,onClick:E=>Ml(A==null?void 0:A.label,h,{extra:A})},[l.createElementVNode("div",{style:l.normalizeStyle({color:A==null?void 0:A.textColor}),class:"extra-button-label"},l.toDisplayString(A==null?void 0:A.label),5)],8,nr))),128))])]),_:2},1024)]),key:"0"}:void 0,((F=Z.value)==null?void 0:F.length)>0?{name:"batchButton",fn:l.withCtx(h=>[l.withDirectives(l.createVNode(Jn,{lockingPage:l.unref(Nl)===l.unref(ye),buttons:h.buttons,selectTableItems:He.value,onButtonClick:a[1]||(a[1]=A=>Ml(A,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,ne.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!ne.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:Je.value,visible:Ze.value,width:wa.value,onBeforeDestroy:Wa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",vr,[l.createVNode(Qe.ssForm,{rowContents:Ae.value,isEnableWrap:!1,showOperator:!1,onChange:vn,onClickTrigger:Ga,isEdit:Al.value,onBlurChange:Ra},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[wl.value?(l.openBlock(),l.createElementBlock("div",br,[l.createVNode(c,{onClick:a[6]||(a[6]=h=>Ze.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]=h=>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:Je.value,visible:_l.value,width:Fl.value,onBeforeDestroy:a[9]||(a[9]=h=>_l.value=!1)},{default:l.withCtx(()=>[l.createVNode(Xn)]),footer:l.withCtx(()=>[l.createElementVNode("div",kr,[l.createVNode(c,{onClick:a[8]||(a[8]=h=>_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"]),Le.value?(l.openBlock(),l.createBlock(Qe.ssFilePreview,{key:1,fileDataList:dl.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:Oe.value},null,8,["files","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Tl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=h=>e.componentVisible=!1),width:Fl.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(d,{dialogItem:cl.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(Tl.ssDialog,{title:Te.title,visible:Te.show,width:Te.width,onBeforeDestroy:sn},{default:l.withCtx(()=>[l.createElementVNode("div",mr,[l.createVNode(Qe.ssForm,{rowContents:Te==null?void 0:Te.contents,formRules:Te==null?void 0:Te.formRules,showOperator:!1,buttonValue:Te.buttonValue,isEdit:Al.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:un},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},Cr=Pl._export_sfc(Sr,[["__scopeId","data-v-9f164bbe"]]);exports.formGetOptions=Hl;exports.getSelectRow=Xl;exports.ssTable=Cr;exports.useFormComp=Da;exports.useFormToTableComp=ka;exports.useUnit=ma;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-DcP7YN6o.cjs"),r=require("./index-30skmX_7.cjs"),i=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),s={class:"log-wrap"},u=t.defineComponent({__name:"index",setup(_){const e=t.reactive({...c.State});t.onMounted(async()=>{e.tableData=await e.getLogTableDataAsync()});const l=n=>{var o;e.clickButton(n,(o=e.tableData)==null?void 0:o.map(a=>a.id),a=>{console.log("清空操作成功:",a),a&&(e.tableData=[])})};return(n,o)=>(t.openBlock(),t.createElementBlock("div",s,[t.createVNode(r.ssTable,{itemData:e.pageData,allowOperate:!1,allowSelect:!1,onOnButtonClick:l},null,8,["itemData"])]))}}),d=i._export_sfc(u,[["__scopeId","data-v-b4bfde04"]]);exports.default=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-DcP7YN6o.cjs"),r=require("./index-BaOJkZDg.cjs"),i=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),s={class:"log-wrap"},u=t.defineComponent({__name:"index",setup(_){const e=t.reactive({...c.State});t.onMounted(async()=>{e.tableData=await e.getLogTableDataAsync()});const l=n=>{var o;e.clickButton(n,(o=e.tableData)==null?void 0:o.map(a=>a.id),a=>{console.log("清空操作成功:",a),a&&(e.tableData=[])})};return(n,o)=>(t.openBlock(),t.createElementBlock("div",s,[t.createVNode(r.ssTable,{itemData:e.pageData,allowOperate:!1,allowSelect:!1,onOnButtonClick:l},null,8,["itemData"])]))}}),d=i._export_sfc(u,[["__scopeId","data-v-b4bfde04"]]);exports.default=d;