ss-component-new 1.3.474 → 1.3.475

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 (85) hide show
  1. package/dist/{OrbitControls-X8Tx1hPt.js → OrbitControls-CcniPNk7.js} +1 -1
  2. package/dist/{OrbitControls-DvnUitVd.cjs → OrbitControls-kK6BBpL4.cjs} +1 -1
  3. package/dist/{PCDLoader-BG-ZSu84.js → PCDLoader-B0_dKUxm.js} +1 -1
  4. package/dist/{PCDLoader-Dy4BlpG3.cjs → PCDLoader-BhWhU7AF.cjs} +1 -1
  5. package/dist/{animationData-Bln0M7cD.js → animationData-_k7oY6dT.js} +1 -1
  6. package/dist/{animationData-BsfHPO-P.cjs → animationData-u3PDQuOQ.cjs} +1 -1
  7. package/dist/{iconfont-D9hgzLCg.cjs → iconfont-BYcEzhNe.cjs} +1 -1
  8. package/dist/{iconfont-BQBCgO1O.js → iconfont-DiGd__OT.js} +2 -2
  9. package/dist/{index-BTghn1W2.cjs → index-4sRonvwO.cjs} +1 -1
  10. package/dist/{index-BWUv92s4.cjs → index-BER-9cea.cjs} +1 -1
  11. package/dist/{index-BQCj3fMV.js → index-BEmcYHbr.js} +13 -13
  12. package/dist/{index-CD5uCiH9.js → index-BG20WI0G.js} +1 -1
  13. package/dist/{index-BOb1nNwq.js → index-BWlbMCvF.js} +3 -3
  14. package/dist/{index-DlMQigjS.js → index-B_hltucu.js} +1 -1
  15. package/dist/{index-8dhcui8A.js → index-BeRXwYS6.js} +1 -1
  16. package/dist/{index-BQOERy34.cjs → index-BrmJTI0B.cjs} +1 -1
  17. package/dist/{index-BKIacUel.cjs → index-Bu78K7ZG.cjs} +1 -1
  18. package/dist/{index-CNbYtIV_.cjs → index-BvHQ4rgD.cjs} +1 -1
  19. package/dist/{index-Dq4Lwm9O.cjs → index-C-B1N90Y.cjs} +1 -1
  20. package/dist/{index-DJL-eKIo.js → index-C35tMkD-.js} +2 -2
  21. package/dist/{index-sVdFHyjl.cjs → index-C89mMUM5.cjs} +1 -1
  22. package/dist/{index-CHIWRNqT.cjs → index-C8G1ik6O.cjs} +1 -1
  23. package/dist/{index-BWxZZ5t2.js → index-C8howWAV.js} +6 -6
  24. package/dist/{index-BW7PEvq0.js → index-CFp-3Ii5.js} +1 -1
  25. package/dist/{index-BAC9zNh7.js → index-CV1On3aP.js} +3 -3
  26. package/dist/{index-DFfIPpCG.js → index-CZU4FRVk.js} +3 -3
  27. package/dist/{index-D_Xo-WAP.cjs → index-Ca7EraIq.cjs} +1 -1
  28. package/dist/{index-DyeuJeIz.js → index-Cjax9TjT.js} +2 -2
  29. package/dist/{index-Djzfu6It.js → index-CnERmJxh.js} +3 -3
  30. package/dist/{index-CJIlx0kh.cjs → index-CoDkK5hg.cjs} +1 -1
  31. package/dist/{index-DOoRG-By.cjs → index-CsdTTuj7.cjs} +1 -1
  32. package/dist/{index-CmDV_HX-.cjs → index-Cvv5GKOV.cjs} +1 -1
  33. package/dist/{index-TGKm3MXI.js → index-Cx8gP3xA.js} +6 -6
  34. package/dist/{index-0JtF10qC.cjs → index-CxNA05bD.cjs} +1 -1
  35. package/dist/{index-CMiciReg.js → index-D04ebGoA.js} +1 -1
  36. package/dist/{index-FrPdQKQq.js → index-D54GltRD.js} +1 -1
  37. package/dist/{index-B1cEBcBv.cjs → index-D8agmBOg.cjs} +1 -1
  38. package/dist/{index-CZ01Uey-.js → index-DBZg952W.js} +4 -4
  39. package/dist/{index-cAtiRq0m.js → index-DHHOxu2C.js} +2 -2
  40. package/dist/{index-iDpB4RnF.cjs → index-DHotzRf6.cjs} +1 -1
  41. package/dist/{index-C6xyzF3E.cjs → index-DiH9I8Qd.cjs} +1 -1
  42. package/dist/{index-B74gcS36.cjs → index-DmN5XL7c.cjs} +1 -1
  43. package/dist/{index-CyjcMwPq.js → index-DoOEAJe9.js} +1 -1
  44. package/dist/{index-CdNXBIFC.cjs → index-DpDOUFmB.cjs} +1 -1
  45. package/dist/{index-B8MP6uHs.cjs → index-DqcKRmzN.cjs} +1 -1
  46. package/dist/{index-CbjEUSvK.cjs → index-LkiYEgcl.cjs} +1 -1
  47. package/dist/{index-CJfoKnFP.js → index-ThbaNcbe.js} +1 -1
  48. package/dist/{index-CeuUur0J.js → index-_qmANZPg.js} +1 -1
  49. package/dist/{index-BdB_acmm.cjs → index-eGw5gJGa.cjs} +1 -1
  50. package/dist/{index-ChCxwtv1.js → index-oXfFN0Pr.js} +1 -1
  51. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DCLueP3M.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Cws68h8h.cjs} +1 -1
  52. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BRGuwIGi.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-tsnXyC8a.js} +6 -6
  53. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CYXAbj2a.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B3RSoHQA.js} +4379 -4379
  54. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DpGu0pGu.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BkkUVCLE.cjs} +73 -73
  55. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CbAt1Sgy.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-BzTbm05u.js} +3 -3
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CzixMCTz.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-ChLyboIT.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_1_lang-bvR0uxez.js → index.vue_vue_type_style_index_1_lang-Cwuh77RJ.js} +3 -3
  58. package/dist/{index.vue_vue_type_style_index_1_lang-DiCmmZWZ.cjs → index.vue_vue_type_style_index_1_lang-D_Jkk1jj.cjs} +1 -1
  59. package/dist/{main-DBuDKx9k.js → main-CQ5P45HO.js} +2 -2
  60. package/dist/{main-BAdh_eGu.cjs → main-CdLPmV9p.cjs} +1 -1
  61. package/dist/{pointTrack-C3DjtFZp.cjs → pointTrack-BlTNQUei.cjs} +1 -1
  62. package/dist/{pointTrack-DINaUvcX.js → pointTrack-o_VVFlmw.js} +1 -1
  63. package/dist/{robotUtil-BeynP2xM.js → robotUtil-BIMs6Vbb.js} +1 -1
  64. package/dist/{robotUtil-CI-r19FW.cjs → robotUtil-CHCt1RuS.cjs} +1 -1
  65. package/dist/ss-component.cjs +1 -1
  66. package/dist/ss-component.js +9 -9
  67. package/dist/ss-component2.cjs +1 -1
  68. package/dist/ss-component2.js +10 -10
  69. package/dist/{threeModel-CEX82wRN.cjs → threeModel-DP_7xQQL.cjs} +1 -1
  70. package/dist/{threeModel-DT3NAfO0.js → threeModel-OAebCYSS.js} +5 -5
  71. package/dist/{threePreview-D3TXuSzk.cjs → threePreview-BNlZnB3i.cjs} +1 -1
  72. package/dist/{threePreview-BDS4HbKS.js → threePreview-RzBngWrN.js} +3 -3
  73. package/dist/{threeSceneView-Cl6V_agq.cjs → threeSceneView-C1o5iNCO.cjs} +1 -1
  74. package/dist/{threeSceneView-DN0ThqUj.js → threeSceneView-C8vlDAO-.js} +7 -7
  75. package/dist/{threeSceneViewForCPMPIP-Bln3jqsZ.cjs → threeSceneViewForCPMPIP-ByuSeCFK.cjs} +1 -1
  76. package/dist/{threeSceneViewForCPMPIP-6wdyEUgw.js → threeSceneViewForCPMPIP-CdhbgviA.js} +10 -10
  77. package/dist/{threeTrackPathView-C8VR9-qO.cjs → threeTrackPathView-BqI0D7OI.cjs} +1 -1
  78. package/dist/{threeTrackPathView-B1oaH-Qc.js → threeTrackPathView-DyGh44hI.js} +5 -5
  79. package/dist/{threeViewerHost-BaGBR8jd.js → threeViewerHost-CTUpfC_Y.js} +2 -2
  80. package/dist/{threeViewerHost-pVmmGFpg.cjs → threeViewerHost-Czjy_lsO.cjs} +2 -2
  81. package/dist/{urdfTree-BU2M7_8q.cjs → urdfTree-CE1RFgO5.cjs} +1 -1
  82. package/dist/{urdfTree-BhqPlNff.js → urdfTree-Du-nKROV.js} +1 -1
  83. package/dist/{workpieceTreePanel-DiVmUGRy.js → workpieceTreePanel-BCaK6cMT.js} +5 -5
  84. package/dist/{workpieceTreePanel-2XzE7ufi.cjs → workpieceTreePanel-XnZWnUpu.cjs} +1 -1
  85. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const l=require("vue"),k=require("./index-CEwxrYB-.cjs"),Hl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DpGu0pGu.cjs"),_e=require("./index-BQOERy34.cjs"),Me=require("./threeViewerHost-pVmmGFpg.cjs"),ie=require("./index.vue_vue_type_style_index_1_lang-PBh9haH2.cjs"),Br=require("./index.vue_vue_type_style_index_1_lang-DiCmmZWZ.cjs"),$l=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xl=require("./index-DdIZEUfD.cjs");require("./index-Ku2f-lW8.cjs");const va=require("./isString-Cvx5mmsS.cjs"),Ql=O=>O.match(/\((.*)\)/)[1],ba={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(O){const Z=O,Q=l.ref(null),$=l.ref(!1),L=l.ref(null);return l.watch(()=>Z==null?void 0:Z.isVisible,()=>{$.value=Z==null?void 0:Z.isVisible},{deep:!0,immediate:!0}),l.watch(()=>L.value,()=>{l.nextTick(()=>{var s,ee;(ee=(s=Q.value)==null?void 0:s.updatePopper)==null||ee.call(s)})},{deep:!0,immediate:!0}),(s,ee)=>{const he=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(he,{visible:$.value,title:Z==null?void 0:Z.title,placement:Z==null?void 0:Z.placement,width:Z==null?void 0:Z.width,ref_key:"popOverRef",ref:Q},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:L})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},Ar={key:0,class:"extra-button-content"},wr={class:"table-operator-wrap"},_r={class:"extra-button-filter"},Ur={class:"form-content-value"},Or={key:0,class:"extra-header"},Lr={class:"drop-menu",style:{width:"120px"}},Vr={key:0},Mr={key:1},jr={key:1,class:"extra-button-content tabs-button-wrapper"},$r={class:"table-operator-wrap"},Pr={class:"extra-button-filter"},Kr={class:"form-content-value"},Fr={key:0,class:"extra-header"},zr={class:"drop-menu",style:{width:"120px"}},Rr={key:0},qr={key:1},Jr={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(O,{emit:Z}){const Q=Z,$=O,L=l.ref(""),s=l.ref(!1),ee=l.ref([]),he=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),me=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],ye=oe=>{const ae=oe.raw;if(!ae)return;const te=new FileReader;te.onload=V=>{try{const xe=new Uint8Array(V.target.result),Ee=Me.readSync(xe,{type:"array"}),qe=Ee.SheetNames[0],Le=Ee.Sheets[qe],Je=Me.utils.decode_range(Le["!ref"]).e.c+1,we=new Array(Je).fill(""),C=[];for(const J in Le){if(J[0]==="!")continue;const{r:W,c:ke}=Me.utils.decode_cell(J);let Ne=Le[J].v;if(Le[J].t==="n"&&Ne>0&&Ne<1e6&&(Ne=new Date((Ne-25569)*86400*1e3).toISOString().split("T")[0]),(Ne==null||Ne==="")&&(Ne=""),W===0)we[ke]=Ne;else{if(!C[W-1]){C[W-1]={};for(let We=0;We<Je;We++)C[W-1][`col_${We}`]=""}C[W-1][`col_${ke}`]=Ne}}for(let J=0;J<Je;J++)we[J]===void 0&&(we[J]="");const de=C==null?void 0:C[0];if(!(de!=null&&de.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");Q("getImportData",we,C)}catch(xe){throw k.ElMessage.error(xe.message),new Error(xe.message)}},te.readAsArrayBuffer(ae)},je=oe=>{var te;const ae=(te=ee.value)==null?void 0:te.reduce((V,xe,Ee)=>(Ee===0?V[xe.label]=oe:V[xe.label]=xe==null?void 0:xe.value,V),{});Q("filter",ae,oe,!0)},He=oe=>{Q("buttonClick",oe)},le=oe=>{var ae,te;ee.value=(te=(ae=ie.getColumnChild(k.cloneDeep(oe)))==null?void 0:ae.filter(V=>(V==null?void 0:V.label)!==""&&(V==null?void 0:V.label)!=="操作"))==null?void 0:te.map(V=>({label:(V==null?void 0:V.label)??"",value:"",name:(V==null?void 0:V.label)??"",isFormColHidden:V==null?void 0:V.isTableColHidden,width:2}))},Ue=l.ref(!1),Oe=oe=>{var ae;if((oe==null?void 0:oe.buttonName)==="确认"&&(Q("filter",oe==null?void 0:oe.content),Ue.value=(oe==null?void 0:oe.content)&&Object.values(oe==null?void 0:oe.content).length>0),(oe==null?void 0:oe.buttonName)==="清空"){const te=k.cloneDeep(oe==null?void 0:oe.content);for(const V in te)te[V]="";ee.value=(ae=ee.value)==null?void 0:ae.map(V=>({...V,value:""})),Q("filter",te),Ue.value=!1}s.value=!1},fe=()=>{var ae,te;ee.value=(ae=ee.value)==null?void 0:ae.map(V=>({...V,value:""}));const oe=(te=ee.value)==null?void 0:te.reduce((V,xe)=>(V[xe.label]=xe.value,V),{});Q("filter",oe)};return l.onMounted(()=>{le($.columns)}),l.watch(()=>$.columns,()=>{le($.columns)},{deep:!0,immediate:!0}),(oe,ae)=>{var Le,rl,Je,we;const te=l.resolveComponent("el-icon"),V=l.resolveComponent("svg-icon"),xe=l.resolveComponent("el-input"),Ee=l.resolveComponent("el-button"),qe=l.resolveComponent("el-upload");return O.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",Ar,[l.createElementVNode("div",{class:l.normalizeClass(O.compName?"table-name-wrap":""),style:l.normalizeStyle({background:($==null?void 0:$.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:($==null?void 0:$.level)>1?"0px":"8px",fontWeight:600-(($==null?void 0:$.level)-1)*100>=400?600-(($==null?void 0:$.level)-1)*100:400,fontSize:15-($==null?void 0:$.level)>=12?15-($==null?void 0:$.level)+"px":"14px"})},l.toDisplayString(O.compName),7),l.createElementVNode("div",wr,[l.createElementVNode("div",_r,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,de,J,W;return[l.createVNode(xe,{modelValue:L.value,"onUpdate:modelValue":ae[1]||(ae[1]=ke=>L.value=ke),style:{"min-width":"80px"},placeholder:Ue.value?(J=(de=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:de.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:je,disabled:((W=ee.value)==null?void 0:W.length)===0},{suffix:l.withCtx(()=>{var ke,Ne;return[!L.value&&((Ne=(ke=O.filterValues)==null?void 0:ke.filter(We=>We))!=null&&Ne.join("/"))?(l.openBlock(),l.createBlock(te,{key:0,style:{cursor:"pointer"},onClick:fe},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:ae[0]||(ae[0]=ke=>s.value=!s.value)},[l.createVNode(V,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Ur,[(l.openBlock(),l.createBlock(_e.ssForm,{rowContents:ee.value,buttonValue:he.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:he.value,isStartJustify:!1,onOnButtonClick:Oe},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Le=O.buttons)==null?void 0:Le.length)>0?(l.openBlock(),l.createElementBlock("div",Or,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((rl=O.buttons)==null?void 0:rl.filter(C=>O.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,de)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:de},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":ye,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!O.lockingPage},{default:l.withCtx(()=>[l.createVNode(Ee,{disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(_e._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Ee,{key:0,disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style"])):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",Lr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,J=>(l.openBlock(),l.createBlock(Ee,{key:J==null?void 0:J.label,disabled:!!O.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:W=>He(J==null?void 0:J.label)},{default:l.withCtx(()=>{var W,ke;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(W=J==null?void 0:J.label)!=null&&W.includes("选中")?(l.openBlock(),l.createElementBlock("span",Vr,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Mr,"("+l.toDisplayString(O.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),C!=null&&C.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Ee,{key:2,id:"themeButton",disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"}),onClick:J=>He(C==null?void 0:C.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])])):(l.openBlock(),l.createElementBlock("div",jr,[l.createElementVNode("div",$r,[l.createElementVNode("div",Pr,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,de,J,W;return[l.createVNode(xe,{modelValue:L.value,"onUpdate:modelValue":ae[3]||(ae[3]=ke=>L.value=ke),style:{"min-width":"80px"},placeholder:Ue.value?(J=(de=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:de.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:je,disabled:((W=ee.value)==null?void 0:W.length)===0},{suffix:l.withCtx(()=>{var ke,Ne;return[!L.value&&((Ne=(ke=O.filterValues)==null?void 0:ke.filter(We=>We))!=null&&Ne.join("/"))?(l.openBlock(),l.createBlock(te,{key:0,style:{cursor:"pointer"},onClick:fe},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:ae[2]||(ae[2]=ke=>s.value=!s.value)},[l.createVNode(V,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Kr,[(l.openBlock(),l.createBlock(_e.ssForm,{rowContents:ee.value,buttonValue:he.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:he.value,isStartJustify:!1,onOnButtonClick:Oe},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Je=O.buttons)==null?void 0:Je.length)>0?(l.openBlock(),l.createElementBlock("div",Fr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((we=O.buttons)==null?void 0:we.filter(C=>O.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,de)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:de},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":ye,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(Ee,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=me==null?void 0:me.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(_e._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Ee,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=me==null?void 0:me.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",zr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,J=>(l.openBlock(),l.createBlock(Ee,{key:J==null?void 0:J.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:W=>He(J==null?void 0:J.label)},{default:l.withCtx(()=>{var W,ke;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(W=J==null?void 0:J.label)!=null&&W.includes("选中")?(l.openBlock(),l.createElementBlock("span",Rr,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",qr,"("+l.toDisplayString(O.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),C!=null&&C.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Ee,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(C==null?void 0:C.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:J=>He(C==null?void 0:C.label)},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=me==null?void 0:me.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},Wr=$l._export_sfc(Jr,[["__scopeId","data-v-b0dbf278"]]),Gr=l.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(O,{emit:Z}){const Q=O,$=Z,L=ee=>{$("buttonClick",ee)},s=ee=>{var he;return ee!=null&&ee.includes("删除")?((he=Q.selectTableItems)==null?void 0:he.length)>0?"warning-active-type":"warning-type":"default-type"};return(ee,he)=>{const me=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(O.buttons,ye=>(l.openBlock(),l.createBlock(me,{key:ye==null?void 0:ye.label,disabled:!!O.lockingPage,class:l.normalizeClass(s(ye==null?void 0:ye.label)),onClick:je=>L(ye==null?void 0:ye.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(ye==null?void 0:ye.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Hr=$l._export_sfc(Gr,[["__scopeId","data-v-70b12973"]]),ma=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(O){this.selectArray=O},setSelectString(O){this.selectString=O}}}),Qr={class:"calculator-content"},Xr={class:"calculator-child"},Yr={class:"calculator-child"},Zr=l.defineComponent({__name:"calculator",setup(O){const Z=l.ref(),Q=l.ref();return l.onMounted(()=>{Z.value=[{type:"Upload",label:"输入",name:"input"}],Q.value=[{type:"Upload",label:"输出",name:"output"}]}),($,L)=>(l.openBlock(),l.createElementBlock("div",Qr,[l.createElementVNode("div",Xr,[l.createVNode(_e.ssForm,{rowContents:Z.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Yr,[l.createVNode(_e.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Ir=$l._export_sfc(Zr,[["__scopeId","data-v-73db0fe7"]]),ka=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(O){this.selectIndex=O},setSelectMenu(O){this.selectMenu=O},setSelectTitle(O){this.selectTitle=O}}}),Xl=(O,Z)=>{let Q=O,$=Z;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((L,s)=>{if(Array.isArray(L)){let ee={};return L=L==null?void 0:L.forEach((he,me)=>{var ye;(ye=$==null?void 0:$[me])!=null&&ye.prop?ee[$[me].prop]=he:Array.isArray(he)&&(ee.children=Xl(he,$))}),Object.assign(ee,{id:s})}else return L})),Q},Sa=(O,Z,Q)=>{let $=O,L=Z;return $=$==null?void 0:$.map((s,ee)=>{var he,me;return!Array.isArray(s)||!((he=L==null?void 0:L[ee])!=null&&he.label)&&!Q||(s.unshift(((me=L==null?void 0:L[ee])==null?void 0:me.label)??""),s.some(ye=>Array.isArray(ye))&&(s=s==null?void 0:s.map(ye=>{var je;return Array.isArray(ye)&&(ye=Sa(ye,(je=L==null?void 0:L[ee])==null?void 0:je.children,Q)),ye}))),s}),$},en=(O,Z,Q)=>{if(Z==="")return O==null?void 0:O.filter($=>($==null?void 0:$.id)!==Q);{const $=Z.split("-");return ln(O,$,Q)}},ln=(O,Z,Q)=>{let $=O,L=Z;return(L==null?void 0:L.length)===0?$=$==null?void 0:$.filter(s=>s.id!==Q):$=$==null?void 0:$.map(s=>(s.id.toString()===(L==null?void 0:L[0])&&(L==null||L.shift(),s=Ca(s,L,Q)),s)),$},Ca=(O,Z,Q)=>{var s,ee;let $=O,L=Z;return(L==null?void 0:L.length)===0?$.children=(s=$.children)==null?void 0:s.filter(he=>he.id!==Q):$.children=(ee=$.children)==null?void 0:ee.map(he=>(he.id.toString()===(L==null?void 0:L[0])&&(L==null||L.shift(),he=Ca(he,L,Q)),he)),$},an=(O,Z,Q)=>{if(Z==="")return Q;{const $=Z.split("-");return rn(O,$,Q)}},rn=(O,Z,Q)=>{let $=O,L=Z;return(L==null?void 0:L.length)===0?$=Q:$=$==null?void 0:$.map(s=>(s.id.toString()===(L==null?void 0:L[0])&&(L==null||L.shift(),s=Da(s,L,Q)),s)),$},Da=(O,Z,Q)=>{var s;let $=O,L=Z;return(L==null?void 0:L.length)===0?$.children=Q:$.children=(s=$.children)==null?void 0:s.map(ee=>(ee.id.toString()===(L==null?void 0:L[0])&&(L==null||L.shift(),ee=Da(ee,L,Q)),ee)),$},xa=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(O){this.objUrl=O},setBlobUrls(O){this.blobUrls=O}}}),Yl=async O=>{var s,ee,he,me,ye,je,He;let Z=(ee=(s=k.cloneDeep(O))==null?void 0:s.optionUrl)==null?void 0:ee.menuSelect,Q=[];Z==null||Z.forEach(le=>{});let $="";const L=await ie.menuToParent(Z);if(L==null||L.forEach(le=>{var Ue,Oe,fe,oe;(le==null?void 0:le.name)===(((oe=(fe=(Oe=(Ue=k.cloneDeep(O))==null?void 0:Ue.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:fe[0])==null?void 0:oe.replaceAll("'",""))??"")&&($=le==null?void 0:le.id)}),$!==""){const le=(he=L==null?void 0:L.find(fe=>{var oe,ae,te,V;return(fe==null?void 0:fe.name)===(((ae=(oe=O==null?void 0:O.groupSelect)==null?void 0:oe.split(":"))==null?void 0:ae[0])||((V=(te=O==null?void 0:O.optionUrl)==null?void 0:te.groupSelect)==null?void 0:V[0]))}))==null?void 0:he.compData;let Ue=(ye=(me=le==null?void 0:le.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:me.contents)==null?void 0:ye.map(fe=>fe==null?void 0:fe.label),Oe=(He=(je=le==null?void 0:le.find(fe=>(fe==null?void 0:fe.key)==="tableContents"))==null?void 0:je.contents)==null?void 0:He.map(fe=>(fe=fe==null?void 0:fe.filter(oe=>!(oe!=null&&oe.id)),fe));Oe==null||Oe.forEach(fe=>{Q.push(ie.getValueToObjectValue(fe,Ue))})}return Q},nn={class:"table-content"},on={class:"menu-config-wrap"},tn=["onClick"],sn=["onClick"],un={key:0,class:"viewport-wrap"},cn=["onClick"],dn={title:"选择显示列信息"},pn={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},fn=["title"],gn={class:"col-operate-wrap"},hn={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},yn={class:"pop-view"},vn={class:"pop-wrapper"},bn={class:"file-list-pop"},mn=["title","onClick"],kn=["onClick"],Sn=["onClick"],Cn={class:"form-content"},Dn={key:0,class:"dialog-footer"},xn={class:"dialog-footer"},Tn={class:"form-content"},En={__name:"index",props:{pageLayout:{type:String,default:"vertical"},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!1},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(O,{emit:Z}){var ya;const Q=l.ref([]),$=xa(k.pinia),L=l.ref(null),s=O,ee=l.ref(s==null?void 0:s.allowSelect),he=l.ref((ya=s==null?void 0:s.config)==null?void 0:ya.showIndex),me=l.ref(),ye=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),je=ie.useOriginalState(k.pinia),{originalPath:He}=k.storeToRefs(je),le=He.value,Ue=l.ref(!1),Oe=l.ref(!1),fe=l.ref(!1),oe=l.reactive({column:{},status:!1,text:"合计"}),ae=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),te=Z,V=l.ref([]),xe=l.reactive({prop:"",order:null}),Ee=l.ref([]),qe=l.ref(!1),Le=l.ref(!1),rl=l.ref(null);Me.useThreeSystem();const Je=l.ref([]),we=l.ref(!1),C=l.ref(),de=ie.useMenuState(),{importLoading:J,activeMenuPath:W,contentLoading:ke,linkMenuInfo:Ne}=k.storeToRefs(de),We=ie.useTableComp(k.pinia),Te=ie.useModelComp(k.pinia),{extraContents:be,cacheUpdatingData:il,tableViewContents:ul,tableLoading:Bn,pageMapState:Ze,lockingPage:Tl}=k.storeToRefs(Te),Y=l.ref([]),El=l.ref([]),Nl=l.ref(new Map);l.ref(!1);const Ge=l.ref("");l.ref();const Bl=l.ref(!0),nl=l.ref(0),Zl=l.ref(!0),$e=l.ref(""),Qe=l.ref(!1),Ta=l.ref({label:"查看三维模型"}),Al=l.ref(!1),Pl=l.ref(),Ve=l.ref([]),Ie=l.ref([]),wl=l.ref(!1),cl=l.ref([]),ol=l.ref([]),el=l.ref([]),Xe=l.ref([]),Pe=l.ref(),Be=l.ref(),Ea=ma(k.pinia),_l=l.ref(),Kl=l.ref(0),Ul=ka(k.pinia),{selectIndex:Na,selectMenu:Ye,selectTitle:Fl}=k.storeToRefs(Ul),{selectString:ll}=k.storeToRefs(Ea),Ba=k.useLoginState(k.pinia),{loginUserInfo:ge}=k.storeToRefs(Ba),Aa=l.ref(720),Ke=l.ref(!1),Ol=l.ref(!1),Fe=l.ref([]),al=l.ref(),dl=l.ref(!0),Il=l.ref(!0),Ll=l.ref([]),wa=l.inject("contentRef");l.provide("contentRef",wa),l.watch(()=>{var e;return(e=Y.value)==null?void 0:e.length},e=>{ae.total=e}),l.watch(()=>ul.value,async()=>{var i,p,d,g,m,t,N,j,v,U,T,S,K,x,A,D,f,h;if(((i=ul.value)==null?void 0:i.length)===0||!((p=s==null?void 0:s.itemData)!=null&&p.find(u=>(u==null?void 0:u.key)==="columnPath"))||!((d=s==null?void 0:s.itemData)!=null&&d.find(u=>(u==null?void 0:u.key)==="pageColumn")))return;let e=(v=(j=(N=(t=(m=(g=s==null?void 0:s.itemData)==null?void 0:g.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:m.contents)==null?void 0:t.split("["))==null?void 0:N[1])==null?void 0:j.split("]"))==null?void 0:v[0],a=((K=(S=(T=(U=s==null?void 0:s.itemData)==null?void 0:U.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:T.contents)==null?void 0:S.split("["))==null?void 0:K[0])+((A=(x=ul.value)==null?void 0:x.find(u=>(u==null?void 0:u.key)===e))==null?void 0:A.value),n=((f=(D=s==null?void 0:s.itemData)==null?void 0:D.find(u=>(u==null?void 0:u.key)==="pageGroup"))==null?void 0:f.contents)??"",r=await ie.getItemData(a,sessionStorage.getItem("systemKey"),""),o=(h=r==null?void 0:r.find(u=>(u==null?void 0:u.name)===(n===""?s==null?void 0:s.compName:n)))==null?void 0:h.compData;ga(o,s.allMapContents)},{deep:!0});const _a=async(e,a)=>{var n,r,o,i,p;try{const d=await k.getInsofDataApi({id:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index)});let g;((n=d==null?void 0:d.data)==null?void 0:n.code)===200&&(g=((o=(r=d==null?void 0:d.data)==null?void 0:r.result)==null?void 0:o[0])||null);const m={type:"data",pageKey:s!=null&&s.parentTableId?(i=g==null?void 0:g.key)==null?void 0:i.pageKey:W.value,tableId:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index),systemKey:sessionStorage.getItem("systemKey")},t=a==null?void 0:a.map(v=>{const U=Object.keys(v),T={};return U.forEach((S,K)=>{T[e[K]]=v[S]}),T}),N=t==null?void 0:t.map(v=>({key:m,value:{tableData:v}})),j=await k.batchAddInsofDataApi({dataList:N});((p=j==null?void 0:j.data)==null?void 0:p.code)===200?(Te.setRefreshCurStructure(!0),k.ElMessage.success("导入数据成功")):k.ElMessage.error("导入数据响应失败")}catch(d){throw k.ElMessage.error("导入数据处理失败"),new Error(d)}},Ua=async e=>{var a,n;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await k.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),o=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let i=URL.createObjectURL(o);C.value=[{name:(n=e==null?void 0:e.split("/"))==null?void 0:n[((a=e==null?void 0:e.split("/"))==null?void 0:a.length)-1],blobUrl:i}],we.value=!0}};l.onBeforeUnmount(()=>{Il.value=!1;let e=Kl.value;Kl.value=e+1});const ea=l.computed(()=>{var r,o;const e=(ae.currentPage-1)*ae.pageSize,a=e+ae.pageSize,n=(r=V.value)==null?void 0:r.find(i=>{var p;return(i==null?void 0:i.sortable)&&((p=i==null?void 0:i.label)==null?void 0:p.includes("时间"))});return n&&(xe.order="descending",xe.prop=n==null?void 0:n.prop),te("getSliceContLength",ae),(o=Y.value)==null?void 0:o.slice(e,a)}),Oa=e=>{ae.currentPage=e,te("getSliceContLength",ae)},La=e=>{var a;ae.pageSize=e,e*ae.currentPage>((a=Y.value)==null?void 0:a.length)&&(ae.currentPage=1,ae.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),te("getSliceContLength",ae)},Va=(e,a)=>{var p,d;const n=(d=(p=V.value)==null?void 0:p.map(g=>g==null?void 0:g.prop))==null?void 0:d.filter(g=>g!=="operate");let r;const o=(e==null?void 0:e.length)===(n==null?void 0:n.length);if(e!=null&&e.includes("序号"))return k.ElMessage.error("导入的数据不需要包含序号列");if(r=o?e:e.slice(0,n==null?void 0:n.length),!(r==null?void 0:r.every(g=>n==null?void 0:n.find(m=>g===m))))return k.ElMessage.error("导入的数据表头不匹配");_a(r,a)},Ma=(e,a)=>{var n;Te.setRefreshCurStructure(!1),((n=V.value)==null?void 0:n.length)===0||Va(e,a)},ja=(e,a,n,r)=>{const o=[],i=[],p=m=>Object.keys(m).length;for(const m in e)if(e[m]!==void 0){const t=e[m],N=[];for(const[j,v]of Object.entries(t))N.push(v),i.length<p(t)&&i.push(j);o.push(N)}o.unshift(i);const d=Me.utils.aoa_to_sheet(o),g=Me.utils.book_new();Me.utils.book_append_sheet(g,d,r),Me.writeFileSync(g,`${a}.xlsx`),Fe.value=[]},Vl=async(e,a,n,r=!1,o)=>{var i,p,d,g,m,t,N,j;try{Te.setRefreshCurStructure(!1);const v=await k.getInsofDataApi({id:s==null?void 0:s.index});if(((i=v==null?void 0:v.data)==null?void 0:i.code)===200){let U=(m=(g=(d=(p=v==null?void 0:v.data)==null?void 0:p.result)==null?void 0:d[0])==null?void 0:g.value)==null?void 0:m.pageData;r?U={...U,compData:(N=U==null?void 0:U.compData)==null?void 0:N.map(S=>{var K;return(S==null?void 0:S.key)==="header"?{...S,contents:(K=S==null?void 0:S.contents)==null?void 0:K.map(x=>({...x,[e]:n}))}:S})}:U={...U,compData:(t=U==null?void 0:U.compData)==null?void 0:t.map(S=>{var K,x;return(S==null?void 0:S.key)==="header"?{...S,contents:(K=S==null?void 0:S.contents)==null?void 0:K.map(A=>(A==null?void 0:A.prop)===(a==null?void 0:a.prop)?{...A,[e]:n}:A)}:(S==null?void 0:S.key)==="tableToForm"&&o?{...S,contents:(x=S==null?void 0:S.contents)==null?void 0:x.map(A=>(A==null?void 0:A.prop)===(a==null?void 0:a.prop)?{...A,[o]:n}:A)}:S})};const T=await k.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:U}});((j=T==null?void 0:T.data)==null?void 0:j.code)===200?(k.ElMessage.success("编辑成功"),Te.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(v){k.ElMessage.error(v)}},$a=async(e,a)=>{await Vl("label",a,e)},Pa=async(e,a)=>{await Vl("columnType",a,e,!1,"type")},Ka=()=>{il.value?Ke.value=!1:ha()},Fa=e=>{Fe.value=e},za=(e,a)=>{al.value===a?dl.value=!1:dl.value=!0,al.value=a==null?void 0:a.changeProp},pl=l.computed(()=>{var n,r,o;const e=(n=V.value)==null?void 0:n.some(i=>i==null?void 0:i.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(o=(r=V.value)==null?void 0:r.filter(i=>(i==null?void 0:i.label)!=="操作"))==null?void 0:o.map(i=>({...i,filterable:!!(i!=null&&i.filterable),showSummary:!!(i!=null&&i.showSummary),operable:!!(i!=null&&i.operable)}))}),Ra=async(e,a,n)=>{const r=k.cloneDeep(V.value);await l.nextTick(),V.value=r==null?void 0:r.map(o=>(n==null?void 0:n.label)===(o==null?void 0:o.label)?{...o,[a]:e}:o),await Vl(a,n,e)},zl=async(e,a)=>{await Vl(a,null,e,!0)},qa=()=>{Qe.value=!1},Ja=e=>{te("clickTrigger",e)},Rl=async e=>{var i,p,d,g,m,t,N,j,v,U,T,S,K,x;let a,n,r;if(typeof e=="string"?(a=e,n=null,r=null):(a=e==null?void 0:e.row,n=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix),(i=a==null?void 0:a.toString())!=null&&i.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(a.includes(",")){k.ElMessage.error("当前版本仅允许单个urdf预览!");return}cl.value=[a],Le.value=!0,rl.value={data:k.cloneDeep(n)},qe.value=!0;return}let o=[];if((p=a==null?void 0:a.toString())!=null&&p.includes(".stl")||(d=a==null?void 0:a.toString())!=null&&d.includes(".STL")||(g=a==null?void 0:a.toString())!=null&&g.includes(".obj")||(m=a==null?void 0:a.toString())!=null&&m.includes(".mtl")){cl.value=(t=a==null?void 0:a.toString())==null?void 0:t.split(","),Le.value=!1,qe.value=!0;return}if((N=a==null?void 0:a.toString())!=null&&N.includes(".stl")||(j=a==null?void 0:a.toString())!=null&&j.includes(".STL")||(v=a==null?void 0:a.toString())!=null&&v.includes(".obj")||(U=a==null?void 0:a.toString())!=null&&U.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let A,D=[],f={};if(Array.isArray(a)?A=a:A=a==null?void 0:a.split(","),A==null||A.forEach(h=>{h.includes(".mtl")?D.push(h):f.blob=f.blob?f.blob+","+h:h}),(D==null?void 0:D.length)>0&&(f.mtlBlobs=D),r&&(f.suffix=r),(S=(T=Object.values(f))==null?void 0:T[0])!=null&&S.includes("http:"))o.push(f);else{const h=new Blob([f.blob],{type:"application/octet-stream;charset=UTF-8"});let u=URL.createObjectURL(h),y="";(K=a==null?void 0:a.split("/"))==null||K.forEach((z,B)=>{var G;B===((G=a==null?void 0:a.split("/"))==null?void 0:G.length)-1&&(y=z)}),(x=f.blob)!=null&&x.includes(".stl")&&(y=(y==null?void 0:y.replaceAll(">",""))+".urdf"),C.value=[{name:y,blobUrl:u}],we.value=!0}}else{try{de.setImportLoading(!0);const A=new Br.ChunkDownloader(a,2*1024*1024),D=await A.downloadAll(y=>{console.log(`下载进度: ${y.percent}%`)}),f=new Blob([D],{type:"application/octet-stream"}),h=URL.createObjectURL(f),u=a.split("/").pop();C.value=[{name:u,blobUrl:h,size:A.totalSize}],de.setImportLoading(!1)}catch(A){console.error("NC文件加载失败:",A)}we.value=!0}(o==null?void 0:o.length)>0&&$.setBlobUrls(o)},Ml=e=>{var r,o,i,p;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(p=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:p[((i=(o=e==null?void 0:e.url)==null?void 0:o.split("."))==null?void 0:i.length)-1];return(e==null?void 0:e.name)+"."+a},Wa=async e=>{let a=null,n=null,r=null;if(e!=null&&e.downloadUrl){const i=await ql(),p=_e.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),d=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"}}).finally(()=>{p.close()}),g=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(g),n=e==null?void 0:e.name;const m=n==null?void 0:n.lastIndexOf(".");r=n==null?void 0:n.slice(m)}else{const i=await Me.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(i.data),n=Ml(e)):a=e==null?void 0:e.url}if(r!=null&&r.includes(".urdf")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){const i={row:`${a}`,suffix:r};Rl(i);return}const o={name:n,blobUrl:a};C.value=[o],we.value=!0},Ga=async e=>{let a=null,n=null;if(e!=null&&e.downloadUrl){const i=await ql(),p=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"}}),d=new Blob([p.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(d),n=e==null?void 0:e.name}else{const i=await Me.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(i.data),n=Ml(e)}const r={name:n,blobUrl:a},o=document.createElement("a");o.href=r.blobUrl,o.download=r.name,o.style.display="none",document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o)},100)},Ha=(e,a)=>{var n;if(Object.values(a).length!==0)return Object.values(a).find(r=>{var o,i,p;return((o=r==null?void 0:r.toString())==null?void 0:o.includes(".txt"))||((i=r==null?void 0:r.toString())==null?void 0:i.includes(".cpt"))||((p=r==null?void 0:r.toString())==null?void 0:p.includes(".obj"))})?[...e,Ta.value]:(n=s==null?void 0:s.config)!=null&&n.allowMove?[...e,{label:"迁移"}]:e},Qa=(e,a={})=>[...e==null?void 0:e.values()].filter(n=>Object.keys(a).every(r=>{var p;const o=n[r],i=(p=a[r])==null?void 0:p.toLowerCase();return i&&o&&typeof o=="string"?o.toLowerCase().includes(i):!0})),la=l.ref([]),Xa=async(e,a,n=!1)=>{var r;if(e){if(Te.setTableLoading(!0),la.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(o=>!o)))return Y.value=El.value;if(n){Y.value=[...Nl.value.values()].filter(o=>Object.values(o).some(i=>typeof i=="string"?i==null?void 0:i.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}Y.value=Qa(Nl.value,e),Te.setTableLoading(!1)}},Ya=async e=>{var p,d,g,m,t,N,j,v,U,T,S,K,x,A,D;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((p=ge.value)==null?void 0:p.account)||((d=ge.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((g=ge.value)==null?void 0:g.account)||((m=ge.value)==null?void 0:m.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(N=(t=a==null?void 0:a.data)==null?void 0:t.result)==null?void 0:N.map(f=>f==null?void 0:f.id);const o=(v=(j=n==null?void 0:n.data)==null?void 0:j.result)==null?void 0:v.map(f=>f==null?void 0:f.id);r=[...k.cloneDeep(r),...o],(r==null?void 0:r.length)>0&&(r!=null&&r.every(f=>f!==null&&f))&&await k.batchDeleteInsofDataApi({ids:r});let i=await ie.getItemData(W.value,sessionStorage.getItem("systemKey"),e.id);if(i=i==null?void 0:i.filter(f=>f.comp!=="methodButton"),i&&i.length>0){const f=!Array.isArray(Fl.value)&&((U=Fl.value)==null?void 0:U.key)!=="main"?[]:Fl.value;f.push({key:Ye.value===""?(T=e==null?void 0:e.id)==null?void 0:T.toString():Ye.value+"-"+((S=e==null?void 0:e.id)==null?void 0:S.toString()),value:e[(K=Object.keys(e))==null?void 0:K.filter(h=>h!=="index"&&h!=="id")[0]]}),Ul.setSelectMenu(Ye.value===""?(x=e==null?void 0:e.id)==null?void 0:x.toString():Ye.value+"-"+((A=e==null?void 0:e.id)==null?void 0:A.toString())),Ul.setSelectTitle(f),Ul.setSelectIndex((D=e==null?void 0:e.id)==null?void 0:D.toString()),te("pageChange",i)}},aa=async(e,a,n,r)=>{var i,p,d,g,m,t,N,j,v,U,T,S,K,x,A,D,f,h,u,y,z,B,G,re,X;if(te("clickMainKey",n),(r==null?void 0:r.isExistChild)===!0){let q=(p=(i=V.value)==null?void 0:i.find(R=>(R==null?void 0:R.isMainKey)===!0))==null?void 0:p.prop,H=(d=r==null?void 0:r.rowContent)==null?void 0:d[q],w=(m=(g=r==null?void 0:r.columnType)==null?void 0:g.childPath)==null?void 0:m.split(le),M=[];w==null||w.forEach((R,c)=>{(w==null?void 0:w.length)-1===c&&M.push(H),M.push(R)}),M=M.join(le);let F=await ie.getItemData(M,sessionStorage.getItem("systemKey"),""),I=await ie.getItemData((t=r==null?void 0:r.columnType)==null?void 0:t.childPath,sessionStorage.getItem("systemKey"),"");if(!F||(F==null?void 0:F.length)===0){let R=[];I==null||I.forEach(P=>{var ve,ce,E,b;let _={type:"structure",pageKey:M,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(ve=ge.value)==null?void 0:ve.id,parentPageKey:"",createUserLayer:((ce=ge.value)==null?void 0:ce.dept)||((E=ge.value)==null?void 0:E.部门名称)},ne={pageData:{comp:P==null?void 0:P.comp,compData:(b=P==null?void 0:P.compData)==null?void 0:b.filter(se=>(se==null?void 0:se.key)!=="tableContents"),name:P==null?void 0:P.name,isShow:P==null?void 0:P.isShow}};R.push({key:_,value:ne})}),(R==null?void 0:R.length)>0&&await k.batchAddInsofDataApi({dataList:R});let c=await ie.getItemData(M,sessionStorage.getItem("systemKey"),"");Ll.value=c}else{let R=I==null?void 0:I.map(c=>{var P,_;return(c==null?void 0:c.comp)==="Form"?c.compData=(P=c.compData)==null?void 0:P.map(ne=>{var ve;return(ne==null?void 0:ne.key)==="formContent"&&(ne.contents=(ve=ne==null?void 0:ne.contents)==null?void 0:ve.map(ce=>{var b,se,ue,pe,Ce;let E=(Ce=(pe=(ue=(se=(b=F==null?void 0:F.find(Se=>(Se==null?void 0:Se.name)===(c==null?void 0:c.name)))==null?void 0:b.compData)==null?void 0:se.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:ue.contents)==null?void 0:pe.find(Se=>(Se==null?void 0:Se.prop)===(ce==null?void 0:ce.prop)))==null?void 0:Ce.value;return ce.value=E,ce})),ne}):c=F==null?void 0:F.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)),c.id=(_=F==null?void 0:F.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)))==null?void 0:_.id,c});Ll.value=R}te("routeUrl",Ll.value,{isEdit:!0,routerUrl:M});return}if((r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(q=>(q==null?void 0:q.url)&&(q==null?void 0:q.name)))){let q=k.cloneDeep(e);q=await((N=k.cloneDeep(q))==null?void 0:N.map(async w=>{var I,R,c,P;const M=await Me.downloadAvatarApi({url:w==null?void 0:w.url});let F=URL.createObjectURL(M.data);return{name:(w==null?void 0:w.name)+"."+((P=(I=w==null?void 0:w.url)==null?void 0:I.split("."))==null?void 0:P[((c=(R=w==null?void 0:w.url)==null?void 0:R.split("."))==null?void 0:c.length)-1]),blobUrl:F}}));let H=await Promise.all(q);C.value=H,we.value=!0}const o=k.cloneDeep(V.value);if((r==null?void 0:r.isMainKey)===!0&&(o==null?void 0:o.length)>0){(j=o==null?void 0:o[0])==null||j.prop;let q=k.cloneDeep(W).value+le+(r==null?void 0:r.data),H=k.cloneDeep(W).value,w=(U=(v=Ze.value[q])==null?void 0:v.filter(R=>{var c,P;return((c=R==null?void 0:R.key)==null?void 0:c.type)==="structure"&&((P=R==null?void 0:R.key)==null?void 0:P.parentTable)===""}))==null?void 0:U.map(R=>{var c;return(c=R==null?void 0:R.value)==null?void 0:c.pageData}),M={};(T=V.value)==null||T.forEach(R=>{(R==null?void 0:R.label)!=="操作"&&(M[R.label]=n[R.prop]??n[R.label])});let F=(K=(S=s==null?void 0:s.itemData)==null?void 0:S.find(R=>(R==null?void 0:R.key)==="mainRouters"))==null?void 0:K.contents,I;if((F==null?void 0:F.length)>0){let R=q==null?void 0:q.split(le)[((x=q==null?void 0:q.split(le))==null?void 0:x.length)-1],c=F==null?void 0:F.find(P=>(P==null?void 0:P.key)===R);I=(c==null?void 0:c.routerContent)+le+(c==null?void 0:c.key)}if((w==null?void 0:w.length)>0)await ie.getItemData(q+le+`updateLoading${((A=ge.value)==null?void 0:A.account)||((D=ge.value)==null?void 0:D.账号)}`,sessionStorage.getItem("systemKey"),"")||await ie.loadingConstruct(q,q+le+`updateLoading${((f=ge.value)==null?void 0:f.account)||((h=ge.value)==null?void 0:h.账号)}`,M,I),Te.setRouteToChildPath(H),de.setActiveMenuPath(q+le+`updateLoading${((u=ge.value)==null?void 0:u.account)||((y=ge.value)==null?void 0:y.账号)}`);else{(z=o==null?void 0:o[0])==null||z.prop;let R=k.cloneDeep(W).value+le+(r==null?void 0:r.data),c=k.cloneDeep(W).value;await ie.getItemData(c+le,sessionStorage.getItem("systemKey"),""),await ie.loadingConstruct(c+le,R,M),await ie.loadingConstruct(R,R+le+`updateLoading${((B=ge.value)==null?void 0:B.account)||((G=ge.value)==null?void 0:G.账号)}`,M,I),Te.setRouteToChildPath(c),de.setActiveMenuPath(R+le+`updateLoading${((re=ge.value)==null?void 0:re.account)||((X=ge.value)==null?void 0:X.账号)}`)}}},Za=()=>{we.value=!1},Ia=e=>{te("rowClick",e)};l.watch(()=>s.changedContent,()=>{var n,r;if(!s.changedContent)return;let e=(n=Y.value)==null?void 0:n.map(o=>{var i;return o.id===((i=s.changedContent)==null?void 0:i.id)&&(o={...s.changedContent,id:s.changedContent.newId?s.changedContent.newId:s.changedContent.id},delete o.newId),o});const a=(r=s.itemData)==null?void 0:r.map(o=>((o==null?void 0:o.key)==="tableContents"&&(o.contents=e),o));Y.value=e,te("contentChange",{contents:a,index:s.index}),te("change",{content:e,index:s==null?void 0:s.index,buttonName:"",id:s==null?void 0:s.index})},{deep:!0,immediate:!0});const er=()=>{},lr=async()=>{const e=W.value,a=sessionStorage.getItem("systemKey"),n=await ie.getItemData(e,a,""),r=n==null?void 0:n.find(d=>(d==null?void 0:d.name)==="方法明细"),o=(r==null?void 0:r.compData)||[],i=o==null?void 0:o.find(d=>(d==null?void 0:d.key)==="formContent");return i==null?void 0:i.contents},ql=async()=>`Bearer ${k.Local.get("access-token")}`,ar=async(e,{token:a,inputData:n}={})=>await k.axios.post(e,n,{headers:{Authorization:a}}).catch(o=>(de.setImportLoading(!1),Promise.reject(o))),rr=e=>{var r;let a={};const n=[];return a.form={},(r=k.cloneDeep(e))==null||r.forEach((o,i)=>{var p,d,g,m,t,N,j,v,U,T,S,K,x,A;if((o==null?void 0:o.comp)==="Table"){(d=(p=o==null?void 0:o.compData)==null?void 0:p.find(u=>(u==null?void 0:u.key)==="header"))==null||d.contents;let D=(t=(m=(g=o==null?void 0:o.compData)==null?void 0:g.find(u=>(u==null?void 0:u.key)==="tableContents"))==null?void 0:m.contents)==null?void 0:t.map(u=>u.slice(1));(T=(U=(v=(j=(N=o==null?void 0:o.compData)==null?void 0:N.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:j.contents)==null?void 0:v[0])==null?void 0:U[0])==null||T.label;let f=(K=(S=o==null?void 0:o.compData)==null?void 0:S.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:K.contents,h=[];D==null||D.forEach(u=>{let y=[];u==null||u.forEach((z,B)=>{var re;let G={};((re=f[B])==null?void 0:re.label)!=="操作"&&(G[f[B].label]=z,y.push(G))}),h.push(y)}),a[o.name]=h}else{const D=(A=(x=o.compData)==null?void 0:x.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:A.contents;D==null||D.forEach(f=>{var h,u;if(f.prop!==""){let y=f==null?void 0:f.value;Array.isArray(y)?y=((h=y==null?void 0:y[0])==null?void 0:h.oldUrl)||(y??"http://222.92.178.198:62001/"+((u=y==null?void 0:y[0])==null?void 0:u.url)):y=y.toString(),f={key:(f==null?void 0:f.prop)??(f==null?void 0:f.label),value:y},n.push(f)}})}}),a.form=ie.getFormContents(n),a};let jl=null;const nr=()=>{de.setLoadingPercent(0)},ra=()=>{clearInterval(jl),jl=null},or=()=>{ra(),nr()},fl=()=>{de.setImportLoading(!1),or()},tr=()=>{jl=setInterval(()=>{const e=de.getLoadingPercent();if(e==99){ra();return}de.setLoadingPercent(e+1)},100)},sr=async(e,a,n)=>{var z,B,G,re,X,q,H,w,M,F,I,R;de.setImportLoading(!0,ie.loadingTypeConstants.PROGRESS),jl||tr();const r=await lr().catch(c=>(fl(),Promise.reject(c))),o=r==null?void 0:r.find(c=>(c==null?void 0:c.key)==="算法体"),i=o==null?void 0:o.value;if(!i){console.log("未搜索到isMain, 缺少算法执行接口"),fl();return}const p=V.value||[],d=p.find(c=>(c==null?void 0:c.prop)==="输入"),g=d==null?void 0:d.prop;let m=a==null?void 0:a[g];const t=await ql().catch(c=>(fl(),Promise.reject(c)));let N=!1,j="";(z=V.value)==null||z.forEach(c=>{(c==null?void 0:c.prop)===g&&(N=!!(c!=null&&c.childPath),j=c==null?void 0:c.childPath)});let v="",U="";if(N){let c=(G=(B=V.value)==null?void 0:B.find(ve=>(ve==null?void 0:ve.isMainKey)===!0))==null?void 0:G.prop;U=a==null?void 0:a[c];let P=j==null?void 0:j.split(le),_=[];P==null||P.forEach((ve,ce)=>{(P==null?void 0:P.length)-1===ce&&_.push(U),_.push(ve)}),_=_.join(le),v=_;let ne=await ie.getItemData(_,sessionStorage.getItem("systemKey"),"");m=rr(ne)}const T=await ar(i,{token:t,inputData:m}).catch(c=>(fl(),Promise.reject(c))),S=(re=T==null?void 0:T.data)==null?void 0:re.data,K=r==null?void 0:r.find(c=>(c==null?void 0:c.prop)==="算法名称");K==null||K.value;const x=p.find(c=>(c==null?void 0:c.prop)==="输出"),A=x==null?void 0:x.directiveLabel;v=v==null?void 0:v.replaceAll(d==null?void 0:d.directiveLabel,A);const D=(X=k.cloneDeep(v))==null?void 0:X.replaceAll(le+U,"");let f=await ie.getItemData(v,sessionStorage.getItem("systemKey"),""),h=await ie.getItemData(D,sessionStorage.getItem("systemKey"),"");if(f){let c=[],P=[];f==null||f.forEach(_=>{var ne,ve;if((_==null?void 0:_.comp)==="Table")(ne=_==null?void 0:_.compData)==null||ne.forEach(ce=>{var E;(ce==null?void 0:ce.key)==="tableContents"&&((E=ce==null?void 0:ce.contents)==null||E.forEach(b=>{var se,ue;(se=b==null?void 0:b[0])!=null&&se.id&&c.push((ue=b==null?void 0:b[0])==null?void 0:ue.id)}))});else if((_==null?void 0:_.comp)==="Form"){_.compData=(ve=_==null?void 0:_.compData)==null?void 0:ve.map(E=>{var b;return(E==null?void 0:E.key)==="formContent"&&(E.contents=(b=E==null?void 0:E.contents)==null?void 0:b.map(se=>{var ue,pe;return(ue=S==null?void 0:S.form)!=null&&ue[se.prop]&&(se.value=(pe=S==null?void 0:S.form)==null?void 0:pe[se.prop]),se})),E});let ce={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};P.push({id:_==null?void 0:_.id,value:ce})}}),(P==null?void 0:P.length)>0&&await k.batchUpdateInsofDataApi({dataList:P}),c=[...new Set(c)],(c==null?void 0:c.length)>0&&await k.batchDeleteInsofDataApi({ids:c})}else{let c=[];if(S!=null&&S.table){let P={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:v,parentTable:"",createUserId:(q=ge.value)==null?void 0:q.id,createUserOrg:((H=ge.value)==null?void 0:H.dept)||((w=ge.value)==null?void 0:w.部门名称)};h==null||h.forEach(_=>{let ve={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};c.push({key:P,value:ve})})}if(S!=null&&S.form){let P={type:"structure",pageKey:v,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(M=ge.value)==null?void 0:M.id,parentPageKey:"",createUserLayer:((F=ge.value)==null?void 0:F.dept)||((I=ge.value)==null?void 0:I.部门名称)};h==null||h.forEach(_=>{var E;let ne=(E=_==null?void 0:_.compData)==null?void 0:E.map(b=>{var se;return(b==null?void 0:b.key)==="formContent"&&(b.contents=(se=b.contents)==null?void 0:se.map(ue=>{var pe,Ce;return(pe=S==null?void 0:S.form)!=null&&pe[ue.prop]&&(ue.value=(Ce=S==null?void 0:S.form)==null?void 0:Ce[ue.prop]),ue})),b}),ce={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:ne}};c.push({key:P,value:ce})})}(c==null?void 0:c.length)>0&&await k.batchAddInsofDataApi({dataList:c})}let u=await ie.getItemData(v,sessionStorage.getItem("systemKey"),""),y=[];S!=null&&S.table&&((R=S==null?void 0:S.table)==null||R.forEach(c=>{var ne,ve,ce,E;let P={type:"data",pageKey:v,tableId:(ne=u==null?void 0:u[0])==null?void 0:ne.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ve=ge.value)==null?void 0:ve.id,createUserOrg:((ce=ge.value)==null?void 0:ce.dept)||((E=ge.value)==null?void 0:E.部门名称)},_={tableData:c};y.push({key:P,value:_})})),(y==null?void 0:y.length)>0&&await k.batchAddInsofDataApi({dataList:y}),vl(!0),fl()},na=(e,a)=>(e=e==null?void 0:e.map(n=>{var r,o;return n!=null&&n.children&&((r=n.children)!=null&&r.find(i=>i.id===(a==null?void 0:a.id))?n.children=(o=n.children)==null?void 0:o.filter(i=>(i==null?void 0:i.id)!==(a==null?void 0:a.id)):n.children=na(n.children,a)),n}),e),De=l.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:s==null?void 0:s.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(e,a,n)=>{a===(s==null?void 0:s.index)?n(new Error("选择源不能和目标源一致")):n()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),ir=()=>{De.show=!1},ur=e=>{var a,n;if((e==null?void 0:e.buttonName)==="取消")return De.show=!1;De.to=e==null?void 0:e.content,!(!(s!=null&&s.index)||!((a=De.to)!=null&&a.groupName))&&(s==null?void 0:s.index)!==((n=De.to)==null?void 0:n.groupName)&&(te("change",{buttonName:"迁移",value:{from:De.from,to:De.to,data:De.selectRow}}),De.show=!1)},cr=l.computed(()=>s.compName===_e.tableSign),dr=async e=>{de.setImportLoading(!0),await _e.initUpdateCAMTargetData(e).finally(()=>{de.setImportLoading(!1)}),k.ElMessage({type:"success",message:"应用成功"})},gl=async(e,a,n)=>{var r,o,i,p,d,g,m,t,N,j,v,U,T,S,K;if(Ge.value="",wl.value=!0,Bl.value=!0,te("onButtonClick",e,a),e==="删除")ie.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,A;(x=Y.value)!=null&&x.find(D=>(D==null?void 0:D.id)===(a==null?void 0:a.id))?Y.value=(A=k.cloneDeep(Y.value))==null?void 0:A.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)):Y.value=na(k.cloneDeep(Y.value),a),en(_l.value,Ye.value,a==null?void 0:a.id),Te.setTableLoading(s==null?void 0:s.index),te("change",{content:Y.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:V.value})});else if(e==="批量删除"){if(((r=Fe.value)==null?void 0:r.length)===0)return k.ElMessage.warning("请先勾选操作的数据");ie.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,D;const x=(A=Fe.value)==null?void 0:A.map(f=>f.id);Y.value=(D=k.cloneDeep(Y.value))==null?void 0:D.filter(f=>!(x!=null&&x.includes(f.id))),Te.setTableLoading(s==null?void 0:s.index),te("change",{content:Y.value,singleContent:null,selectItems:Fe.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:V.value})})}else if(e==="复制新增"){$e.value="新增";const x=k.cloneDeep(a),A=(o=V.value)==null?void 0:o.find(h=>h==null?void 0:h.isMainKey),D=A||((i=V.value)==null?void 0:i[0]),f=(p=el.value)==null?void 0:p.find(h=>(h==null?void 0:h.label)==="新建");await ta(!0,f,{data:x,firstCol:D})}else if(e==="新增")$e.value="新增",yl(""),Qe.value=!0;else if(e==="编辑")$e.value="编辑",yl(a),Qe.value=!0;else if(e==="查看")$e.value="查看",yl(a),wl.value=!1,Bl.value=!1,Qe.value=!0;else if(e==="查看三维模型"){const x={};for(let D in a)D!=="id"&&(x[D]=a[D]);let A=(d=Object.values(x))==null?void 0:d[1];We.setTableShowThree(A)}else if(((g=n==null?void 0:n.extra)==null?void 0:g.type)==="modelExample")$e.value=e,Al.value=!0;else if(e==="新建"){let x=Ze.value,A=[];for(let y in x)y!=null&&y.includes(`loading${((m=ge.value)==null?void 0:m.account)||((t=ge.value)==null?void 0:t.账号)}`)&&(A=[...A,...y]);let D=[];for(let y in x)y!=null&&y.includes(`updateLoading${((N=ge.value)==null?void 0:N.account)||((j=ge.value)==null?void 0:j.账号)}`)&&(D=[...D,...y]);let f=A==null?void 0:A.map(y=>y==null?void 0:y.id);const h=D==null?void 0:D.map(y=>y==null?void 0:y.id);f=[...k.cloneDeep(f),...h],(f==null?void 0:f.length)>0&&(f!=null&&f.every(y=>y!==null&&y))&&await k.batchDeleteInsofDataApi({ids:f});const u=(v=el.value)==null?void 0:v.find(y=>(y==null?void 0:y.label)==="新建");await ta(!1,u)}else if(e==="修改模板"){let x=k.cloneDeep(W).value;Te.setRouteToChildPath(x),de.setActiveMenuPath(x+le)}else if(e==="执行")sr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((U=Fe.value)==null?void 0:U.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((T=Y.value)==null?void 0:T.length)===0)return k.ElMessage.warning("暂无数据导出");const x=(K=(S=V.value)==null?void 0:S.map(D=>D==null?void 0:D.label))==null?void 0:K.filter(D=>D!=="操作"),A=e==="导出全部"?k.cloneDeep(Y.value):k.cloneDeep(Fe.value);A==null||A.forEach(D=>{D==null||delete D.id}),ja(A,s==null?void 0:s.compName,x,s==null?void 0:s.compName)}else e==="迁移"?(De.selectRow=a,De.show=!0):e==="应用至流程"&&dr(a)},pr=async e=>{var n,r,o,i,p,d;const a=await k.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((n=a==null?void 0:a.data)==null?void 0:n.code)===200)return Array.isArray((r=a==null?void 0:a.data)==null?void 0:r.result)&&((i=(o=a==null?void 0:a.data)==null?void 0:o.result)==null?void 0:i.length)>0?(d=(p=a==null?void 0:a.data)==null?void 0:p.result)==null?void 0:d.map(g=>{var m;return{id:g==null?void 0:g.id,...(m=g==null?void 0:g.value)==null?void 0:m.pageData}}):[]},fr=async(e,a)=>{var n,r,o,i,p,d,g,m,t,N,j,v,U,T,S,K,x,A,D,f;try{let h,u;const y=(n=Ze.value[W.value+le])==null?void 0:n.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="structureMethod"}),z=(r=Ze.value[W.value+le])==null?void 0:r.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="structure"}),B=y==null?void 0:y.find(w=>{var M,F;return((F=(M=w==null?void 0:w.value)==null?void 0:M.pageData)==null?void 0:F.method)==="保存"});if(!B)return;const G=(d=(p=Ze.value[(i=(o=B==null?void 0:B.value)==null?void 0:o.pageData)==null?void 0:i.path])==null?void 0:p.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="data"}))==null?void 0:d.find(w=>{var M,F,I,R;return((F=(M=w==null?void 0:w.value)==null?void 0:M.tableData)==null?void 0:F.算法名称)===((R=(I=B==null?void 0:B.value)==null?void 0:I.pageData)==null?void 0:R.method)});if(!G)return;const re={buttonName:(m=(g=B==null?void 0:B.value)==null?void 0:g.pageData)==null?void 0:m.method,api:(N=(t=G==null?void 0:G.value)==null?void 0:t.tableData)==null?void 0:N.算法体,content:z==null?void 0:z.map(w=>{var M;return(M=w==null?void 0:w.value)==null?void 0:M.pageData}),extraContent:[],extraValues:(v=(j=B==null?void 0:B.value)==null?void 0:j.pageData)==null?void 0:v.data,methodName:(T=(U=B==null?void 0:B.value)==null?void 0:U.pageData)==null?void 0:T.path};if(!e)return;const X={...e,compData:(S=e==null?void 0:e.compData)==null?void 0:S.map(w=>{var M;return(w==null?void 0:w.key)==="formContent"?{...w,contents:(M=w==null?void 0:w.contents)==null?void 0:M.map(F=>(F==null?void 0:F.prop)===a?{...F,value:""}:F)}:w})},q={key:{pageKey:W.value+le,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:X}},H=await k.axios.post(re.api,q,{headers:{"Content-Type":"application/json"}});return((K=H==null?void 0:H.data)==null?void 0:K.code)===200&&(h=(A=(x=H==null?void 0:H.data)==null?void 0:x.result)==null?void 0:A.latestReportCode,u=(f=(D=H==null?void 0:H.data)==null?void 0:D.result)==null?void 0:f.status),{newMainKeyValue:h,newStatus:u}}catch(h){throw k.ElMessage.error(h),new Error(h)}},oa=(e,a,n,r)=>{var o;te("contentChange",{contents:(o=e==null?void 0:e.compData)==null?void 0:o.map(i=>{var p;return(i==null?void 0:i.key)==="formContent"?{...i,contents:(p=i==null?void 0:i.contents)==null?void 0:p.map(d=>(d==null?void 0:d.key)===a?{...d,value:n}:hl.value&&(d==null?void 0:d.prop)===hl.prop?{...d,value:hl.value}:d)}:i}),index:e==null?void 0:e.id},r)},hl=l.reactive({prop:"状态",value:""}),gr=l.ref(["系统自动生成信息","审批意见"]),hr=async(e,a,n)=>{var g,m;let r=e==null?void 0:e[a==null?void 0:a.prop],o=1,i,p;const d=k.cloneDeep(W).value+le+r;if(d){hl.value="",i=(g=Ze.value[d])==null?void 0:g.filter(j=>{var v;return((v=j==null?void 0:j.key)==null?void 0:v.type)==="structure"});const t=i==null?void 0:i.find(j=>{var v,U,T;return((T=(U=(v=j==null?void 0:j.value)==null?void 0:v.pageData)==null?void 0:U.comp)==null?void 0:T.toUpperCase())==="FORM"});p={...(m=t==null?void 0:t.value)==null?void 0:m.pageData,id:t==null?void 0:t.id};const N=await fr(p,a==null?void 0:a.prop);if(hl.value=N==null?void 0:N.newStatus,N!=null&&N.newMainKeyValue)return N==null?void 0:N.newMainKeyValue}if(Y.value.some(t=>(t==null?void 0:t[a==null?void 0:a.prop])===r)){const t=r;for(;Y.value.some(N=>(N==null?void 0:N[a==null?void 0:a.prop])===`${t}(${o})`);)o++;r=`${t}(${o})`}return r},ta=async(e,a,n)=>{var p,d,g,m,t,N,j,v;let r,o;const i=await hr(n==null?void 0:n.data,n==null?void 0:n.firstCol);if(e?(r=k.cloneDeep(W).value+le+((m=n==null?void 0:n.data)==null?void 0:m[(g=n==null?void 0:n.firstCol)==null?void 0:g.prop]),o=k.cloneDeep(W).value+le+i):(r=k.cloneDeep(W).value+le,o=k.cloneDeep(r)+`loading${((p=ge.value)==null?void 0:p.account)||((d=ge.value)==null?void 0:d.账号)}`),a){const U=(N=(t=Ze.value[o])==null?void 0:t.filter(T=>{var S;return((S=T==null?void 0:T.key)==null?void 0:S.parentTable)===""}))==null?void 0:N.map(T=>{var S;return{id:T==null?void 0:T.id,...(S=T==null?void 0:T.value)==null?void 0:S.pageData}});if((U==null?void 0:U.length)>0)if(e){const T=U==null?void 0:U.find(S=>{var K;return((K=S==null?void 0:S.comp)==null?void 0:K.toUpperCase())==="FORM"});T&&oa(T,(j=n==null?void 0:n.firstCol)==null?void 0:j.label,i,W.value)}else Te.setRouteToChildPath(k.cloneDeep(W).value),de.setActiveMenuPath(o);else if(await ie.loadingConstruct(r,o,null,null,e?gr.value:null),e){const T=await pr(o);if((T==null?void 0:T.length)>0){const S=T==null?void 0:T.find(K=>{var x;return((x=K==null?void 0:K.comp)==null?void 0:x.toUpperCase())==="FORM"});S&&oa(S,(v=n==null?void 0:n.firstCol)==null?void 0:v.label,i,W.value)}}else Te.setRouteToChildPath(k.cloneDeep(W).value),de.setActiveMenuPath(o)}else e?(Ge.value="",Be.value=n==null?void 0:n.data,vl(!0,n==null?void 0:n.firstCol,i)):(Te.setRouteToChildPath(k.cloneDeep(W).value),de.setActiveMenuPath(o))},yr=()=>{qe.value=!1,cl.value=[],Le.value=!1},yl=e=>{var o,i,p,d,g,m;const a=[];let n=[];for(let t in e)Array.isArray(e==null?void 0:e[t])&&n.push(t);Ee.value=k.cloneDeep(V.value),(i=ie.getColumnChild((o=k.cloneDeep(V.value))==null?void 0:o.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||i.forEach((t,N)=>{var j;n.find(v=>v===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((j=t==null?void 0:t.formType)==null?void 0:j.toUpperCase())==="SELECT"?a.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",name:(t==null?void 0:t.prop)??"t"+N,prop:t==null?void 0:t.prop,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??N,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled,optionUrl:{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.formMenuSelect,type:"Select",selectRelateType:t==null?void 0:t.selectRelateType}}):a.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",prop:t==null?void 0:t.prop,name:(t==null?void 0:t.prop)??"t"+N,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??N,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled}))}),e===""||!e||(Ge.value=(e==null?void 0:e.id)??"");let r=ie.getColumnChild((p=k.cloneDeep(V.value))==null?void 0:p.filter(t=>(t==null?void 0:t.label)!=="操作"));Ve.value&&((d=Ve.value)==null?void 0:d.length)>0&&(Ve.value=(g=k.cloneDeep(Ve).value)==null?void 0:g.map(t=>{var j;let N=(t==null?void 0:t.prop)||((j=r==null?void 0:r.find(v=>(v==null?void 0:v.label)===(t==null?void 0:t.label)))==null?void 0:j.prop);return N&&(t.value=e[N]),t})),Xe.value=Ve.value&&((m=Ve.value)==null?void 0:m.length)>0?ie.getTableFormToForm(Ve.value):a},vr=()=>{var a;const e=(a=L.value)==null?void 0:a.$el;e&&Hl.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:n=>{var p;const{oldIndex:r,newIndex:o}=n;if(r===o)return;const i=pl.value.splice(r,1)[0];pl.value.splice(o,0,i),V.value=(p=V.value)==null?void 0:p.slice().sort((d,g)=>{if(d.label==="操作")return 1;if(g.label==="操作")return-1;const m=pl.value.findIndex(N=>N.label===d.label),t=pl.value.findIndex(N=>N.label===g.label);return m-t})}})};l.onMounted(()=>{Pl.value=window.innerWidth-240*2});const br=()=>{l.nextTick(()=>{vr()})},Jl=(e,a)=>{var r;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let n;return e.children=(r=e.children)==null?void 0:r.map(o=>{var i,p;if((o==null?void 0:o.id)===Ge.value){let d={};for(let g in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===g))==null?void 0:i.label;m?d[g]=(p=Be.value)==null?void 0:p[m]:d[g]=o[g]}o=Object.assign(d,Be.value),n=o}else{let d=Jl(o,a);o=d==null?void 0:d.contents,n=d==null?void 0:d.currentSelectContents}return o}),{contents:e,currentSelectContents:n}},sa=(e,a)=>{let n,r;return e!=null&&e.find(o=>(o==null?void 0:o.id)===Ge.value)?n=e==null?void 0:e.map(o=>{var i,p;if((o==null?void 0:o.id)===Ge.value){let d={};for(let g in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===g))==null?void 0:i.label;m?d[g]=(p=Be.value)==null?void 0:p[m]:d[g]=o[g]}o=Object.assign(d,Be.value),r=o}return o}):n=e==null?void 0:e.map(o=>{var i,p,d,g;if((o==null?void 0:o.id)===Ge.value){let m={};for(let t in o){let N=(i=a==null?void 0:a.find(j=>(j==null?void 0:j.prop)===t))==null?void 0:i.label;N?m[t]=(p=Be.value)==null?void 0:p[N]:m[t]=o[t]}o=Object.assign(m,Be.value),r=o}else o=(d=Jl(o,a))==null?void 0:d.contents,r=(g=Jl(o,a))==null?void 0:g.currentSelectContents;return o}),{newContents:n,currentSelectContents:r}},ia=(e,a,n)=>{var r,o;return e[a==null?void 0:a.prop]=n,typeof e.id=="number"&&(e.id=(r=e.id)==null?void 0:r.toString()),e.children&&((o=e.children)==null?void 0:o.length)>0&&(e.children=e.children.map(ia)),e},Wl=e=>{var n;const a=[];return a.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((n=e.children)==null||n.forEach(r=>{a.push(...Wl(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const o={...r};return delete o.children,o}):[]},vl=(e=!0,a,n)=>{var m,t,N,j,v,U,T,S,K;let r=ie.getColumnChild((m=k.cloneDeep(V.value))==null?void 0:m.filter(x=>(x==null?void 0:x.label)!=="操作")),o,i=k.cloneDeep(Y.value);if(!Be.value){Qe.value=!1;return}if(Ge.value===""){nl.value++;let x;a&&n?x={id:nl.value.toString(),[a==null?void 0:a.prop]:n,children:Be.value.children}:x={id:nl.value.toString()},x!=null&&x.children&&(x={...x,children:(t=x.children)==null?void 0:t.map(A=>ia(A,a,n))}),i.push(Object.assign(Be.value,x)),o=Object.assign(Be.value,x)}else i=(N=sa(i,r))==null?void 0:N.newContents,o=(j=sa(i,r))==null?void 0:j.currentSelectContents;const p=(v=s.itemData)==null?void 0:v.filter(x=>(x==null?void 0:x.key)==="childTree")[0];if(((U=p==null?void 0:p.contents)==null?void 0:U.length)>0){$e.value="编辑";const x=[];i==null||i.forEach((A,D)=>{var h;let f={};if(Array.isArray(A)){let u=[];A==null||A.filter(y=>!(y!=null&&y.id)).forEach((y,z)=>{var B,G,re,X,q,H,w;if((G=(B=Pe.value)==null?void 0:B[z])!=null&&G.prop&&!Array.isArray(y)){let M={};M[Pe.value[z].column]=y,be!=null&&be.value&&((re=be==null?void 0:be.value)==null?void 0:re.length)>0&&((X=be==null?void 0:be.value)!=null&&X.find(F=>JSON.stringify(F==null?void 0:F[0])===JSON.stringify(M)))&&(u=(q=be==null?void 0:be.value)==null?void 0:q.find(F=>JSON.stringify(F==null?void 0:F[0])===JSON.stringify(M))),u&&u.length>0?f[Pe.value[z].prop]=u!=null&&u.find(F=>{var I;return((I=Object.keys(F))==null?void 0:I[0])===Pe.value[z].column})?(H=u==null?void 0:u.find(F=>{var I;return((I=Object.keys(F))==null?void 0:I[0])===Pe.value[z].column}))==null?void 0:H[Pe.value[z].column]:y:f[Pe.value[z].prop]=y}else Array.isArray(y)&&((w=Pe.value[z])!=null&&w.prop?f[Pe.value[z].prop]=y:f.children=Xl(y,Pe.value))})}else f=A;Array.isArray(A)&&A.some(u=>u==null?void 0:u.id)?x.push(Object.assign(f,{id:(h=A==null?void 0:A.find(u=>u.id))==null?void 0:h.id})):f.id?x.push(f):x.push(Object.assign(f,{id:D.toString()}))}),Y.value=fa(x,p,V.value)}else Y.value=i;da(Y.value),_l.value=Y.value;const d=an(_l.value,Ye.value,i);let g=[];if(il.value?(g=(T=k.cloneDeep(il).value.singleContent)==null?void 0:T.filter(x=>(x==null?void 0:x.id)!==(o==null?void 0:o.id)),g.push(o)):g=[o],Ke.value){const x={content:d,singleContent:((S=p==null?void 0:p.contents)==null?void 0:S.length)>0?g==null?void 0:g.flatMap(Wl):g,index:s==null?void 0:s.index,buttonName:"编辑",column:V.value,parentTableId:s==null?void 0:s.parentTableId};Te.setCacheUpdatingData(x)}if(e){const x={content:d,singleContent:((K=p==null?void 0:p.contents)==null?void 0:K.length)>0?Wl(o):o,index:s==null?void 0:s.index,buttonName:$e.value,column:V.value,parentTableId:s==null?void 0:s.parentTableId};Te.setTableLoading(s==null?void 0:s.index),Qe.value=!1,Be.value=void 0,te("change",x)}};l.onUnmounted(()=>{V.value=[],Y.value=[],Ee.value=[],Je.value=[],Ve.value=[],Ie.value=[],cl.value=[],ol.value=[],Xe.value=[],Fe.value=[],L.value=null});const ua=async(e,a,n)=>{var m,t,N,j,v,U,T,S,K,x,A;al.value=n==null?void 0:n.prop;const r=k.cloneDeep(s.itemData),o=r==null?void 0:r.map(D=>{var f;return(D==null?void 0:D.key)==="header"&&((f=D.contents)==null||f.map((h,u)=>{var y,z,B,G,re,X,q,H,w,M,F,I,R,c,P,_,ne,ve,ce;return h.type=h!=null&&h.type?h.type:(G=(B=(z=(y=h==null?void 0:h.key)==null?void 0:y.split("$"))==null?void 0:z[1])==null?void 0:B.split("("))!=null&&G[0]?(X=(re=ie.FormType)==null?void 0:re.find(E=>{var b,se,ue,pe;return(E==null?void 0:E.key)===((pe=(ue=(se=(b=h==null?void 0:h.key)==null?void 0:b.split("$"))==null?void 0:se[1])==null?void 0:ue.split("("))==null?void 0:pe[0])}))==null?void 0:X.value:"Input",h.options=h!=null&&h.options?h.options:((w=(H=(q=h==null?void 0:h.key)==null?void 0:q.split("$"))==null?void 0:H[1])==null?void 0:w.length)>0?(R=(I=Ql((F=(M=h==null?void 0:h.key)==null?void 0:M.split("$"))==null?void 0:F[1]))==null?void 0:I.split(","))==null?void 0:R.map(E=>({label:E,value:E})):[],(c=h==null?void 0:h.key)!=null&&c.includes("$")&&(h.key=(_=(P=h==null?void 0:h.key)==null?void 0:P.split("$"))==null?void 0:_[0]),h.value=(ne=Object.values(a))==null?void 0:ne[u],h.optionUrl=h!=null&&h.formMenuSelect&&((ve=h==null?void 0:h.formMenuSelect)==null?void 0:ve.length)>0?{groupSelect:(ce=h==null?void 0:h.groupSelect)==null?void 0:ce.split(/[::]/).map(E=>E.trim()),menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":"")}:null,h})),D});let i=k.cloneDeep(Xe.value),p=(t=(m=k.cloneDeep(o))==null?void 0:m.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:t.contents;i=i==null?void 0:i.map(D=>{var f;return D.value=(f=p==null?void 0:p.find((h,u)=>u===(D==null?void 0:D.id)))==null?void 0:f.value,D});let d="",g=(v=(j=(N=k.cloneDeep(o))==null?void 0:N.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:j.contents)==null?void 0:v.find((D,f)=>{var h,u,y;return(D==null?void 0:D.label)===al.value||(f==null?void 0:f.toString())===((y=(u=(h=al.value)==null?void 0:h.split("a"))==null?void 0:u[1])==null?void 0:y.toString())});if((S=(T=(U=k.cloneDeep(o))==null?void 0:U.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:T.contents)==null||S.forEach(D=>{var f,h,u,y,z;d===""&&((u=(h=(f=D==null?void 0:D.optionUrl)==null?void 0:f.groupSelect)==null?void 0:h[1])!=null&&u.includes("["))&&(d=(z=(y=D==null?void 0:D.optionUrl)==null?void 0:y.groupSelect)==null?void 0:z[1])}),(K=g==null?void 0:g.optionUrl)!=null&&K.menuSelect){let D=await Yl(g),f;if(D==null||D.forEach(h=>{var u,y,z,B,G,re,X,q,H,w;d===((y=(u=g==null?void 0:g.optionUrl)==null?void 0:u.groupSelect)==null?void 0:y[1])&&((G=(B=(z=g==null?void 0:g.optionUrl)==null?void 0:z.groupSelect)==null?void 0:B[1])!=null&&G.includes("["))&&((w=k.cloneDeep(h))==null?void 0:w[(H=(q=(X=(re=g==null?void 0:g.optionUrl)==null?void 0:re.groupSelect)==null?void 0:X[1])==null?void 0:q.replaceAll("[",""))==null?void 0:H.replaceAll("]","")])===(g==null?void 0:g.value)&&(f=h)}),f){let h=k.cloneDeep(i);h=h==null?void 0:h.map(y=>{var z,B,G,re,X,q,H,w,M,F,I;return(f!=null&&f[y==null?void 0:y.label]||f!=null&&f[(re=(G=(B=(z=y==null?void 0:y.optionUrl)==null?void 0:z.groupSelect)==null?void 0:B[1])==null?void 0:G.replaceAll("[",""))==null?void 0:re.replaceAll("]","")])&&((H=(q=(X=y==null?void 0:y.optionUrl)==null?void 0:X.groupSelect)==null?void 0:q[1])!=null&&H.includes("["))&&(y.value=(f==null?void 0:f[y==null?void 0:y.label])||(f==null?void 0:f[(I=(F=(M=(w=y==null?void 0:y.optionUrl)==null?void 0:w.groupSelect)==null?void 0:M[1])==null?void 0:F.replaceAll("[",""))==null?void 0:I.replaceAll("]","")])),y}),Y.value=(x=k.cloneDeep(Y.value))==null?void 0:x.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const z={};return h==null||h.forEach(B=>{z[B.name]=B.value}),z.id=y==null?void 0:y.id,z}return y});let u=k.cloneDeep(h);u=u==null?void 0:u.map(y=>{var z,B,G,re;return(B=(z=y==null?void 0:y.optionUrl)==null?void 0:z.menuSelect)!=null&&B.some(X=>X==null?void 0:X.includes)&&(y.optionUrl.menuSelect=(re=(G=y==null?void 0:y.optionUrl)==null?void 0:G.menuSelect)==null?void 0:re.map(X=>{var q,H,w,M;if(X!=null&&X.includes("[")){let F=(H=(q=X==null?void 0:X.replaceAll("[","").replaceAll("]",""))==null?void 0:q.split(":"))==null?void 0:H[1];X=(M=(w=k.cloneDeep(h))==null?void 0:w.find(I=>(I==null?void 0:I.label)===F))==null?void 0:M.value}return X})),y}),Y.value=(A=k.cloneDeep(Y.value))==null?void 0:A.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const z={};return u==null||u.forEach(B=>{z[B.name]=B.value}),z.id=y==null?void 0:y.id,z}return y})}}},mr=async e=>{var m,t,N,j,v,U,T,S,K,x,A,D;if(!e)return;Be.value=e;const a=k.cloneDeep(s.itemData);let n=a==null?void 0:a.map(f=>{var h;return(f==null?void 0:f.key)==="header"&&((h=f.contents)==null||h.map((u,y)=>{var z,B,G,re,X,q,H,w,M,F,I,R,c,P,_,ne,ve,ce,E;return u.type=u!=null&&u.type?u.type:(re=(G=(B=(z=u==null?void 0:u.key)==null?void 0:z.split("$"))==null?void 0:B[1])==null?void 0:G.split("("))!=null&&re[0]?(q=(X=ie.FormType)==null?void 0:X.find(b=>{var se,ue,pe,Ce;return(b==null?void 0:b.key)===((Ce=(pe=(ue=(se=u==null?void 0:u.key)==null?void 0:se.split("$"))==null?void 0:ue[1])==null?void 0:pe.split("("))==null?void 0:Ce[0])}))==null?void 0:q.value:"Input",u.options=u!=null&&u.options?u.options:((M=(w=(H=u==null?void 0:u.key)==null?void 0:H.split("$"))==null?void 0:w[1])==null?void 0:M.length)>0?(c=(R=Ql((I=(F=u==null?void 0:u.key)==null?void 0:F.split("$"))==null?void 0:I[1]))==null?void 0:R.split(","))==null?void 0:c.map(b=>({label:b,value:b})):[],(P=u==null?void 0:u.key)!=null&&P.includes("$")&&(u.key=(ne=(_=u==null?void 0:u.key)==null?void 0:_.split("$"))==null?void 0:ne[0]),u.value=(ve=Object.values(e))==null?void 0:ve[y],u.optionUrl=u!=null&&u.formMenuSelect&&((ce=u==null?void 0:u.formMenuSelect)==null?void 0:ce.length)>0?{groupSelect:(E=u==null?void 0:u.groupSelect)==null?void 0:E.split(/[::]/).map(b=>b.trim()),menuSelect:u==null?void 0:u.formMenuSelect,selectRelateType:"",type:(u==null?void 0:u.formType)??(u!=null&&u.groupSelect?"Select":"")}:null,u})),f}),r=Xe.value,o=(t=(m=k.cloneDeep(n))==null?void 0:m.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:t.contents;if(r=r==null?void 0:r.map(f=>{var h;return f.value=(h=o==null?void 0:o.find((u,y)=>(u==null?void 0:u.prop)===(f==null?void 0:f.name)))==null?void 0:h.value,f}),!dl.value)return;let i="",p=(v=(j=(N=k.cloneDeep(n))==null?void 0:N.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:j.contents)==null?void 0:v.find((f,h)=>{var u,y,z;return(f==null?void 0:f.label)===al.value||(h==null?void 0:h.toString())===((z=(y=(u=al.value)==null?void 0:u.split("a"))==null?void 0:y[1])==null?void 0:z.toString())}),d=(U=p==null?void 0:p.optionUrl)==null?void 0:U.menuSelect,g=!0;if((K=(S=(T=k.cloneDeep(n))==null?void 0:T.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:S.contents)==null||K.forEach(f=>{var h,u,y,z,B,G;g&&((y=(u=(h=f==null?void 0:f.optionUrl)==null?void 0:h.groupSelect)==null?void 0:u[1])!=null&&y.includes("["))&&(i=(B=(z=f==null?void 0:f.optionUrl)==null?void 0:z.groupSelect)==null?void 0:B[1],JSON.stringify(d)===JSON.stringify((G=f==null?void 0:f.optionUrl)==null?void 0:G.menuSelect)&&(g=!1))}),(x=p==null?void 0:p.optionUrl)!=null&&x.menuSelect&&dl.value){let f=await Yl(p),h;if((A=p==null?void 0:p.optionUrl)==null||A.menuSelect,f==null||f.forEach(u=>{var y,z,B,G,re,X,q,H,w,M;i===((z=(y=p==null?void 0:p.optionUrl)==null?void 0:y.groupSelect)==null?void 0:z[1])&&((re=(G=(B=p==null?void 0:p.optionUrl)==null?void 0:B.groupSelect)==null?void 0:G[1])!=null&&re.includes("["))&&((M=k.cloneDeep(u))==null?void 0:M[(w=(H=(q=(X=p==null?void 0:p.optionUrl)==null?void 0:X.groupSelect)==null?void 0:q[1])==null?void 0:H.replaceAll("[",""))==null?void 0:w.replaceAll("]","")])===(p==null?void 0:p.value)&&(h=u)}),h){let u=k.cloneDeep(r);u=u==null?void 0:u.map(B=>{var G,re,X,q,H,w,M,F,I,R,c;return(h!=null&&h[B==null?void 0:B.label]||h!=null&&h[(q=(X=(re=(G=B==null?void 0:B.optionUrl)==null?void 0:G.groupSelect)==null?void 0:re[1])==null?void 0:X.replaceAll("[",""))==null?void 0:q.replaceAll("]","")])&&((M=(w=(H=B==null?void 0:B.optionUrl)==null?void 0:H.groupSelect)==null?void 0:w[1])!=null&&M.includes("["))&&(B.value=(h==null?void 0:h[B==null?void 0:B.label])||(h==null?void 0:h[(c=(R=(I=(F=B==null?void 0:B.optionUrl)==null?void 0:F.groupSelect)==null?void 0:I[1])==null?void 0:R.replaceAll("[",""))==null?void 0:c.replaceAll("]","")])),B}),Xe.value=k.cloneDeep(u);let y=k.cloneDeep(u);y=y==null?void 0:y.map(B=>{var G,re,X,q,H,w;return(re=(G=B==null?void 0:B.optionUrl)==null?void 0:G.menuSelect)!=null&&re.some(M=>M==null?void 0:M.includes("["))&&(B.optionUrl.oldMenuSelect=(q=(X=k.cloneDeep(B))==null?void 0:X.optionUrl)==null?void 0:q.menuSelect,B.optionUrl.menuSelect=(w=(H=B==null?void 0:B.optionUrl)==null?void 0:H.menuSelect)==null?void 0:w.map(M=>{var F,I,R,c;if(M!=null&&M.includes("[")){let P=(I=(F=M==null?void 0:M.replaceAll("[","").replaceAll("]",""))==null?void 0:F.split(":"))==null?void 0:I[1];M=(c=(R=k.cloneDeep(u))==null?void 0:R.find(_=>(_==null?void 0:_.label)===P))==null?void 0:c.value}return M})),B}),Xe.value=y;let z={};(D=Xe.value)==null||D.forEach(B=>{z[B.prop]=B==null?void 0:B.value}),Be.value=z}}dl.value=!1},kr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",Sr=e=>{var i,p;const a=(p=(i=Ve.value)==null?void 0:i.find(d=>(d==null?void 0:d.label)===(e==null?void 0:e.label)))==null?void 0:p.multiple,n=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;Y.value.forEach(d=>{const g=d==null?void 0:d[n];a&&va.isString(g)&&(d[n]=[g]),!a&&!va.isString(g)&&(d[n]="")})},ca=(e,a)=>{var n;return a==null||a.forEach(r=>{e[r==null?void 0:r.prop]=r==null?void 0:r.value}),e.children&&((n=e.children)==null?void 0:n.length)>0&&(e.children=e.children.map(r=>ca(r,a))),e},Gl=e=>{var n,r,o,i,p,d;yl("");const a=(n=Xe.value)==null?void 0:n.reduce((g,m)=>(g[m.name]=m.value,g),{});if(((r=Object.keys(a))==null?void 0:r.length)>0){Be.value=a,Ge.value="",nl.value=(o=Y.value)==null?void 0:o.length,ol.value=(i=el.value)==null?void 0:i.filter(m=>(m==null?void 0:m.label)!=="新增");const g=(d=(p=Ee.value)==null?void 0:p.filter(m=>(m==null?void 0:m.label)!=="操作"))==null?void 0:d.map(m=>{var N,j,v;const t=(j=(N=Ve.value)==null?void 0:N.find(U=>(U==null?void 0:U.label)===(m==null?void 0:m.label)))==null?void 0:j.multiple;return Sr(m),{...m,contents:(m==null?void 0:m.options)??[],optionUrl:m!=null&&m.formMenuSelect&&((v=m==null?void 0:m.formMenuSelect)==null?void 0:v.length)>0?{groupSelect:m==null?void 0:m.groupSelect,menuSelect:m==null?void 0:m.formMenuSelect,selectRelateType:"",type:m==null?void 0:m.formType,multiple:t}:null}});V.value=g==null?void 0:g.map(m=>ca(m,[{prop:"type",value:"edit"},{prop:"columnType",value:kr(m==null?void 0:m.formType)||(m==null?void 0:m.columnType)}])),e==="createClick"&&vl(!1)}},tl={START:"开始时间",END:"结束时间",HOURS:"工时"},Cr=(e,a)=>Number(Hl.dayjs(a).diff(Hl.dayjs(e),"day",!0).toFixed(1)),da=e=>{var i;const a=s.itemData,n=(i=a==null?void 0:a.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:i.contents,r=new Map;return n==null||n.forEach((p,d)=>{const{label:g}=p;r.set(g,d)}),!r.has(tl.START)||!r.has(tl.END)||!r.has(tl.HOURS)?e:e==null?void 0:e.map(p=>{const d=p==null?void 0:p[tl.START],g=p==null?void 0:p[tl.END],m=Cr(d,g);return d&&g&&(p[tl.HOURS]=`${m}天`),p})},pa=(e,a,n=0)=>{if(n>((a==null?void 0:a.length)??""))return e;const r=a==null?void 0:a[n],o=new Map;for(const p of e){const d=p[r];o.has(d)||o.set(d,[]),o.get(d)&&o.get(d).push(p)}const i=[];for(const[p,d]of o){const[g,...m]=d,t={...g};n+1===((a==null?void 0:a.length)??"")?t.children=d==null?void 0:d.map(N=>(N.level=k.cloneDeep(n)+1,N)).filter((N,j)=>j!==0):m.length>0&&(t.children=pa(m,a,n+1)),t.level=n,i.push(t)}return i},fa=(e,a,n)=>{var o;if(!(a!=null&&a.contents)||((o=a==null?void 0:a.contents)==null?void 0:o.length)===0)return e;let r=[];return r=pa(e,a==null?void 0:a.contents,0),r},ga=(e,a)=>{var j,v,U,T,S,K,x,A,D,f,h,u,y,z,B,G,re,X,q,H,w,M,F,I,R;const n=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="header");e==null||e.filter(c=>(c==null?void 0:c.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="childTree")[0];let o=a;const i=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="page"),p=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="rowButton"),d=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="extraButton"),g=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableContents"),m=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableIndex");Ve.value=(v=(j=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableToForm"))==null?void 0:j[0])==null?void 0:v.contents,Zl.value=(i==null?void 0:i.contents)??!0;let t=[];ll.value===""?t=n==null?void 0:n[0]:t=(n==null?void 0:n.find(c=>(c==null?void 0:c.selectLabel)==="("+ll.value+")"))??(n==null?void 0:n.find(c=>!(c!=null&&c.selectLabel)));let N=[];if(ll.value===""?N=m==null?void 0:m[0]:N=(m==null?void 0:m.find(c=>(c==null?void 0:c.selectLabel)==="("+ll.value+")"))??(m==null?void 0:m.find(c=>!(c!=null&&c.selectLabel))),((U=t==null?void 0:t.contents)==null?void 0:U.length)>0){let c=[];if(t!=null&&t.contents.some(E=>Array.isArray(E)&&(E==null?void 0:E.find(b=>b.children))))Ye.value===""?c=(S=(T=ie.getGradeColumns(t==null?void 0:t.contents))==null?void 0:T[0])==null?void 0:S.filter(E=>!Array.isArray(E)):(Ye.value.split("-"),c=(K=ie.getGradeColumns(t==null?void 0:t.contents))==null?void 0:K[0]);else{let E=t!=null&&t.contents.some(b=>Array.isArray(b))?(x=t==null?void 0:t.contents)==null?void 0:x[0]:t==null?void 0:t.contents;E==null||E.forEach((b,se)=>{var Ce,Se,bl,ml;let ue="";(Se=(Ce=W.value)==null?void 0:Ce.split("/"))==null||Se.forEach(ze=>{var kl,Sl,Cl;if(ze!==""){let sl=(Cl=(Sl=(kl=ze==null?void 0:ze.split(le+"updateLoading"))==null?void 0:kl[0])==null?void 0:Sl.split(le+"loading"))==null?void 0:Cl[0];ue=ue===""?ue+sl:ue+"/"+sl}}),ue=ue+le+(b==null?void 0:b.directiveLabel);const pe=(bl=Ve.value)==null?void 0:bl.find(ze=>(ze==null?void 0:ze.prop)===(b==null?void 0:b.prop));c.push({label:(b==null?void 0:b.label)??"",prop:(b==null?void 0:b.label)==="操作"?"operate":(b==null?void 0:b.prop)??"a"+se,width:b!=null&&b.width?parseInt(b.width):"",fixed:(b==null?void 0:b.fixed)??void 0,sortable:(b==null?void 0:b.sortable)??!1,filterable:(b==null?void 0:b.filterable)??!1,operable:(b==null?void 0:b.operable)??!1,showSummary:(b==null?void 0:b.showSummary)??!1,align:(b==null?void 0:b.align)??"left",showOverflowTooltip:(b==null?void 0:b.showOverflowTooltip)??!0,isNotDrag:(b==null?void 0:b.isNotDrag)??!1,isEditCol:(b==null?void 0:b.isEditCol)??!1,isOperate:(b==null?void 0:b.isOperate)??!1,id:(b==null?void 0:b.id)??se,type:(b==null?void 0:b.label)==="操作"?"operate":void 0,formType:(b==null?void 0:b.formType)??(b!=null&&b.groupSelect?"Select":""),isTableColHidden:b==null?void 0:b.isTableColHidden,isFormColHidden:b==null?void 0:b.isFormColHidden,disabled:b==null?void 0:b.disabled,options:(b==null?void 0:b.options)??[],value:(b==null?void 0:b.value)??"",formMenuSelect:(b==null?void 0:b.formMenuSelect)??[],isRoute:(b==null?void 0:b.isRoute)??!1,groupSelect:b!=null&&b.groupSelect?(ml=b==null?void 0:b.groupSelect)==null?void 0:ml.replaceAll('"',"").split(":"):[],isMainKey:(b==null?void 0:b.isMainKey)||(b==null?void 0:b.directiveLabel)&&!o[ue],columnType:(pe==null?void 0:pe.type)||(b==null?void 0:b.columnType)||"TEXTAREA",directiveLabel:b==null?void 0:b.directiveLabel,isExistChild:!!(b!=null&&b.directiveLabel&&o[ue]),childPath:ue})})}V.value=ie.getNewColumnChild(c),Je.value=ie.getNewColumnChild(c),Q.value=(A=V.value)==null?void 0:A.map(E=>E==null?void 0:E.label),Oe.value=(D=V.value)==null?void 0:D.every(E=>E==null?void 0:E.filterable),fe.value=(f=V.value)==null?void 0:f.every(E=>E==null?void 0:E.operable),Ue.value=(h=V.value)==null?void 0:h.every(E=>E==null?void 0:E.sortable);let P=(y=(u=ie.getAllLeafNodes(V.value))==null?void 0:u.filter(E=>(E==null?void 0:E.type)!=="operate"))==null?void 0:y.map((E,b)=>({prop:(E==null?void 0:E.prop)??"a"+b,column:E.label}));Pe.value=P;let _=[];ll.value===""?_=g==null?void 0:g[0]:_=(g==null?void 0:g.find(E=>(E==null?void 0:E.selectLabel)==="("+ll.value+")"))??(g==null?void 0:g.find(E=>!(E!=null&&E.selectLabel)));let ne=Array.isArray((z=_==null?void 0:_.contents)==null?void 0:z[0])&&((B=_==null?void 0:_.contents)!=null&&B[0].every(E=>Array.isArray(E)))?(G=_==null?void 0:_.contents)==null?void 0:G[0]:_==null?void 0:_.contents;N!=null&&N.contents&&((re=N==null?void 0:N.contents)==null?void 0:re.length)!==0&&(ne=(X=k.cloneDeep(ne))==null?void 0:X.map((E,b)=>{if(!Array.isArray(E)){let se={};for(let ue in E)ue!=="id"&&ue!=="index"&&(se[ue]=E[ue]);E=Object.values(se)}return E}));const ve=!!((q=V.value)!=null&&q.find(E=>E.prop==="index"));ne=Sa(ne,N==null?void 0:N.contents,ve);const ce=[];ne==null||ne.forEach((E,b)=>{var ue;let se={};if(Array.isArray(E)){let pe=[];E==null||E.filter(Ce=>!(Ce!=null&&Ce.id)).forEach((Ce,Se)=>{var bl,ml,ze,kl,Sl,Cl;if((bl=P==null?void 0:P[Se])!=null&&bl.prop&&!Array.isArray(Ce)){let sl={};sl[P[Se].column]=Ce,be!=null&&be.value&&((ml=be==null?void 0:be.value)==null?void 0:ml.length)>0&&((ze=be==null?void 0:be.value)!=null&&ze.find(Re=>JSON.stringify(Re==null?void 0:Re[0])===JSON.stringify(sl)))&&(pe=(kl=be==null?void 0:be.value)==null?void 0:kl.find(Re=>JSON.stringify(Re==null?void 0:Re[0])===JSON.stringify(sl))),pe&&pe.length>0?se[P[Se].prop]=pe!=null&&pe.find(Re=>{var Dl;return((Dl=Object.keys(Re))==null?void 0:Dl[0])===P[Se].column})?(Sl=pe==null?void 0:pe.find(Re=>{var Dl;return((Dl=Object.keys(Re))==null?void 0:Dl[0])===P[Se].column}))==null?void 0:Sl[P[Se].column]:Ce:se[P[Se].prop]=Ce}else Array.isArray(Ce)&&((Cl=P[Se])!=null&&Cl.prop?se[P[Se].prop]=Ce:se.children=Xl(Ce,P))})}else se=E;Array.isArray(E)&&E.some(pe=>pe==null?void 0:pe.id)?ce.push(Object.assign(se,{id:(ue=E==null?void 0:E.find(pe=>pe.id))==null?void 0:ue.id})):se.id?ce.push(se):ce.push(Object.assign(se,{id:b.toString()}))}),Y.value=fa(ce,r,V.value),El.value=ce,(H=El.value)==null||H.forEach(E=>{var b;(b=Nl.value)==null||b.set(E.id,E)})}else V.value=[],Ee.value=[],Y.value=[],El.value=[],Nl.value=new Map;((w=p==null?void 0:p.contents)==null?void 0:w.length)>0?Ie.value=p==null?void 0:p.contents:Ie.value=[],((M=d==null?void 0:d.contents)==null?void 0:M.length)>0?(ol.value=d==null?void 0:d.contents,el.value=d==null?void 0:d.contents):(ol.value=[],el.value=[]),nl.value=((F=Y==null?void 0:Y.value)==null?void 0:F.length)??0,da(Y.value),_l.value=Y.value,Ke.value&&(V.value=(R=(I=Ee.value)==null?void 0:I.filter(c=>(c==null?void 0:c.label)!=="操作"))==null?void 0:R.map(c=>{var P;return{...c,type:"edit",optionUrl:c!=null&&c.formMenuSelect&&((P=c==null?void 0:c.formMenuSelect)==null?void 0:P.length)>0?{groupSelect:c==null?void 0:c.groupSelect,menuSelect:c==null?void 0:c.formMenuSelect,selectRelateType:"",type:c==null?void 0:c.formType}:null}}),Gl())};l.watch(()=>[s.itemData,ll.value,Na.value,Ye.value,be==null?void 0:be.value],async()=>{var e,a,n,r,o,i;if((e=s==null?void 0:s.itemData)!=null&&e.find(p=>(p==null?void 0:p.key)==="columnPath")&&!((a=ul.value)!=null&&a.find(p=>{var d,g;return(p==null?void 0:p.key)===((g=(d=s==null?void 0:s.itemData)==null?void 0:d.find(m=>(m==null?void 0:m.key)==="columnPath"))==null?void 0:g.contents)}))){let p=ul.value,d={key:(r=(n=s==null?void 0:s.itemData)==null?void 0:n.find(g=>(g==null?void 0:g.key)==="columnPath"))==null?void 0:r.contents,value:(i=(o=s==null?void 0:s.itemData)==null?void 0:o.find(g=>(g==null?void 0:g.key)==="columnUsingPath"))==null?void 0:i.contents};p!=null&&p.find(g=>(g==null?void 0:g.key)===(d==null?void 0:d.key))?p=p==null?void 0:p.map(g=>((g==null?void 0:g.key)===(d==null?void 0:d.key)&&(g.value=d.value),g)):p.push(d),Te.setTableViewContents(p)}ga(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(yl(e==null?void 0:e.form),$e.value=e==null?void 0:e.dialogTitle,wl.value=!0,Qe.value=!0)},{immediate:!0,deep:!0});const ha=()=>{var e;(e=me.value)!=null&&e.includes("read")&&(Ke.value=!Ke.value)},Dr=()=>{Ol.value=!Ol.value};l.watch(()=>{var e;return(e=s==null?void 0:s.config)==null?void 0:e.viewport},e=>{var a;me.value=e,(e==null?void 0:e.length)===0?Ke.value=!1:(e!=null&&e.includes("read")||(Ke.value=!0),e!=null&&e.includes("edit")||(Ke.value=!1)),he.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||Ke.value},{immediate:!0}),l.watch(()=>Ke.value,e=>{var a;e?(Gl("viewChange"),Te.setCacheUpdatingData(null)):(ol.value=el.value,V.value=Je.value,il.value&&(Te.setTableLoading(s==null?void 0:s.index),te("change",il.value))),ee.value=e,he.value=e||((a=s==null?void 0:s.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=ea.value)==null?void 0:e.length},e=>{e===0&&(ae.currentPage=1)}),l.watch(()=>s==null?void 0:s.compNames,e=>{De.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:e||[],width:1}]},{immediate:!0}),l.ref(!1);const xr=(e,a)=>{var n;Gl("createClick"),a===ae.pageSize&&(ae.currentPage=Math.ceil(((n=Y.value)==null?void 0:n.length)/ae.pageSize))},Tr=(e,a,n)=>{var r;ua(n,e,a),Be.value=k.cloneDeep(e),Ge.value=e==null?void 0:e.id,nl.value=(r=Y.value)==null?void 0:r.length,$e.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",vl(!1)},Ae=e=>{var g,m,t,N,j,v,U,T,S,K;const{row:a,column:n,item:r,slotData:o}=e;let i=a!=null&&a[n==null?void 0:n.prop]||(a==null?void 0:a[n==null?void 0:n.prop])===0?((m=(g=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:g[0])==null?void 0:m.contents)??((a==null?void 0:a[n==null?void 0:n.prop])===0?"0":a==null?void 0:a[n==null?void 0:n.prop]):((N=(t=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:t[0])==null?void 0:N.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((v=(j=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:j[0])==null?void 0:v.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((S=(T=a==null?void 0:a[(U=r==null?void 0:r.child)==null?void 0:U.prop])==null?void 0:T[0])==null?void 0:S.contents)??(a==null?void 0:a[(K=r==null?void 0:r.child)==null?void 0:K.prop]),d=Array.isArray(i)&&!(i!=null&&i.every(x=>typeof x=="string"||typeof x=="number"))?"查看":i;return d=Array.isArray(d)?d.join(","):d,d},Er=e=>{var m,t,N,j,v,U,T,S,K,x;const{row:a,column:n,item:r,slotData:o}=e;let i=a!=null&&a[n==null?void 0:n.prop]?((t=(m=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:m[0])==null?void 0:t.contents)??(a==null?void 0:a[n==null?void 0:n.prop]):((j=(N=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:N[0])==null?void 0:j.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((U=(v=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:v[0])==null?void 0:U.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((K=(S=a==null?void 0:a[(T=r==null?void 0:r.child)==null?void 0:T.prop])==null?void 0:S[0])==null?void 0:K.contents)??(a==null?void 0:a[(x=r==null?void 0:r.child)==null?void 0:x.prop]);const d=Array.isArray(i)&&!(i!=null&&i.every(A=>typeof A=="string"||typeof A=="number")),g=Array.isArray(i)&&(i==null?void 0:i.find(A=>A==null?void 0:A.url));return d&&g},Nr=(e,a)=>e.find(n=>Object.values(n).some(r=>r===a));return l.watch(()=>Ne.value,async e=>{if(e){de.setContentLoading(!0),await l.nextTick();const a=Nr(Y.value,e==null?void 0:e.data);if(!a)return de.setContentLoading(!1);await aa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),de.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)&&(Y.value=(a=Y.value)==null?void 0:a.map(n=>{var r;return(n==null?void 0:n.id)===((r=e==null?void 0:e.data)==null?void 0:r.id)?{...n,id:e==null?void 0:e.resId}:n})))},{immediate:!0,deep:!0}),(e,a)=>{var m,t,N,j;const n=l.resolveComponent("svg-icon"),r=l.resolveComponent("el-popover"),o=l.resolveComponent("el-switch"),i=l.resolveComponent("el-checkbox"),p=l.resolveComponent("el-checkbox-group"),d=l.resolveComponent("el-button"),g=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",nn,[Il.value?(l.openBlock(),l.createBlock(_e.ssTable,{id:"excel-table",pageObj:ae,showIndex:he.value,isTree:(m=O.compItem)==null?void 0:m.isTree,summaryInfo:oe,columns:V.value,defaultSort:xe,isCardViewport:Ol.value,checkedColumns:Q.value,key:Kl.value+JSON.stringify(V.value),tableData:ea.value,isEditViewport:Ke.value,isShowPagination:Zl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ee.value,onDbClickRow:Ya,extraButton:ol.value,rowButton:Ie.value,cacheExtraButtons:el.value,isClearSelection:((t=Fe.value)==null?void 0:t.length)===0,onDoCurrentChange:Oa,onDoSizeChange:La,onContentClick:aa,onRowClick:Ia,onSelectChange:Fa,onCellChange:Tr,onChange:ua,onPreview:Rl,onSubmitEditingTable:Ka,onHandleColEditChange:$a,onHandleColTypeChange:Pa,onClickButton:gl},l.createSlots({headerButton:l.withCtx(v=>{var U,T;return[O.showHeader?(l.openBlock(),l.createBlock(Wr,{key:0,pageLayout:O.pageLayout,lockingPage:l.unref(Tl)===l.unref(W),filterValues:la.value,selectNums:(U=Fe.value)==null?void 0:U.length,dataNums:(T=Y.value)==null?void 0:T.length,compName:O.compName,isDevMode:O.isDevMode,buttons:v.buttons,onButtonClick:a[0]||(a[0]=S=>gl(S,"",{})),columns:V.value,onFilter:Xa,onGetImportData:Ma,level:O.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var v,U,T,S;return[((v=Y.value)==null?void 0:v.length)>0&&O.allowOperate?(l.openBlock(),l.createElementBlock("div",un,[(U=me.value)!=null&&U.includes("read")&&((T=me.value)!=null&&T.includes("edit"))&&((S=Ie.value)!=null&&S.some(K=>(K==null?void 0:K.label)==="编辑"))&&!Ol.value&&l.unref(Tl)!==l.unref(W)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:ha},[l.createVNode(n,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:Dr},[l.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:v,index:U})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:T=>xr(v,U)},[l.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,cn)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:br},{reference:l.withCtx(()=>[l.createElementVNode("span",dn,[l.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",pn,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(o,{"model-value":Ue.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=v=>zl(v,"sortable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":Oe.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=v=>zl(v,"filterable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":fe.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=v=>zl(v,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(p,{modelValue:Q.value,"onUpdate:modelValue":a[5]||(a[5]=v=>Q.value=v),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:L},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(pl.value,v=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:v.label},[l.createVNode(i,{value:v.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:v.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(v.label),9,fn)]),_:2},1032,["value"]),l.createVNode(r,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:l.withCtx(()=>[l.createVNode(n,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:l.withCtx(()=>{var U;return[l.createElementVNode("div",gn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((U=Object.keys(v))==null?void 0:U.filter(T=>{var S;return(S=ye.value)==null?void 0:S.find(K=>(K==null?void 0:K.value)===T)}),T=>{var S,K;return l.openBlock(),l.createElementBlock("div",{key:T},[l.createVNode(o,{"model-value":v==null?void 0:v[T],"active-text":(K=(S=ye.value)==null?void 0:S.find(x=>(x==null?void 0:x.value)===T))==null?void 0:K.label,onChange:x=>Ra(x,T,v)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",hn,[l.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(v=>{var U,T,S,K,x,A,D,f,h,u,y,z,B,G,re,X,q,H;return[Er(v)?(l.openBlock(),l.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:l.withCtx(()=>[l.createElementVNode("span",yn,l.toDisplayString(Ae(v)),1)]),default:l.withCtx(()=>{var w;return[l.createElementVNode("div",vn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v==null?void 0:v.row[(w=v==null?void 0:v.column)==null?void 0:w.prop],M=>(l.openBlock(),l.createElementBlock("div",bn,[l.createElementVNode("div",{class:"prop-url",title:Ml(M),onClick:F=>Wa(M)},l.toDisplayString(Ml(M)),9,mn),l.createElementVNode("div",{class:"prop-download",onClick:F=>Ga(M)}," 下载 ",8,kn)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Ae(v))&&((T=(U=Ae(v))==null?void 0:U.toString())!=null&&T.includes(".txt")||(K=(S=Ae(v))==null?void 0:S.toString())!=null&&K.includes(".cpt")||(A=(x=Ae(v))==null?void 0:x.toString())!=null&&A.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ae(v))&&((f=(D=Ae(v))==null?void 0:D.toString())!=null&&f.includes(".txt")||(u=(h=Ae(v))==null?void 0:h.toString())!=null&&u.includes(".cpt")||(z=(y=Ae(v))==null?void 0:y.toString())!=null&&z.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ae(v))&&((G=(B=Ae(v))==null?void 0:B.toString())!=null&&G.includes(".txt")||(X=(re=Ae(v))==null?void 0:re.toString())!=null&&X.includes(".cpt")||(H=(q=Ae(v))==null?void 0:q.toString())!=null&&H.includes(".cyd"))?"pointer":"",marginLeft:(v==null?void 0:v.colIndex)===0?`${((v==null?void 0:v.level)??0)*20}px`:0}),onClick:w=>Ua(Ae(v))},l.toDisplayString(Ae(v)===0?"0":Ae(v)),13,Sn))]}),_:2},[((N=Ie.value)==null?void 0:N.length)>0&&l.unref(Tl)!==l.unref(W)?{name:"actions",fn:l.withCtx(({item:v})=>[l.createVNode(r,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:l.withCtx(()=>[l.createVNode(n,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:l.withCtx(()=>{var U;return[l.createElementVNode("div",on,[cr.value?(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:O.index,onClick:T=>gl("应用至流程",v,{extra:e.content})},[l.createElementVNode("div",{style:l.normalizeStyle({color:(U=e.content)==null?void 0:U.textColor}),class:"extra-button-label"}," 应用至流程 ",4)],8,tn)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ha(Ie.value,v),(T,S)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:S,onClick:K=>gl(T==null?void 0:T.label,v,{extra:T})},[l.createElementVNode("div",{style:l.normalizeStyle({color:T==null?void 0:T.textColor}),class:"extra-button-label"},l.toDisplayString(T==null?void 0:T.label),5)],8,sn))),128))])]}),_:2},1024)]),key:"0"}:void 0,((j=Y.value)==null?void 0:j.length)>0?{name:"batchButton",fn:l.withCtx(v=>[l.withDirectives(l.createVNode(Hr,{lockingPage:l.unref(Tl)===l.unref(W),buttons:v.buttons,selectTableItems:Fe.value,onButtonClick:a[1]||(a[1]=U=>gl(U,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,ee.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!ee.value]])]),key:"1"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):l.createCommentVNode("",!0),l.createVNode(xl.ssDialog,{title:$e.value,visible:Qe.value,width:Aa.value,onBeforeDestroy:qa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",Cn,[l.createVNode(_e.ssForm,{rowContents:Xe.value,isEnableWrap:!1,showOperator:!1,onChange:mr,onClickTrigger:Ja,isEdit:Bl.value,onBlurChange:za,onPreview:Rl},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[wl.value?(l.openBlock(),l.createElementBlock("div",Dn,[l.createVNode(d,{onClick:a[6]||(a[6]=v=>Qe.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[13]||(a[13]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[13]}),l.createVNode(d,{class:"ok-button",onClick:a[7]||(a[7]=v=>vl(!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(xl.ssDialog,{title:$e.value,visible:Al.value,width:Pl.value,onBeforeDestroy:a[9]||(a[9]=v=>Al.value=!1)},{default:l.withCtx(()=>[l.createVNode(Ir)]),footer:l.withCtx(()=>[l.createElementVNode("div",xn,[l.createVNode(d,{onClick:a[8]||(a[8]=v=>Al.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[15]||(a[15]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[15]}),l.createVNode(d,{class:"ok-button",onClick:er,id:"themeButton"},{default:l.withCtx(()=>a[16]||(a[16]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["title","visible","width"]),we.value?(l.openBlock(),l.createBlock(_e.ssFilePreview,{key:1,fileDataList:C.value,onDestroy:Za},null,8,["fileDataList"])):l.createCommentVNode("",!0),qe.value?(l.openBlock(),l.createBlock(xl.ssDialog,{key:2,visible:qe.value,onBeforeDestroy:yr,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:l.withCtx(()=>[l.createVNode(Me.ThreeViewerHost,{"file-urls":cl.value,isThreeScene:Le.value,isSelfWindow:!0,threeData:rl.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(xl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=v=>e.componentVisible=!1),width:Pl.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(g,{dialogItem:Ll.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(xl.ssDialog,{title:De.title,visible:De.show,width:De.width,onBeforeDestroy:ir},{default:l.withCtx(()=>[l.createElementVNode("div",Tn,[l.createVNode(_e.ssForm,{rowContents:De==null?void 0:De.contents,formRules:De==null?void 0:De.formRules,showOperator:!1,buttonValue:De.buttonValue,isEdit:Bl.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:ur},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},Nn=$l._export_sfc(En,[["__scopeId","data-v-9b8983ff"]]);exports.formGetOptions=Ql;exports.getSelectRow=Yl;exports.ssTable=Nn;exports.useFormComp=xa;exports.useFormToTableComp=ma;exports.useUnit=ka;
1
+ "use strict";const l=require("vue"),k=require("./index-CEwxrYB-.cjs"),Hl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BkkUVCLE.cjs"),_e=require("./index-BrmJTI0B.cjs"),Me=require("./threeViewerHost-Czjy_lsO.cjs"),ie=require("./index.vue_vue_type_style_index_1_lang-PBh9haH2.cjs"),Br=require("./index.vue_vue_type_style_index_1_lang-D_Jkk1jj.cjs"),$l=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xl=require("./index-DdIZEUfD.cjs");require("./index-Ku2f-lW8.cjs");const va=require("./isString-Cvx5mmsS.cjs"),Ql=O=>O.match(/\((.*)\)/)[1],ba={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(O){const Z=O,Q=l.ref(null),$=l.ref(!1),L=l.ref(null);return l.watch(()=>Z==null?void 0:Z.isVisible,()=>{$.value=Z==null?void 0:Z.isVisible},{deep:!0,immediate:!0}),l.watch(()=>L.value,()=>{l.nextTick(()=>{var s,ee;(ee=(s=Q.value)==null?void 0:s.updatePopper)==null||ee.call(s)})},{deep:!0,immediate:!0}),(s,ee)=>{const he=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(he,{visible:$.value,title:Z==null?void 0:Z.title,placement:Z==null?void 0:Z.placement,width:Z==null?void 0:Z.width,ref_key:"popOverRef",ref:Q},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:L})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},Ar={key:0,class:"extra-button-content"},wr={class:"table-operator-wrap"},_r={class:"extra-button-filter"},Ur={class:"form-content-value"},Or={key:0,class:"extra-header"},Lr={class:"drop-menu",style:{width:"120px"}},Vr={key:0},Mr={key:1},jr={key:1,class:"extra-button-content tabs-button-wrapper"},$r={class:"table-operator-wrap"},Pr={class:"extra-button-filter"},Kr={class:"form-content-value"},Fr={key:0,class:"extra-header"},zr={class:"drop-menu",style:{width:"120px"}},Rr={key:0},qr={key:1},Jr={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(O,{emit:Z}){const Q=Z,$=O,L=l.ref(""),s=l.ref(!1),ee=l.ref([]),he=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),me=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],ye=oe=>{const ae=oe.raw;if(!ae)return;const te=new FileReader;te.onload=V=>{try{const xe=new Uint8Array(V.target.result),Ee=Me.readSync(xe,{type:"array"}),qe=Ee.SheetNames[0],Le=Ee.Sheets[qe],Je=Me.utils.decode_range(Le["!ref"]).e.c+1,we=new Array(Je).fill(""),C=[];for(const J in Le){if(J[0]==="!")continue;const{r:W,c:ke}=Me.utils.decode_cell(J);let Ne=Le[J].v;if(Le[J].t==="n"&&Ne>0&&Ne<1e6&&(Ne=new Date((Ne-25569)*86400*1e3).toISOString().split("T")[0]),(Ne==null||Ne==="")&&(Ne=""),W===0)we[ke]=Ne;else{if(!C[W-1]){C[W-1]={};for(let We=0;We<Je;We++)C[W-1][`col_${We}`]=""}C[W-1][`col_${ke}`]=Ne}}for(let J=0;J<Je;J++)we[J]===void 0&&(we[J]="");const de=C==null?void 0:C[0];if(!(de!=null&&de.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");Q("getImportData",we,C)}catch(xe){throw k.ElMessage.error(xe.message),new Error(xe.message)}},te.readAsArrayBuffer(ae)},je=oe=>{var te;const ae=(te=ee.value)==null?void 0:te.reduce((V,xe,Ee)=>(Ee===0?V[xe.label]=oe:V[xe.label]=xe==null?void 0:xe.value,V),{});Q("filter",ae,oe,!0)},He=oe=>{Q("buttonClick",oe)},le=oe=>{var ae,te;ee.value=(te=(ae=ie.getColumnChild(k.cloneDeep(oe)))==null?void 0:ae.filter(V=>(V==null?void 0:V.label)!==""&&(V==null?void 0:V.label)!=="操作"))==null?void 0:te.map(V=>({label:(V==null?void 0:V.label)??"",value:"",name:(V==null?void 0:V.label)??"",isFormColHidden:V==null?void 0:V.isTableColHidden,width:2}))},Ue=l.ref(!1),Oe=oe=>{var ae;if((oe==null?void 0:oe.buttonName)==="确认"&&(Q("filter",oe==null?void 0:oe.content),Ue.value=(oe==null?void 0:oe.content)&&Object.values(oe==null?void 0:oe.content).length>0),(oe==null?void 0:oe.buttonName)==="清空"){const te=k.cloneDeep(oe==null?void 0:oe.content);for(const V in te)te[V]="";ee.value=(ae=ee.value)==null?void 0:ae.map(V=>({...V,value:""})),Q("filter",te),Ue.value=!1}s.value=!1},fe=()=>{var ae,te;ee.value=(ae=ee.value)==null?void 0:ae.map(V=>({...V,value:""}));const oe=(te=ee.value)==null?void 0:te.reduce((V,xe)=>(V[xe.label]=xe.value,V),{});Q("filter",oe)};return l.onMounted(()=>{le($.columns)}),l.watch(()=>$.columns,()=>{le($.columns)},{deep:!0,immediate:!0}),(oe,ae)=>{var Le,rl,Je,we;const te=l.resolveComponent("el-icon"),V=l.resolveComponent("svg-icon"),xe=l.resolveComponent("el-input"),Ee=l.resolveComponent("el-button"),qe=l.resolveComponent("el-upload");return O.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",Ar,[l.createElementVNode("div",{class:l.normalizeClass(O.compName?"table-name-wrap":""),style:l.normalizeStyle({background:($==null?void 0:$.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:($==null?void 0:$.level)>1?"0px":"8px",fontWeight:600-(($==null?void 0:$.level)-1)*100>=400?600-(($==null?void 0:$.level)-1)*100:400,fontSize:15-($==null?void 0:$.level)>=12?15-($==null?void 0:$.level)+"px":"14px"})},l.toDisplayString(O.compName),7),l.createElementVNode("div",wr,[l.createElementVNode("div",_r,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,de,J,W;return[l.createVNode(xe,{modelValue:L.value,"onUpdate:modelValue":ae[1]||(ae[1]=ke=>L.value=ke),style:{"min-width":"80px"},placeholder:Ue.value?(J=(de=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:de.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:je,disabled:((W=ee.value)==null?void 0:W.length)===0},{suffix:l.withCtx(()=>{var ke,Ne;return[!L.value&&((Ne=(ke=O.filterValues)==null?void 0:ke.filter(We=>We))!=null&&Ne.join("/"))?(l.openBlock(),l.createBlock(te,{key:0,style:{cursor:"pointer"},onClick:fe},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:ae[0]||(ae[0]=ke=>s.value=!s.value)},[l.createVNode(V,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Ur,[(l.openBlock(),l.createBlock(_e.ssForm,{rowContents:ee.value,buttonValue:he.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:he.value,isStartJustify:!1,onOnButtonClick:Oe},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Le=O.buttons)==null?void 0:Le.length)>0?(l.openBlock(),l.createElementBlock("div",Or,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((rl=O.buttons)==null?void 0:rl.filter(C=>O.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,de)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:de},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":ye,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!O.lockingPage},{default:l.withCtx(()=>[l.createVNode(Ee,{disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(_e._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Ee,{key:0,disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style"])):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",Lr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,J=>(l.openBlock(),l.createBlock(Ee,{key:J==null?void 0:J.label,disabled:!!O.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:W=>He(J==null?void 0:J.label)},{default:l.withCtx(()=>{var W,ke;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(W=J==null?void 0:J.label)!=null&&W.includes("选中")?(l.openBlock(),l.createElementBlock("span",Vr,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Mr,"("+l.toDisplayString(O.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),C!=null&&C.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Ee,{key:2,id:"themeButton",disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"}),onClick:J=>He(C==null?void 0:C.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])])):(l.openBlock(),l.createElementBlock("div",jr,[l.createElementVNode("div",$r,[l.createElementVNode("div",Pr,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,de,J,W;return[l.createVNode(xe,{modelValue:L.value,"onUpdate:modelValue":ae[3]||(ae[3]=ke=>L.value=ke),style:{"min-width":"80px"},placeholder:Ue.value?(J=(de=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:de.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:je,disabled:((W=ee.value)==null?void 0:W.length)===0},{suffix:l.withCtx(()=>{var ke,Ne;return[!L.value&&((Ne=(ke=O.filterValues)==null?void 0:ke.filter(We=>We))!=null&&Ne.join("/"))?(l.openBlock(),l.createBlock(te,{key:0,style:{cursor:"pointer"},onClick:fe},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:ae[2]||(ae[2]=ke=>s.value=!s.value)},[l.createVNode(V,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Kr,[(l.openBlock(),l.createBlock(_e.ssForm,{rowContents:ee.value,buttonValue:he.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:he.value,isStartJustify:!1,onOnButtonClick:Oe},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Je=O.buttons)==null?void 0:Je.length)>0?(l.openBlock(),l.createElementBlock("div",Fr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((we=O.buttons)==null?void 0:we.filter(C=>O.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,de)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:de},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":ye,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(Ee,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=me==null?void 0:me.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(_e._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Ee,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=me==null?void 0:me.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",zr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,J=>(l.openBlock(),l.createBlock(Ee,{key:J==null?void 0:J.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:W=>He(J==null?void 0:J.label)},{default:l.withCtx(()=>{var W,ke;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(W=J==null?void 0:J.label)!=null&&W.includes("选中")?(l.openBlock(),l.createElementBlock("span",Rr,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",qr,"("+l.toDisplayString(O.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),C!=null&&C.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Ee,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(C==null?void 0:C.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:J=>He(C==null?void 0:C.label)},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=me==null?void 0:me.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},Wr=$l._export_sfc(Jr,[["__scopeId","data-v-b0dbf278"]]),Gr=l.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(O,{emit:Z}){const Q=O,$=Z,L=ee=>{$("buttonClick",ee)},s=ee=>{var he;return ee!=null&&ee.includes("删除")?((he=Q.selectTableItems)==null?void 0:he.length)>0?"warning-active-type":"warning-type":"default-type"};return(ee,he)=>{const me=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(O.buttons,ye=>(l.openBlock(),l.createBlock(me,{key:ye==null?void 0:ye.label,disabled:!!O.lockingPage,class:l.normalizeClass(s(ye==null?void 0:ye.label)),onClick:je=>L(ye==null?void 0:ye.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(ye==null?void 0:ye.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Hr=$l._export_sfc(Gr,[["__scopeId","data-v-70b12973"]]),ma=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(O){this.selectArray=O},setSelectString(O){this.selectString=O}}}),Qr={class:"calculator-content"},Xr={class:"calculator-child"},Yr={class:"calculator-child"},Zr=l.defineComponent({__name:"calculator",setup(O){const Z=l.ref(),Q=l.ref();return l.onMounted(()=>{Z.value=[{type:"Upload",label:"输入",name:"input"}],Q.value=[{type:"Upload",label:"输出",name:"output"}]}),($,L)=>(l.openBlock(),l.createElementBlock("div",Qr,[l.createElementVNode("div",Xr,[l.createVNode(_e.ssForm,{rowContents:Z.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Yr,[l.createVNode(_e.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Ir=$l._export_sfc(Zr,[["__scopeId","data-v-73db0fe7"]]),ka=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(O){this.selectIndex=O},setSelectMenu(O){this.selectMenu=O},setSelectTitle(O){this.selectTitle=O}}}),Xl=(O,Z)=>{let Q=O,$=Z;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((L,s)=>{if(Array.isArray(L)){let ee={};return L=L==null?void 0:L.forEach((he,me)=>{var ye;(ye=$==null?void 0:$[me])!=null&&ye.prop?ee[$[me].prop]=he:Array.isArray(he)&&(ee.children=Xl(he,$))}),Object.assign(ee,{id:s})}else return L})),Q},Sa=(O,Z,Q)=>{let $=O,L=Z;return $=$==null?void 0:$.map((s,ee)=>{var he,me;return!Array.isArray(s)||!((he=L==null?void 0:L[ee])!=null&&he.label)&&!Q||(s.unshift(((me=L==null?void 0:L[ee])==null?void 0:me.label)??""),s.some(ye=>Array.isArray(ye))&&(s=s==null?void 0:s.map(ye=>{var je;return Array.isArray(ye)&&(ye=Sa(ye,(je=L==null?void 0:L[ee])==null?void 0:je.children,Q)),ye}))),s}),$},en=(O,Z,Q)=>{if(Z==="")return O==null?void 0:O.filter($=>($==null?void 0:$.id)!==Q);{const $=Z.split("-");return ln(O,$,Q)}},ln=(O,Z,Q)=>{let $=O,L=Z;return(L==null?void 0:L.length)===0?$=$==null?void 0:$.filter(s=>s.id!==Q):$=$==null?void 0:$.map(s=>(s.id.toString()===(L==null?void 0:L[0])&&(L==null||L.shift(),s=Ca(s,L,Q)),s)),$},Ca=(O,Z,Q)=>{var s,ee;let $=O,L=Z;return(L==null?void 0:L.length)===0?$.children=(s=$.children)==null?void 0:s.filter(he=>he.id!==Q):$.children=(ee=$.children)==null?void 0:ee.map(he=>(he.id.toString()===(L==null?void 0:L[0])&&(L==null||L.shift(),he=Ca(he,L,Q)),he)),$},an=(O,Z,Q)=>{if(Z==="")return Q;{const $=Z.split("-");return rn(O,$,Q)}},rn=(O,Z,Q)=>{let $=O,L=Z;return(L==null?void 0:L.length)===0?$=Q:$=$==null?void 0:$.map(s=>(s.id.toString()===(L==null?void 0:L[0])&&(L==null||L.shift(),s=Da(s,L,Q)),s)),$},Da=(O,Z,Q)=>{var s;let $=O,L=Z;return(L==null?void 0:L.length)===0?$.children=Q:$.children=(s=$.children)==null?void 0:s.map(ee=>(ee.id.toString()===(L==null?void 0:L[0])&&(L==null||L.shift(),ee=Da(ee,L,Q)),ee)),$},xa=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(O){this.objUrl=O},setBlobUrls(O){this.blobUrls=O}}}),Yl=async O=>{var s,ee,he,me,ye,je,He;let Z=(ee=(s=k.cloneDeep(O))==null?void 0:s.optionUrl)==null?void 0:ee.menuSelect,Q=[];Z==null||Z.forEach(le=>{});let $="";const L=await ie.menuToParent(Z);if(L==null||L.forEach(le=>{var Ue,Oe,fe,oe;(le==null?void 0:le.name)===(((oe=(fe=(Oe=(Ue=k.cloneDeep(O))==null?void 0:Ue.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:fe[0])==null?void 0:oe.replaceAll("'",""))??"")&&($=le==null?void 0:le.id)}),$!==""){const le=(he=L==null?void 0:L.find(fe=>{var oe,ae,te,V;return(fe==null?void 0:fe.name)===(((ae=(oe=O==null?void 0:O.groupSelect)==null?void 0:oe.split(":"))==null?void 0:ae[0])||((V=(te=O==null?void 0:O.optionUrl)==null?void 0:te.groupSelect)==null?void 0:V[0]))}))==null?void 0:he.compData;let Ue=(ye=(me=le==null?void 0:le.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:me.contents)==null?void 0:ye.map(fe=>fe==null?void 0:fe.label),Oe=(He=(je=le==null?void 0:le.find(fe=>(fe==null?void 0:fe.key)==="tableContents"))==null?void 0:je.contents)==null?void 0:He.map(fe=>(fe=fe==null?void 0:fe.filter(oe=>!(oe!=null&&oe.id)),fe));Oe==null||Oe.forEach(fe=>{Q.push(ie.getValueToObjectValue(fe,Ue))})}return Q},nn={class:"table-content"},on={class:"menu-config-wrap"},tn=["onClick"],sn=["onClick"],un={key:0,class:"viewport-wrap"},cn=["onClick"],dn={title:"选择显示列信息"},pn={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},fn=["title"],gn={class:"col-operate-wrap"},hn={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},yn={class:"pop-view"},vn={class:"pop-wrapper"},bn={class:"file-list-pop"},mn=["title","onClick"],kn=["onClick"],Sn=["onClick"],Cn={class:"form-content"},Dn={key:0,class:"dialog-footer"},xn={class:"dialog-footer"},Tn={class:"form-content"},En={__name:"index",props:{pageLayout:{type:String,default:"vertical"},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!1},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(O,{emit:Z}){var ya;const Q=l.ref([]),$=xa(k.pinia),L=l.ref(null),s=O,ee=l.ref(s==null?void 0:s.allowSelect),he=l.ref((ya=s==null?void 0:s.config)==null?void 0:ya.showIndex),me=l.ref(),ye=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),je=ie.useOriginalState(k.pinia),{originalPath:He}=k.storeToRefs(je),le=He.value,Ue=l.ref(!1),Oe=l.ref(!1),fe=l.ref(!1),oe=l.reactive({column:{},status:!1,text:"合计"}),ae=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),te=Z,V=l.ref([]),xe=l.reactive({prop:"",order:null}),Ee=l.ref([]),qe=l.ref(!1),Le=l.ref(!1),rl=l.ref(null);Me.useThreeSystem();const Je=l.ref([]),we=l.ref(!1),C=l.ref(),de=ie.useMenuState(),{importLoading:J,activeMenuPath:W,contentLoading:ke,linkMenuInfo:Ne}=k.storeToRefs(de),We=ie.useTableComp(k.pinia),Te=ie.useModelComp(k.pinia),{extraContents:be,cacheUpdatingData:il,tableViewContents:ul,tableLoading:Bn,pageMapState:Ze,lockingPage:Tl}=k.storeToRefs(Te),Y=l.ref([]),El=l.ref([]),Nl=l.ref(new Map);l.ref(!1);const Ge=l.ref("");l.ref();const Bl=l.ref(!0),nl=l.ref(0),Zl=l.ref(!0),$e=l.ref(""),Qe=l.ref(!1),Ta=l.ref({label:"查看三维模型"}),Al=l.ref(!1),Pl=l.ref(),Ve=l.ref([]),Ie=l.ref([]),wl=l.ref(!1),cl=l.ref([]),ol=l.ref([]),el=l.ref([]),Xe=l.ref([]),Pe=l.ref(),Be=l.ref(),Ea=ma(k.pinia),_l=l.ref(),Kl=l.ref(0),Ul=ka(k.pinia),{selectIndex:Na,selectMenu:Ye,selectTitle:Fl}=k.storeToRefs(Ul),{selectString:ll}=k.storeToRefs(Ea),Ba=k.useLoginState(k.pinia),{loginUserInfo:ge}=k.storeToRefs(Ba),Aa=l.ref(720),Ke=l.ref(!1),Ol=l.ref(!1),Fe=l.ref([]),al=l.ref(),dl=l.ref(!0),Il=l.ref(!0),Ll=l.ref([]),wa=l.inject("contentRef");l.provide("contentRef",wa),l.watch(()=>{var e;return(e=Y.value)==null?void 0:e.length},e=>{ae.total=e}),l.watch(()=>ul.value,async()=>{var i,p,d,g,m,t,N,j,v,U,T,S,K,x,A,D,f,h;if(((i=ul.value)==null?void 0:i.length)===0||!((p=s==null?void 0:s.itemData)!=null&&p.find(u=>(u==null?void 0:u.key)==="columnPath"))||!((d=s==null?void 0:s.itemData)!=null&&d.find(u=>(u==null?void 0:u.key)==="pageColumn")))return;let e=(v=(j=(N=(t=(m=(g=s==null?void 0:s.itemData)==null?void 0:g.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:m.contents)==null?void 0:t.split("["))==null?void 0:N[1])==null?void 0:j.split("]"))==null?void 0:v[0],a=((K=(S=(T=(U=s==null?void 0:s.itemData)==null?void 0:U.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:T.contents)==null?void 0:S.split("["))==null?void 0:K[0])+((A=(x=ul.value)==null?void 0:x.find(u=>(u==null?void 0:u.key)===e))==null?void 0:A.value),n=((f=(D=s==null?void 0:s.itemData)==null?void 0:D.find(u=>(u==null?void 0:u.key)==="pageGroup"))==null?void 0:f.contents)??"",r=await ie.getItemData(a,sessionStorage.getItem("systemKey"),""),o=(h=r==null?void 0:r.find(u=>(u==null?void 0:u.name)===(n===""?s==null?void 0:s.compName:n)))==null?void 0:h.compData;ga(o,s.allMapContents)},{deep:!0});const _a=async(e,a)=>{var n,r,o,i,p;try{const d=await k.getInsofDataApi({id:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index)});let g;((n=d==null?void 0:d.data)==null?void 0:n.code)===200&&(g=((o=(r=d==null?void 0:d.data)==null?void 0:r.result)==null?void 0:o[0])||null);const m={type:"data",pageKey:s!=null&&s.parentTableId?(i=g==null?void 0:g.key)==null?void 0:i.pageKey:W.value,tableId:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index),systemKey:sessionStorage.getItem("systemKey")},t=a==null?void 0:a.map(v=>{const U=Object.keys(v),T={};return U.forEach((S,K)=>{T[e[K]]=v[S]}),T}),N=t==null?void 0:t.map(v=>({key:m,value:{tableData:v}})),j=await k.batchAddInsofDataApi({dataList:N});((p=j==null?void 0:j.data)==null?void 0:p.code)===200?(Te.setRefreshCurStructure(!0),k.ElMessage.success("导入数据成功")):k.ElMessage.error("导入数据响应失败")}catch(d){throw k.ElMessage.error("导入数据处理失败"),new Error(d)}},Ua=async e=>{var a,n;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await k.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),o=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let i=URL.createObjectURL(o);C.value=[{name:(n=e==null?void 0:e.split("/"))==null?void 0:n[((a=e==null?void 0:e.split("/"))==null?void 0:a.length)-1],blobUrl:i}],we.value=!0}};l.onBeforeUnmount(()=>{Il.value=!1;let e=Kl.value;Kl.value=e+1});const ea=l.computed(()=>{var r,o;const e=(ae.currentPage-1)*ae.pageSize,a=e+ae.pageSize,n=(r=V.value)==null?void 0:r.find(i=>{var p;return(i==null?void 0:i.sortable)&&((p=i==null?void 0:i.label)==null?void 0:p.includes("时间"))});return n&&(xe.order="descending",xe.prop=n==null?void 0:n.prop),te("getSliceContLength",ae),(o=Y.value)==null?void 0:o.slice(e,a)}),Oa=e=>{ae.currentPage=e,te("getSliceContLength",ae)},La=e=>{var a;ae.pageSize=e,e*ae.currentPage>((a=Y.value)==null?void 0:a.length)&&(ae.currentPage=1,ae.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),te("getSliceContLength",ae)},Va=(e,a)=>{var p,d;const n=(d=(p=V.value)==null?void 0:p.map(g=>g==null?void 0:g.prop))==null?void 0:d.filter(g=>g!=="operate");let r;const o=(e==null?void 0:e.length)===(n==null?void 0:n.length);if(e!=null&&e.includes("序号"))return k.ElMessage.error("导入的数据不需要包含序号列");if(r=o?e:e.slice(0,n==null?void 0:n.length),!(r==null?void 0:r.every(g=>n==null?void 0:n.find(m=>g===m))))return k.ElMessage.error("导入的数据表头不匹配");_a(r,a)},Ma=(e,a)=>{var n;Te.setRefreshCurStructure(!1),((n=V.value)==null?void 0:n.length)===0||Va(e,a)},ja=(e,a,n,r)=>{const o=[],i=[],p=m=>Object.keys(m).length;for(const m in e)if(e[m]!==void 0){const t=e[m],N=[];for(const[j,v]of Object.entries(t))N.push(v),i.length<p(t)&&i.push(j);o.push(N)}o.unshift(i);const d=Me.utils.aoa_to_sheet(o),g=Me.utils.book_new();Me.utils.book_append_sheet(g,d,r),Me.writeFileSync(g,`${a}.xlsx`),Fe.value=[]},Vl=async(e,a,n,r=!1,o)=>{var i,p,d,g,m,t,N,j;try{Te.setRefreshCurStructure(!1);const v=await k.getInsofDataApi({id:s==null?void 0:s.index});if(((i=v==null?void 0:v.data)==null?void 0:i.code)===200){let U=(m=(g=(d=(p=v==null?void 0:v.data)==null?void 0:p.result)==null?void 0:d[0])==null?void 0:g.value)==null?void 0:m.pageData;r?U={...U,compData:(N=U==null?void 0:U.compData)==null?void 0:N.map(S=>{var K;return(S==null?void 0:S.key)==="header"?{...S,contents:(K=S==null?void 0:S.contents)==null?void 0:K.map(x=>({...x,[e]:n}))}:S})}:U={...U,compData:(t=U==null?void 0:U.compData)==null?void 0:t.map(S=>{var K,x;return(S==null?void 0:S.key)==="header"?{...S,contents:(K=S==null?void 0:S.contents)==null?void 0:K.map(A=>(A==null?void 0:A.prop)===(a==null?void 0:a.prop)?{...A,[e]:n}:A)}:(S==null?void 0:S.key)==="tableToForm"&&o?{...S,contents:(x=S==null?void 0:S.contents)==null?void 0:x.map(A=>(A==null?void 0:A.prop)===(a==null?void 0:a.prop)?{...A,[o]:n}:A)}:S})};const T=await k.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:U}});((j=T==null?void 0:T.data)==null?void 0:j.code)===200?(k.ElMessage.success("编辑成功"),Te.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(v){k.ElMessage.error(v)}},$a=async(e,a)=>{await Vl("label",a,e)},Pa=async(e,a)=>{await Vl("columnType",a,e,!1,"type")},Ka=()=>{il.value?Ke.value=!1:ha()},Fa=e=>{Fe.value=e},za=(e,a)=>{al.value===a?dl.value=!1:dl.value=!0,al.value=a==null?void 0:a.changeProp},pl=l.computed(()=>{var n,r,o;const e=(n=V.value)==null?void 0:n.some(i=>i==null?void 0:i.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(o=(r=V.value)==null?void 0:r.filter(i=>(i==null?void 0:i.label)!=="操作"))==null?void 0:o.map(i=>({...i,filterable:!!(i!=null&&i.filterable),showSummary:!!(i!=null&&i.showSummary),operable:!!(i!=null&&i.operable)}))}),Ra=async(e,a,n)=>{const r=k.cloneDeep(V.value);await l.nextTick(),V.value=r==null?void 0:r.map(o=>(n==null?void 0:n.label)===(o==null?void 0:o.label)?{...o,[a]:e}:o),await Vl(a,n,e)},zl=async(e,a)=>{await Vl(a,null,e,!0)},qa=()=>{Qe.value=!1},Ja=e=>{te("clickTrigger",e)},Rl=async e=>{var i,p,d,g,m,t,N,j,v,U,T,S,K,x;let a,n,r;if(typeof e=="string"?(a=e,n=null,r=null):(a=e==null?void 0:e.row,n=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix),(i=a==null?void 0:a.toString())!=null&&i.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(a.includes(",")){k.ElMessage.error("当前版本仅允许单个urdf预览!");return}cl.value=[a],Le.value=!0,rl.value={data:k.cloneDeep(n)},qe.value=!0;return}let o=[];if((p=a==null?void 0:a.toString())!=null&&p.includes(".stl")||(d=a==null?void 0:a.toString())!=null&&d.includes(".STL")||(g=a==null?void 0:a.toString())!=null&&g.includes(".obj")||(m=a==null?void 0:a.toString())!=null&&m.includes(".mtl")){cl.value=(t=a==null?void 0:a.toString())==null?void 0:t.split(","),Le.value=!1,qe.value=!0;return}if((N=a==null?void 0:a.toString())!=null&&N.includes(".stl")||(j=a==null?void 0:a.toString())!=null&&j.includes(".STL")||(v=a==null?void 0:a.toString())!=null&&v.includes(".obj")||(U=a==null?void 0:a.toString())!=null&&U.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let A,D=[],f={};if(Array.isArray(a)?A=a:A=a==null?void 0:a.split(","),A==null||A.forEach(h=>{h.includes(".mtl")?D.push(h):f.blob=f.blob?f.blob+","+h:h}),(D==null?void 0:D.length)>0&&(f.mtlBlobs=D),r&&(f.suffix=r),(S=(T=Object.values(f))==null?void 0:T[0])!=null&&S.includes("http:"))o.push(f);else{const h=new Blob([f.blob],{type:"application/octet-stream;charset=UTF-8"});let u=URL.createObjectURL(h),y="";(K=a==null?void 0:a.split("/"))==null||K.forEach((z,B)=>{var G;B===((G=a==null?void 0:a.split("/"))==null?void 0:G.length)-1&&(y=z)}),(x=f.blob)!=null&&x.includes(".stl")&&(y=(y==null?void 0:y.replaceAll(">",""))+".urdf"),C.value=[{name:y,blobUrl:u}],we.value=!0}}else{try{de.setImportLoading(!0);const A=new Br.ChunkDownloader(a,2*1024*1024),D=await A.downloadAll(y=>{console.log(`下载进度: ${y.percent}%`)}),f=new Blob([D],{type:"application/octet-stream"}),h=URL.createObjectURL(f),u=a.split("/").pop();C.value=[{name:u,blobUrl:h,size:A.totalSize}],de.setImportLoading(!1)}catch(A){console.error("NC文件加载失败:",A)}we.value=!0}(o==null?void 0:o.length)>0&&$.setBlobUrls(o)},Ml=e=>{var r,o,i,p;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(p=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:p[((i=(o=e==null?void 0:e.url)==null?void 0:o.split("."))==null?void 0:i.length)-1];return(e==null?void 0:e.name)+"."+a},Wa=async e=>{let a=null,n=null,r=null;if(e!=null&&e.downloadUrl){const i=await ql(),p=_e.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),d=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"}}).finally(()=>{p.close()}),g=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(g),n=e==null?void 0:e.name;const m=n==null?void 0:n.lastIndexOf(".");r=n==null?void 0:n.slice(m)}else{const i=await Me.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(i.data),n=Ml(e)):a=e==null?void 0:e.url}if(r!=null&&r.includes(".urdf")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){const i={row:`${a}`,suffix:r};Rl(i);return}const o={name:n,blobUrl:a};C.value=[o],we.value=!0},Ga=async e=>{let a=null,n=null;if(e!=null&&e.downloadUrl){const i=await ql(),p=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"}}),d=new Blob([p.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(d),n=e==null?void 0:e.name}else{const i=await Me.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(i.data),n=Ml(e)}const r={name:n,blobUrl:a},o=document.createElement("a");o.href=r.blobUrl,o.download=r.name,o.style.display="none",document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o)},100)},Ha=(e,a)=>{var n;if(Object.values(a).length!==0)return Object.values(a).find(r=>{var o,i,p;return((o=r==null?void 0:r.toString())==null?void 0:o.includes(".txt"))||((i=r==null?void 0:r.toString())==null?void 0:i.includes(".cpt"))||((p=r==null?void 0:r.toString())==null?void 0:p.includes(".obj"))})?[...e,Ta.value]:(n=s==null?void 0:s.config)!=null&&n.allowMove?[...e,{label:"迁移"}]:e},Qa=(e,a={})=>[...e==null?void 0:e.values()].filter(n=>Object.keys(a).every(r=>{var p;const o=n[r],i=(p=a[r])==null?void 0:p.toLowerCase();return i&&o&&typeof o=="string"?o.toLowerCase().includes(i):!0})),la=l.ref([]),Xa=async(e,a,n=!1)=>{var r;if(e){if(Te.setTableLoading(!0),la.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(o=>!o)))return Y.value=El.value;if(n){Y.value=[...Nl.value.values()].filter(o=>Object.values(o).some(i=>typeof i=="string"?i==null?void 0:i.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}Y.value=Qa(Nl.value,e),Te.setTableLoading(!1)}},Ya=async e=>{var p,d,g,m,t,N,j,v,U,T,S,K,x,A,D;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((p=ge.value)==null?void 0:p.account)||((d=ge.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((g=ge.value)==null?void 0:g.account)||((m=ge.value)==null?void 0:m.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(N=(t=a==null?void 0:a.data)==null?void 0:t.result)==null?void 0:N.map(f=>f==null?void 0:f.id);const o=(v=(j=n==null?void 0:n.data)==null?void 0:j.result)==null?void 0:v.map(f=>f==null?void 0:f.id);r=[...k.cloneDeep(r),...o],(r==null?void 0:r.length)>0&&(r!=null&&r.every(f=>f!==null&&f))&&await k.batchDeleteInsofDataApi({ids:r});let i=await ie.getItemData(W.value,sessionStorage.getItem("systemKey"),e.id);if(i=i==null?void 0:i.filter(f=>f.comp!=="methodButton"),i&&i.length>0){const f=!Array.isArray(Fl.value)&&((U=Fl.value)==null?void 0:U.key)!=="main"?[]:Fl.value;f.push({key:Ye.value===""?(T=e==null?void 0:e.id)==null?void 0:T.toString():Ye.value+"-"+((S=e==null?void 0:e.id)==null?void 0:S.toString()),value:e[(K=Object.keys(e))==null?void 0:K.filter(h=>h!=="index"&&h!=="id")[0]]}),Ul.setSelectMenu(Ye.value===""?(x=e==null?void 0:e.id)==null?void 0:x.toString():Ye.value+"-"+((A=e==null?void 0:e.id)==null?void 0:A.toString())),Ul.setSelectTitle(f),Ul.setSelectIndex((D=e==null?void 0:e.id)==null?void 0:D.toString()),te("pageChange",i)}},aa=async(e,a,n,r)=>{var i,p,d,g,m,t,N,j,v,U,T,S,K,x,A,D,f,h,u,y,z,B,G,re,X;if(te("clickMainKey",n),(r==null?void 0:r.isExistChild)===!0){let q=(p=(i=V.value)==null?void 0:i.find(R=>(R==null?void 0:R.isMainKey)===!0))==null?void 0:p.prop,H=(d=r==null?void 0:r.rowContent)==null?void 0:d[q],w=(m=(g=r==null?void 0:r.columnType)==null?void 0:g.childPath)==null?void 0:m.split(le),M=[];w==null||w.forEach((R,c)=>{(w==null?void 0:w.length)-1===c&&M.push(H),M.push(R)}),M=M.join(le);let F=await ie.getItemData(M,sessionStorage.getItem("systemKey"),""),I=await ie.getItemData((t=r==null?void 0:r.columnType)==null?void 0:t.childPath,sessionStorage.getItem("systemKey"),"");if(!F||(F==null?void 0:F.length)===0){let R=[];I==null||I.forEach(P=>{var ve,ce,E,b;let _={type:"structure",pageKey:M,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(ve=ge.value)==null?void 0:ve.id,parentPageKey:"",createUserLayer:((ce=ge.value)==null?void 0:ce.dept)||((E=ge.value)==null?void 0:E.部门名称)},ne={pageData:{comp:P==null?void 0:P.comp,compData:(b=P==null?void 0:P.compData)==null?void 0:b.filter(se=>(se==null?void 0:se.key)!=="tableContents"),name:P==null?void 0:P.name,isShow:P==null?void 0:P.isShow}};R.push({key:_,value:ne})}),(R==null?void 0:R.length)>0&&await k.batchAddInsofDataApi({dataList:R});let c=await ie.getItemData(M,sessionStorage.getItem("systemKey"),"");Ll.value=c}else{let R=I==null?void 0:I.map(c=>{var P,_;return(c==null?void 0:c.comp)==="Form"?c.compData=(P=c.compData)==null?void 0:P.map(ne=>{var ve;return(ne==null?void 0:ne.key)==="formContent"&&(ne.contents=(ve=ne==null?void 0:ne.contents)==null?void 0:ve.map(ce=>{var b,se,ue,pe,Ce;let E=(Ce=(pe=(ue=(se=(b=F==null?void 0:F.find(Se=>(Se==null?void 0:Se.name)===(c==null?void 0:c.name)))==null?void 0:b.compData)==null?void 0:se.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:ue.contents)==null?void 0:pe.find(Se=>(Se==null?void 0:Se.prop)===(ce==null?void 0:ce.prop)))==null?void 0:Ce.value;return ce.value=E,ce})),ne}):c=F==null?void 0:F.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)),c.id=(_=F==null?void 0:F.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)))==null?void 0:_.id,c});Ll.value=R}te("routeUrl",Ll.value,{isEdit:!0,routerUrl:M});return}if((r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(q=>(q==null?void 0:q.url)&&(q==null?void 0:q.name)))){let q=k.cloneDeep(e);q=await((N=k.cloneDeep(q))==null?void 0:N.map(async w=>{var I,R,c,P;const M=await Me.downloadAvatarApi({url:w==null?void 0:w.url});let F=URL.createObjectURL(M.data);return{name:(w==null?void 0:w.name)+"."+((P=(I=w==null?void 0:w.url)==null?void 0:I.split("."))==null?void 0:P[((c=(R=w==null?void 0:w.url)==null?void 0:R.split("."))==null?void 0:c.length)-1]),blobUrl:F}}));let H=await Promise.all(q);C.value=H,we.value=!0}const o=k.cloneDeep(V.value);if((r==null?void 0:r.isMainKey)===!0&&(o==null?void 0:o.length)>0){(j=o==null?void 0:o[0])==null||j.prop;let q=k.cloneDeep(W).value+le+(r==null?void 0:r.data),H=k.cloneDeep(W).value,w=(U=(v=Ze.value[q])==null?void 0:v.filter(R=>{var c,P;return((c=R==null?void 0:R.key)==null?void 0:c.type)==="structure"&&((P=R==null?void 0:R.key)==null?void 0:P.parentTable)===""}))==null?void 0:U.map(R=>{var c;return(c=R==null?void 0:R.value)==null?void 0:c.pageData}),M={};(T=V.value)==null||T.forEach(R=>{(R==null?void 0:R.label)!=="操作"&&(M[R.label]=n[R.prop]??n[R.label])});let F=(K=(S=s==null?void 0:s.itemData)==null?void 0:S.find(R=>(R==null?void 0:R.key)==="mainRouters"))==null?void 0:K.contents,I;if((F==null?void 0:F.length)>0){let R=q==null?void 0:q.split(le)[((x=q==null?void 0:q.split(le))==null?void 0:x.length)-1],c=F==null?void 0:F.find(P=>(P==null?void 0:P.key)===R);I=(c==null?void 0:c.routerContent)+le+(c==null?void 0:c.key)}if((w==null?void 0:w.length)>0)await ie.getItemData(q+le+`updateLoading${((A=ge.value)==null?void 0:A.account)||((D=ge.value)==null?void 0:D.账号)}`,sessionStorage.getItem("systemKey"),"")||await ie.loadingConstruct(q,q+le+`updateLoading${((f=ge.value)==null?void 0:f.account)||((h=ge.value)==null?void 0:h.账号)}`,M,I),Te.setRouteToChildPath(H),de.setActiveMenuPath(q+le+`updateLoading${((u=ge.value)==null?void 0:u.account)||((y=ge.value)==null?void 0:y.账号)}`);else{(z=o==null?void 0:o[0])==null||z.prop;let R=k.cloneDeep(W).value+le+(r==null?void 0:r.data),c=k.cloneDeep(W).value;await ie.getItemData(c+le,sessionStorage.getItem("systemKey"),""),await ie.loadingConstruct(c+le,R,M),await ie.loadingConstruct(R,R+le+`updateLoading${((B=ge.value)==null?void 0:B.account)||((G=ge.value)==null?void 0:G.账号)}`,M,I),Te.setRouteToChildPath(c),de.setActiveMenuPath(R+le+`updateLoading${((re=ge.value)==null?void 0:re.account)||((X=ge.value)==null?void 0:X.账号)}`)}}},Za=()=>{we.value=!1},Ia=e=>{te("rowClick",e)};l.watch(()=>s.changedContent,()=>{var n,r;if(!s.changedContent)return;let e=(n=Y.value)==null?void 0:n.map(o=>{var i;return o.id===((i=s.changedContent)==null?void 0:i.id)&&(o={...s.changedContent,id:s.changedContent.newId?s.changedContent.newId:s.changedContent.id},delete o.newId),o});const a=(r=s.itemData)==null?void 0:r.map(o=>((o==null?void 0:o.key)==="tableContents"&&(o.contents=e),o));Y.value=e,te("contentChange",{contents:a,index:s.index}),te("change",{content:e,index:s==null?void 0:s.index,buttonName:"",id:s==null?void 0:s.index})},{deep:!0,immediate:!0});const er=()=>{},lr=async()=>{const e=W.value,a=sessionStorage.getItem("systemKey"),n=await ie.getItemData(e,a,""),r=n==null?void 0:n.find(d=>(d==null?void 0:d.name)==="方法明细"),o=(r==null?void 0:r.compData)||[],i=o==null?void 0:o.find(d=>(d==null?void 0:d.key)==="formContent");return i==null?void 0:i.contents},ql=async()=>`Bearer ${k.Local.get("access-token")}`,ar=async(e,{token:a,inputData:n}={})=>await k.axios.post(e,n,{headers:{Authorization:a}}).catch(o=>(de.setImportLoading(!1),Promise.reject(o))),rr=e=>{var r;let a={};const n=[];return a.form={},(r=k.cloneDeep(e))==null||r.forEach((o,i)=>{var p,d,g,m,t,N,j,v,U,T,S,K,x,A;if((o==null?void 0:o.comp)==="Table"){(d=(p=o==null?void 0:o.compData)==null?void 0:p.find(u=>(u==null?void 0:u.key)==="header"))==null||d.contents;let D=(t=(m=(g=o==null?void 0:o.compData)==null?void 0:g.find(u=>(u==null?void 0:u.key)==="tableContents"))==null?void 0:m.contents)==null?void 0:t.map(u=>u.slice(1));(T=(U=(v=(j=(N=o==null?void 0:o.compData)==null?void 0:N.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:j.contents)==null?void 0:v[0])==null?void 0:U[0])==null||T.label;let f=(K=(S=o==null?void 0:o.compData)==null?void 0:S.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:K.contents,h=[];D==null||D.forEach(u=>{let y=[];u==null||u.forEach((z,B)=>{var re;let G={};((re=f[B])==null?void 0:re.label)!=="操作"&&(G[f[B].label]=z,y.push(G))}),h.push(y)}),a[o.name]=h}else{const D=(A=(x=o.compData)==null?void 0:x.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:A.contents;D==null||D.forEach(f=>{var h,u;if(f.prop!==""){let y=f==null?void 0:f.value;Array.isArray(y)?y=((h=y==null?void 0:y[0])==null?void 0:h.oldUrl)||(y??"http://222.92.178.198:62001/"+((u=y==null?void 0:y[0])==null?void 0:u.url)):y=y.toString(),f={key:(f==null?void 0:f.prop)??(f==null?void 0:f.label),value:y},n.push(f)}})}}),a.form=ie.getFormContents(n),a};let jl=null;const nr=()=>{de.setLoadingPercent(0)},ra=()=>{clearInterval(jl),jl=null},or=()=>{ra(),nr()},fl=()=>{de.setImportLoading(!1),or()},tr=()=>{jl=setInterval(()=>{const e=de.getLoadingPercent();if(e==99){ra();return}de.setLoadingPercent(e+1)},100)},sr=async(e,a,n)=>{var z,B,G,re,X,q,H,w,M,F,I,R;de.setImportLoading(!0,ie.loadingTypeConstants.PROGRESS),jl||tr();const r=await lr().catch(c=>(fl(),Promise.reject(c))),o=r==null?void 0:r.find(c=>(c==null?void 0:c.key)==="算法体"),i=o==null?void 0:o.value;if(!i){console.log("未搜索到isMain, 缺少算法执行接口"),fl();return}const p=V.value||[],d=p.find(c=>(c==null?void 0:c.prop)==="输入"),g=d==null?void 0:d.prop;let m=a==null?void 0:a[g];const t=await ql().catch(c=>(fl(),Promise.reject(c)));let N=!1,j="";(z=V.value)==null||z.forEach(c=>{(c==null?void 0:c.prop)===g&&(N=!!(c!=null&&c.childPath),j=c==null?void 0:c.childPath)});let v="",U="";if(N){let c=(G=(B=V.value)==null?void 0:B.find(ve=>(ve==null?void 0:ve.isMainKey)===!0))==null?void 0:G.prop;U=a==null?void 0:a[c];let P=j==null?void 0:j.split(le),_=[];P==null||P.forEach((ve,ce)=>{(P==null?void 0:P.length)-1===ce&&_.push(U),_.push(ve)}),_=_.join(le),v=_;let ne=await ie.getItemData(_,sessionStorage.getItem("systemKey"),"");m=rr(ne)}const T=await ar(i,{token:t,inputData:m}).catch(c=>(fl(),Promise.reject(c))),S=(re=T==null?void 0:T.data)==null?void 0:re.data,K=r==null?void 0:r.find(c=>(c==null?void 0:c.prop)==="算法名称");K==null||K.value;const x=p.find(c=>(c==null?void 0:c.prop)==="输出"),A=x==null?void 0:x.directiveLabel;v=v==null?void 0:v.replaceAll(d==null?void 0:d.directiveLabel,A);const D=(X=k.cloneDeep(v))==null?void 0:X.replaceAll(le+U,"");let f=await ie.getItemData(v,sessionStorage.getItem("systemKey"),""),h=await ie.getItemData(D,sessionStorage.getItem("systemKey"),"");if(f){let c=[],P=[];f==null||f.forEach(_=>{var ne,ve;if((_==null?void 0:_.comp)==="Table")(ne=_==null?void 0:_.compData)==null||ne.forEach(ce=>{var E;(ce==null?void 0:ce.key)==="tableContents"&&((E=ce==null?void 0:ce.contents)==null||E.forEach(b=>{var se,ue;(se=b==null?void 0:b[0])!=null&&se.id&&c.push((ue=b==null?void 0:b[0])==null?void 0:ue.id)}))});else if((_==null?void 0:_.comp)==="Form"){_.compData=(ve=_==null?void 0:_.compData)==null?void 0:ve.map(E=>{var b;return(E==null?void 0:E.key)==="formContent"&&(E.contents=(b=E==null?void 0:E.contents)==null?void 0:b.map(se=>{var ue,pe;return(ue=S==null?void 0:S.form)!=null&&ue[se.prop]&&(se.value=(pe=S==null?void 0:S.form)==null?void 0:pe[se.prop]),se})),E});let ce={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};P.push({id:_==null?void 0:_.id,value:ce})}}),(P==null?void 0:P.length)>0&&await k.batchUpdateInsofDataApi({dataList:P}),c=[...new Set(c)],(c==null?void 0:c.length)>0&&await k.batchDeleteInsofDataApi({ids:c})}else{let c=[];if(S!=null&&S.table){let P={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:v,parentTable:"",createUserId:(q=ge.value)==null?void 0:q.id,createUserOrg:((H=ge.value)==null?void 0:H.dept)||((w=ge.value)==null?void 0:w.部门名称)};h==null||h.forEach(_=>{let ve={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};c.push({key:P,value:ve})})}if(S!=null&&S.form){let P={type:"structure",pageKey:v,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(M=ge.value)==null?void 0:M.id,parentPageKey:"",createUserLayer:((F=ge.value)==null?void 0:F.dept)||((I=ge.value)==null?void 0:I.部门名称)};h==null||h.forEach(_=>{var E;let ne=(E=_==null?void 0:_.compData)==null?void 0:E.map(b=>{var se;return(b==null?void 0:b.key)==="formContent"&&(b.contents=(se=b.contents)==null?void 0:se.map(ue=>{var pe,Ce;return(pe=S==null?void 0:S.form)!=null&&pe[ue.prop]&&(ue.value=(Ce=S==null?void 0:S.form)==null?void 0:Ce[ue.prop]),ue})),b}),ce={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:ne}};c.push({key:P,value:ce})})}(c==null?void 0:c.length)>0&&await k.batchAddInsofDataApi({dataList:c})}let u=await ie.getItemData(v,sessionStorage.getItem("systemKey"),""),y=[];S!=null&&S.table&&((R=S==null?void 0:S.table)==null||R.forEach(c=>{var ne,ve,ce,E;let P={type:"data",pageKey:v,tableId:(ne=u==null?void 0:u[0])==null?void 0:ne.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ve=ge.value)==null?void 0:ve.id,createUserOrg:((ce=ge.value)==null?void 0:ce.dept)||((E=ge.value)==null?void 0:E.部门名称)},_={tableData:c};y.push({key:P,value:_})})),(y==null?void 0:y.length)>0&&await k.batchAddInsofDataApi({dataList:y}),vl(!0),fl()},na=(e,a)=>(e=e==null?void 0:e.map(n=>{var r,o;return n!=null&&n.children&&((r=n.children)!=null&&r.find(i=>i.id===(a==null?void 0:a.id))?n.children=(o=n.children)==null?void 0:o.filter(i=>(i==null?void 0:i.id)!==(a==null?void 0:a.id)):n.children=na(n.children,a)),n}),e),De=l.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:s==null?void 0:s.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(e,a,n)=>{a===(s==null?void 0:s.index)?n(new Error("选择源不能和目标源一致")):n()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),ir=()=>{De.show=!1},ur=e=>{var a,n;if((e==null?void 0:e.buttonName)==="取消")return De.show=!1;De.to=e==null?void 0:e.content,!(!(s!=null&&s.index)||!((a=De.to)!=null&&a.groupName))&&(s==null?void 0:s.index)!==((n=De.to)==null?void 0:n.groupName)&&(te("change",{buttonName:"迁移",value:{from:De.from,to:De.to,data:De.selectRow}}),De.show=!1)},cr=l.computed(()=>s.compName===_e.tableSign),dr=async e=>{de.setImportLoading(!0),await _e.initUpdateCAMTargetData(e).finally(()=>{de.setImportLoading(!1)}),k.ElMessage({type:"success",message:"应用成功"})},gl=async(e,a,n)=>{var r,o,i,p,d,g,m,t,N,j,v,U,T,S,K;if(Ge.value="",wl.value=!0,Bl.value=!0,te("onButtonClick",e,a),e==="删除")ie.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,A;(x=Y.value)!=null&&x.find(D=>(D==null?void 0:D.id)===(a==null?void 0:a.id))?Y.value=(A=k.cloneDeep(Y.value))==null?void 0:A.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)):Y.value=na(k.cloneDeep(Y.value),a),en(_l.value,Ye.value,a==null?void 0:a.id),Te.setTableLoading(s==null?void 0:s.index),te("change",{content:Y.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:V.value})});else if(e==="批量删除"){if(((r=Fe.value)==null?void 0:r.length)===0)return k.ElMessage.warning("请先勾选操作的数据");ie.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,D;const x=(A=Fe.value)==null?void 0:A.map(f=>f.id);Y.value=(D=k.cloneDeep(Y.value))==null?void 0:D.filter(f=>!(x!=null&&x.includes(f.id))),Te.setTableLoading(s==null?void 0:s.index),te("change",{content:Y.value,singleContent:null,selectItems:Fe.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:V.value})})}else if(e==="复制新增"){$e.value="新增";const x=k.cloneDeep(a),A=(o=V.value)==null?void 0:o.find(h=>h==null?void 0:h.isMainKey),D=A||((i=V.value)==null?void 0:i[0]),f=(p=el.value)==null?void 0:p.find(h=>(h==null?void 0:h.label)==="新建");await ta(!0,f,{data:x,firstCol:D})}else if(e==="新增")$e.value="新增",yl(""),Qe.value=!0;else if(e==="编辑")$e.value="编辑",yl(a),Qe.value=!0;else if(e==="查看")$e.value="查看",yl(a),wl.value=!1,Bl.value=!1,Qe.value=!0;else if(e==="查看三维模型"){const x={};for(let D in a)D!=="id"&&(x[D]=a[D]);let A=(d=Object.values(x))==null?void 0:d[1];We.setTableShowThree(A)}else if(((g=n==null?void 0:n.extra)==null?void 0:g.type)==="modelExample")$e.value=e,Al.value=!0;else if(e==="新建"){let x=Ze.value,A=[];for(let y in x)y!=null&&y.includes(`loading${((m=ge.value)==null?void 0:m.account)||((t=ge.value)==null?void 0:t.账号)}`)&&(A=[...A,...y]);let D=[];for(let y in x)y!=null&&y.includes(`updateLoading${((N=ge.value)==null?void 0:N.account)||((j=ge.value)==null?void 0:j.账号)}`)&&(D=[...D,...y]);let f=A==null?void 0:A.map(y=>y==null?void 0:y.id);const h=D==null?void 0:D.map(y=>y==null?void 0:y.id);f=[...k.cloneDeep(f),...h],(f==null?void 0:f.length)>0&&(f!=null&&f.every(y=>y!==null&&y))&&await k.batchDeleteInsofDataApi({ids:f});const u=(v=el.value)==null?void 0:v.find(y=>(y==null?void 0:y.label)==="新建");await ta(!1,u)}else if(e==="修改模板"){let x=k.cloneDeep(W).value;Te.setRouteToChildPath(x),de.setActiveMenuPath(x+le)}else if(e==="执行")sr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((U=Fe.value)==null?void 0:U.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((T=Y.value)==null?void 0:T.length)===0)return k.ElMessage.warning("暂无数据导出");const x=(K=(S=V.value)==null?void 0:S.map(D=>D==null?void 0:D.label))==null?void 0:K.filter(D=>D!=="操作"),A=e==="导出全部"?k.cloneDeep(Y.value):k.cloneDeep(Fe.value);A==null||A.forEach(D=>{D==null||delete D.id}),ja(A,s==null?void 0:s.compName,x,s==null?void 0:s.compName)}else e==="迁移"?(De.selectRow=a,De.show=!0):e==="应用至流程"&&dr(a)},pr=async e=>{var n,r,o,i,p,d;const a=await k.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((n=a==null?void 0:a.data)==null?void 0:n.code)===200)return Array.isArray((r=a==null?void 0:a.data)==null?void 0:r.result)&&((i=(o=a==null?void 0:a.data)==null?void 0:o.result)==null?void 0:i.length)>0?(d=(p=a==null?void 0:a.data)==null?void 0:p.result)==null?void 0:d.map(g=>{var m;return{id:g==null?void 0:g.id,...(m=g==null?void 0:g.value)==null?void 0:m.pageData}}):[]},fr=async(e,a)=>{var n,r,o,i,p,d,g,m,t,N,j,v,U,T,S,K,x,A,D,f;try{let h,u;const y=(n=Ze.value[W.value+le])==null?void 0:n.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="structureMethod"}),z=(r=Ze.value[W.value+le])==null?void 0:r.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="structure"}),B=y==null?void 0:y.find(w=>{var M,F;return((F=(M=w==null?void 0:w.value)==null?void 0:M.pageData)==null?void 0:F.method)==="保存"});if(!B)return;const G=(d=(p=Ze.value[(i=(o=B==null?void 0:B.value)==null?void 0:o.pageData)==null?void 0:i.path])==null?void 0:p.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="data"}))==null?void 0:d.find(w=>{var M,F,I,R;return((F=(M=w==null?void 0:w.value)==null?void 0:M.tableData)==null?void 0:F.算法名称)===((R=(I=B==null?void 0:B.value)==null?void 0:I.pageData)==null?void 0:R.method)});if(!G)return;const re={buttonName:(m=(g=B==null?void 0:B.value)==null?void 0:g.pageData)==null?void 0:m.method,api:(N=(t=G==null?void 0:G.value)==null?void 0:t.tableData)==null?void 0:N.算法体,content:z==null?void 0:z.map(w=>{var M;return(M=w==null?void 0:w.value)==null?void 0:M.pageData}),extraContent:[],extraValues:(v=(j=B==null?void 0:B.value)==null?void 0:j.pageData)==null?void 0:v.data,methodName:(T=(U=B==null?void 0:B.value)==null?void 0:U.pageData)==null?void 0:T.path};if(!e)return;const X={...e,compData:(S=e==null?void 0:e.compData)==null?void 0:S.map(w=>{var M;return(w==null?void 0:w.key)==="formContent"?{...w,contents:(M=w==null?void 0:w.contents)==null?void 0:M.map(F=>(F==null?void 0:F.prop)===a?{...F,value:""}:F)}:w})},q={key:{pageKey:W.value+le,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:X}},H=await k.axios.post(re.api,q,{headers:{"Content-Type":"application/json"}});return((K=H==null?void 0:H.data)==null?void 0:K.code)===200&&(h=(A=(x=H==null?void 0:H.data)==null?void 0:x.result)==null?void 0:A.latestReportCode,u=(f=(D=H==null?void 0:H.data)==null?void 0:D.result)==null?void 0:f.status),{newMainKeyValue:h,newStatus:u}}catch(h){throw k.ElMessage.error(h),new Error(h)}},oa=(e,a,n,r)=>{var o;te("contentChange",{contents:(o=e==null?void 0:e.compData)==null?void 0:o.map(i=>{var p;return(i==null?void 0:i.key)==="formContent"?{...i,contents:(p=i==null?void 0:i.contents)==null?void 0:p.map(d=>(d==null?void 0:d.key)===a?{...d,value:n}:hl.value&&(d==null?void 0:d.prop)===hl.prop?{...d,value:hl.value}:d)}:i}),index:e==null?void 0:e.id},r)},hl=l.reactive({prop:"状态",value:""}),gr=l.ref(["系统自动生成信息","审批意见"]),hr=async(e,a,n)=>{var g,m;let r=e==null?void 0:e[a==null?void 0:a.prop],o=1,i,p;const d=k.cloneDeep(W).value+le+r;if(d){hl.value="",i=(g=Ze.value[d])==null?void 0:g.filter(j=>{var v;return((v=j==null?void 0:j.key)==null?void 0:v.type)==="structure"});const t=i==null?void 0:i.find(j=>{var v,U,T;return((T=(U=(v=j==null?void 0:j.value)==null?void 0:v.pageData)==null?void 0:U.comp)==null?void 0:T.toUpperCase())==="FORM"});p={...(m=t==null?void 0:t.value)==null?void 0:m.pageData,id:t==null?void 0:t.id};const N=await fr(p,a==null?void 0:a.prop);if(hl.value=N==null?void 0:N.newStatus,N!=null&&N.newMainKeyValue)return N==null?void 0:N.newMainKeyValue}if(Y.value.some(t=>(t==null?void 0:t[a==null?void 0:a.prop])===r)){const t=r;for(;Y.value.some(N=>(N==null?void 0:N[a==null?void 0:a.prop])===`${t}(${o})`);)o++;r=`${t}(${o})`}return r},ta=async(e,a,n)=>{var p,d,g,m,t,N,j,v;let r,o;const i=await hr(n==null?void 0:n.data,n==null?void 0:n.firstCol);if(e?(r=k.cloneDeep(W).value+le+((m=n==null?void 0:n.data)==null?void 0:m[(g=n==null?void 0:n.firstCol)==null?void 0:g.prop]),o=k.cloneDeep(W).value+le+i):(r=k.cloneDeep(W).value+le,o=k.cloneDeep(r)+`loading${((p=ge.value)==null?void 0:p.account)||((d=ge.value)==null?void 0:d.账号)}`),a){const U=(N=(t=Ze.value[o])==null?void 0:t.filter(T=>{var S;return((S=T==null?void 0:T.key)==null?void 0:S.parentTable)===""}))==null?void 0:N.map(T=>{var S;return{id:T==null?void 0:T.id,...(S=T==null?void 0:T.value)==null?void 0:S.pageData}});if((U==null?void 0:U.length)>0)if(e){const T=U==null?void 0:U.find(S=>{var K;return((K=S==null?void 0:S.comp)==null?void 0:K.toUpperCase())==="FORM"});T&&oa(T,(j=n==null?void 0:n.firstCol)==null?void 0:j.label,i,W.value)}else Te.setRouteToChildPath(k.cloneDeep(W).value),de.setActiveMenuPath(o);else if(await ie.loadingConstruct(r,o,null,null,e?gr.value:null),e){const T=await pr(o);if((T==null?void 0:T.length)>0){const S=T==null?void 0:T.find(K=>{var x;return((x=K==null?void 0:K.comp)==null?void 0:x.toUpperCase())==="FORM"});S&&oa(S,(v=n==null?void 0:n.firstCol)==null?void 0:v.label,i,W.value)}}else Te.setRouteToChildPath(k.cloneDeep(W).value),de.setActiveMenuPath(o)}else e?(Ge.value="",Be.value=n==null?void 0:n.data,vl(!0,n==null?void 0:n.firstCol,i)):(Te.setRouteToChildPath(k.cloneDeep(W).value),de.setActiveMenuPath(o))},yr=()=>{qe.value=!1,cl.value=[],Le.value=!1},yl=e=>{var o,i,p,d,g,m;const a=[];let n=[];for(let t in e)Array.isArray(e==null?void 0:e[t])&&n.push(t);Ee.value=k.cloneDeep(V.value),(i=ie.getColumnChild((o=k.cloneDeep(V.value))==null?void 0:o.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||i.forEach((t,N)=>{var j;n.find(v=>v===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((j=t==null?void 0:t.formType)==null?void 0:j.toUpperCase())==="SELECT"?a.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",name:(t==null?void 0:t.prop)??"t"+N,prop:t==null?void 0:t.prop,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??N,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled,optionUrl:{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.formMenuSelect,type:"Select",selectRelateType:t==null?void 0:t.selectRelateType}}):a.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",prop:t==null?void 0:t.prop,name:(t==null?void 0:t.prop)??"t"+N,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??N,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled}))}),e===""||!e||(Ge.value=(e==null?void 0:e.id)??"");let r=ie.getColumnChild((p=k.cloneDeep(V.value))==null?void 0:p.filter(t=>(t==null?void 0:t.label)!=="操作"));Ve.value&&((d=Ve.value)==null?void 0:d.length)>0&&(Ve.value=(g=k.cloneDeep(Ve).value)==null?void 0:g.map(t=>{var j;let N=(t==null?void 0:t.prop)||((j=r==null?void 0:r.find(v=>(v==null?void 0:v.label)===(t==null?void 0:t.label)))==null?void 0:j.prop);return N&&(t.value=e[N]),t})),Xe.value=Ve.value&&((m=Ve.value)==null?void 0:m.length)>0?ie.getTableFormToForm(Ve.value):a},vr=()=>{var a;const e=(a=L.value)==null?void 0:a.$el;e&&Hl.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:n=>{var p;const{oldIndex:r,newIndex:o}=n;if(r===o)return;const i=pl.value.splice(r,1)[0];pl.value.splice(o,0,i),V.value=(p=V.value)==null?void 0:p.slice().sort((d,g)=>{if(d.label==="操作")return 1;if(g.label==="操作")return-1;const m=pl.value.findIndex(N=>N.label===d.label),t=pl.value.findIndex(N=>N.label===g.label);return m-t})}})};l.onMounted(()=>{Pl.value=window.innerWidth-240*2});const br=()=>{l.nextTick(()=>{vr()})},Jl=(e,a)=>{var r;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let n;return e.children=(r=e.children)==null?void 0:r.map(o=>{var i,p;if((o==null?void 0:o.id)===Ge.value){let d={};for(let g in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===g))==null?void 0:i.label;m?d[g]=(p=Be.value)==null?void 0:p[m]:d[g]=o[g]}o=Object.assign(d,Be.value),n=o}else{let d=Jl(o,a);o=d==null?void 0:d.contents,n=d==null?void 0:d.currentSelectContents}return o}),{contents:e,currentSelectContents:n}},sa=(e,a)=>{let n,r;return e!=null&&e.find(o=>(o==null?void 0:o.id)===Ge.value)?n=e==null?void 0:e.map(o=>{var i,p;if((o==null?void 0:o.id)===Ge.value){let d={};for(let g in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===g))==null?void 0:i.label;m?d[g]=(p=Be.value)==null?void 0:p[m]:d[g]=o[g]}o=Object.assign(d,Be.value),r=o}return o}):n=e==null?void 0:e.map(o=>{var i,p,d,g;if((o==null?void 0:o.id)===Ge.value){let m={};for(let t in o){let N=(i=a==null?void 0:a.find(j=>(j==null?void 0:j.prop)===t))==null?void 0:i.label;N?m[t]=(p=Be.value)==null?void 0:p[N]:m[t]=o[t]}o=Object.assign(m,Be.value),r=o}else o=(d=Jl(o,a))==null?void 0:d.contents,r=(g=Jl(o,a))==null?void 0:g.currentSelectContents;return o}),{newContents:n,currentSelectContents:r}},ia=(e,a,n)=>{var r,o;return e[a==null?void 0:a.prop]=n,typeof e.id=="number"&&(e.id=(r=e.id)==null?void 0:r.toString()),e.children&&((o=e.children)==null?void 0:o.length)>0&&(e.children=e.children.map(ia)),e},Wl=e=>{var n;const a=[];return a.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((n=e.children)==null||n.forEach(r=>{a.push(...Wl(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const o={...r};return delete o.children,o}):[]},vl=(e=!0,a,n)=>{var m,t,N,j,v,U,T,S,K;let r=ie.getColumnChild((m=k.cloneDeep(V.value))==null?void 0:m.filter(x=>(x==null?void 0:x.label)!=="操作")),o,i=k.cloneDeep(Y.value);if(!Be.value){Qe.value=!1;return}if(Ge.value===""){nl.value++;let x;a&&n?x={id:nl.value.toString(),[a==null?void 0:a.prop]:n,children:Be.value.children}:x={id:nl.value.toString()},x!=null&&x.children&&(x={...x,children:(t=x.children)==null?void 0:t.map(A=>ia(A,a,n))}),i.push(Object.assign(Be.value,x)),o=Object.assign(Be.value,x)}else i=(N=sa(i,r))==null?void 0:N.newContents,o=(j=sa(i,r))==null?void 0:j.currentSelectContents;const p=(v=s.itemData)==null?void 0:v.filter(x=>(x==null?void 0:x.key)==="childTree")[0];if(((U=p==null?void 0:p.contents)==null?void 0:U.length)>0){$e.value="编辑";const x=[];i==null||i.forEach((A,D)=>{var h;let f={};if(Array.isArray(A)){let u=[];A==null||A.filter(y=>!(y!=null&&y.id)).forEach((y,z)=>{var B,G,re,X,q,H,w;if((G=(B=Pe.value)==null?void 0:B[z])!=null&&G.prop&&!Array.isArray(y)){let M={};M[Pe.value[z].column]=y,be!=null&&be.value&&((re=be==null?void 0:be.value)==null?void 0:re.length)>0&&((X=be==null?void 0:be.value)!=null&&X.find(F=>JSON.stringify(F==null?void 0:F[0])===JSON.stringify(M)))&&(u=(q=be==null?void 0:be.value)==null?void 0:q.find(F=>JSON.stringify(F==null?void 0:F[0])===JSON.stringify(M))),u&&u.length>0?f[Pe.value[z].prop]=u!=null&&u.find(F=>{var I;return((I=Object.keys(F))==null?void 0:I[0])===Pe.value[z].column})?(H=u==null?void 0:u.find(F=>{var I;return((I=Object.keys(F))==null?void 0:I[0])===Pe.value[z].column}))==null?void 0:H[Pe.value[z].column]:y:f[Pe.value[z].prop]=y}else Array.isArray(y)&&((w=Pe.value[z])!=null&&w.prop?f[Pe.value[z].prop]=y:f.children=Xl(y,Pe.value))})}else f=A;Array.isArray(A)&&A.some(u=>u==null?void 0:u.id)?x.push(Object.assign(f,{id:(h=A==null?void 0:A.find(u=>u.id))==null?void 0:h.id})):f.id?x.push(f):x.push(Object.assign(f,{id:D.toString()}))}),Y.value=fa(x,p,V.value)}else Y.value=i;da(Y.value),_l.value=Y.value;const d=an(_l.value,Ye.value,i);let g=[];if(il.value?(g=(T=k.cloneDeep(il).value.singleContent)==null?void 0:T.filter(x=>(x==null?void 0:x.id)!==(o==null?void 0:o.id)),g.push(o)):g=[o],Ke.value){const x={content:d,singleContent:((S=p==null?void 0:p.contents)==null?void 0:S.length)>0?g==null?void 0:g.flatMap(Wl):g,index:s==null?void 0:s.index,buttonName:"编辑",column:V.value,parentTableId:s==null?void 0:s.parentTableId};Te.setCacheUpdatingData(x)}if(e){const x={content:d,singleContent:((K=p==null?void 0:p.contents)==null?void 0:K.length)>0?Wl(o):o,index:s==null?void 0:s.index,buttonName:$e.value,column:V.value,parentTableId:s==null?void 0:s.parentTableId};Te.setTableLoading(s==null?void 0:s.index),Qe.value=!1,Be.value=void 0,te("change",x)}};l.onUnmounted(()=>{V.value=[],Y.value=[],Ee.value=[],Je.value=[],Ve.value=[],Ie.value=[],cl.value=[],ol.value=[],Xe.value=[],Fe.value=[],L.value=null});const ua=async(e,a,n)=>{var m,t,N,j,v,U,T,S,K,x,A;al.value=n==null?void 0:n.prop;const r=k.cloneDeep(s.itemData),o=r==null?void 0:r.map(D=>{var f;return(D==null?void 0:D.key)==="header"&&((f=D.contents)==null||f.map((h,u)=>{var y,z,B,G,re,X,q,H,w,M,F,I,R,c,P,_,ne,ve,ce;return h.type=h!=null&&h.type?h.type:(G=(B=(z=(y=h==null?void 0:h.key)==null?void 0:y.split("$"))==null?void 0:z[1])==null?void 0:B.split("("))!=null&&G[0]?(X=(re=ie.FormType)==null?void 0:re.find(E=>{var b,se,ue,pe;return(E==null?void 0:E.key)===((pe=(ue=(se=(b=h==null?void 0:h.key)==null?void 0:b.split("$"))==null?void 0:se[1])==null?void 0:ue.split("("))==null?void 0:pe[0])}))==null?void 0:X.value:"Input",h.options=h!=null&&h.options?h.options:((w=(H=(q=h==null?void 0:h.key)==null?void 0:q.split("$"))==null?void 0:H[1])==null?void 0:w.length)>0?(R=(I=Ql((F=(M=h==null?void 0:h.key)==null?void 0:M.split("$"))==null?void 0:F[1]))==null?void 0:I.split(","))==null?void 0:R.map(E=>({label:E,value:E})):[],(c=h==null?void 0:h.key)!=null&&c.includes("$")&&(h.key=(_=(P=h==null?void 0:h.key)==null?void 0:P.split("$"))==null?void 0:_[0]),h.value=(ne=Object.values(a))==null?void 0:ne[u],h.optionUrl=h!=null&&h.formMenuSelect&&((ve=h==null?void 0:h.formMenuSelect)==null?void 0:ve.length)>0?{groupSelect:(ce=h==null?void 0:h.groupSelect)==null?void 0:ce.split(/[::]/).map(E=>E.trim()),menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":"")}:null,h})),D});let i=k.cloneDeep(Xe.value),p=(t=(m=k.cloneDeep(o))==null?void 0:m.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:t.contents;i=i==null?void 0:i.map(D=>{var f;return D.value=(f=p==null?void 0:p.find((h,u)=>u===(D==null?void 0:D.id)))==null?void 0:f.value,D});let d="",g=(v=(j=(N=k.cloneDeep(o))==null?void 0:N.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:j.contents)==null?void 0:v.find((D,f)=>{var h,u,y;return(D==null?void 0:D.label)===al.value||(f==null?void 0:f.toString())===((y=(u=(h=al.value)==null?void 0:h.split("a"))==null?void 0:u[1])==null?void 0:y.toString())});if((S=(T=(U=k.cloneDeep(o))==null?void 0:U.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:T.contents)==null||S.forEach(D=>{var f,h,u,y,z;d===""&&((u=(h=(f=D==null?void 0:D.optionUrl)==null?void 0:f.groupSelect)==null?void 0:h[1])!=null&&u.includes("["))&&(d=(z=(y=D==null?void 0:D.optionUrl)==null?void 0:y.groupSelect)==null?void 0:z[1])}),(K=g==null?void 0:g.optionUrl)!=null&&K.menuSelect){let D=await Yl(g),f;if(D==null||D.forEach(h=>{var u,y,z,B,G,re,X,q,H,w;d===((y=(u=g==null?void 0:g.optionUrl)==null?void 0:u.groupSelect)==null?void 0:y[1])&&((G=(B=(z=g==null?void 0:g.optionUrl)==null?void 0:z.groupSelect)==null?void 0:B[1])!=null&&G.includes("["))&&((w=k.cloneDeep(h))==null?void 0:w[(H=(q=(X=(re=g==null?void 0:g.optionUrl)==null?void 0:re.groupSelect)==null?void 0:X[1])==null?void 0:q.replaceAll("[",""))==null?void 0:H.replaceAll("]","")])===(g==null?void 0:g.value)&&(f=h)}),f){let h=k.cloneDeep(i);h=h==null?void 0:h.map(y=>{var z,B,G,re,X,q,H,w,M,F,I;return(f!=null&&f[y==null?void 0:y.label]||f!=null&&f[(re=(G=(B=(z=y==null?void 0:y.optionUrl)==null?void 0:z.groupSelect)==null?void 0:B[1])==null?void 0:G.replaceAll("[",""))==null?void 0:re.replaceAll("]","")])&&((H=(q=(X=y==null?void 0:y.optionUrl)==null?void 0:X.groupSelect)==null?void 0:q[1])!=null&&H.includes("["))&&(y.value=(f==null?void 0:f[y==null?void 0:y.label])||(f==null?void 0:f[(I=(F=(M=(w=y==null?void 0:y.optionUrl)==null?void 0:w.groupSelect)==null?void 0:M[1])==null?void 0:F.replaceAll("[",""))==null?void 0:I.replaceAll("]","")])),y}),Y.value=(x=k.cloneDeep(Y.value))==null?void 0:x.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const z={};return h==null||h.forEach(B=>{z[B.name]=B.value}),z.id=y==null?void 0:y.id,z}return y});let u=k.cloneDeep(h);u=u==null?void 0:u.map(y=>{var z,B,G,re;return(B=(z=y==null?void 0:y.optionUrl)==null?void 0:z.menuSelect)!=null&&B.some(X=>X==null?void 0:X.includes)&&(y.optionUrl.menuSelect=(re=(G=y==null?void 0:y.optionUrl)==null?void 0:G.menuSelect)==null?void 0:re.map(X=>{var q,H,w,M;if(X!=null&&X.includes("[")){let F=(H=(q=X==null?void 0:X.replaceAll("[","").replaceAll("]",""))==null?void 0:q.split(":"))==null?void 0:H[1];X=(M=(w=k.cloneDeep(h))==null?void 0:w.find(I=>(I==null?void 0:I.label)===F))==null?void 0:M.value}return X})),y}),Y.value=(A=k.cloneDeep(Y.value))==null?void 0:A.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const z={};return u==null||u.forEach(B=>{z[B.name]=B.value}),z.id=y==null?void 0:y.id,z}return y})}}},mr=async e=>{var m,t,N,j,v,U,T,S,K,x,A,D;if(!e)return;Be.value=e;const a=k.cloneDeep(s.itemData);let n=a==null?void 0:a.map(f=>{var h;return(f==null?void 0:f.key)==="header"&&((h=f.contents)==null||h.map((u,y)=>{var z,B,G,re,X,q,H,w,M,F,I,R,c,P,_,ne,ve,ce,E;return u.type=u!=null&&u.type?u.type:(re=(G=(B=(z=u==null?void 0:u.key)==null?void 0:z.split("$"))==null?void 0:B[1])==null?void 0:G.split("("))!=null&&re[0]?(q=(X=ie.FormType)==null?void 0:X.find(b=>{var se,ue,pe,Ce;return(b==null?void 0:b.key)===((Ce=(pe=(ue=(se=u==null?void 0:u.key)==null?void 0:se.split("$"))==null?void 0:ue[1])==null?void 0:pe.split("("))==null?void 0:Ce[0])}))==null?void 0:q.value:"Input",u.options=u!=null&&u.options?u.options:((M=(w=(H=u==null?void 0:u.key)==null?void 0:H.split("$"))==null?void 0:w[1])==null?void 0:M.length)>0?(c=(R=Ql((I=(F=u==null?void 0:u.key)==null?void 0:F.split("$"))==null?void 0:I[1]))==null?void 0:R.split(","))==null?void 0:c.map(b=>({label:b,value:b})):[],(P=u==null?void 0:u.key)!=null&&P.includes("$")&&(u.key=(ne=(_=u==null?void 0:u.key)==null?void 0:_.split("$"))==null?void 0:ne[0]),u.value=(ve=Object.values(e))==null?void 0:ve[y],u.optionUrl=u!=null&&u.formMenuSelect&&((ce=u==null?void 0:u.formMenuSelect)==null?void 0:ce.length)>0?{groupSelect:(E=u==null?void 0:u.groupSelect)==null?void 0:E.split(/[::]/).map(b=>b.trim()),menuSelect:u==null?void 0:u.formMenuSelect,selectRelateType:"",type:(u==null?void 0:u.formType)??(u!=null&&u.groupSelect?"Select":"")}:null,u})),f}),r=Xe.value,o=(t=(m=k.cloneDeep(n))==null?void 0:m.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:t.contents;if(r=r==null?void 0:r.map(f=>{var h;return f.value=(h=o==null?void 0:o.find((u,y)=>(u==null?void 0:u.prop)===(f==null?void 0:f.name)))==null?void 0:h.value,f}),!dl.value)return;let i="",p=(v=(j=(N=k.cloneDeep(n))==null?void 0:N.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:j.contents)==null?void 0:v.find((f,h)=>{var u,y,z;return(f==null?void 0:f.label)===al.value||(h==null?void 0:h.toString())===((z=(y=(u=al.value)==null?void 0:u.split("a"))==null?void 0:y[1])==null?void 0:z.toString())}),d=(U=p==null?void 0:p.optionUrl)==null?void 0:U.menuSelect,g=!0;if((K=(S=(T=k.cloneDeep(n))==null?void 0:T.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:S.contents)==null||K.forEach(f=>{var h,u,y,z,B,G;g&&((y=(u=(h=f==null?void 0:f.optionUrl)==null?void 0:h.groupSelect)==null?void 0:u[1])!=null&&y.includes("["))&&(i=(B=(z=f==null?void 0:f.optionUrl)==null?void 0:z.groupSelect)==null?void 0:B[1],JSON.stringify(d)===JSON.stringify((G=f==null?void 0:f.optionUrl)==null?void 0:G.menuSelect)&&(g=!1))}),(x=p==null?void 0:p.optionUrl)!=null&&x.menuSelect&&dl.value){let f=await Yl(p),h;if((A=p==null?void 0:p.optionUrl)==null||A.menuSelect,f==null||f.forEach(u=>{var y,z,B,G,re,X,q,H,w,M;i===((z=(y=p==null?void 0:p.optionUrl)==null?void 0:y.groupSelect)==null?void 0:z[1])&&((re=(G=(B=p==null?void 0:p.optionUrl)==null?void 0:B.groupSelect)==null?void 0:G[1])!=null&&re.includes("["))&&((M=k.cloneDeep(u))==null?void 0:M[(w=(H=(q=(X=p==null?void 0:p.optionUrl)==null?void 0:X.groupSelect)==null?void 0:q[1])==null?void 0:H.replaceAll("[",""))==null?void 0:w.replaceAll("]","")])===(p==null?void 0:p.value)&&(h=u)}),h){let u=k.cloneDeep(r);u=u==null?void 0:u.map(B=>{var G,re,X,q,H,w,M,F,I,R,c;return(h!=null&&h[B==null?void 0:B.label]||h!=null&&h[(q=(X=(re=(G=B==null?void 0:B.optionUrl)==null?void 0:G.groupSelect)==null?void 0:re[1])==null?void 0:X.replaceAll("[",""))==null?void 0:q.replaceAll("]","")])&&((M=(w=(H=B==null?void 0:B.optionUrl)==null?void 0:H.groupSelect)==null?void 0:w[1])!=null&&M.includes("["))&&(B.value=(h==null?void 0:h[B==null?void 0:B.label])||(h==null?void 0:h[(c=(R=(I=(F=B==null?void 0:B.optionUrl)==null?void 0:F.groupSelect)==null?void 0:I[1])==null?void 0:R.replaceAll("[",""))==null?void 0:c.replaceAll("]","")])),B}),Xe.value=k.cloneDeep(u);let y=k.cloneDeep(u);y=y==null?void 0:y.map(B=>{var G,re,X,q,H,w;return(re=(G=B==null?void 0:B.optionUrl)==null?void 0:G.menuSelect)!=null&&re.some(M=>M==null?void 0:M.includes("["))&&(B.optionUrl.oldMenuSelect=(q=(X=k.cloneDeep(B))==null?void 0:X.optionUrl)==null?void 0:q.menuSelect,B.optionUrl.menuSelect=(w=(H=B==null?void 0:B.optionUrl)==null?void 0:H.menuSelect)==null?void 0:w.map(M=>{var F,I,R,c;if(M!=null&&M.includes("[")){let P=(I=(F=M==null?void 0:M.replaceAll("[","").replaceAll("]",""))==null?void 0:F.split(":"))==null?void 0:I[1];M=(c=(R=k.cloneDeep(u))==null?void 0:R.find(_=>(_==null?void 0:_.label)===P))==null?void 0:c.value}return M})),B}),Xe.value=y;let z={};(D=Xe.value)==null||D.forEach(B=>{z[B.prop]=B==null?void 0:B.value}),Be.value=z}}dl.value=!1},kr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",Sr=e=>{var i,p;const a=(p=(i=Ve.value)==null?void 0:i.find(d=>(d==null?void 0:d.label)===(e==null?void 0:e.label)))==null?void 0:p.multiple,n=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;Y.value.forEach(d=>{const g=d==null?void 0:d[n];a&&va.isString(g)&&(d[n]=[g]),!a&&!va.isString(g)&&(d[n]="")})},ca=(e,a)=>{var n;return a==null||a.forEach(r=>{e[r==null?void 0:r.prop]=r==null?void 0:r.value}),e.children&&((n=e.children)==null?void 0:n.length)>0&&(e.children=e.children.map(r=>ca(r,a))),e},Gl=e=>{var n,r,o,i,p,d;yl("");const a=(n=Xe.value)==null?void 0:n.reduce((g,m)=>(g[m.name]=m.value,g),{});if(((r=Object.keys(a))==null?void 0:r.length)>0){Be.value=a,Ge.value="",nl.value=(o=Y.value)==null?void 0:o.length,ol.value=(i=el.value)==null?void 0:i.filter(m=>(m==null?void 0:m.label)!=="新增");const g=(d=(p=Ee.value)==null?void 0:p.filter(m=>(m==null?void 0:m.label)!=="操作"))==null?void 0:d.map(m=>{var N,j,v;const t=(j=(N=Ve.value)==null?void 0:N.find(U=>(U==null?void 0:U.label)===(m==null?void 0:m.label)))==null?void 0:j.multiple;return Sr(m),{...m,contents:(m==null?void 0:m.options)??[],optionUrl:m!=null&&m.formMenuSelect&&((v=m==null?void 0:m.formMenuSelect)==null?void 0:v.length)>0?{groupSelect:m==null?void 0:m.groupSelect,menuSelect:m==null?void 0:m.formMenuSelect,selectRelateType:"",type:m==null?void 0:m.formType,multiple:t}:null}});V.value=g==null?void 0:g.map(m=>ca(m,[{prop:"type",value:"edit"},{prop:"columnType",value:kr(m==null?void 0:m.formType)||(m==null?void 0:m.columnType)}])),e==="createClick"&&vl(!1)}},tl={START:"开始时间",END:"结束时间",HOURS:"工时"},Cr=(e,a)=>Number(Hl.dayjs(a).diff(Hl.dayjs(e),"day",!0).toFixed(1)),da=e=>{var i;const a=s.itemData,n=(i=a==null?void 0:a.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:i.contents,r=new Map;return n==null||n.forEach((p,d)=>{const{label:g}=p;r.set(g,d)}),!r.has(tl.START)||!r.has(tl.END)||!r.has(tl.HOURS)?e:e==null?void 0:e.map(p=>{const d=p==null?void 0:p[tl.START],g=p==null?void 0:p[tl.END],m=Cr(d,g);return d&&g&&(p[tl.HOURS]=`${m}天`),p})},pa=(e,a,n=0)=>{if(n>((a==null?void 0:a.length)??""))return e;const r=a==null?void 0:a[n],o=new Map;for(const p of e){const d=p[r];o.has(d)||o.set(d,[]),o.get(d)&&o.get(d).push(p)}const i=[];for(const[p,d]of o){const[g,...m]=d,t={...g};n+1===((a==null?void 0:a.length)??"")?t.children=d==null?void 0:d.map(N=>(N.level=k.cloneDeep(n)+1,N)).filter((N,j)=>j!==0):m.length>0&&(t.children=pa(m,a,n+1)),t.level=n,i.push(t)}return i},fa=(e,a,n)=>{var o;if(!(a!=null&&a.contents)||((o=a==null?void 0:a.contents)==null?void 0:o.length)===0)return e;let r=[];return r=pa(e,a==null?void 0:a.contents,0),r},ga=(e,a)=>{var j,v,U,T,S,K,x,A,D,f,h,u,y,z,B,G,re,X,q,H,w,M,F,I,R;const n=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="header");e==null||e.filter(c=>(c==null?void 0:c.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="childTree")[0];let o=a;const i=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="page"),p=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="rowButton"),d=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="extraButton"),g=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableContents"),m=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableIndex");Ve.value=(v=(j=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableToForm"))==null?void 0:j[0])==null?void 0:v.contents,Zl.value=(i==null?void 0:i.contents)??!0;let t=[];ll.value===""?t=n==null?void 0:n[0]:t=(n==null?void 0:n.find(c=>(c==null?void 0:c.selectLabel)==="("+ll.value+")"))??(n==null?void 0:n.find(c=>!(c!=null&&c.selectLabel)));let N=[];if(ll.value===""?N=m==null?void 0:m[0]:N=(m==null?void 0:m.find(c=>(c==null?void 0:c.selectLabel)==="("+ll.value+")"))??(m==null?void 0:m.find(c=>!(c!=null&&c.selectLabel))),((U=t==null?void 0:t.contents)==null?void 0:U.length)>0){let c=[];if(t!=null&&t.contents.some(E=>Array.isArray(E)&&(E==null?void 0:E.find(b=>b.children))))Ye.value===""?c=(S=(T=ie.getGradeColumns(t==null?void 0:t.contents))==null?void 0:T[0])==null?void 0:S.filter(E=>!Array.isArray(E)):(Ye.value.split("-"),c=(K=ie.getGradeColumns(t==null?void 0:t.contents))==null?void 0:K[0]);else{let E=t!=null&&t.contents.some(b=>Array.isArray(b))?(x=t==null?void 0:t.contents)==null?void 0:x[0]:t==null?void 0:t.contents;E==null||E.forEach((b,se)=>{var Ce,Se,bl,ml;let ue="";(Se=(Ce=W.value)==null?void 0:Ce.split("/"))==null||Se.forEach(ze=>{var kl,Sl,Cl;if(ze!==""){let sl=(Cl=(Sl=(kl=ze==null?void 0:ze.split(le+"updateLoading"))==null?void 0:kl[0])==null?void 0:Sl.split(le+"loading"))==null?void 0:Cl[0];ue=ue===""?ue+sl:ue+"/"+sl}}),ue=ue+le+(b==null?void 0:b.directiveLabel);const pe=(bl=Ve.value)==null?void 0:bl.find(ze=>(ze==null?void 0:ze.prop)===(b==null?void 0:b.prop));c.push({label:(b==null?void 0:b.label)??"",prop:(b==null?void 0:b.label)==="操作"?"operate":(b==null?void 0:b.prop)??"a"+se,width:b!=null&&b.width?parseInt(b.width):"",fixed:(b==null?void 0:b.fixed)??void 0,sortable:(b==null?void 0:b.sortable)??!1,filterable:(b==null?void 0:b.filterable)??!1,operable:(b==null?void 0:b.operable)??!1,showSummary:(b==null?void 0:b.showSummary)??!1,align:(b==null?void 0:b.align)??"left",showOverflowTooltip:(b==null?void 0:b.showOverflowTooltip)??!0,isNotDrag:(b==null?void 0:b.isNotDrag)??!1,isEditCol:(b==null?void 0:b.isEditCol)??!1,isOperate:(b==null?void 0:b.isOperate)??!1,id:(b==null?void 0:b.id)??se,type:(b==null?void 0:b.label)==="操作"?"operate":void 0,formType:(b==null?void 0:b.formType)??(b!=null&&b.groupSelect?"Select":""),isTableColHidden:b==null?void 0:b.isTableColHidden,isFormColHidden:b==null?void 0:b.isFormColHidden,disabled:b==null?void 0:b.disabled,options:(b==null?void 0:b.options)??[],value:(b==null?void 0:b.value)??"",formMenuSelect:(b==null?void 0:b.formMenuSelect)??[],isRoute:(b==null?void 0:b.isRoute)??!1,groupSelect:b!=null&&b.groupSelect?(ml=b==null?void 0:b.groupSelect)==null?void 0:ml.replaceAll('"',"").split(":"):[],isMainKey:(b==null?void 0:b.isMainKey)||(b==null?void 0:b.directiveLabel)&&!o[ue],columnType:(pe==null?void 0:pe.type)||(b==null?void 0:b.columnType)||"TEXTAREA",directiveLabel:b==null?void 0:b.directiveLabel,isExistChild:!!(b!=null&&b.directiveLabel&&o[ue]),childPath:ue})})}V.value=ie.getNewColumnChild(c),Je.value=ie.getNewColumnChild(c),Q.value=(A=V.value)==null?void 0:A.map(E=>E==null?void 0:E.label),Oe.value=(D=V.value)==null?void 0:D.every(E=>E==null?void 0:E.filterable),fe.value=(f=V.value)==null?void 0:f.every(E=>E==null?void 0:E.operable),Ue.value=(h=V.value)==null?void 0:h.every(E=>E==null?void 0:E.sortable);let P=(y=(u=ie.getAllLeafNodes(V.value))==null?void 0:u.filter(E=>(E==null?void 0:E.type)!=="operate"))==null?void 0:y.map((E,b)=>({prop:(E==null?void 0:E.prop)??"a"+b,column:E.label}));Pe.value=P;let _=[];ll.value===""?_=g==null?void 0:g[0]:_=(g==null?void 0:g.find(E=>(E==null?void 0:E.selectLabel)==="("+ll.value+")"))??(g==null?void 0:g.find(E=>!(E!=null&&E.selectLabel)));let ne=Array.isArray((z=_==null?void 0:_.contents)==null?void 0:z[0])&&((B=_==null?void 0:_.contents)!=null&&B[0].every(E=>Array.isArray(E)))?(G=_==null?void 0:_.contents)==null?void 0:G[0]:_==null?void 0:_.contents;N!=null&&N.contents&&((re=N==null?void 0:N.contents)==null?void 0:re.length)!==0&&(ne=(X=k.cloneDeep(ne))==null?void 0:X.map((E,b)=>{if(!Array.isArray(E)){let se={};for(let ue in E)ue!=="id"&&ue!=="index"&&(se[ue]=E[ue]);E=Object.values(se)}return E}));const ve=!!((q=V.value)!=null&&q.find(E=>E.prop==="index"));ne=Sa(ne,N==null?void 0:N.contents,ve);const ce=[];ne==null||ne.forEach((E,b)=>{var ue;let se={};if(Array.isArray(E)){let pe=[];E==null||E.filter(Ce=>!(Ce!=null&&Ce.id)).forEach((Ce,Se)=>{var bl,ml,ze,kl,Sl,Cl;if((bl=P==null?void 0:P[Se])!=null&&bl.prop&&!Array.isArray(Ce)){let sl={};sl[P[Se].column]=Ce,be!=null&&be.value&&((ml=be==null?void 0:be.value)==null?void 0:ml.length)>0&&((ze=be==null?void 0:be.value)!=null&&ze.find(Re=>JSON.stringify(Re==null?void 0:Re[0])===JSON.stringify(sl)))&&(pe=(kl=be==null?void 0:be.value)==null?void 0:kl.find(Re=>JSON.stringify(Re==null?void 0:Re[0])===JSON.stringify(sl))),pe&&pe.length>0?se[P[Se].prop]=pe!=null&&pe.find(Re=>{var Dl;return((Dl=Object.keys(Re))==null?void 0:Dl[0])===P[Se].column})?(Sl=pe==null?void 0:pe.find(Re=>{var Dl;return((Dl=Object.keys(Re))==null?void 0:Dl[0])===P[Se].column}))==null?void 0:Sl[P[Se].column]:Ce:se[P[Se].prop]=Ce}else Array.isArray(Ce)&&((Cl=P[Se])!=null&&Cl.prop?se[P[Se].prop]=Ce:se.children=Xl(Ce,P))})}else se=E;Array.isArray(E)&&E.some(pe=>pe==null?void 0:pe.id)?ce.push(Object.assign(se,{id:(ue=E==null?void 0:E.find(pe=>pe.id))==null?void 0:ue.id})):se.id?ce.push(se):ce.push(Object.assign(se,{id:b.toString()}))}),Y.value=fa(ce,r,V.value),El.value=ce,(H=El.value)==null||H.forEach(E=>{var b;(b=Nl.value)==null||b.set(E.id,E)})}else V.value=[],Ee.value=[],Y.value=[],El.value=[],Nl.value=new Map;((w=p==null?void 0:p.contents)==null?void 0:w.length)>0?Ie.value=p==null?void 0:p.contents:Ie.value=[],((M=d==null?void 0:d.contents)==null?void 0:M.length)>0?(ol.value=d==null?void 0:d.contents,el.value=d==null?void 0:d.contents):(ol.value=[],el.value=[]),nl.value=((F=Y==null?void 0:Y.value)==null?void 0:F.length)??0,da(Y.value),_l.value=Y.value,Ke.value&&(V.value=(R=(I=Ee.value)==null?void 0:I.filter(c=>(c==null?void 0:c.label)!=="操作"))==null?void 0:R.map(c=>{var P;return{...c,type:"edit",optionUrl:c!=null&&c.formMenuSelect&&((P=c==null?void 0:c.formMenuSelect)==null?void 0:P.length)>0?{groupSelect:c==null?void 0:c.groupSelect,menuSelect:c==null?void 0:c.formMenuSelect,selectRelateType:"",type:c==null?void 0:c.formType}:null}}),Gl())};l.watch(()=>[s.itemData,ll.value,Na.value,Ye.value,be==null?void 0:be.value],async()=>{var e,a,n,r,o,i;if((e=s==null?void 0:s.itemData)!=null&&e.find(p=>(p==null?void 0:p.key)==="columnPath")&&!((a=ul.value)!=null&&a.find(p=>{var d,g;return(p==null?void 0:p.key)===((g=(d=s==null?void 0:s.itemData)==null?void 0:d.find(m=>(m==null?void 0:m.key)==="columnPath"))==null?void 0:g.contents)}))){let p=ul.value,d={key:(r=(n=s==null?void 0:s.itemData)==null?void 0:n.find(g=>(g==null?void 0:g.key)==="columnPath"))==null?void 0:r.contents,value:(i=(o=s==null?void 0:s.itemData)==null?void 0:o.find(g=>(g==null?void 0:g.key)==="columnUsingPath"))==null?void 0:i.contents};p!=null&&p.find(g=>(g==null?void 0:g.key)===(d==null?void 0:d.key))?p=p==null?void 0:p.map(g=>((g==null?void 0:g.key)===(d==null?void 0:d.key)&&(g.value=d.value),g)):p.push(d),Te.setTableViewContents(p)}ga(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(yl(e==null?void 0:e.form),$e.value=e==null?void 0:e.dialogTitle,wl.value=!0,Qe.value=!0)},{immediate:!0,deep:!0});const ha=()=>{var e;(e=me.value)!=null&&e.includes("read")&&(Ke.value=!Ke.value)},Dr=()=>{Ol.value=!Ol.value};l.watch(()=>{var e;return(e=s==null?void 0:s.config)==null?void 0:e.viewport},e=>{var a;me.value=e,(e==null?void 0:e.length)===0?Ke.value=!1:(e!=null&&e.includes("read")||(Ke.value=!0),e!=null&&e.includes("edit")||(Ke.value=!1)),he.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||Ke.value},{immediate:!0}),l.watch(()=>Ke.value,e=>{var a;e?(Gl("viewChange"),Te.setCacheUpdatingData(null)):(ol.value=el.value,V.value=Je.value,il.value&&(Te.setTableLoading(s==null?void 0:s.index),te("change",il.value))),ee.value=e,he.value=e||((a=s==null?void 0:s.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=ea.value)==null?void 0:e.length},e=>{e===0&&(ae.currentPage=1)}),l.watch(()=>s==null?void 0:s.compNames,e=>{De.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:e||[],width:1}]},{immediate:!0}),l.ref(!1);const xr=(e,a)=>{var n;Gl("createClick"),a===ae.pageSize&&(ae.currentPage=Math.ceil(((n=Y.value)==null?void 0:n.length)/ae.pageSize))},Tr=(e,a,n)=>{var r;ua(n,e,a),Be.value=k.cloneDeep(e),Ge.value=e==null?void 0:e.id,nl.value=(r=Y.value)==null?void 0:r.length,$e.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",vl(!1)},Ae=e=>{var g,m,t,N,j,v,U,T,S,K;const{row:a,column:n,item:r,slotData:o}=e;let i=a!=null&&a[n==null?void 0:n.prop]||(a==null?void 0:a[n==null?void 0:n.prop])===0?((m=(g=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:g[0])==null?void 0:m.contents)??((a==null?void 0:a[n==null?void 0:n.prop])===0?"0":a==null?void 0:a[n==null?void 0:n.prop]):((N=(t=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:t[0])==null?void 0:N.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((v=(j=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:j[0])==null?void 0:v.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((S=(T=a==null?void 0:a[(U=r==null?void 0:r.child)==null?void 0:U.prop])==null?void 0:T[0])==null?void 0:S.contents)??(a==null?void 0:a[(K=r==null?void 0:r.child)==null?void 0:K.prop]),d=Array.isArray(i)&&!(i!=null&&i.every(x=>typeof x=="string"||typeof x=="number"))?"查看":i;return d=Array.isArray(d)?d.join(","):d,d},Er=e=>{var m,t,N,j,v,U,T,S,K,x;const{row:a,column:n,item:r,slotData:o}=e;let i=a!=null&&a[n==null?void 0:n.prop]?((t=(m=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:m[0])==null?void 0:t.contents)??(a==null?void 0:a[n==null?void 0:n.prop]):((j=(N=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:N[0])==null?void 0:j.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((U=(v=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:v[0])==null?void 0:U.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((K=(S=a==null?void 0:a[(T=r==null?void 0:r.child)==null?void 0:T.prop])==null?void 0:S[0])==null?void 0:K.contents)??(a==null?void 0:a[(x=r==null?void 0:r.child)==null?void 0:x.prop]);const d=Array.isArray(i)&&!(i!=null&&i.every(A=>typeof A=="string"||typeof A=="number")),g=Array.isArray(i)&&(i==null?void 0:i.find(A=>A==null?void 0:A.url));return d&&g},Nr=(e,a)=>e.find(n=>Object.values(n).some(r=>r===a));return l.watch(()=>Ne.value,async e=>{if(e){de.setContentLoading(!0),await l.nextTick();const a=Nr(Y.value,e==null?void 0:e.data);if(!a)return de.setContentLoading(!1);await aa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),de.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)&&(Y.value=(a=Y.value)==null?void 0:a.map(n=>{var r;return(n==null?void 0:n.id)===((r=e==null?void 0:e.data)==null?void 0:r.id)?{...n,id:e==null?void 0:e.resId}:n})))},{immediate:!0,deep:!0}),(e,a)=>{var m,t,N,j;const n=l.resolveComponent("svg-icon"),r=l.resolveComponent("el-popover"),o=l.resolveComponent("el-switch"),i=l.resolveComponent("el-checkbox"),p=l.resolveComponent("el-checkbox-group"),d=l.resolveComponent("el-button"),g=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",nn,[Il.value?(l.openBlock(),l.createBlock(_e.ssTable,{id:"excel-table",pageObj:ae,showIndex:he.value,isTree:(m=O.compItem)==null?void 0:m.isTree,summaryInfo:oe,columns:V.value,defaultSort:xe,isCardViewport:Ol.value,checkedColumns:Q.value,key:Kl.value+JSON.stringify(V.value),tableData:ea.value,isEditViewport:Ke.value,isShowPagination:Zl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ee.value,onDbClickRow:Ya,extraButton:ol.value,rowButton:Ie.value,cacheExtraButtons:el.value,isClearSelection:((t=Fe.value)==null?void 0:t.length)===0,onDoCurrentChange:Oa,onDoSizeChange:La,onContentClick:aa,onRowClick:Ia,onSelectChange:Fa,onCellChange:Tr,onChange:ua,onPreview:Rl,onSubmitEditingTable:Ka,onHandleColEditChange:$a,onHandleColTypeChange:Pa,onClickButton:gl},l.createSlots({headerButton:l.withCtx(v=>{var U,T;return[O.showHeader?(l.openBlock(),l.createBlock(Wr,{key:0,pageLayout:O.pageLayout,lockingPage:l.unref(Tl)===l.unref(W),filterValues:la.value,selectNums:(U=Fe.value)==null?void 0:U.length,dataNums:(T=Y.value)==null?void 0:T.length,compName:O.compName,isDevMode:O.isDevMode,buttons:v.buttons,onButtonClick:a[0]||(a[0]=S=>gl(S,"",{})),columns:V.value,onFilter:Xa,onGetImportData:Ma,level:O.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var v,U,T,S;return[((v=Y.value)==null?void 0:v.length)>0&&O.allowOperate?(l.openBlock(),l.createElementBlock("div",un,[(U=me.value)!=null&&U.includes("read")&&((T=me.value)!=null&&T.includes("edit"))&&((S=Ie.value)!=null&&S.some(K=>(K==null?void 0:K.label)==="编辑"))&&!Ol.value&&l.unref(Tl)!==l.unref(W)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:ha},[l.createVNode(n,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:Dr},[l.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:v,index:U})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:T=>xr(v,U)},[l.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,cn)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:br},{reference:l.withCtx(()=>[l.createElementVNode("span",dn,[l.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",pn,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(o,{"model-value":Ue.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=v=>zl(v,"sortable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":Oe.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=v=>zl(v,"filterable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":fe.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=v=>zl(v,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(p,{modelValue:Q.value,"onUpdate:modelValue":a[5]||(a[5]=v=>Q.value=v),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:L},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(pl.value,v=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:v.label},[l.createVNode(i,{value:v.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:v.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(v.label),9,fn)]),_:2},1032,["value"]),l.createVNode(r,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:l.withCtx(()=>[l.createVNode(n,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:l.withCtx(()=>{var U;return[l.createElementVNode("div",gn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((U=Object.keys(v))==null?void 0:U.filter(T=>{var S;return(S=ye.value)==null?void 0:S.find(K=>(K==null?void 0:K.value)===T)}),T=>{var S,K;return l.openBlock(),l.createElementBlock("div",{key:T},[l.createVNode(o,{"model-value":v==null?void 0:v[T],"active-text":(K=(S=ye.value)==null?void 0:S.find(x=>(x==null?void 0:x.value)===T))==null?void 0:K.label,onChange:x=>Ra(x,T,v)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",hn,[l.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(v=>{var U,T,S,K,x,A,D,f,h,u,y,z,B,G,re,X,q,H;return[Er(v)?(l.openBlock(),l.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:l.withCtx(()=>[l.createElementVNode("span",yn,l.toDisplayString(Ae(v)),1)]),default:l.withCtx(()=>{var w;return[l.createElementVNode("div",vn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v==null?void 0:v.row[(w=v==null?void 0:v.column)==null?void 0:w.prop],M=>(l.openBlock(),l.createElementBlock("div",bn,[l.createElementVNode("div",{class:"prop-url",title:Ml(M),onClick:F=>Wa(M)},l.toDisplayString(Ml(M)),9,mn),l.createElementVNode("div",{class:"prop-download",onClick:F=>Ga(M)}," 下载 ",8,kn)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Ae(v))&&((T=(U=Ae(v))==null?void 0:U.toString())!=null&&T.includes(".txt")||(K=(S=Ae(v))==null?void 0:S.toString())!=null&&K.includes(".cpt")||(A=(x=Ae(v))==null?void 0:x.toString())!=null&&A.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ae(v))&&((f=(D=Ae(v))==null?void 0:D.toString())!=null&&f.includes(".txt")||(u=(h=Ae(v))==null?void 0:h.toString())!=null&&u.includes(".cpt")||(z=(y=Ae(v))==null?void 0:y.toString())!=null&&z.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ae(v))&&((G=(B=Ae(v))==null?void 0:B.toString())!=null&&G.includes(".txt")||(X=(re=Ae(v))==null?void 0:re.toString())!=null&&X.includes(".cpt")||(H=(q=Ae(v))==null?void 0:q.toString())!=null&&H.includes(".cyd"))?"pointer":"",marginLeft:(v==null?void 0:v.colIndex)===0?`${((v==null?void 0:v.level)??0)*20}px`:0}),onClick:w=>Ua(Ae(v))},l.toDisplayString(Ae(v)===0?"0":Ae(v)),13,Sn))]}),_:2},[((N=Ie.value)==null?void 0:N.length)>0&&l.unref(Tl)!==l.unref(W)?{name:"actions",fn:l.withCtx(({item:v})=>[l.createVNode(r,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:l.withCtx(()=>[l.createVNode(n,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:l.withCtx(()=>{var U;return[l.createElementVNode("div",on,[cr.value?(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:O.index,onClick:T=>gl("应用至流程",v,{extra:e.content})},[l.createElementVNode("div",{style:l.normalizeStyle({color:(U=e.content)==null?void 0:U.textColor}),class:"extra-button-label"}," 应用至流程 ",4)],8,tn)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ha(Ie.value,v),(T,S)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:S,onClick:K=>gl(T==null?void 0:T.label,v,{extra:T})},[l.createElementVNode("div",{style:l.normalizeStyle({color:T==null?void 0:T.textColor}),class:"extra-button-label"},l.toDisplayString(T==null?void 0:T.label),5)],8,sn))),128))])]}),_:2},1024)]),key:"0"}:void 0,((j=Y.value)==null?void 0:j.length)>0?{name:"batchButton",fn:l.withCtx(v=>[l.withDirectives(l.createVNode(Hr,{lockingPage:l.unref(Tl)===l.unref(W),buttons:v.buttons,selectTableItems:Fe.value,onButtonClick:a[1]||(a[1]=U=>gl(U,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,ee.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!ee.value]])]),key:"1"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):l.createCommentVNode("",!0),l.createVNode(xl.ssDialog,{title:$e.value,visible:Qe.value,width:Aa.value,onBeforeDestroy:qa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",Cn,[l.createVNode(_e.ssForm,{rowContents:Xe.value,isEnableWrap:!1,showOperator:!1,onChange:mr,onClickTrigger:Ja,isEdit:Bl.value,onBlurChange:za,onPreview:Rl},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[wl.value?(l.openBlock(),l.createElementBlock("div",Dn,[l.createVNode(d,{onClick:a[6]||(a[6]=v=>Qe.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[13]||(a[13]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[13]}),l.createVNode(d,{class:"ok-button",onClick:a[7]||(a[7]=v=>vl(!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(xl.ssDialog,{title:$e.value,visible:Al.value,width:Pl.value,onBeforeDestroy:a[9]||(a[9]=v=>Al.value=!1)},{default:l.withCtx(()=>[l.createVNode(Ir)]),footer:l.withCtx(()=>[l.createElementVNode("div",xn,[l.createVNode(d,{onClick:a[8]||(a[8]=v=>Al.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[15]||(a[15]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[15]}),l.createVNode(d,{class:"ok-button",onClick:er,id:"themeButton"},{default:l.withCtx(()=>a[16]||(a[16]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["title","visible","width"]),we.value?(l.openBlock(),l.createBlock(_e.ssFilePreview,{key:1,fileDataList:C.value,onDestroy:Za},null,8,["fileDataList"])):l.createCommentVNode("",!0),qe.value?(l.openBlock(),l.createBlock(xl.ssDialog,{key:2,visible:qe.value,onBeforeDestroy:yr,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:l.withCtx(()=>[l.createVNode(Me.ThreeViewerHost,{"file-urls":cl.value,isThreeScene:Le.value,isSelfWindow:!0,threeData:rl.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(xl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=v=>e.componentVisible=!1),width:Pl.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(g,{dialogItem:Ll.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(xl.ssDialog,{title:De.title,visible:De.show,width:De.width,onBeforeDestroy:ir},{default:l.withCtx(()=>[l.createElementVNode("div",Tn,[l.createVNode(_e.ssForm,{rowContents:De==null?void 0:De.contents,formRules:De==null?void 0:De.formRules,showOperator:!1,buttonValue:De.buttonValue,isEdit:Bl.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:ur},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},Nn=$l._export_sfc(En,[["__scopeId","data-v-9b8983ff"]]);exports.formGetOptions=Ql;exports.getSelectRow=Yl;exports.ssTable=Nn;exports.useFormComp=xa;exports.useFormToTableComp=ma;exports.useUnit=ka;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),u=require("./index-sVdFHyjl.cjs"),n=require("./index.vue_vue_type_style_index_1_lang-PBh9haH2.cjs"),a=require("./index-CEwxrYB-.cjs"),s={class:"routerPage-wrapper"},i=t.defineComponent({__name:"index",setup(d){const o=n.useMenuState(),{activeMenuPath:c}=a.storeToRefs(o),r=a.useLoginState(),e=t.reactive({...n.State});return t.onMounted(async()=>{r.getModelSecretAsync(),e.structureId=await n.getActivePageStructureId(c.value)}),(l,_)=>(t.openBlock(),t.createElementBlock("div",s,[t.createVNode(u.ssTable,{index:e.structureId,compName:e.compName,itemData:e.pageData,changedContent:e.changedRow,onChange:e.handleItemDataChange,onOnButtonClick:e.clickRowButton},null,8,["index","compName","itemData","changedContent","onChange","onOnButtonClick"])]))}});exports.default=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),u=require("./index-C89mMUM5.cjs"),n=require("./index.vue_vue_type_style_index_1_lang-PBh9haH2.cjs"),a=require("./index-CEwxrYB-.cjs"),s={class:"routerPage-wrapper"},i=t.defineComponent({__name:"index",setup(d){const o=n.useMenuState(),{activeMenuPath:c}=a.storeToRefs(o),r=a.useLoginState(),e=t.reactive({...n.State});return t.onMounted(async()=>{r.getModelSecretAsync(),e.structureId=await n.getActivePageStructureId(c.value)}),(l,_)=>(t.openBlock(),t.createElementBlock("div",s,[t.createVNode(u.ssTable,{index:e.structureId,compName:e.compName,itemData:e.pageData,changedContent:e.changedRow,onChange:e.handleItemDataChange,onOnButtonClick:e.clickRowButton},null,8,["index","compName","itemData","changedContent","onChange","onOnButtonClick"])]))}});exports.default=i;
@@ -1,16 +1,16 @@
1
- import { b as Mo, a as Lo, f as Fo, g as Ko, u as jo, s as Uo } from "./index-CZ01Uey-.js";
1
+ import { b as Mo, a as Lo, f as Fo, g as Ko, u as jo, s as Uo } from "./index-DBZg952W.js";
2
2
  import { computed as Xt, ref as pe, watch as xt, onUnmounted as No, resolveComponent as Ut, createElementBlock as at, openBlock as Ae, createVNode as Se, createBlock as Mt, createCommentVNode as pa, withCtx as je, createElementVNode as re, Fragment as Vt, renderList as Zt, toDisplayString as ht, nextTick as qa, createTextVNode as Pt, defineComponent as wa, resolveDynamicComponent as dn, onMounted as An, unref as Rt, reactive as Ka, normalizeStyle as yn, renderSlot as Sn, createSlots as Wo, mergeProps as yr, withModifiers as Rn, getCurrentInstance as Vo, inject as Sl, shallowRef as Ho, toRef as qo, onBeforeMount as mr, watchEffect as Go, onBeforeUnmount as br, normalizeClass as El, getCurrentScope as Xo, onScopeDispose as Yo, provide as Dl, toRefs as Tl, withDirectives as Jo, vShow as Qo } from "vue";
3
3
  import { c1 as Zo, j as ni, c2 as es, bD as ts, bE as as, s as Yt, p as Gt, u as Vi, c as v, bu as Li, g as ya, b as Fi, E as Wt, f as il, bv as Tn, bt as Kn, d as pn, e as kr, c0 as ns } from "./index-CA0SFykF.js";
4
- import { u as is, c as ca, a as vl, e as xr, E as wr, f as _r, d as ls, b as rs, i as Si } from "./index-Djzfu6It.js";
4
+ import { u as is, c as ca, a as vl, e as xr, E as wr, f as _r, d as ls, b as rs, i as Si } from "./index-CnERmJxh.js";
5
5
  import { a as On, u as jn, i as Hi, aE as os, aF as ll, au as rl, aG as Ki, aH as ol, j as ra, aI as gl, E as Ga, aJ as sl, aK as ka, aL as Ln, aM as nn, aN as Cn, aO as Qi, l as ss, aP as us, aQ as cs, aR as ds, aS as ps, aT as fs, aU as hs, aV as vs, aW as gs, aX as ys } from "./index.vue_vue_type_style_index_1_lang-B7HH0PCt.js";
6
6
  import { s as ma, _ as Il } from "./index-DYC-Eh0y.js";
7
- import { a as Cr, T as ms, u as bs } from "./threeViewerHost-BaGBR8jd.js";
8
- import { aK as ks, aL as Ei, l as xs } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CYXAbj2a.js";
7
+ import { a as Cr, T as ms, u as bs } from "./threeViewerHost-CTUpfC_Y.js";
8
+ import { aK as ks, aL as Ei, l as xs } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B3RSoHQA.js";
9
9
  import { _ as ea } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  import { i as Al } from "./isString-C_qk7R_g.js";
11
- import { a as ws, s as _s } from "./index-DFfIPpCG.js";
11
+ import { a as ws, s as _s } from "./index-CZU4FRVk.js";
12
12
  import Sr from "./index-rlStojTL.js";
13
- import { s as Cs } from "./index-CD5uCiH9.js";
13
+ import { s as Cs } from "./index-BG20WI0G.js";
14
14
  var Ss = /\s/;
15
15
  function Es(a) {
16
16
  for (var r = a.length; r-- && Ss.test(a.charAt(r)); )
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as o, reactive as c, onMounted as s, createElementBlock as r, openBlock as u, createVNode as i } from "vue";
2
- import { s as m } from "./index-CZ01Uey-.js";
2
+ import { s as m } from "./index-DBZg952W.js";
3
3
  import { u as d, ay as p, aw as l } from "./index.vue_vue_type_style_index_1_lang-B7HH0PCt.js";
4
4
  import { s as g, u as h } from "./index-CA0SFykF.js";
5
5
  const _ = { class: "routerPage-wrapper" }, B = /* @__PURE__ */ o({