ss-component-new 1.2.191 → 1.2.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-Cxc1PVXd.cjs → index-1ODHK9Cd.cjs} +1 -1
- package/dist/{index-D1ueogxS.cjs → index-B23XP8Sd.cjs} +1 -1
- package/dist/{index-BirQQ3lc.cjs → index-B3s6qd3M.cjs} +1 -1
- package/dist/{index-D65YDXKW.js → index-B5LJ6FGn.js} +1 -1
- package/dist/{index-rZ7014Sk.js → index-BEj44QUg.js} +1 -1
- package/dist/{index-C70zIE55.js → index-BLWD7etg.js} +1 -1
- package/dist/{index-CMIPZKPf.js → index-BQdex7jO.js} +1 -1
- package/dist/{index-BXqKOxuS.js → index-BZrGQ9o1.js} +3 -3
- package/dist/{index-C2JrWyll.js → index-BcBjGzet.js} +3 -3
- package/dist/{index-CBrhRCO-.js → index-BcZW8n6c.js} +1 -1
- package/dist/{index-CWYagSpt.cjs → index-BguIX2P4.cjs} +1 -1
- package/dist/{index-RnSoY-22.cjs → index-Bm50ZZuq.cjs} +1 -1
- package/dist/{index-BymuSJDI.js → index-BowckPW8.js} +1 -1
- package/dist/{index-B-NCl3gS.cjs → index-Bq-dJJvd.cjs} +1 -1
- package/dist/{index-BxzBPUPM.js → index-C5vtEDy4.js} +2 -2
- package/dist/{index-pE7as_kK.cjs → index-C6aP1eIU.cjs} +1 -1
- package/dist/{index-DJG_XEjD.js → index-CLrQ3JMC.js} +2 -2
- package/dist/{index-BX8rwlid.js → index-CMpTpds8.js} +4 -4
- package/dist/{index-DJK5gz0F.js → index-CWGLA4xe.js} +1 -1
- package/dist/{index-cEI9vLYk.cjs → index-Csi6xtxp.cjs} +1 -1
- package/dist/{index-CfrhAsQz.cjs → index-CwX0OwiF.cjs} +1 -1
- package/dist/{index-ClXBdclA.js → index-CxMRlSKH.js} +1 -1
- package/dist/{index-3YRDwSPj.cjs → index-D2ZwX2kR.cjs} +1 -1
- package/dist/{index-Dn1Qel0o.cjs → index-D4T0v2f_.cjs} +1 -1
- package/dist/{index-DVgUQo5m.cjs → index-DNy_qVvw.cjs} +1 -1
- package/dist/{index-uqjKMDh5.js → index-DoqduP20.js} +11 -11
- package/dist/{index-CG3mcSTj.cjs → index-Dv-xHM7h.cjs} +1 -1
- package/dist/{index-BJoXWCIX.js → index-DvuQ6n5o.js} +2 -2
- package/dist/{index-BuL5m2Nq.js → index-Dz5O73IZ.js} +5 -5
- package/dist/{index-ipWINep3.cjs → index-Llg0-BL5.cjs} +1 -1
- package/dist/{index-CPcvHs6z.cjs → index-NG0JZKkn.cjs} +1 -1
- package/dist/{index-zTq3bNpY.js → index-Un7xS2Nb.js} +2 -2
- package/dist/{index-CvNZtYfg.cjs → index-VLwmyIOb.cjs} +1 -1
- package/dist/{index-CgRDUt8V.cjs → index-hYa8rJWO.cjs} +1 -1
- package/dist/{index-cH3mCnr4.js → index-iuq5na-k.js} +1 -1
- package/dist/{index-D-Yo1xz-.cjs → index-r_n9bpW_.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Bsm0qkYt.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BU_MX7_0.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-D6b-8gl4.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DlOjCfkj.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BCaM-Lqa.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-BEFZSjlw.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CQS0SuIY.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-BnVkqouB.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_1_lang-BFSnWFIG.js → index.vue_vue_type_style_index_1_lang-Cgm8Cuer.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-Clj-_LIm.cjs → index.vue_vue_type_style_index_1_lang-DXs-lrLT.cjs} +1 -1
- package/dist/{main-Ce1JDbwN.cjs → main-CK7a4eej.cjs} +1 -1
- package/dist/{main-SkCnXTUx.js → main-eQ2yMiP4.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-X2Nc978i.cjs → threeModel-BQWHG33C.cjs} +1 -1
- package/dist/{threeModel-Byuhg7mk.js → threeModel-BsE51SUL.js} +2 -2
- package/dist/{threeSceneView-CYij3StZ.cjs → threeSceneView-B-TXh0v2.cjs} +1 -1
- package/dist/{threeSceneView-6zjO4BPx.js → threeSceneView-D4ii8mhH.js} +2 -2
- package/dist/{threeSceneViewForCPMPIP-D4udu9q8.js → threeSceneViewForCPMPIP-D_Z1UGet.js} +3 -3
- package/dist/{threeSceneViewForCPMPIP-UVqs5Mfj.cjs → threeSceneViewForCPMPIP-uSbrD0_x.cjs} +1 -1
- package/dist/threeTrackPathView-B_CJ1S5Z.cjs +1 -0
- package/dist/{threeTrackPathView-DuiJbPwP.js → threeTrackPathView-DNh-AvDU.js} +80 -79
- package/dist/{threeViewerHost-BoBcYLbp.js → threeViewerHost-B3D4LzMe.js} +1 -1
- package/dist/{threeViewerHost-B2o6xcaT.cjs → threeViewerHost-DyPs12hY.cjs} +1 -1
- package/dist/{workpieceTreePanel-B55jmeoM.cjs → workpieceTreePanel-BLf_clDa.cjs} +1 -1
- package/dist/{workpieceTreePanel-1eij5wwB.js → workpieceTreePanel-BiQ4O4B7.js} +2 -2
- package/package.json +1 -1
- package/dist/threeTrackPathView-CvJHDcL3.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("vue"),k=require("./index-CEwxrYB-.cjs"),Wl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DwX8qItu.cjs"),Re=require("./index-cEI9vLYk.cjs"),Ve=require("./threeViewerHost-B2o6xcaT.cjs"),ue=require("./index.vue_vue_type_style_index_1_lang-CrR96PnG.cjs");require("./index.vue_vue_type_style_index_1_lang-Clj-_LIm.cjs");const jl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Cl=require("./index-BAjzyphl.cjs");require("./index-C4UuTGqh.cjs");const ga=require("./isString-Cvx5mmsS.cjs"),Gl=O=>O.match(/\((.*)\)/)[1],ha={__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),U=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(()=>U.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 ge=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(ge,{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:U})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},kr={key:0,class:"extra-button-content"},Sr={class:"table-operator-wrap"},Cr={class:"extra-button-filter"},Dr={class:"form-content-value"},xr={key:0,class:"extra-header"},Tr={class:"drop-menu",style:{width:"120px"}},Er={key:0},Nr={key:1},Br={key:1,class:"extra-button-content tabs-button-wrapper"},Ar={class:"table-operator-wrap"},wr={class:"extra-button-filter"},_r={class:"form-content-value"},Ur={key:0,class:"extra-header"},Or={class:"drop-menu",style:{width:"120px"}},Lr={key:0},Vr={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,U=l.ref(""),s=l.ref(!1),ee=l.ref([]),ge=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),me=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],he=oe=>{const re=oe.raw;if(!re)return;const te=new FileReader;te.onload=V=>{try{const xe=new Uint8Array(V.target.result),Ee=Ve.readSync(xe,{type:"array"}),qe=Ee.SheetNames[0],Oe=Ee.Sheets[qe],Je=Ve.utils.decode_range(Oe["!ref"]).e.c+1,we=new Array(Je).fill(""),C=[];for(const J in Oe){if(J[0]==="!")continue;const{r:W,c:ke}=Ve.utils.decode_cell(J);let Ne=Oe[J].v;if(Oe[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 ye=C==null?void 0:C[0];if(!(ye!=null&&ye.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(re)},je=oe=>{var te;const re=(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",re,oe,!0)},He=oe=>{Q("buttonClick",oe)},le=oe=>{var re,te;ee.value=(te=(re=ue.getColumnChild(k.cloneDeep(oe)))==null?void 0:re.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}))},_e=l.ref(!1),Ue=oe=>{var re;if((oe==null?void 0:oe.buttonName)==="确认"&&(Q("filter",oe==null?void 0:oe.content),_e.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=(re=ee.value)==null?void 0:re.map(V=>({...V,value:""})),Q("filter",te),_e.value=!1}s.value=!1},pe=()=>{var re,te;ee.value=(re=ee.value)==null?void 0:re.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,re)=>{var Oe,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",kr,[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",Sr,[l.createElementVNode("div",Cr,[l.createVNode(ha,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,ye,J,W;return[l.createVNode(xe,{modelValue:U.value,"onUpdate:modelValue":re[1]||(re[1]=ke=>U.value=ke),style:{"min-width":"80px"},placeholder:_e.value?(J=(ye=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:ye.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[!U.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:pe},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:re[0]||(re[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",Dr,[(l.openBlock(),l.createBlock(Re.ssForm,{rowContents:ee.value,buttonValue:ge.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ge.value,isStartJustify:!1,onOnButtonClick:Ue},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Oe=O.buttons)==null?void 0:Oe.length)>0?(l.openBlock(),l.createElementBlock("div",xr,[(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,ye)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:ye},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":he,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(Re._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",Tr,[(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",Er,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Nr,"("+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",Br,[l.createElementVNode("div",Ar,[l.createElementVNode("div",wr,[l.createVNode(ha,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,ye,J,W;return[l.createVNode(xe,{modelValue:U.value,"onUpdate:modelValue":re[3]||(re[3]=ke=>U.value=ke),style:{"min-width":"80px"},placeholder:_e.value?(J=(ye=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:ye.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[!U.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:pe},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:re[2]||(re[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",_r,[(l.openBlock(),l.createBlock(Re.ssForm,{rowContents:ee.value,buttonValue:ge.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ge.value,isStartJustify:!1,onOnButtonClick:Ue},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Je=O.buttons)==null?void 0:Je.length)>0?(l.openBlock(),l.createElementBlock("div",Ur,[(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,ye)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:ye},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":he,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(Re._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",Or,[(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",Lr,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Vr,"("+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)])]))}}},Mr=jl._export_sfc(jr,[["__scopeId","data-v-b0dbf278"]]),$r=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,U=ee=>{$("buttonClick",ee)},s=ee=>{var ge;return ee!=null&&ee.includes("删除")?((ge=Q.selectTableItems)==null?void 0:ge.length)>0?"warning-active-type":"warning-type":"default-type"};return(ee,ge)=>{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,he=>(l.openBlock(),l.createBlock(me,{key:he==null?void 0:he.label,disabled:!!O.lockingPage,class:l.normalizeClass(s(he==null?void 0:he.label)),onClick:je=>U(he==null?void 0:he.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(he==null?void 0:he.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Pr=jl._export_sfc($r,[["__scopeId","data-v-70b12973"]]),ya=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(O){this.selectArray=O},setSelectString(O){this.selectString=O}}}),Kr={class:"calculator-content"},Fr={class:"calculator-child"},zr={class:"calculator-child"},Rr=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"}]}),($,U)=>(l.openBlock(),l.createElementBlock("div",Kr,[l.createElementVNode("div",Fr,[l.createVNode(Re.ssForm,{rowContents:Z.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",zr,[l.createVNode(Re.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),qr=jl._export_sfc(Rr,[["__scopeId","data-v-73db0fe7"]]),va=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(O){this.selectIndex=O},setSelectMenu(O){this.selectMenu=O},setSelectTitle(O){this.selectTitle=O}}}),Hl=(O,Z)=>{let Q=O,$=Z;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((U,s)=>{if(Array.isArray(U)){let ee={};return U=U==null?void 0:U.forEach((ge,me)=>{var he;(he=$==null?void 0:$[me])!=null&&he.prop?ee[$[me].prop]=ge:Array.isArray(ge)&&(ee.children=Hl(ge,$))}),Object.assign(ee,{id:s})}else return U})),Q},ba=(O,Z,Q)=>{let $=O,U=Z;return $=$==null?void 0:$.map((s,ee)=>{var ge,me;return!Array.isArray(s)||!((ge=U==null?void 0:U[ee])!=null&&ge.label)&&!Q||(s.unshift(((me=U==null?void 0:U[ee])==null?void 0:me.label)??""),s.some(he=>Array.isArray(he))&&(s=s==null?void 0:s.map(he=>{var je;return Array.isArray(he)&&(he=ba(he,(je=U==null?void 0:U[ee])==null?void 0:je.children,Q)),he}))),s}),$},Jr=(O,Z,Q)=>{if(Z==="")return O==null?void 0:O.filter($=>($==null?void 0:$.id)!==Q);{const $=Z.split("-");return Wr(O,$,Q)}},Wr=(O,Z,Q)=>{let $=O,U=Z;return(U==null?void 0:U.length)===0?$=$==null?void 0:$.filter(s=>s.id!==Q):$=$==null?void 0:$.map(s=>(s.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),s=ma(s,U,Q)),s)),$},ma=(O,Z,Q)=>{var s,ee;let $=O,U=Z;return(U==null?void 0:U.length)===0?$.children=(s=$.children)==null?void 0:s.filter(ge=>ge.id!==Q):$.children=(ee=$.children)==null?void 0:ee.map(ge=>(ge.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),ge=ma(ge,U,Q)),ge)),$},Gr=(O,Z,Q)=>{if(Z==="")return Q;{const $=Z.split("-");return Hr(O,$,Q)}},Hr=(O,Z,Q)=>{let $=O,U=Z;return(U==null?void 0:U.length)===0?$=Q:$=$==null?void 0:$.map(s=>(s.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),s=ka(s,U,Q)),s)),$},ka=(O,Z,Q)=>{var s;let $=O,U=Z;return(U==null?void 0:U.length)===0?$.children=Q:$.children=(s=$.children)==null?void 0:s.map(ee=>(ee.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),ee=ka(ee,U,Q)),ee)),$},Sa=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(O){this.objUrl=O},setBlobUrls(O){this.blobUrls=O}}}),Ql=async O=>{var s,ee,ge,me,he,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 U=await ue.menuToParent(Z);if(U==null||U.forEach(le=>{var _e,Ue,pe,oe;(le==null?void 0:le.name)===(((oe=(pe=(Ue=(_e=k.cloneDeep(O))==null?void 0:_e.optionUrl)==null?void 0:Ue.groupSelect)==null?void 0:pe[0])==null?void 0:oe.replaceAll("'",""))??"")&&($=le==null?void 0:le.id)}),$!==""){const le=(ge=U==null?void 0:U.find(pe=>{var oe,re,te,V;return(pe==null?void 0:pe.name)===(((re=(oe=O==null?void 0:O.groupSelect)==null?void 0:oe.split(":"))==null?void 0:re[0])||((V=(te=O==null?void 0:O.optionUrl)==null?void 0:te.groupSelect)==null?void 0:V[0]))}))==null?void 0:ge.compData;let _e=(he=(me=le==null?void 0:le.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:me.contents)==null?void 0:he.map(pe=>pe==null?void 0:pe.label),Ue=(He=(je=le==null?void 0:le.find(pe=>(pe==null?void 0:pe.key)==="tableContents"))==null?void 0:je.contents)==null?void 0:He.map(pe=>(pe=pe==null?void 0:pe.filter(oe=>!(oe!=null&&oe.id)),pe));Ue==null||Ue.forEach(pe=>{Q.push(ue.getValueToObjectValue(pe,_e))})}return Q},Qr={class:"table-content"},Xr={class:"menu-config-wrap"},Yr=["onClick"],Zr={key:0,class:"viewport-wrap"},Ir=["onClick"],en={title:"选择显示列信息"},ln={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},an=["title"],rn={class:"col-operate-wrap"},nn={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},on={class:"pop-view"},tn={class:"pop-wrapper"},sn={class:"file-list-pop"},un=["title","onClick"],cn=["onClick"],dn=["onClick"],pn={class:"form-content"},fn={key:0,class:"dialog-footer"},gn={class:"dialog-footer"},hn={class:"form-content"},yn={__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 fa;const Q=l.ref([]),$=Sa(k.pinia),U=l.ref(null),s=O,ee=l.ref(s==null?void 0:s.allowSelect),ge=l.ref((fa=s==null?void 0:s.config)==null?void 0:fa.showIndex),me=l.ref(),he=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),je=ue.useOriginalState(k.pinia),{originalPath:He}=k.storeToRefs(je),le=He.value,_e=l.ref(!1),Ue=l.ref(!1),pe=l.ref(!1),oe=l.reactive({column:{},status:!1,text:"合计"}),re=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),Oe=l.ref(!1),rl=l.ref(null);Ve.useThreeSystem();const Je=l.ref([]),we=l.ref(!1),C=l.ref(),ye=ue.useMenuState(),{importLoading:J,activeMenuPath:W,contentLoading:ke,linkMenuInfo:Ne}=k.storeToRefs(ye),We=ue.useTableComp(k.pinia),Te=ue.useModelComp(k.pinia),{extraContents:be,cacheUpdatingData:il,tableViewContents:ul,tableLoading:bn,pageMapState:Ze,lockingPage:Dl}=k.storeToRefs(Te),Y=l.ref([]),xl=l.ref([]),Tl=l.ref(new Map);l.ref(!1);const Ge=l.ref("");l.ref();const El=l.ref(!0),nl=l.ref(0),Xl=l.ref(!0),Me=l.ref(""),Qe=l.ref(!1),Ca=l.ref({label:"查看三维模型"}),Nl=l.ref(!1),Ml=l.ref(),Le=l.ref([]),Ie=l.ref([]),Bl=l.ref(!1),cl=l.ref([]),ol=l.ref([]),el=l.ref([]),Xe=l.ref([]),$e=l.ref(),Be=l.ref(),Da=ya(k.pinia),Al=l.ref(),$l=l.ref(0),wl=va(k.pinia),{selectIndex:xa,selectMenu:Ye,selectTitle:Pl}=k.storeToRefs(wl),{selectString:ll}=k.storeToRefs(Da),Ta=k.useLoginState(k.pinia),{loginUserInfo:fe}=k.storeToRefs(Ta),Ea=l.ref(720),Pe=l.ref(!1),_l=l.ref(!1),Ke=l.ref([]),al=l.ref(),dl=l.ref(!0),Yl=l.ref(!0),Ul=l.ref([]),Na=l.inject("contentRef");l.provide("contentRef",Na),l.watch(()=>{var e;return(e=Y.value)==null?void 0:e.length},e=>{re.total=e}),l.watch(()=>ul.value,async()=>{var i,p,d,f,m,t,E,M,v,B,_,S,F,x,L,D,g,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=(M=(E=(t=(m=(f=s==null?void 0:s.itemData)==null?void 0:f.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:m.contents)==null?void 0:t.split("["))==null?void 0:E[1])==null?void 0:M.split("]"))==null?void 0:v[0],a=((F=(S=(_=(B=s==null?void 0:s.itemData)==null?void 0:B.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:_.contents)==null?void 0:S.split("["))==null?void 0:F[0])+((L=(x=ul.value)==null?void 0:x.find(u=>(u==null?void 0:u.key)===e))==null?void 0:L.value),n=((g=(D=s==null?void 0:s.itemData)==null?void 0:D.find(u=>(u==null?void 0:u.key)==="pageGroup"))==null?void 0:g.contents)??"",r=await ue.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;da(o,s.allMapContents)},{deep:!0});const Ba=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 f;((n=d==null?void 0:d.data)==null?void 0:n.code)===200&&(f=((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=f==null?void 0:f.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 B=Object.keys(v),_={};return B.forEach((S,F)=>{_[e[F]]=v[S]}),_}),E=t==null?void 0:t.map(v=>({key:m,value:{tableData:v}})),M=await k.batchAddInsofDataApi({dataList:E});((p=M==null?void 0:M.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)}},Aa=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(()=>{Yl.value=!1;let e=$l.value;$l.value=e+1});const Zl=l.computed(()=>{var r,o;const e=(re.currentPage-1)*re.pageSize,a=e+re.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",re),(o=Y.value)==null?void 0:o.slice(e,a)}),wa=e=>{re.currentPage=e,te("getSliceContLength",re)},_a=e=>{var a;re.pageSize=e,e*re.currentPage>((a=Y.value)==null?void 0:a.length)&&(re.currentPage=1,re.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),te("getSliceContLength",re)},Ua=(e,a)=>{var p,d;const n=(d=(p=V.value)==null?void 0:p.map(f=>f==null?void 0:f.prop))==null?void 0:d.filter(f=>f!=="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(f=>n==null?void 0:n.find(m=>f===m))))return k.ElMessage.error("导入的数据表头不匹配");Ba(r,a)},Oa=(e,a)=>{var n;Te.setRefreshCurStructure(!1),((n=V.value)==null?void 0:n.length)===0||Ua(e,a)},La=(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],E=[];for(const[M,v]of Object.entries(t))E.push(v),i.length<p(t)&&i.push(M);o.push(E)}o.unshift(i);const d=Ve.utils.aoa_to_sheet(o),f=Ve.utils.book_new();Ve.utils.book_append_sheet(f,d,r),Ve.writeFileSync(f,`${a}.xlsx`),Ke.value=[]},Ol=async(e,a,n,r=!1,o)=>{var i,p,d,f,m,t,E,M;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 B=(m=(f=(d=(p=v==null?void 0:v.data)==null?void 0:p.result)==null?void 0:d[0])==null?void 0:f.value)==null?void 0:m.pageData;r?B={...B,compData:(E=B==null?void 0:B.compData)==null?void 0:E.map(S=>{var F;return(S==null?void 0:S.key)==="header"?{...S,contents:(F=S==null?void 0:S.contents)==null?void 0:F.map(x=>({...x,[e]:n}))}:S})}:B={...B,compData:(t=B==null?void 0:B.compData)==null?void 0:t.map(S=>{var F,x;return(S==null?void 0:S.key)==="header"?{...S,contents:(F=S==null?void 0:S.contents)==null?void 0:F.map(L=>(L==null?void 0:L.prop)===(a==null?void 0:a.prop)?{...L,[e]:n}:L)}:(S==null?void 0:S.key)==="tableToForm"&&o?{...S,contents:(x=S==null?void 0:S.contents)==null?void 0:x.map(L=>(L==null?void 0:L.prop)===(a==null?void 0:a.prop)?{...L,[o]:n}:L)}:S})};const _=await k.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:B}});((M=_==null?void 0:_.data)==null?void 0:M.code)===200?(k.ElMessage.success("编辑成功"),Te.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(v){k.ElMessage.error(v)}},Va=async(e,a)=>{await Ol("label",a,e)},ja=async(e,a)=>{await Ol("columnType",a,e,!1,"type")},Ma=()=>{il.value?Pe.value=!1:pa()},$a=e=>{Ke.value=e},Pa=(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)}))}),Ka=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 Ol(a,n,e)},Kl=async(e,a)=>{await Ol(a,null,e,!0)},Fa=()=>{Qe.value=!1},za=e=>{te("clickTrigger",e)},Fl=async e=>{var i,p,d,f,m,t,E,M,v,B,_,S,F,x,L;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],Oe.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")||(f=a==null?void 0:a.toString())!=null&&f.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(","),Oe.value=!1,qe.value=!0;return}if((E=a==null?void 0:a.toString())!=null&&E.includes(".stl")||(M=a==null?void 0:a.toString())!=null&&M.includes(".STL")||(v=a==null?void 0:a.toString())!=null&&v.includes(".obj")||(B=a==null?void 0:a.toString())!=null&&B.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let D,g=[],h={};if(Array.isArray(a)?D=a:D=a==null?void 0:a.split(","),D==null||D.forEach(u=>{u.includes(".mtl")?g.push(u):h.blob=h.blob?h.blob+","+u:u}),(g==null?void 0:g.length)>0&&(h.mtlBlobs=g),r&&(h.suffix=r),(S=(_=Object.values(h))==null?void 0:_[0])!=null&&S.includes("http:"))o.push(h);else{const u=new Blob([h.blob],{type:"application/octet-stream;charset=UTF-8"});let b=URL.createObjectURL(u),P="";(F=a==null?void 0:a.split("/"))==null||F.forEach((N,G)=>{var ae;G===((ae=a==null?void 0:a.split("/"))==null?void 0:ae.length)-1&&(P=N)}),(x=h.blob)!=null&&x.includes(".stl")&&(P=(P==null?void 0:P.replaceAll(">",""))+".urdf"),C.value=[{name:P,blobUrl:b}],we.value=!0}}else{const D=await k.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),g=new Blob([D.data],{type:"application/octet-stream;charset=UTF-8"});let h=URL.createObjectURL(g),u="";(L=a==null?void 0:a.split("/"))==null||L.forEach((b,P)=>{var N;P===((N=a==null?void 0:a.split("/"))==null?void 0:N.length)-1&&(u=b)}),C.value=[{name:u,blobUrl:h}],we.value=!0}(o==null?void 0:o.length)>0&&$.setBlobUrls(o)},Ll=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},Ra=async e=>{let a=null,n=null,r=null;if(e!=null&&e.downloadUrl){const i=await zl(),p=Re.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()}),f=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(f),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 Ve.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=Ll(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};Fl(i);return}const o={name:n,blobUrl:a};C.value=[o],we.value=!0},qa=async e=>{let a=null,n=null;if(e!=null&&e.downloadUrl){const i=await zl(),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 Ve.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(i.data),n=Ll(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)},Ja=(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,Ca.value]:(n=s==null?void 0:s.config)!=null&&n.allowMove?[...e,{label:"迁移"}]:e},Wa=(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})),Il=l.ref([]),Ga=async(e,a,n=!1)=>{var r;if(e){if(Te.setTableLoading(!0),Il.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(o=>!o)))return Y.value=xl.value;if(n){Y.value=[...Tl.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=Wa(Tl.value,e),Te.setTableLoading(!1)}},Ha=async e=>{var p,d,f,m,t,E,M,v,B,_,S,F,x,L,D;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((p=fe.value)==null?void 0:p.account)||((d=fe.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((f=fe.value)==null?void 0:f.account)||((m=fe.value)==null?void 0:m.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(E=(t=a==null?void 0:a.data)==null?void 0:t.result)==null?void 0:E.map(g=>g==null?void 0:g.id);const o=(v=(M=n==null?void 0:n.data)==null?void 0:M.result)==null?void 0:v.map(g=>g==null?void 0:g.id);r=[...k.cloneDeep(r),...o],(r==null?void 0:r.length)>0&&(r!=null&&r.every(g=>g!==null&&g))&&await k.batchDeleteInsofDataApi({ids:r});let i=await ue.getItemData(W.value,sessionStorage.getItem("systemKey"),e.id);if(i=i==null?void 0:i.filter(g=>g.comp!=="methodButton"),i&&i.length>0){const g=!Array.isArray(Pl.value)&&((B=Pl.value)==null?void 0:B.key)!=="main"?[]:Pl.value;g.push({key:Ye.value===""?(_=e==null?void 0:e.id)==null?void 0:_.toString():Ye.value+"-"+((S=e==null?void 0:e.id)==null?void 0:S.toString()),value:e[(F=Object.keys(e))==null?void 0:F.filter(h=>h!=="index"&&h!=="id")[0]]}),wl.setSelectMenu(Ye.value===""?(x=e==null?void 0:e.id)==null?void 0:x.toString():Ye.value+"-"+((L=e==null?void 0:e.id)==null?void 0:L.toString())),wl.setSelectTitle(g),wl.setSelectIndex((D=e==null?void 0:e.id)==null?void 0:D.toString()),te("pageChange",i)}},ea=async(e,a,n,r)=>{var i,p,d,f,m,t,E,M,v,B,_,S,F,x,L,D,g,h,u,b,P,N,G,ae,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],A=(m=(f=r==null?void 0:r.columnType)==null?void 0:f.childPath)==null?void 0:m.split(le),j=[];A==null||A.forEach((R,c)=>{(A==null?void 0:A.length)-1===c&&j.push(H),j.push(R)}),j=j.join(le);let z=await ue.getItemData(j,sessionStorage.getItem("systemKey"),""),I=await ue.getItemData((t=r==null?void 0:r.columnType)==null?void 0:t.childPath,sessionStorage.getItem("systemKey"),"");if(!z||(z==null?void 0:z.length)===0){let R=[];I==null||I.forEach(K=>{var ve,ce,T,y;let w={type:"structure",pageKey:j,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(ve=fe.value)==null?void 0:ve.id,parentPageKey:"",createUserLayer:((ce=fe.value)==null?void 0:ce.dept)||((T=fe.value)==null?void 0:T.部门名称)},ne={pageData:{comp:K==null?void 0:K.comp,compData:(y=K==null?void 0:K.compData)==null?void 0:y.filter(se=>(se==null?void 0:se.key)!=="tableContents"),name:K==null?void 0:K.name,isShow:K==null?void 0:K.isShow}};R.push({key:w,value:ne})}),(R==null?void 0:R.length)>0&&await k.batchAddInsofDataApi({dataList:R});let c=await ue.getItemData(j,sessionStorage.getItem("systemKey"),"");Ul.value=c}else{let R=I==null?void 0:I.map(c=>{var K,w;return(c==null?void 0:c.comp)==="Form"?c.compData=(K=c.compData)==null?void 0:K.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 y,se,ie,de,Ce;let T=(Ce=(de=(ie=(se=(y=z==null?void 0:z.find(Se=>(Se==null?void 0:Se.name)===(c==null?void 0:c.name)))==null?void 0:y.compData)==null?void 0:se.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:ie.contents)==null?void 0:de.find(Se=>(Se==null?void 0:Se.prop)===(ce==null?void 0:ce.prop)))==null?void 0:Ce.value;return ce.value=T,ce})),ne}):c=z==null?void 0:z.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)),c.id=(w=z==null?void 0:z.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)))==null?void 0:w.id,c});Ul.value=R}te("routeUrl",Ul.value,{isEdit:!0,routerUrl:j});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((E=k.cloneDeep(q))==null?void 0:E.map(async A=>{var I,R,c,K;const j=await Ve.downloadAvatarApi({url:A==null?void 0:A.url});let z=URL.createObjectURL(j.data);return{name:(A==null?void 0:A.name)+"."+((K=(I=A==null?void 0:A.url)==null?void 0:I.split("."))==null?void 0:K[((c=(R=A==null?void 0:A.url)==null?void 0:R.split("."))==null?void 0:c.length)-1]),blobUrl:z}}));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){(M=o==null?void 0:o[0])==null||M.prop;let q=k.cloneDeep(W).value+le+(r==null?void 0:r.data),H=k.cloneDeep(W).value,A=(B=(v=Ze.value[q])==null?void 0:v.filter(R=>{var c,K;return((c=R==null?void 0:R.key)==null?void 0:c.type)==="structure"&&((K=R==null?void 0:R.key)==null?void 0:K.parentTable)===""}))==null?void 0:B.map(R=>{var c;return(c=R==null?void 0:R.value)==null?void 0:c.pageData}),j={};(_=V.value)==null||_.forEach(R=>{(R==null?void 0:R.label)!=="操作"&&(j[R.label]=n[R.prop]??n[R.label])});let z=(F=(S=s==null?void 0:s.itemData)==null?void 0:S.find(R=>(R==null?void 0:R.key)==="mainRouters"))==null?void 0:F.contents,I;if((z==null?void 0:z.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=z==null?void 0:z.find(K=>(K==null?void 0:K.key)===R);I=(c==null?void 0:c.routerContent)+le+(c==null?void 0:c.key)}if((A==null?void 0:A.length)>0)await ue.getItemData(q+le+`updateLoading${((L=fe.value)==null?void 0:L.account)||((D=fe.value)==null?void 0:D.账号)}`,sessionStorage.getItem("systemKey"),"")||await ue.loadingConstruct(q,q+le+`updateLoading${((g=fe.value)==null?void 0:g.account)||((h=fe.value)==null?void 0:h.账号)}`,j,I),Te.setRouteToChildPath(H),ye.setActiveMenuPath(q+le+`updateLoading${((u=fe.value)==null?void 0:u.account)||((b=fe.value)==null?void 0:b.账号)}`);else{(P=o==null?void 0:o[0])==null||P.prop;let R=k.cloneDeep(W).value+le+(r==null?void 0:r.data),c=k.cloneDeep(W).value;await ue.getItemData(c+le,sessionStorage.getItem("systemKey"),""),await ue.loadingConstruct(c+le,R,j),await ue.loadingConstruct(R,R+le+`updateLoading${((N=fe.value)==null?void 0:N.account)||((G=fe.value)==null?void 0:G.账号)}`,j,I),Te.setRouteToChildPath(c),ye.setActiveMenuPath(R+le+`updateLoading${((ae=fe.value)==null?void 0:ae.account)||((X=fe.value)==null?void 0:X.账号)}`)}}},Qa=()=>{we.value=!1},Xa=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 Ya=()=>{},Za=async()=>{const e=W.value,a=sessionStorage.getItem("systemKey"),n=await ue.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},zl=async()=>`Bearer ${k.Local.get("access-token")}`,Ia=async(e,{token:a,inputData:n}={})=>await k.axios.post(e,n,{headers:{Authorization:a}}).catch(o=>(ye.setImportLoading(!1),Promise.reject(o))),er=e=>{var r;let a={};const n=[];return a.form={},(r=k.cloneDeep(e))==null||r.forEach((o,i)=>{var p,d,f,m,t,E,M,v,B,_,S,F,x,L;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=(f=o==null?void 0:o.compData)==null?void 0:f.find(u=>(u==null?void 0:u.key)==="tableContents"))==null?void 0:m.contents)==null?void 0:t.map(u=>u.slice(1));(_=(B=(v=(M=(E=o==null?void 0:o.compData)==null?void 0:E.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:M.contents)==null?void 0:v[0])==null?void 0:B[0])==null||_.label;let g=(F=(S=o==null?void 0:o.compData)==null?void 0:S.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:F.contents,h=[];D==null||D.forEach(u=>{let b=[];u==null||u.forEach((P,N)=>{var ae;let G={};((ae=g[N])==null?void 0:ae.label)!=="操作"&&(G[g[N].label]=P,b.push(G))}),h.push(b)}),a[o.name]=h}else{const D=(L=(x=o.compData)==null?void 0:x.find(g=>(g==null?void 0:g.key)==="formContent"))==null?void 0:L.contents;D==null||D.forEach(g=>{var h,u;if(g.prop!==""){let b=g==null?void 0:g.value;Array.isArray(b)?b=((h=b==null?void 0:b[0])==null?void 0:h.oldUrl)||(b??"http://222.92.178.198:62001/"+((u=b==null?void 0:b[0])==null?void 0:u.url)):b=b.toString(),g={key:(g==null?void 0:g.prop)??(g==null?void 0:g.label),value:b},n.push(g)}})}}),a.form=ue.getFormContents(n),a},lr=async(e,a,n)=>{var P,N,G,ae,X,q,H,A,j,z,I,R;ye.setImportLoading(!0);const r=await Za().catch(c=>(ye.setImportLoading(!1),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, 缺少算法执行接口"),ye.setImportLoading(!1);return}const p=V.value||[],d=p.find(c=>(c==null?void 0:c.prop)==="输入"),f=d==null?void 0:d.prop;let m=a==null?void 0:a[f];const t=await zl().catch(c=>(ye.setImportLoading(!1),Promise.reject(c)));let E=!1,M="";(P=V.value)==null||P.forEach(c=>{(c==null?void 0:c.prop)===f&&(E=!!(c!=null&&c.childPath),M=c==null?void 0:c.childPath)});let v="",B="";if(E){let c=(G=(N=V.value)==null?void 0:N.find(ve=>(ve==null?void 0:ve.isMainKey)===!0))==null?void 0:G.prop;B=a==null?void 0:a[c];let K=M==null?void 0:M.split(le),w=[];K==null||K.forEach((ve,ce)=>{(K==null?void 0:K.length)-1===ce&&w.push(B),w.push(ve)}),w=w.join(le),v=w;let ne=await ue.getItemData(w,sessionStorage.getItem("systemKey"),"");m=er(ne)}const _=await Ia(i,{token:t,inputData:m}).catch(c=>(ye.setImportLoading(!1),Promise.reject(c))),S=(ae=_==null?void 0:_.data)==null?void 0:ae.data,F=r==null?void 0:r.find(c=>(c==null?void 0:c.prop)==="算法名称");F==null||F.value;const x=p.find(c=>(c==null?void 0:c.prop)==="输出"),L=x==null?void 0:x.directiveLabel;v=v==null?void 0:v.replaceAll(d==null?void 0:d.directiveLabel,L);const D=(X=k.cloneDeep(v))==null?void 0:X.replaceAll(le+B,"");let g=await ue.getItemData(v,sessionStorage.getItem("systemKey"),""),h=await ue.getItemData(D,sessionStorage.getItem("systemKey"),"");if(g){let c=[],K=[];g==null||g.forEach(w=>{var ne,ve;if((w==null?void 0:w.comp)==="Table")(ne=w==null?void 0:w.compData)==null||ne.forEach(ce=>{var T;(ce==null?void 0:ce.key)==="tableContents"&&((T=ce==null?void 0:ce.contents)==null||T.forEach(y=>{var se,ie;(se=y==null?void 0:y[0])!=null&&se.id&&c.push((ie=y==null?void 0:y[0])==null?void 0:ie.id)}))});else if((w==null?void 0:w.comp)==="Form"){w.compData=(ve=w==null?void 0:w.compData)==null?void 0:ve.map(T=>{var y;return(T==null?void 0:T.key)==="formContent"&&(T.contents=(y=T==null?void 0:T.contents)==null?void 0:y.map(se=>{var ie,de;return(ie=S==null?void 0:S.form)!=null&&ie[se.prop]&&(se.value=(de=S==null?void 0:S.form)==null?void 0:de[se.prop]),se})),T});let ce={pageData:{comp:w==null?void 0:w.comp,name:w==null?void 0:w.name,isShow:w==null?void 0:w.isShow,compData:w==null?void 0:w.compData}};K.push({id:w==null?void 0:w.id,value:ce})}}),(K==null?void 0:K.length)>0&&await k.batchUpdateInsofDataApi({dataList:K}),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 K={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:v,parentTable:"",createUserId:(q=fe.value)==null?void 0:q.id,createUserOrg:((H=fe.value)==null?void 0:H.dept)||((A=fe.value)==null?void 0:A.部门名称)};h==null||h.forEach(w=>{let ve={pageData:{comp:w==null?void 0:w.comp,name:w==null?void 0:w.name,isShow:w==null?void 0:w.isShow,compData:w==null?void 0:w.compData}};c.push({key:K,value:ve})})}if(S!=null&&S.form){let K={type:"structure",pageKey:v,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(j=fe.value)==null?void 0:j.id,parentPageKey:"",createUserLayer:((z=fe.value)==null?void 0:z.dept)||((I=fe.value)==null?void 0:I.部门名称)};h==null||h.forEach(w=>{var T;let ne=(T=w==null?void 0:w.compData)==null?void 0:T.map(y=>{var se;return(y==null?void 0:y.key)==="formContent"&&(y.contents=(se=y.contents)==null?void 0:se.map(ie=>{var de,Ce;return(de=S==null?void 0:S.form)!=null&&de[ie.prop]&&(ie.value=(Ce=S==null?void 0:S.form)==null?void 0:Ce[ie.prop]),ie})),y}),ce={pageData:{comp:w==null?void 0:w.comp,name:w==null?void 0:w.name,isShow:w==null?void 0:w.isShow,compData:ne}};c.push({key:K,value:ce})})}(c==null?void 0:c.length)>0&&await k.batchAddInsofDataApi({dataList:c})}let u=await ue.getItemData(v,sessionStorage.getItem("systemKey"),""),b=[];S!=null&&S.table&&((R=S==null?void 0:S.table)==null||R.forEach(c=>{var ne,ve,ce,T;let K={type:"data",pageKey:v,tableId:(ne=u==null?void 0:u[0])==null?void 0:ne.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ve=fe.value)==null?void 0:ve.id,createUserOrg:((ce=fe.value)==null?void 0:ce.dept)||((T=fe.value)==null?void 0:T.部门名称)},w={tableData:c};b.push({key:K,value:w})})),(b==null?void 0:b.length)>0&&await k.batchAddInsofDataApi({dataList:b}),hl(!0),ye.setImportLoading(!1)},la=(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=la(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)"}]}),ar=()=>{De.show=!1},rr=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)},Vl=async(e,a,n)=>{var r,o,i,p,d,f,m,t,E,M,v,B,_,S,F;if(Ge.value="",Bl.value=!0,El.value=!0,te("onButtonClick",e,a),e==="删除")ue.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,L;(x=Y.value)!=null&&x.find(D=>(D==null?void 0:D.id)===(a==null?void 0:a.id))?Y.value=(L=k.cloneDeep(Y.value))==null?void 0:L.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)):Y.value=la(k.cloneDeep(Y.value),a),Jr(Al.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=Ke.value)==null?void 0:r.length)===0)return k.ElMessage.warning("请先勾选操作的数据");ue.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var L,D;const x=(L=Ke.value)==null?void 0:L.map(g=>g.id);Y.value=(D=k.cloneDeep(Y.value))==null?void 0:D.filter(g=>!(x!=null&&x.includes(g.id))),Te.setTableLoading(s==null?void 0:s.index),te("change",{content:Y.value,singleContent:null,selectItems:Ke.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:V.value})})}else if(e==="复制新增"){Me.value="新增";const x=k.cloneDeep(a),L=(o=V.value)==null?void 0:o.find(h=>h==null?void 0:h.isMainKey),D=L||((i=V.value)==null?void 0:i[0]),g=(p=el.value)==null?void 0:p.find(h=>(h==null?void 0:h.label)==="新建");await ra(!0,g,{data:x,firstCol:D})}else if(e==="新增")Me.value="新增",gl(""),Qe.value=!0;else if(e==="编辑")Me.value="编辑",gl(a),Qe.value=!0;else if(e==="查看")Me.value="查看",gl(a),Bl.value=!1,El.value=!1,Qe.value=!0;else if(e==="查看三维模型"){const x={};for(let D in a)D!=="id"&&(x[D]=a[D]);let L=(d=Object.values(x))==null?void 0:d[1];We.setTableShowThree(L)}else if(((f=n==null?void 0:n.extra)==null?void 0:f.type)==="modelExample")Me.value=e,Nl.value=!0;else if(e==="新建"){let x=Ze.value,L=[];for(let b in x)b!=null&&b.includes(`loading${((m=fe.value)==null?void 0:m.account)||((t=fe.value)==null?void 0:t.账号)}`)&&(L=[...L,...b]);let D=[];for(let b in x)b!=null&&b.includes(`updateLoading${((E=fe.value)==null?void 0:E.account)||((M=fe.value)==null?void 0:M.账号)}`)&&(D=[...D,...b]);let g=L==null?void 0:L.map(b=>b==null?void 0:b.id);const h=D==null?void 0:D.map(b=>b==null?void 0:b.id);g=[...k.cloneDeep(g),...h],(g==null?void 0:g.length)>0&&(g!=null&&g.every(b=>b!==null&&b))&&await k.batchDeleteInsofDataApi({ids:g});const u=(v=el.value)==null?void 0:v.find(b=>(b==null?void 0:b.label)==="新建");await ra(!1,u)}else if(e==="修改模板"){let x=k.cloneDeep(W).value;Te.setRouteToChildPath(x),ye.setActiveMenuPath(x+le)}else if(e==="执行")lr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((B=Ke.value)==null?void 0:B.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((_=Y.value)==null?void 0:_.length)===0)return k.ElMessage.warning("暂无数据导出");const x=(F=(S=V.value)==null?void 0:S.map(D=>D==null?void 0:D.label))==null?void 0:F.filter(D=>D!=="操作"),L=e==="导出全部"?k.cloneDeep(Y.value):k.cloneDeep(Ke.value);L==null||L.forEach(D=>{D==null||delete D.id}),La(L,s==null?void 0:s.compName,x,s==null?void 0:s.compName)}else e==="迁移"&&(De.selectRow=a,De.show=!0)},nr=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(f=>{var m;return{id:f==null?void 0:f.id,...(m=f==null?void 0:f.value)==null?void 0:m.pageData}}):[]},or=async(e,a)=>{var n,r,o,i,p,d,f,m,t,E,M,v,B,_,S,F,x,L,D,g;try{let h,u;const b=(n=Ze.value[W.value+le])==null?void 0:n.filter(A=>{var j;return((j=A==null?void 0:A.key)==null?void 0:j.type)==="structureMethod"}),P=(r=Ze.value[W.value+le])==null?void 0:r.filter(A=>{var j;return((j=A==null?void 0:A.key)==null?void 0:j.type)==="structure"}),N=b==null?void 0:b.find(A=>{var j,z;return((z=(j=A==null?void 0:A.value)==null?void 0:j.pageData)==null?void 0:z.method)==="保存"});if(!N)return;const G=(d=(p=Ze.value[(i=(o=N==null?void 0:N.value)==null?void 0:o.pageData)==null?void 0:i.path])==null?void 0:p.filter(A=>{var j;return((j=A==null?void 0:A.key)==null?void 0:j.type)==="data"}))==null?void 0:d.find(A=>{var j,z,I,R;return((z=(j=A==null?void 0:A.value)==null?void 0:j.tableData)==null?void 0:z.算法名称)===((R=(I=N==null?void 0:N.value)==null?void 0:I.pageData)==null?void 0:R.method)});if(!G)return;const ae={buttonName:(m=(f=N==null?void 0:N.value)==null?void 0:f.pageData)==null?void 0:m.method,api:(E=(t=G==null?void 0:G.value)==null?void 0:t.tableData)==null?void 0:E.算法体,content:P==null?void 0:P.map(A=>{var j;return(j=A==null?void 0:A.value)==null?void 0:j.pageData}),extraContent:[],extraValues:(v=(M=N==null?void 0:N.value)==null?void 0:M.pageData)==null?void 0:v.data,methodName:(_=(B=N==null?void 0:N.value)==null?void 0:B.pageData)==null?void 0:_.path};if(!e)return;const X={...e,compData:(S=e==null?void 0:e.compData)==null?void 0:S.map(A=>{var j;return(A==null?void 0:A.key)==="formContent"?{...A,contents:(j=A==null?void 0:A.contents)==null?void 0:j.map(z=>(z==null?void 0:z.prop)===a?{...z,value:""}:z)}:A})},q={key:{pageKey:W.value+le,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:X}},H=await k.axios.post(ae.api,q,{headers:{"Content-Type":"application/json"}});return((F=H==null?void 0:H.data)==null?void 0:F.code)===200&&(h=(L=(x=H==null?void 0:H.data)==null?void 0:x.result)==null?void 0:L.latestReportCode,u=(g=(D=H==null?void 0:H.data)==null?void 0:D.result)==null?void 0:g.status),{newMainKeyValue:h,newStatus:u}}catch(h){throw k.ElMessage.error(h),new Error(h)}},aa=(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}:fl.value&&(d==null?void 0:d.prop)===fl.prop?{...d,value:fl.value}:d)}:i}),index:e==null?void 0:e.id},r)},fl=l.reactive({prop:"状态",value:""}),tr=l.ref(["系统自动生成信息","审批意见"]),sr=async(e,a,n)=>{var f,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){fl.value="",i=(f=Ze.value[d])==null?void 0:f.filter(M=>{var v;return((v=M==null?void 0:M.key)==null?void 0:v.type)==="structure"});const t=i==null?void 0:i.find(M=>{var v,B,_;return((_=(B=(v=M==null?void 0:M.value)==null?void 0:v.pageData)==null?void 0:B.comp)==null?void 0:_.toUpperCase())==="FORM"});p={...(m=t==null?void 0:t.value)==null?void 0:m.pageData,id:t==null?void 0:t.id};const E=await or(p,a==null?void 0:a.prop);if(fl.value=E==null?void 0:E.newStatus,E!=null&&E.newMainKeyValue)return E==null?void 0:E.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(E=>(E==null?void 0:E[a==null?void 0:a.prop])===`${t}(${o})`);)o++;r=`${t}(${o})`}return r},ra=async(e,a,n)=>{var p,d,f,m,t,E,M,v;let r,o;const i=await sr(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[(f=n==null?void 0:n.firstCol)==null?void 0:f.prop]),o=k.cloneDeep(W).value+le+i):(r=k.cloneDeep(W).value+le,o=k.cloneDeep(r)+`loading${((p=fe.value)==null?void 0:p.account)||((d=fe.value)==null?void 0:d.账号)}`),a){const B=(E=(t=Ze.value[o])==null?void 0:t.filter(_=>{var S;return((S=_==null?void 0:_.key)==null?void 0:S.parentTable)===""}))==null?void 0:E.map(_=>{var S;return{id:_==null?void 0:_.id,...(S=_==null?void 0:_.value)==null?void 0:S.pageData}});if((B==null?void 0:B.length)>0)if(e){const _=B==null?void 0:B.find(S=>{var F;return((F=S==null?void 0:S.comp)==null?void 0:F.toUpperCase())==="FORM"});_&&aa(_,(M=n==null?void 0:n.firstCol)==null?void 0:M.label,i,W.value)}else Te.setRouteToChildPath(k.cloneDeep(W).value),ye.setActiveMenuPath(o);else if(await ue.loadingConstruct(r,o,null,null,e?tr.value:null),e){const _=await nr(o);if((_==null?void 0:_.length)>0){const S=_==null?void 0:_.find(F=>{var x;return((x=F==null?void 0:F.comp)==null?void 0:x.toUpperCase())==="FORM"});S&&aa(S,(v=n==null?void 0:n.firstCol)==null?void 0:v.label,i,W.value)}}else Te.setRouteToChildPath(k.cloneDeep(W).value),ye.setActiveMenuPath(o)}else e?(Ge.value="",Be.value=n==null?void 0:n.data,hl(!0,n==null?void 0:n.firstCol,i)):(Te.setRouteToChildPath(k.cloneDeep(W).value),ye.setActiveMenuPath(o))},ir=()=>{qe.value=!1,cl.value=[],Oe.value=!1},gl=e=>{var o,i,p,d,f,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=ue.getColumnChild((o=k.cloneDeep(V.value))==null?void 0:o.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||i.forEach((t,E)=>{var M;n.find(v=>v===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((M=t==null?void 0:t.formType)==null?void 0:M.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"+E,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)??E,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"+E,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)??E,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=ue.getColumnChild((p=k.cloneDeep(V.value))==null?void 0:p.filter(t=>(t==null?void 0:t.label)!=="操作"));Le.value&&((d=Le.value)==null?void 0:d.length)>0&&(Le.value=(f=k.cloneDeep(Le).value)==null?void 0:f.map(t=>{var M;let E=(t==null?void 0:t.prop)||((M=r==null?void 0:r.find(v=>(v==null?void 0:v.label)===(t==null?void 0:t.label)))==null?void 0:M.prop);return E&&(t.value=e[E]),t})),Xe.value=Le.value&&((m=Le.value)==null?void 0:m.length)>0?ue.getTableFormToForm(Le.value):a},ur=()=>{var a;const e=(a=U.value)==null?void 0:a.$el;e&&Wl.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,f)=>{if(d.label==="操作")return 1;if(f.label==="操作")return-1;const m=pl.value.findIndex(E=>E.label===d.label),t=pl.value.findIndex(E=>E.label===f.label);return m-t})}})};l.onMounted(()=>{Ml.value=window.innerWidth-240*2});const cr=()=>{l.nextTick(()=>{ur()})},Rl=(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 f in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:i.label;m?d[f]=(p=Be.value)==null?void 0:p[m]:d[f]=o[f]}o=Object.assign(d,Be.value),n=o}else{let d=Rl(o,a);o=d==null?void 0:d.contents,n=d==null?void 0:d.currentSelectContents}return o}),{contents:e,currentSelectContents:n}},na=(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 f in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:i.label;m?d[f]=(p=Be.value)==null?void 0:p[m]:d[f]=o[f]}o=Object.assign(d,Be.value),r=o}return o}):n=e==null?void 0:e.map(o=>{var i,p,d,f;if((o==null?void 0:o.id)===Ge.value){let m={};for(let t in o){let E=(i=a==null?void 0:a.find(M=>(M==null?void 0:M.prop)===t))==null?void 0:i.label;E?m[t]=(p=Be.value)==null?void 0:p[E]:m[t]=o[t]}o=Object.assign(m,Be.value),r=o}else o=(d=Rl(o,a))==null?void 0:d.contents,r=(f=Rl(o,a))==null?void 0:f.currentSelectContents;return o}),{newContents:n,currentSelectContents:r}},oa=(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(oa)),e},ql=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(...ql(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const o={...r};return delete o.children,o}):[]},hl=(e=!0,a,n)=>{var m,t,E,M,v,B,_,S,F;let r=ue.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(L=>oa(L,a,n))}),i.push(Object.assign(Be.value,x)),o=Object.assign(Be.value,x)}else i=(E=na(i,r))==null?void 0:E.newContents,o=(M=na(i,r))==null?void 0:M.currentSelectContents;const p=(v=s.itemData)==null?void 0:v.filter(x=>(x==null?void 0:x.key)==="childTree")[0];if(((B=p==null?void 0:p.contents)==null?void 0:B.length)>0){Me.value="编辑";const x=[];i==null||i.forEach((L,D)=>{var h;let g={};if(Array.isArray(L)){let u=[];L==null||L.filter(b=>!(b!=null&&b.id)).forEach((b,P)=>{var N,G,ae,X,q,H,A;if((G=(N=$e.value)==null?void 0:N[P])!=null&&G.prop&&!Array.isArray(b)){let j={};j[$e.value[P].column]=b,be!=null&&be.value&&((ae=be==null?void 0:be.value)==null?void 0:ae.length)>0&&((X=be==null?void 0:be.value)!=null&&X.find(z=>JSON.stringify(z==null?void 0:z[0])===JSON.stringify(j)))&&(u=(q=be==null?void 0:be.value)==null?void 0:q.find(z=>JSON.stringify(z==null?void 0:z[0])===JSON.stringify(j))),u&&u.length>0?g[$e.value[P].prop]=u!=null&&u.find(z=>{var I;return((I=Object.keys(z))==null?void 0:I[0])===$e.value[P].column})?(H=u==null?void 0:u.find(z=>{var I;return((I=Object.keys(z))==null?void 0:I[0])===$e.value[P].column}))==null?void 0:H[$e.value[P].column]:b:g[$e.value[P].prop]=b}else Array.isArray(b)&&((A=$e.value[P])!=null&&A.prop?g[$e.value[P].prop]=b:g.children=Hl(b,$e.value))})}else g=L;Array.isArray(L)&&L.some(u=>u==null?void 0:u.id)?x.push(Object.assign(g,{id:(h=L==null?void 0:L.find(u=>u.id))==null?void 0:h.id})):g.id?x.push(g):x.push(Object.assign(g,{id:D.toString()}))}),Y.value=ca(x,p,V.value)}else Y.value=i;ia(Y.value),Al.value=Y.value;const d=Gr(Al.value,Ye.value,i);let f=[];if(il.value?(f=(_=k.cloneDeep(il).value.singleContent)==null?void 0:_.filter(x=>(x==null?void 0:x.id)!==(o==null?void 0:o.id)),f.push(o)):f=[o],Pe.value){const x={content:d,singleContent:((S=p==null?void 0:p.contents)==null?void 0:S.length)>0?f==null?void 0:f.flatMap(ql):f,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:((F=p==null?void 0:p.contents)==null?void 0:F.length)>0?ql(o):o,index:s==null?void 0:s.index,buttonName:Me.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=[],Le.value=[],Ie.value=[],cl.value=[],ol.value=[],Xe.value=[],Ke.value=[],U.value=null});const ta=async(e,a,n)=>{var m,t,E,M,v,B,_,S,F,x,L;al.value=n==null?void 0:n.prop;const r=k.cloneDeep(s.itemData),o=r==null?void 0:r.map(D=>{var g;return(D==null?void 0:D.key)==="header"&&((g=D.contents)==null||g.map((h,u)=>{var b,P,N,G,ae,X,q,H,A,j,z,I,R,c,K,w,ne,ve,ce;return h.type=h!=null&&h.type?h.type:(G=(N=(P=(b=h==null?void 0:h.key)==null?void 0:b.split("$"))==null?void 0:P[1])==null?void 0:N.split("("))!=null&&G[0]?(X=(ae=ue.FormType)==null?void 0:ae.find(T=>{var y,se,ie,de;return(T==null?void 0:T.key)===((de=(ie=(se=(y=h==null?void 0:h.key)==null?void 0:y.split("$"))==null?void 0:se[1])==null?void 0:ie.split("("))==null?void 0:de[0])}))==null?void 0:X.value:"Input",h.options=h!=null&&h.options?h.options:((A=(H=(q=h==null?void 0:h.key)==null?void 0:q.split("$"))==null?void 0:H[1])==null?void 0:A.length)>0?(R=(I=Gl((z=(j=h==null?void 0:h.key)==null?void 0:j.split("$"))==null?void 0:z[1]))==null?void 0:I.split(","))==null?void 0:R.map(T=>({label:T,value:T})):[],(c=h==null?void 0:h.key)!=null&&c.includes("$")&&(h.key=(w=(K=h==null?void 0:h.key)==null?void 0:K.split("$"))==null?void 0:w[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(T=>T.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 g;return D.value=(g=p==null?void 0:p.find((h,u)=>u===(D==null?void 0:D.id)))==null?void 0:g.value,D});let d="",f=(v=(M=(E=k.cloneDeep(o))==null?void 0:E.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:M.contents)==null?void 0:v.find((D,g)=>{var h,u,b;return(D==null?void 0:D.label)===al.value||(g==null?void 0:g.toString())===((b=(u=(h=al.value)==null?void 0:h.split("a"))==null?void 0:u[1])==null?void 0:b.toString())});if((S=(_=(B=k.cloneDeep(o))==null?void 0:B.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:_.contents)==null||S.forEach(D=>{var g,h,u,b,P;d===""&&((u=(h=(g=D==null?void 0:D.optionUrl)==null?void 0:g.groupSelect)==null?void 0:h[1])!=null&&u.includes("["))&&(d=(P=(b=D==null?void 0:D.optionUrl)==null?void 0:b.groupSelect)==null?void 0:P[1])}),(F=f==null?void 0:f.optionUrl)!=null&&F.menuSelect){let D=await Ql(f),g;if(D==null||D.forEach(h=>{var u,b,P,N,G,ae,X,q,H,A;d===((b=(u=f==null?void 0:f.optionUrl)==null?void 0:u.groupSelect)==null?void 0:b[1])&&((G=(N=(P=f==null?void 0:f.optionUrl)==null?void 0:P.groupSelect)==null?void 0:N[1])!=null&&G.includes("["))&&((A=k.cloneDeep(h))==null?void 0:A[(H=(q=(X=(ae=f==null?void 0:f.optionUrl)==null?void 0:ae.groupSelect)==null?void 0:X[1])==null?void 0:q.replaceAll("[",""))==null?void 0:H.replaceAll("]","")])===(f==null?void 0:f.value)&&(g=h)}),g){let h=k.cloneDeep(i);h=h==null?void 0:h.map(b=>{var P,N,G,ae,X,q,H,A,j,z,I;return(g!=null&&g[b==null?void 0:b.label]||g!=null&&g[(ae=(G=(N=(P=b==null?void 0:b.optionUrl)==null?void 0:P.groupSelect)==null?void 0:N[1])==null?void 0:G.replaceAll("[",""))==null?void 0:ae.replaceAll("]","")])&&((H=(q=(X=b==null?void 0:b.optionUrl)==null?void 0:X.groupSelect)==null?void 0:q[1])!=null&&H.includes("["))&&(b.value=(g==null?void 0:g[b==null?void 0:b.label])||(g==null?void 0:g[(I=(z=(j=(A=b==null?void 0:b.optionUrl)==null?void 0:A.groupSelect)==null?void 0:j[1])==null?void 0:z.replaceAll("[",""))==null?void 0:I.replaceAll("]","")])),b}),Y.value=(x=k.cloneDeep(Y.value))==null?void 0:x.map(b=>{if((b==null?void 0:b.id)===(a==null?void 0:a.id)){const P={};return h==null||h.forEach(N=>{P[N.name]=N.value}),P.id=b==null?void 0:b.id,P}return b});let u=k.cloneDeep(h);u=u==null?void 0:u.map(b=>{var P,N,G,ae;return(N=(P=b==null?void 0:b.optionUrl)==null?void 0:P.menuSelect)!=null&&N.some(X=>X==null?void 0:X.includes)&&(b.optionUrl.menuSelect=(ae=(G=b==null?void 0:b.optionUrl)==null?void 0:G.menuSelect)==null?void 0:ae.map(X=>{var q,H,A,j;if(X!=null&&X.includes("[")){let z=(H=(q=X==null?void 0:X.replaceAll("[","").replaceAll("]",""))==null?void 0:q.split(":"))==null?void 0:H[1];X=(j=(A=k.cloneDeep(h))==null?void 0:A.find(I=>(I==null?void 0:I.label)===z))==null?void 0:j.value}return X})),b}),Y.value=(L=k.cloneDeep(Y.value))==null?void 0:L.map(b=>{if((b==null?void 0:b.id)===(a==null?void 0:a.id)){const P={};return u==null||u.forEach(N=>{P[N.name]=N.value}),P.id=b==null?void 0:b.id,P}return b})}}},dr=async e=>{var m,t,E,M,v,B,_,S,F,x,L,D;if(!e)return;Be.value=e;const a=k.cloneDeep(s.itemData);let n=a==null?void 0:a.map(g=>{var h;return(g==null?void 0:g.key)==="header"&&((h=g.contents)==null||h.map((u,b)=>{var P,N,G,ae,X,q,H,A,j,z,I,R,c,K,w,ne,ve,ce,T;return u.type=u!=null&&u.type?u.type:(ae=(G=(N=(P=u==null?void 0:u.key)==null?void 0:P.split("$"))==null?void 0:N[1])==null?void 0:G.split("("))!=null&&ae[0]?(q=(X=ue.FormType)==null?void 0:X.find(y=>{var se,ie,de,Ce;return(y==null?void 0:y.key)===((Ce=(de=(ie=(se=u==null?void 0:u.key)==null?void 0:se.split("$"))==null?void 0:ie[1])==null?void 0:de.split("("))==null?void 0:Ce[0])}))==null?void 0:q.value:"Input",u.options=u!=null&&u.options?u.options:((j=(A=(H=u==null?void 0:u.key)==null?void 0:H.split("$"))==null?void 0:A[1])==null?void 0:j.length)>0?(c=(R=Gl((I=(z=u==null?void 0:u.key)==null?void 0:z.split("$"))==null?void 0:I[1]))==null?void 0:R.split(","))==null?void 0:c.map(y=>({label:y,value:y})):[],(K=u==null?void 0:u.key)!=null&&K.includes("$")&&(u.key=(ne=(w=u==null?void 0:u.key)==null?void 0:w.split("$"))==null?void 0:ne[0]),u.value=(ve=Object.values(e))==null?void 0:ve[b],u.optionUrl=u!=null&&u.formMenuSelect&&((ce=u==null?void 0:u.formMenuSelect)==null?void 0:ce.length)>0?{groupSelect:(T=u==null?void 0:u.groupSelect)==null?void 0:T.split(/[::]/).map(y=>y.trim()),menuSelect:u==null?void 0:u.formMenuSelect,selectRelateType:"",type:(u==null?void 0:u.formType)??(u!=null&&u.groupSelect?"Select":"")}:null,u})),g}),r=Xe.value,o=(t=(m=k.cloneDeep(n))==null?void 0:m.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:t.contents;if(r=r==null?void 0:r.map(g=>{var h;return g.value=(h=o==null?void 0:o.find((u,b)=>(u==null?void 0:u.prop)===(g==null?void 0:g.name)))==null?void 0:h.value,g}),!dl.value)return;let i="",p=(v=(M=(E=k.cloneDeep(n))==null?void 0:E.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:M.contents)==null?void 0:v.find((g,h)=>{var u,b,P;return(g==null?void 0:g.label)===al.value||(h==null?void 0:h.toString())===((P=(b=(u=al.value)==null?void 0:u.split("a"))==null?void 0:b[1])==null?void 0:P.toString())}),d=(B=p==null?void 0:p.optionUrl)==null?void 0:B.menuSelect,f=!0;if((F=(S=(_=k.cloneDeep(n))==null?void 0:_.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:S.contents)==null||F.forEach(g=>{var h,u,b,P,N,G;f&&((b=(u=(h=g==null?void 0:g.optionUrl)==null?void 0:h.groupSelect)==null?void 0:u[1])!=null&&b.includes("["))&&(i=(N=(P=g==null?void 0:g.optionUrl)==null?void 0:P.groupSelect)==null?void 0:N[1],JSON.stringify(d)===JSON.stringify((G=g==null?void 0:g.optionUrl)==null?void 0:G.menuSelect)&&(f=!1))}),(x=p==null?void 0:p.optionUrl)!=null&&x.menuSelect&&dl.value){let g=await Ql(p),h;if((L=p==null?void 0:p.optionUrl)==null||L.menuSelect,g==null||g.forEach(u=>{var b,P,N,G,ae,X,q,H,A,j;i===((P=(b=p==null?void 0:p.optionUrl)==null?void 0:b.groupSelect)==null?void 0:P[1])&&((ae=(G=(N=p==null?void 0:p.optionUrl)==null?void 0:N.groupSelect)==null?void 0:G[1])!=null&&ae.includes("["))&&((j=k.cloneDeep(u))==null?void 0:j[(A=(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:A.replaceAll("]","")])===(p==null?void 0:p.value)&&(h=u)}),h){let u=k.cloneDeep(r);u=u==null?void 0:u.map(N=>{var G,ae,X,q,H,A,j,z,I,R,c;return(h!=null&&h[N==null?void 0:N.label]||h!=null&&h[(q=(X=(ae=(G=N==null?void 0:N.optionUrl)==null?void 0:G.groupSelect)==null?void 0:ae[1])==null?void 0:X.replaceAll("[",""))==null?void 0:q.replaceAll("]","")])&&((j=(A=(H=N==null?void 0:N.optionUrl)==null?void 0:H.groupSelect)==null?void 0:A[1])!=null&&j.includes("["))&&(N.value=(h==null?void 0:h[N==null?void 0:N.label])||(h==null?void 0:h[(c=(R=(I=(z=N==null?void 0:N.optionUrl)==null?void 0:z.groupSelect)==null?void 0:I[1])==null?void 0:R.replaceAll("[",""))==null?void 0:c.replaceAll("]","")])),N}),Xe.value=k.cloneDeep(u);let b=k.cloneDeep(u);b=b==null?void 0:b.map(N=>{var G,ae,X,q,H,A;return(ae=(G=N==null?void 0:N.optionUrl)==null?void 0:G.menuSelect)!=null&&ae.some(j=>j==null?void 0:j.includes("["))&&(N.optionUrl.oldMenuSelect=(q=(X=k.cloneDeep(N))==null?void 0:X.optionUrl)==null?void 0:q.menuSelect,N.optionUrl.menuSelect=(A=(H=N==null?void 0:N.optionUrl)==null?void 0:H.menuSelect)==null?void 0:A.map(j=>{var z,I,R,c;if(j!=null&&j.includes("[")){let K=(I=(z=j==null?void 0:j.replaceAll("[","").replaceAll("]",""))==null?void 0:z.split(":"))==null?void 0:I[1];j=(c=(R=k.cloneDeep(u))==null?void 0:R.find(w=>(w==null?void 0:w.label)===K))==null?void 0:c.value}return j})),N}),Xe.value=b;let P={};(D=Xe.value)==null||D.forEach(N=>{P[N.prop]=N==null?void 0:N.value}),Be.value=P}}dl.value=!1},pr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",fr=e=>{var i,p;const a=(p=(i=Le.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 f=d==null?void 0:d[n];a&&ga.isString(f)&&(d[n]=[f]),!a&&!ga.isString(f)&&(d[n]="")})},sa=(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=>sa(r,a))),e},Jl=e=>{var n,r,o,i,p,d;gl("");const a=(n=Xe.value)==null?void 0:n.reduce((f,m)=>(f[m.name]=m.value,f),{});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 f=(d=(p=Ee.value)==null?void 0:p.filter(m=>(m==null?void 0:m.label)!=="操作"))==null?void 0:d.map(m=>{var E,M,v;const t=(M=(E=Le.value)==null?void 0:E.find(B=>(B==null?void 0:B.label)===(m==null?void 0:m.label)))==null?void 0:M.multiple;return fr(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=f==null?void 0:f.map(m=>sa(m,[{prop:"type",value:"edit"},{prop:"columnType",value:pr(m==null?void 0:m.formType)||(m==null?void 0:m.columnType)}])),e==="createClick"&&hl(!1)}},tl={START:"开始时间",END:"结束时间",HOURS:"工时"},gr=(e,a)=>Number(Wl.dayjs(a).diff(Wl.dayjs(e),"day",!0).toFixed(1)),ia=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:f}=p;r.set(f,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],f=p==null?void 0:p[tl.END],m=gr(d,f);return d&&f&&(p[tl.HOURS]=`${m}天`),p})},ua=(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[f,...m]=d,t={...f};n+1===((a==null?void 0:a.length)??"")?t.children=d==null?void 0:d.map(E=>(E.level=k.cloneDeep(n)+1,E)).filter((E,M)=>M!==0):m.length>0&&(t.children=ua(m,a,n+1)),t.level=n,i.push(t)}return i},ca=(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=ua(e,a==null?void 0:a.contents,0),r},da=(e,a)=>{var M,v,B,_,S,F,x,L,D,g,h,u,b,P,N,G,ae,X,q,H,A,j,z,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"),f=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");Le.value=(v=(M=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableToForm"))==null?void 0:M[0])==null?void 0:v.contents,Xl.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 E=[];if(ll.value===""?E=m==null?void 0:m[0]:E=(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))),((B=t==null?void 0:t.contents)==null?void 0:B.length)>0){let c=[];if(t!=null&&t.contents.some(T=>Array.isArray(T)&&(T==null?void 0:T.find(y=>y.children))))Ye.value===""?c=(S=(_=ue.getGradeColumns(t==null?void 0:t.contents))==null?void 0:_[0])==null?void 0:S.filter(T=>!Array.isArray(T)):(Ye.value.split("-"),c=(F=ue.getGradeColumns(t==null?void 0:t.contents))==null?void 0:F[0]);else{let T=t!=null&&t.contents.some(y=>Array.isArray(y))?(x=t==null?void 0:t.contents)==null?void 0:x[0]:t==null?void 0:t.contents;T==null||T.forEach((y,se)=>{var Ce,Se,yl,vl;let ie="";(Se=(Ce=W.value)==null?void 0:Ce.split("/"))==null||Se.forEach(Fe=>{var bl,ml,kl;if(Fe!==""){let sl=(kl=(ml=(bl=Fe==null?void 0:Fe.split(le+"updateLoading"))==null?void 0:bl[0])==null?void 0:ml.split(le+"loading"))==null?void 0:kl[0];ie=ie===""?ie+sl:ie+"/"+sl}}),ie=ie+le+(y==null?void 0:y.directiveLabel);const de=(yl=Le.value)==null?void 0:yl.find(Fe=>(Fe==null?void 0:Fe.prop)===(y==null?void 0:y.prop));c.push({label:(y==null?void 0:y.label)??"",prop:(y==null?void 0:y.label)==="操作"?"operate":(y==null?void 0:y.prop)??"a"+se,width:y!=null&&y.width?parseInt(y.width):"",fixed:(y==null?void 0:y.fixed)??void 0,sortable:(y==null?void 0:y.sortable)??!1,filterable:(y==null?void 0:y.filterable)??!1,operable:(y==null?void 0:y.operable)??!1,showSummary:(y==null?void 0:y.showSummary)??!1,align:(y==null?void 0:y.align)??"left",showOverflowTooltip:(y==null?void 0:y.showOverflowTooltip)??!0,isNotDrag:(y==null?void 0:y.isNotDrag)??!1,isEditCol:(y==null?void 0:y.isEditCol)??!1,isOperate:(y==null?void 0:y.isOperate)??!1,id:(y==null?void 0:y.id)??se,type:(y==null?void 0:y.label)==="操作"?"operate":void 0,formType:(y==null?void 0:y.formType)??(y!=null&&y.groupSelect?"Select":""),isTableColHidden:y==null?void 0:y.isTableColHidden,isFormColHidden:y==null?void 0:y.isFormColHidden,disabled:y==null?void 0:y.disabled,options:(y==null?void 0:y.options)??[],value:(y==null?void 0:y.value)??"",formMenuSelect:(y==null?void 0:y.formMenuSelect)??[],isRoute:(y==null?void 0:y.isRoute)??!1,groupSelect:y!=null&&y.groupSelect?(vl=y==null?void 0:y.groupSelect)==null?void 0:vl.replaceAll('"',"").split(":"):[],isMainKey:(y==null?void 0:y.isMainKey)||(y==null?void 0:y.directiveLabel)&&!o[ie],columnType:(de==null?void 0:de.type)||(y==null?void 0:y.columnType)||"TEXTAREA",directiveLabel:y==null?void 0:y.directiveLabel,isExistChild:!!(y!=null&&y.directiveLabel&&o[ie]),childPath:ie})})}V.value=ue.getNewColumnChild(c),Je.value=ue.getNewColumnChild(c),Q.value=(L=V.value)==null?void 0:L.map(T=>T==null?void 0:T.label),Ue.value=(D=V.value)==null?void 0:D.every(T=>T==null?void 0:T.filterable),pe.value=(g=V.value)==null?void 0:g.every(T=>T==null?void 0:T.operable),_e.value=(h=V.value)==null?void 0:h.every(T=>T==null?void 0:T.sortable);let K=(b=(u=ue.getAllLeafNodes(V.value))==null?void 0:u.filter(T=>(T==null?void 0:T.type)!=="operate"))==null?void 0:b.map((T,y)=>({prop:(T==null?void 0:T.prop)??"a"+y,column:T.label}));$e.value=K;let w=[];ll.value===""?w=f==null?void 0:f[0]:w=(f==null?void 0:f.find(T=>(T==null?void 0:T.selectLabel)==="("+ll.value+")"))??(f==null?void 0:f.find(T=>!(T!=null&&T.selectLabel)));let ne=Array.isArray((P=w==null?void 0:w.contents)==null?void 0:P[0])&&((N=w==null?void 0:w.contents)!=null&&N[0].every(T=>Array.isArray(T)))?(G=w==null?void 0:w.contents)==null?void 0:G[0]:w==null?void 0:w.contents;E!=null&&E.contents&&((ae=E==null?void 0:E.contents)==null?void 0:ae.length)!==0&&(ne=(X=k.cloneDeep(ne))==null?void 0:X.map((T,y)=>{if(!Array.isArray(T)){let se={};for(let ie in T)ie!=="id"&&ie!=="index"&&(se[ie]=T[ie]);T=Object.values(se)}return T}));const ve=!!((q=V.value)!=null&&q.find(T=>T.prop==="index"));ne=ba(ne,E==null?void 0:E.contents,ve);const ce=[];ne==null||ne.forEach((T,y)=>{var ie;let se={};if(Array.isArray(T)){let de=[];T==null||T.filter(Ce=>!(Ce!=null&&Ce.id)).forEach((Ce,Se)=>{var yl,vl,Fe,bl,ml,kl;if((yl=K==null?void 0:K[Se])!=null&&yl.prop&&!Array.isArray(Ce)){let sl={};sl[K[Se].column]=Ce,be!=null&&be.value&&((vl=be==null?void 0:be.value)==null?void 0:vl.length)>0&&((Fe=be==null?void 0:be.value)!=null&&Fe.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl)))&&(de=(bl=be==null?void 0:be.value)==null?void 0:bl.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl))),de&&de.length>0?se[K[Se].prop]=de!=null&&de.find(ze=>{var Sl;return((Sl=Object.keys(ze))==null?void 0:Sl[0])===K[Se].column})?(ml=de==null?void 0:de.find(ze=>{var Sl;return((Sl=Object.keys(ze))==null?void 0:Sl[0])===K[Se].column}))==null?void 0:ml[K[Se].column]:Ce:se[K[Se].prop]=Ce}else Array.isArray(Ce)&&((kl=K[Se])!=null&&kl.prop?se[K[Se].prop]=Ce:se.children=Hl(Ce,K))})}else se=T;Array.isArray(T)&&T.some(de=>de==null?void 0:de.id)?ce.push(Object.assign(se,{id:(ie=T==null?void 0:T.find(de=>de.id))==null?void 0:ie.id})):se.id?ce.push(se):ce.push(Object.assign(se,{id:y.toString()}))}),Y.value=ca(ce,r,V.value),xl.value=ce,(H=xl.value)==null||H.forEach(T=>{var y;(y=Tl.value)==null||y.set(T.id,T)})}else V.value=[],Ee.value=[],Y.value=[],xl.value=[],Tl.value=new Map;((A=p==null?void 0:p.contents)==null?void 0:A.length)>0?Ie.value=p==null?void 0:p.contents:Ie.value=[],((j=d==null?void 0:d.contents)==null?void 0:j.length)>0?(ol.value=d==null?void 0:d.contents,el.value=d==null?void 0:d.contents):(ol.value=[],el.value=[]),nl.value=((z=Y==null?void 0:Y.value)==null?void 0:z.length)??0,ia(Y.value),Al.value=Y.value,Pe.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 K;return{...c,type:"edit",optionUrl:c!=null&&c.formMenuSelect&&((K=c==null?void 0:c.formMenuSelect)==null?void 0:K.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}}),Jl())};l.watch(()=>[s.itemData,ll.value,xa.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,f;return(p==null?void 0:p.key)===((f=(d=s==null?void 0:s.itemData)==null?void 0:d.find(m=>(m==null?void 0:m.key)==="columnPath"))==null?void 0:f.contents)}))){let p=ul.value,d={key:(r=(n=s==null?void 0:s.itemData)==null?void 0:n.find(f=>(f==null?void 0:f.key)==="columnPath"))==null?void 0:r.contents,value:(i=(o=s==null?void 0:s.itemData)==null?void 0:o.find(f=>(f==null?void 0:f.key)==="columnUsingPath"))==null?void 0:i.contents};p!=null&&p.find(f=>(f==null?void 0:f.key)===(d==null?void 0:d.key))?p=p==null?void 0:p.map(f=>((f==null?void 0:f.key)===(d==null?void 0:d.key)&&(f.value=d.value),f)):p.push(d),Te.setTableViewContents(p)}da(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(gl(e==null?void 0:e.form),Me.value=e==null?void 0:e.dialogTitle,Bl.value=!0,Qe.value=!0)},{immediate:!0,deep:!0});const pa=()=>{var e;(e=me.value)!=null&&e.includes("read")&&(Pe.value=!Pe.value)},hr=()=>{_l.value=!_l.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?Pe.value=!1:(e!=null&&e.includes("read")||(Pe.value=!0),e!=null&&e.includes("edit")||(Pe.value=!1)),ge.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||Pe.value},{immediate:!0}),l.watch(()=>Pe.value,e=>{var a;e?(Jl("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,ge.value=e||((a=s==null?void 0:s.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=Zl.value)==null?void 0:e.length},e=>{e===0&&(re.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 yr=(e,a)=>{var n;Jl("createClick"),a===re.pageSize&&(re.currentPage=Math.ceil(((n=Y.value)==null?void 0:n.length)/re.pageSize))},vr=(e,a,n)=>{var r;ta(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,Me.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",hl(!1)},Ae=e=>{var f,m,t,E,M,v,B,_,S,F;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=(f=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:f[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]):((E=(t=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:t[0])==null?void 0:E.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((v=(M=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:M[0])==null?void 0:v.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((S=(_=a==null?void 0:a[(B=r==null?void 0:r.child)==null?void 0:B.prop])==null?void 0:_[0])==null?void 0:S.contents)??(a==null?void 0:a[(F=r==null?void 0:r.child)==null?void 0:F.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},br=e=>{var m,t,E,M,v,B,_,S,F,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]):((M=(E=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:E[0])==null?void 0:M.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((B=(v=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:v[0])==null?void 0:B.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((F=(S=a==null?void 0:a[(_=r==null?void 0:r.child)==null?void 0:_.prop])==null?void 0:S[0])==null?void 0:F.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(L=>typeof L=="string"||typeof L=="number")),f=Array.isArray(i)&&(i==null?void 0:i.find(L=>L==null?void 0:L.url));return d&&f},mr=(e,a)=>e.find(n=>Object.values(n).some(r=>r===a));return l.watch(()=>Ne.value,async e=>{if(e){ye.setContentLoading(!0),await l.nextTick();const a=mr(Y.value,e==null?void 0:e.data);if(!a)return ye.setContentLoading(!1);await ea(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),ye.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,E,M;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"),f=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",Qr,[Yl.value?(l.openBlock(),l.createBlock(Re.ssTable,{id:"excel-table",pageObj:re,showIndex:ge.value,isTree:(m=O.compItem)==null?void 0:m.isTree,summaryInfo:oe,columns:V.value,defaultSort:xe,isCardViewport:_l.value,checkedColumns:Q.value,key:$l.value+JSON.stringify(V.value),tableData:Zl.value,isEditViewport:Pe.value,isShowPagination:Xl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ee.value,onDbClickRow:Ha,extraButton:ol.value,rowButton:Ie.value,cacheExtraButtons:el.value,isClearSelection:((t=Ke.value)==null?void 0:t.length)===0,onDoCurrentChange:wa,onDoSizeChange:_a,onContentClick:ea,onRowClick:Xa,onSelectChange:$a,onCellChange:vr,onChange:ta,onPreview:Fl,onSubmitEditingTable:Ma,onHandleColEditChange:Va,onHandleColTypeChange:ja,onClickButton:Vl},l.createSlots({headerButton:l.withCtx(v=>{var B,_;return[O.showHeader?(l.openBlock(),l.createBlock(Mr,{key:0,pageLayout:O.pageLayout,lockingPage:l.unref(Dl)===l.unref(W),filterValues:Il.value,selectNums:(B=Ke.value)==null?void 0:B.length,dataNums:(_=Y.value)==null?void 0:_.length,compName:O.compName,isDevMode:O.isDevMode,buttons:v.buttons,onButtonClick:a[0]||(a[0]=S=>Vl(S,"",{})),columns:V.value,onFilter:Ga,onGetImportData:Oa,level:O.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var v,B,_,S;return[((v=Y.value)==null?void 0:v.length)>0&&O.allowOperate?(l.openBlock(),l.createElementBlock("div",Zr,[(B=me.value)!=null&&B.includes("read")&&((_=me.value)!=null&&_.includes("edit"))&&((S=Ie.value)!=null&&S.some(F=>(F==null?void 0:F.label)==="编辑"))&&!_l.value&&l.unref(Dl)!==l.unref(W)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:pa},[l.createVNode(n,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:hr},[l.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:v,index:B})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:_=>yr(v,B)},[l.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,Ir)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:cr},{reference:l.withCtx(()=>[l.createElementVNode("span",en,[l.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",ln,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(o,{"model-value":_e.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=v=>Kl(v,"sortable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":Ue.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=v=>Kl(v,"filterable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":pe.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=v=>Kl(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:U},{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,an)]),_: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 B;return[l.createElementVNode("div",rn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((B=Object.keys(v))==null?void 0:B.filter(_=>{var S;return(S=he.value)==null?void 0:S.find(F=>(F==null?void 0:F.value)===_)}),_=>{var S,F;return l.openBlock(),l.createElementBlock("div",{key:_},[l.createVNode(o,{"model-value":v==null?void 0:v[_],"active-text":(F=(S=he.value)==null?void 0:S.find(x=>(x==null?void 0:x.value)===_))==null?void 0:F.label,onChange:x=>Ka(x,_,v)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",nn,[l.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(v=>{var B,_,S,F,x,L,D,g,h,u,b,P,N,G,ae,X,q,H;return[br(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",on,l.toDisplayString(Ae(v)),1)]),default:l.withCtx(()=>{var A;return[l.createElementVNode("div",tn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v==null?void 0:v.row[(A=v==null?void 0:v.column)==null?void 0:A.prop],j=>(l.openBlock(),l.createElementBlock("div",sn,[l.createElementVNode("div",{class:"prop-url",title:Ll(j),onClick:z=>Ra(j)},l.toDisplayString(Ll(j)),9,un),l.createElementVNode("div",{class:"prop-download",onClick:z=>qa(j)}," 下载 ",8,cn)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Ae(v))&&((_=(B=Ae(v))==null?void 0:B.toString())!=null&&_.includes(".txt")||(F=(S=Ae(v))==null?void 0:S.toString())!=null&&F.includes(".cpt")||(L=(x=Ae(v))==null?void 0:x.toString())!=null&&L.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ae(v))&&((g=(D=Ae(v))==null?void 0:D.toString())!=null&&g.includes(".txt")||(u=(h=Ae(v))==null?void 0:h.toString())!=null&&u.includes(".cpt")||(P=(b=Ae(v))==null?void 0:b.toString())!=null&&P.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ae(v))&&((G=(N=Ae(v))==null?void 0:N.toString())!=null&&G.includes(".txt")||(X=(ae=Ae(v))==null?void 0:ae.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:A=>Aa(Ae(v))},l.toDisplayString(Ae(v)===0?"0":Ae(v)),13,dn))]}),_:2},[((E=Ie.value)==null?void 0:E.length)>0&&l.unref(Dl)!==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(()=>[l.createElementVNode("div",Xr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ja(Ie.value,v),(B,_)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:_,onClick:S=>Vl(B==null?void 0:B.label,v,{extra:B})},[l.createElementVNode("div",{style:l.normalizeStyle({color:B==null?void 0:B.textColor}),class:"extra-button-label"},l.toDisplayString(B==null?void 0:B.label),5)],8,Yr))),128))])]),_:2},1024)]),key:"0"}:void 0,((M=Y.value)==null?void 0:M.length)>0?{name:"batchButton",fn:l.withCtx(v=>[l.withDirectives(l.createVNode(Pr,{lockingPage:l.unref(Dl)===l.unref(W),buttons:v.buttons,selectTableItems:Ke.value,onButtonClick:a[1]||(a[1]=B=>Vl(B,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,ee.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!ee.value]])]),key:"1"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):l.createCommentVNode("",!0),l.createVNode(Cl.ssDialog,{title:Me.value,visible:Qe.value,width:Ea.value,onBeforeDestroy:Fa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",pn,[l.createVNode(Re.ssForm,{rowContents:Xe.value,isEnableWrap:!1,showOperator:!1,onChange:dr,onClickTrigger:za,isEdit:El.value,onBlurChange:Pa,onPreview:Fl},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[Bl.value?(l.openBlock(),l.createElementBlock("div",fn,[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=>hl(!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(Cl.ssDialog,{title:Me.value,visible:Nl.value,width:Ml.value,onBeforeDestroy:a[9]||(a[9]=v=>Nl.value=!1)},{default:l.withCtx(()=>[l.createVNode(qr)]),footer:l.withCtx(()=>[l.createElementVNode("div",gn,[l.createVNode(d,{onClick:a[8]||(a[8]=v=>Nl.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:Ya,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(Re.ssFilePreview,{key:1,fileDataList:C.value,onDestroy:Qa},null,8,["fileDataList"])):l.createCommentVNode("",!0),qe.value?(l.openBlock(),l.createBlock(Cl.ssDialog,{key:2,visible:qe.value,onBeforeDestroy:ir,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:l.withCtx(()=>[l.createVNode(Ve.ThreeViewerHost,{"file-urls":cl.value,isThreeScene:Oe.value,isSelfWindow:!0,threeData:rl.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Cl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=v=>e.componentVisible=!1),width:Ml.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(f,{dialogItem:Ul.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(Cl.ssDialog,{title:De.title,visible:De.show,width:De.width,onBeforeDestroy:ar},{default:l.withCtx(()=>[l.createElementVNode("div",hn,[l.createVNode(Re.ssForm,{rowContents:De==null?void 0:De.contents,formRules:De==null?void 0:De.formRules,showOperator:!1,buttonValue:De.buttonValue,isEdit:El.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:rr},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},vn=jl._export_sfc(yn,[["__scopeId","data-v-20e45bfb"]]);exports.formGetOptions=Gl;exports.getSelectRow=Ql;exports.ssTable=vn;exports.useFormComp=Sa;exports.useFormToTableComp=ya;exports.useUnit=va;
|
|
1
|
+
"use strict";const l=require("vue"),k=require("./index-CEwxrYB-.cjs"),Wl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DwX8qItu.cjs"),Re=require("./index-Csi6xtxp.cjs"),Ve=require("./threeViewerHost-DyPs12hY.cjs"),ue=require("./index.vue_vue_type_style_index_1_lang-CrR96PnG.cjs");require("./index.vue_vue_type_style_index_1_lang-DXs-lrLT.cjs");const jl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Cl=require("./index-BAjzyphl.cjs");require("./index-C4UuTGqh.cjs");const ga=require("./isString-Cvx5mmsS.cjs"),Gl=O=>O.match(/\((.*)\)/)[1],ha={__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),U=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(()=>U.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 ge=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(ge,{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:U})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},kr={key:0,class:"extra-button-content"},Sr={class:"table-operator-wrap"},Cr={class:"extra-button-filter"},Dr={class:"form-content-value"},xr={key:0,class:"extra-header"},Tr={class:"drop-menu",style:{width:"120px"}},Er={key:0},Nr={key:1},Br={key:1,class:"extra-button-content tabs-button-wrapper"},Ar={class:"table-operator-wrap"},wr={class:"extra-button-filter"},_r={class:"form-content-value"},Ur={key:0,class:"extra-header"},Or={class:"drop-menu",style:{width:"120px"}},Lr={key:0},Vr={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,U=l.ref(""),s=l.ref(!1),ee=l.ref([]),ge=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),me=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],he=oe=>{const re=oe.raw;if(!re)return;const te=new FileReader;te.onload=V=>{try{const xe=new Uint8Array(V.target.result),Ee=Ve.readSync(xe,{type:"array"}),qe=Ee.SheetNames[0],Oe=Ee.Sheets[qe],Je=Ve.utils.decode_range(Oe["!ref"]).e.c+1,we=new Array(Je).fill(""),C=[];for(const J in Oe){if(J[0]==="!")continue;const{r:W,c:ke}=Ve.utils.decode_cell(J);let Ne=Oe[J].v;if(Oe[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 ye=C==null?void 0:C[0];if(!(ye!=null&&ye.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(re)},je=oe=>{var te;const re=(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",re,oe,!0)},He=oe=>{Q("buttonClick",oe)},le=oe=>{var re,te;ee.value=(te=(re=ue.getColumnChild(k.cloneDeep(oe)))==null?void 0:re.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}))},_e=l.ref(!1),Ue=oe=>{var re;if((oe==null?void 0:oe.buttonName)==="确认"&&(Q("filter",oe==null?void 0:oe.content),_e.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=(re=ee.value)==null?void 0:re.map(V=>({...V,value:""})),Q("filter",te),_e.value=!1}s.value=!1},pe=()=>{var re,te;ee.value=(re=ee.value)==null?void 0:re.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,re)=>{var Oe,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",kr,[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",Sr,[l.createElementVNode("div",Cr,[l.createVNode(ha,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,ye,J,W;return[l.createVNode(xe,{modelValue:U.value,"onUpdate:modelValue":re[1]||(re[1]=ke=>U.value=ke),style:{"min-width":"80px"},placeholder:_e.value?(J=(ye=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:ye.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[!U.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:pe},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:re[0]||(re[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",Dr,[(l.openBlock(),l.createBlock(Re.ssForm,{rowContents:ee.value,buttonValue:ge.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ge.value,isStartJustify:!1,onOnButtonClick:Ue},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Oe=O.buttons)==null?void 0:Oe.length)>0?(l.openBlock(),l.createElementBlock("div",xr,[(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,ye)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:ye},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":he,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(Re._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",Tr,[(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",Er,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Nr,"("+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",Br,[l.createElementVNode("div",Ar,[l.createElementVNode("div",wr,[l.createVNode(ha,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,ye,J,W;return[l.createVNode(xe,{modelValue:U.value,"onUpdate:modelValue":re[3]||(re[3]=ke=>U.value=ke),style:{"min-width":"80px"},placeholder:_e.value?(J=(ye=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:ye.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[!U.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:pe},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:re[2]||(re[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",_r,[(l.openBlock(),l.createBlock(Re.ssForm,{rowContents:ee.value,buttonValue:ge.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ge.value,isStartJustify:!1,onOnButtonClick:Ue},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Je=O.buttons)==null?void 0:Je.length)>0?(l.openBlock(),l.createElementBlock("div",Ur,[(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,ye)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:ye},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":he,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(Re._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",Or,[(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",Lr,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Vr,"("+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)])]))}}},Mr=jl._export_sfc(jr,[["__scopeId","data-v-b0dbf278"]]),$r=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,U=ee=>{$("buttonClick",ee)},s=ee=>{var ge;return ee!=null&&ee.includes("删除")?((ge=Q.selectTableItems)==null?void 0:ge.length)>0?"warning-active-type":"warning-type":"default-type"};return(ee,ge)=>{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,he=>(l.openBlock(),l.createBlock(me,{key:he==null?void 0:he.label,disabled:!!O.lockingPage,class:l.normalizeClass(s(he==null?void 0:he.label)),onClick:je=>U(he==null?void 0:he.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(he==null?void 0:he.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Pr=jl._export_sfc($r,[["__scopeId","data-v-70b12973"]]),ya=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(O){this.selectArray=O},setSelectString(O){this.selectString=O}}}),Kr={class:"calculator-content"},Fr={class:"calculator-child"},zr={class:"calculator-child"},Rr=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"}]}),($,U)=>(l.openBlock(),l.createElementBlock("div",Kr,[l.createElementVNode("div",Fr,[l.createVNode(Re.ssForm,{rowContents:Z.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",zr,[l.createVNode(Re.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),qr=jl._export_sfc(Rr,[["__scopeId","data-v-73db0fe7"]]),va=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(O){this.selectIndex=O},setSelectMenu(O){this.selectMenu=O},setSelectTitle(O){this.selectTitle=O}}}),Hl=(O,Z)=>{let Q=O,$=Z;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((U,s)=>{if(Array.isArray(U)){let ee={};return U=U==null?void 0:U.forEach((ge,me)=>{var he;(he=$==null?void 0:$[me])!=null&&he.prop?ee[$[me].prop]=ge:Array.isArray(ge)&&(ee.children=Hl(ge,$))}),Object.assign(ee,{id:s})}else return U})),Q},ba=(O,Z,Q)=>{let $=O,U=Z;return $=$==null?void 0:$.map((s,ee)=>{var ge,me;return!Array.isArray(s)||!((ge=U==null?void 0:U[ee])!=null&&ge.label)&&!Q||(s.unshift(((me=U==null?void 0:U[ee])==null?void 0:me.label)??""),s.some(he=>Array.isArray(he))&&(s=s==null?void 0:s.map(he=>{var je;return Array.isArray(he)&&(he=ba(he,(je=U==null?void 0:U[ee])==null?void 0:je.children,Q)),he}))),s}),$},Jr=(O,Z,Q)=>{if(Z==="")return O==null?void 0:O.filter($=>($==null?void 0:$.id)!==Q);{const $=Z.split("-");return Wr(O,$,Q)}},Wr=(O,Z,Q)=>{let $=O,U=Z;return(U==null?void 0:U.length)===0?$=$==null?void 0:$.filter(s=>s.id!==Q):$=$==null?void 0:$.map(s=>(s.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),s=ma(s,U,Q)),s)),$},ma=(O,Z,Q)=>{var s,ee;let $=O,U=Z;return(U==null?void 0:U.length)===0?$.children=(s=$.children)==null?void 0:s.filter(ge=>ge.id!==Q):$.children=(ee=$.children)==null?void 0:ee.map(ge=>(ge.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),ge=ma(ge,U,Q)),ge)),$},Gr=(O,Z,Q)=>{if(Z==="")return Q;{const $=Z.split("-");return Hr(O,$,Q)}},Hr=(O,Z,Q)=>{let $=O,U=Z;return(U==null?void 0:U.length)===0?$=Q:$=$==null?void 0:$.map(s=>(s.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),s=ka(s,U,Q)),s)),$},ka=(O,Z,Q)=>{var s;let $=O,U=Z;return(U==null?void 0:U.length)===0?$.children=Q:$.children=(s=$.children)==null?void 0:s.map(ee=>(ee.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),ee=ka(ee,U,Q)),ee)),$},Sa=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(O){this.objUrl=O},setBlobUrls(O){this.blobUrls=O}}}),Ql=async O=>{var s,ee,ge,me,he,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 U=await ue.menuToParent(Z);if(U==null||U.forEach(le=>{var _e,Ue,pe,oe;(le==null?void 0:le.name)===(((oe=(pe=(Ue=(_e=k.cloneDeep(O))==null?void 0:_e.optionUrl)==null?void 0:Ue.groupSelect)==null?void 0:pe[0])==null?void 0:oe.replaceAll("'",""))??"")&&($=le==null?void 0:le.id)}),$!==""){const le=(ge=U==null?void 0:U.find(pe=>{var oe,re,te,V;return(pe==null?void 0:pe.name)===(((re=(oe=O==null?void 0:O.groupSelect)==null?void 0:oe.split(":"))==null?void 0:re[0])||((V=(te=O==null?void 0:O.optionUrl)==null?void 0:te.groupSelect)==null?void 0:V[0]))}))==null?void 0:ge.compData;let _e=(he=(me=le==null?void 0:le.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:me.contents)==null?void 0:he.map(pe=>pe==null?void 0:pe.label),Ue=(He=(je=le==null?void 0:le.find(pe=>(pe==null?void 0:pe.key)==="tableContents"))==null?void 0:je.contents)==null?void 0:He.map(pe=>(pe=pe==null?void 0:pe.filter(oe=>!(oe!=null&&oe.id)),pe));Ue==null||Ue.forEach(pe=>{Q.push(ue.getValueToObjectValue(pe,_e))})}return Q},Qr={class:"table-content"},Xr={class:"menu-config-wrap"},Yr=["onClick"],Zr={key:0,class:"viewport-wrap"},Ir=["onClick"],en={title:"选择显示列信息"},ln={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},an=["title"],rn={class:"col-operate-wrap"},nn={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},on={class:"pop-view"},tn={class:"pop-wrapper"},sn={class:"file-list-pop"},un=["title","onClick"],cn=["onClick"],dn=["onClick"],pn={class:"form-content"},fn={key:0,class:"dialog-footer"},gn={class:"dialog-footer"},hn={class:"form-content"},yn={__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 fa;const Q=l.ref([]),$=Sa(k.pinia),U=l.ref(null),s=O,ee=l.ref(s==null?void 0:s.allowSelect),ge=l.ref((fa=s==null?void 0:s.config)==null?void 0:fa.showIndex),me=l.ref(),he=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),je=ue.useOriginalState(k.pinia),{originalPath:He}=k.storeToRefs(je),le=He.value,_e=l.ref(!1),Ue=l.ref(!1),pe=l.ref(!1),oe=l.reactive({column:{},status:!1,text:"合计"}),re=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),Oe=l.ref(!1),rl=l.ref(null);Ve.useThreeSystem();const Je=l.ref([]),we=l.ref(!1),C=l.ref(),ye=ue.useMenuState(),{importLoading:J,activeMenuPath:W,contentLoading:ke,linkMenuInfo:Ne}=k.storeToRefs(ye),We=ue.useTableComp(k.pinia),Te=ue.useModelComp(k.pinia),{extraContents:be,cacheUpdatingData:il,tableViewContents:ul,tableLoading:bn,pageMapState:Ze,lockingPage:Dl}=k.storeToRefs(Te),Y=l.ref([]),xl=l.ref([]),Tl=l.ref(new Map);l.ref(!1);const Ge=l.ref("");l.ref();const El=l.ref(!0),nl=l.ref(0),Xl=l.ref(!0),Me=l.ref(""),Qe=l.ref(!1),Ca=l.ref({label:"查看三维模型"}),Nl=l.ref(!1),Ml=l.ref(),Le=l.ref([]),Ie=l.ref([]),Bl=l.ref(!1),cl=l.ref([]),ol=l.ref([]),el=l.ref([]),Xe=l.ref([]),$e=l.ref(),Be=l.ref(),Da=ya(k.pinia),Al=l.ref(),$l=l.ref(0),wl=va(k.pinia),{selectIndex:xa,selectMenu:Ye,selectTitle:Pl}=k.storeToRefs(wl),{selectString:ll}=k.storeToRefs(Da),Ta=k.useLoginState(k.pinia),{loginUserInfo:fe}=k.storeToRefs(Ta),Ea=l.ref(720),Pe=l.ref(!1),_l=l.ref(!1),Ke=l.ref([]),al=l.ref(),dl=l.ref(!0),Yl=l.ref(!0),Ul=l.ref([]),Na=l.inject("contentRef");l.provide("contentRef",Na),l.watch(()=>{var e;return(e=Y.value)==null?void 0:e.length},e=>{re.total=e}),l.watch(()=>ul.value,async()=>{var i,p,d,f,m,t,E,M,v,B,_,S,F,x,L,D,g,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=(M=(E=(t=(m=(f=s==null?void 0:s.itemData)==null?void 0:f.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:m.contents)==null?void 0:t.split("["))==null?void 0:E[1])==null?void 0:M.split("]"))==null?void 0:v[0],a=((F=(S=(_=(B=s==null?void 0:s.itemData)==null?void 0:B.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:_.contents)==null?void 0:S.split("["))==null?void 0:F[0])+((L=(x=ul.value)==null?void 0:x.find(u=>(u==null?void 0:u.key)===e))==null?void 0:L.value),n=((g=(D=s==null?void 0:s.itemData)==null?void 0:D.find(u=>(u==null?void 0:u.key)==="pageGroup"))==null?void 0:g.contents)??"",r=await ue.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;da(o,s.allMapContents)},{deep:!0});const Ba=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 f;((n=d==null?void 0:d.data)==null?void 0:n.code)===200&&(f=((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=f==null?void 0:f.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 B=Object.keys(v),_={};return B.forEach((S,F)=>{_[e[F]]=v[S]}),_}),E=t==null?void 0:t.map(v=>({key:m,value:{tableData:v}})),M=await k.batchAddInsofDataApi({dataList:E});((p=M==null?void 0:M.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)}},Aa=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(()=>{Yl.value=!1;let e=$l.value;$l.value=e+1});const Zl=l.computed(()=>{var r,o;const e=(re.currentPage-1)*re.pageSize,a=e+re.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",re),(o=Y.value)==null?void 0:o.slice(e,a)}),wa=e=>{re.currentPage=e,te("getSliceContLength",re)},_a=e=>{var a;re.pageSize=e,e*re.currentPage>((a=Y.value)==null?void 0:a.length)&&(re.currentPage=1,re.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),te("getSliceContLength",re)},Ua=(e,a)=>{var p,d;const n=(d=(p=V.value)==null?void 0:p.map(f=>f==null?void 0:f.prop))==null?void 0:d.filter(f=>f!=="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(f=>n==null?void 0:n.find(m=>f===m))))return k.ElMessage.error("导入的数据表头不匹配");Ba(r,a)},Oa=(e,a)=>{var n;Te.setRefreshCurStructure(!1),((n=V.value)==null?void 0:n.length)===0||Ua(e,a)},La=(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],E=[];for(const[M,v]of Object.entries(t))E.push(v),i.length<p(t)&&i.push(M);o.push(E)}o.unshift(i);const d=Ve.utils.aoa_to_sheet(o),f=Ve.utils.book_new();Ve.utils.book_append_sheet(f,d,r),Ve.writeFileSync(f,`${a}.xlsx`),Ke.value=[]},Ol=async(e,a,n,r=!1,o)=>{var i,p,d,f,m,t,E,M;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 B=(m=(f=(d=(p=v==null?void 0:v.data)==null?void 0:p.result)==null?void 0:d[0])==null?void 0:f.value)==null?void 0:m.pageData;r?B={...B,compData:(E=B==null?void 0:B.compData)==null?void 0:E.map(S=>{var F;return(S==null?void 0:S.key)==="header"?{...S,contents:(F=S==null?void 0:S.contents)==null?void 0:F.map(x=>({...x,[e]:n}))}:S})}:B={...B,compData:(t=B==null?void 0:B.compData)==null?void 0:t.map(S=>{var F,x;return(S==null?void 0:S.key)==="header"?{...S,contents:(F=S==null?void 0:S.contents)==null?void 0:F.map(L=>(L==null?void 0:L.prop)===(a==null?void 0:a.prop)?{...L,[e]:n}:L)}:(S==null?void 0:S.key)==="tableToForm"&&o?{...S,contents:(x=S==null?void 0:S.contents)==null?void 0:x.map(L=>(L==null?void 0:L.prop)===(a==null?void 0:a.prop)?{...L,[o]:n}:L)}:S})};const _=await k.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:B}});((M=_==null?void 0:_.data)==null?void 0:M.code)===200?(k.ElMessage.success("编辑成功"),Te.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(v){k.ElMessage.error(v)}},Va=async(e,a)=>{await Ol("label",a,e)},ja=async(e,a)=>{await Ol("columnType",a,e,!1,"type")},Ma=()=>{il.value?Pe.value=!1:pa()},$a=e=>{Ke.value=e},Pa=(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)}))}),Ka=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 Ol(a,n,e)},Kl=async(e,a)=>{await Ol(a,null,e,!0)},Fa=()=>{Qe.value=!1},za=e=>{te("clickTrigger",e)},Fl=async e=>{var i,p,d,f,m,t,E,M,v,B,_,S,F,x,L;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],Oe.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")||(f=a==null?void 0:a.toString())!=null&&f.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(","),Oe.value=!1,qe.value=!0;return}if((E=a==null?void 0:a.toString())!=null&&E.includes(".stl")||(M=a==null?void 0:a.toString())!=null&&M.includes(".STL")||(v=a==null?void 0:a.toString())!=null&&v.includes(".obj")||(B=a==null?void 0:a.toString())!=null&&B.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let D,g=[],h={};if(Array.isArray(a)?D=a:D=a==null?void 0:a.split(","),D==null||D.forEach(u=>{u.includes(".mtl")?g.push(u):h.blob=h.blob?h.blob+","+u:u}),(g==null?void 0:g.length)>0&&(h.mtlBlobs=g),r&&(h.suffix=r),(S=(_=Object.values(h))==null?void 0:_[0])!=null&&S.includes("http:"))o.push(h);else{const u=new Blob([h.blob],{type:"application/octet-stream;charset=UTF-8"});let b=URL.createObjectURL(u),P="";(F=a==null?void 0:a.split("/"))==null||F.forEach((N,G)=>{var ae;G===((ae=a==null?void 0:a.split("/"))==null?void 0:ae.length)-1&&(P=N)}),(x=h.blob)!=null&&x.includes(".stl")&&(P=(P==null?void 0:P.replaceAll(">",""))+".urdf"),C.value=[{name:P,blobUrl:b}],we.value=!0}}else{const D=await k.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),g=new Blob([D.data],{type:"application/octet-stream;charset=UTF-8"});let h=URL.createObjectURL(g),u="";(L=a==null?void 0:a.split("/"))==null||L.forEach((b,P)=>{var N;P===((N=a==null?void 0:a.split("/"))==null?void 0:N.length)-1&&(u=b)}),C.value=[{name:u,blobUrl:h}],we.value=!0}(o==null?void 0:o.length)>0&&$.setBlobUrls(o)},Ll=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},Ra=async e=>{let a=null,n=null,r=null;if(e!=null&&e.downloadUrl){const i=await zl(),p=Re.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()}),f=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(f),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 Ve.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=Ll(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};Fl(i);return}const o={name:n,blobUrl:a};C.value=[o],we.value=!0},qa=async e=>{let a=null,n=null;if(e!=null&&e.downloadUrl){const i=await zl(),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 Ve.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(i.data),n=Ll(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)},Ja=(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,Ca.value]:(n=s==null?void 0:s.config)!=null&&n.allowMove?[...e,{label:"迁移"}]:e},Wa=(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})),Il=l.ref([]),Ga=async(e,a,n=!1)=>{var r;if(e){if(Te.setTableLoading(!0),Il.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(o=>!o)))return Y.value=xl.value;if(n){Y.value=[...Tl.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=Wa(Tl.value,e),Te.setTableLoading(!1)}},Ha=async e=>{var p,d,f,m,t,E,M,v,B,_,S,F,x,L,D;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((p=fe.value)==null?void 0:p.account)||((d=fe.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((f=fe.value)==null?void 0:f.account)||((m=fe.value)==null?void 0:m.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(E=(t=a==null?void 0:a.data)==null?void 0:t.result)==null?void 0:E.map(g=>g==null?void 0:g.id);const o=(v=(M=n==null?void 0:n.data)==null?void 0:M.result)==null?void 0:v.map(g=>g==null?void 0:g.id);r=[...k.cloneDeep(r),...o],(r==null?void 0:r.length)>0&&(r!=null&&r.every(g=>g!==null&&g))&&await k.batchDeleteInsofDataApi({ids:r});let i=await ue.getItemData(W.value,sessionStorage.getItem("systemKey"),e.id);if(i=i==null?void 0:i.filter(g=>g.comp!=="methodButton"),i&&i.length>0){const g=!Array.isArray(Pl.value)&&((B=Pl.value)==null?void 0:B.key)!=="main"?[]:Pl.value;g.push({key:Ye.value===""?(_=e==null?void 0:e.id)==null?void 0:_.toString():Ye.value+"-"+((S=e==null?void 0:e.id)==null?void 0:S.toString()),value:e[(F=Object.keys(e))==null?void 0:F.filter(h=>h!=="index"&&h!=="id")[0]]}),wl.setSelectMenu(Ye.value===""?(x=e==null?void 0:e.id)==null?void 0:x.toString():Ye.value+"-"+((L=e==null?void 0:e.id)==null?void 0:L.toString())),wl.setSelectTitle(g),wl.setSelectIndex((D=e==null?void 0:e.id)==null?void 0:D.toString()),te("pageChange",i)}},ea=async(e,a,n,r)=>{var i,p,d,f,m,t,E,M,v,B,_,S,F,x,L,D,g,h,u,b,P,N,G,ae,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],A=(m=(f=r==null?void 0:r.columnType)==null?void 0:f.childPath)==null?void 0:m.split(le),j=[];A==null||A.forEach((R,c)=>{(A==null?void 0:A.length)-1===c&&j.push(H),j.push(R)}),j=j.join(le);let z=await ue.getItemData(j,sessionStorage.getItem("systemKey"),""),I=await ue.getItemData((t=r==null?void 0:r.columnType)==null?void 0:t.childPath,sessionStorage.getItem("systemKey"),"");if(!z||(z==null?void 0:z.length)===0){let R=[];I==null||I.forEach(K=>{var ve,ce,T,y;let w={type:"structure",pageKey:j,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(ve=fe.value)==null?void 0:ve.id,parentPageKey:"",createUserLayer:((ce=fe.value)==null?void 0:ce.dept)||((T=fe.value)==null?void 0:T.部门名称)},ne={pageData:{comp:K==null?void 0:K.comp,compData:(y=K==null?void 0:K.compData)==null?void 0:y.filter(se=>(se==null?void 0:se.key)!=="tableContents"),name:K==null?void 0:K.name,isShow:K==null?void 0:K.isShow}};R.push({key:w,value:ne})}),(R==null?void 0:R.length)>0&&await k.batchAddInsofDataApi({dataList:R});let c=await ue.getItemData(j,sessionStorage.getItem("systemKey"),"");Ul.value=c}else{let R=I==null?void 0:I.map(c=>{var K,w;return(c==null?void 0:c.comp)==="Form"?c.compData=(K=c.compData)==null?void 0:K.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 y,se,ie,de,Ce;let T=(Ce=(de=(ie=(se=(y=z==null?void 0:z.find(Se=>(Se==null?void 0:Se.name)===(c==null?void 0:c.name)))==null?void 0:y.compData)==null?void 0:se.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:ie.contents)==null?void 0:de.find(Se=>(Se==null?void 0:Se.prop)===(ce==null?void 0:ce.prop)))==null?void 0:Ce.value;return ce.value=T,ce})),ne}):c=z==null?void 0:z.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)),c.id=(w=z==null?void 0:z.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)))==null?void 0:w.id,c});Ul.value=R}te("routeUrl",Ul.value,{isEdit:!0,routerUrl:j});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((E=k.cloneDeep(q))==null?void 0:E.map(async A=>{var I,R,c,K;const j=await Ve.downloadAvatarApi({url:A==null?void 0:A.url});let z=URL.createObjectURL(j.data);return{name:(A==null?void 0:A.name)+"."+((K=(I=A==null?void 0:A.url)==null?void 0:I.split("."))==null?void 0:K[((c=(R=A==null?void 0:A.url)==null?void 0:R.split("."))==null?void 0:c.length)-1]),blobUrl:z}}));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){(M=o==null?void 0:o[0])==null||M.prop;let q=k.cloneDeep(W).value+le+(r==null?void 0:r.data),H=k.cloneDeep(W).value,A=(B=(v=Ze.value[q])==null?void 0:v.filter(R=>{var c,K;return((c=R==null?void 0:R.key)==null?void 0:c.type)==="structure"&&((K=R==null?void 0:R.key)==null?void 0:K.parentTable)===""}))==null?void 0:B.map(R=>{var c;return(c=R==null?void 0:R.value)==null?void 0:c.pageData}),j={};(_=V.value)==null||_.forEach(R=>{(R==null?void 0:R.label)!=="操作"&&(j[R.label]=n[R.prop]??n[R.label])});let z=(F=(S=s==null?void 0:s.itemData)==null?void 0:S.find(R=>(R==null?void 0:R.key)==="mainRouters"))==null?void 0:F.contents,I;if((z==null?void 0:z.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=z==null?void 0:z.find(K=>(K==null?void 0:K.key)===R);I=(c==null?void 0:c.routerContent)+le+(c==null?void 0:c.key)}if((A==null?void 0:A.length)>0)await ue.getItemData(q+le+`updateLoading${((L=fe.value)==null?void 0:L.account)||((D=fe.value)==null?void 0:D.账号)}`,sessionStorage.getItem("systemKey"),"")||await ue.loadingConstruct(q,q+le+`updateLoading${((g=fe.value)==null?void 0:g.account)||((h=fe.value)==null?void 0:h.账号)}`,j,I),Te.setRouteToChildPath(H),ye.setActiveMenuPath(q+le+`updateLoading${((u=fe.value)==null?void 0:u.account)||((b=fe.value)==null?void 0:b.账号)}`);else{(P=o==null?void 0:o[0])==null||P.prop;let R=k.cloneDeep(W).value+le+(r==null?void 0:r.data),c=k.cloneDeep(W).value;await ue.getItemData(c+le,sessionStorage.getItem("systemKey"),""),await ue.loadingConstruct(c+le,R,j),await ue.loadingConstruct(R,R+le+`updateLoading${((N=fe.value)==null?void 0:N.account)||((G=fe.value)==null?void 0:G.账号)}`,j,I),Te.setRouteToChildPath(c),ye.setActiveMenuPath(R+le+`updateLoading${((ae=fe.value)==null?void 0:ae.account)||((X=fe.value)==null?void 0:X.账号)}`)}}},Qa=()=>{we.value=!1},Xa=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 Ya=()=>{},Za=async()=>{const e=W.value,a=sessionStorage.getItem("systemKey"),n=await ue.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},zl=async()=>`Bearer ${k.Local.get("access-token")}`,Ia=async(e,{token:a,inputData:n}={})=>await k.axios.post(e,n,{headers:{Authorization:a}}).catch(o=>(ye.setImportLoading(!1),Promise.reject(o))),er=e=>{var r;let a={};const n=[];return a.form={},(r=k.cloneDeep(e))==null||r.forEach((o,i)=>{var p,d,f,m,t,E,M,v,B,_,S,F,x,L;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=(f=o==null?void 0:o.compData)==null?void 0:f.find(u=>(u==null?void 0:u.key)==="tableContents"))==null?void 0:m.contents)==null?void 0:t.map(u=>u.slice(1));(_=(B=(v=(M=(E=o==null?void 0:o.compData)==null?void 0:E.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:M.contents)==null?void 0:v[0])==null?void 0:B[0])==null||_.label;let g=(F=(S=o==null?void 0:o.compData)==null?void 0:S.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:F.contents,h=[];D==null||D.forEach(u=>{let b=[];u==null||u.forEach((P,N)=>{var ae;let G={};((ae=g[N])==null?void 0:ae.label)!=="操作"&&(G[g[N].label]=P,b.push(G))}),h.push(b)}),a[o.name]=h}else{const D=(L=(x=o.compData)==null?void 0:x.find(g=>(g==null?void 0:g.key)==="formContent"))==null?void 0:L.contents;D==null||D.forEach(g=>{var h,u;if(g.prop!==""){let b=g==null?void 0:g.value;Array.isArray(b)?b=((h=b==null?void 0:b[0])==null?void 0:h.oldUrl)||(b??"http://222.92.178.198:62001/"+((u=b==null?void 0:b[0])==null?void 0:u.url)):b=b.toString(),g={key:(g==null?void 0:g.prop)??(g==null?void 0:g.label),value:b},n.push(g)}})}}),a.form=ue.getFormContents(n),a},lr=async(e,a,n)=>{var P,N,G,ae,X,q,H,A,j,z,I,R;ye.setImportLoading(!0);const r=await Za().catch(c=>(ye.setImportLoading(!1),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, 缺少算法执行接口"),ye.setImportLoading(!1);return}const p=V.value||[],d=p.find(c=>(c==null?void 0:c.prop)==="输入"),f=d==null?void 0:d.prop;let m=a==null?void 0:a[f];const t=await zl().catch(c=>(ye.setImportLoading(!1),Promise.reject(c)));let E=!1,M="";(P=V.value)==null||P.forEach(c=>{(c==null?void 0:c.prop)===f&&(E=!!(c!=null&&c.childPath),M=c==null?void 0:c.childPath)});let v="",B="";if(E){let c=(G=(N=V.value)==null?void 0:N.find(ve=>(ve==null?void 0:ve.isMainKey)===!0))==null?void 0:G.prop;B=a==null?void 0:a[c];let K=M==null?void 0:M.split(le),w=[];K==null||K.forEach((ve,ce)=>{(K==null?void 0:K.length)-1===ce&&w.push(B),w.push(ve)}),w=w.join(le),v=w;let ne=await ue.getItemData(w,sessionStorage.getItem("systemKey"),"");m=er(ne)}const _=await Ia(i,{token:t,inputData:m}).catch(c=>(ye.setImportLoading(!1),Promise.reject(c))),S=(ae=_==null?void 0:_.data)==null?void 0:ae.data,F=r==null?void 0:r.find(c=>(c==null?void 0:c.prop)==="算法名称");F==null||F.value;const x=p.find(c=>(c==null?void 0:c.prop)==="输出"),L=x==null?void 0:x.directiveLabel;v=v==null?void 0:v.replaceAll(d==null?void 0:d.directiveLabel,L);const D=(X=k.cloneDeep(v))==null?void 0:X.replaceAll(le+B,"");let g=await ue.getItemData(v,sessionStorage.getItem("systemKey"),""),h=await ue.getItemData(D,sessionStorage.getItem("systemKey"),"");if(g){let c=[],K=[];g==null||g.forEach(w=>{var ne,ve;if((w==null?void 0:w.comp)==="Table")(ne=w==null?void 0:w.compData)==null||ne.forEach(ce=>{var T;(ce==null?void 0:ce.key)==="tableContents"&&((T=ce==null?void 0:ce.contents)==null||T.forEach(y=>{var se,ie;(se=y==null?void 0:y[0])!=null&&se.id&&c.push((ie=y==null?void 0:y[0])==null?void 0:ie.id)}))});else if((w==null?void 0:w.comp)==="Form"){w.compData=(ve=w==null?void 0:w.compData)==null?void 0:ve.map(T=>{var y;return(T==null?void 0:T.key)==="formContent"&&(T.contents=(y=T==null?void 0:T.contents)==null?void 0:y.map(se=>{var ie,de;return(ie=S==null?void 0:S.form)!=null&&ie[se.prop]&&(se.value=(de=S==null?void 0:S.form)==null?void 0:de[se.prop]),se})),T});let ce={pageData:{comp:w==null?void 0:w.comp,name:w==null?void 0:w.name,isShow:w==null?void 0:w.isShow,compData:w==null?void 0:w.compData}};K.push({id:w==null?void 0:w.id,value:ce})}}),(K==null?void 0:K.length)>0&&await k.batchUpdateInsofDataApi({dataList:K}),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 K={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:v,parentTable:"",createUserId:(q=fe.value)==null?void 0:q.id,createUserOrg:((H=fe.value)==null?void 0:H.dept)||((A=fe.value)==null?void 0:A.部门名称)};h==null||h.forEach(w=>{let ve={pageData:{comp:w==null?void 0:w.comp,name:w==null?void 0:w.name,isShow:w==null?void 0:w.isShow,compData:w==null?void 0:w.compData}};c.push({key:K,value:ve})})}if(S!=null&&S.form){let K={type:"structure",pageKey:v,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(j=fe.value)==null?void 0:j.id,parentPageKey:"",createUserLayer:((z=fe.value)==null?void 0:z.dept)||((I=fe.value)==null?void 0:I.部门名称)};h==null||h.forEach(w=>{var T;let ne=(T=w==null?void 0:w.compData)==null?void 0:T.map(y=>{var se;return(y==null?void 0:y.key)==="formContent"&&(y.contents=(se=y.contents)==null?void 0:se.map(ie=>{var de,Ce;return(de=S==null?void 0:S.form)!=null&&de[ie.prop]&&(ie.value=(Ce=S==null?void 0:S.form)==null?void 0:Ce[ie.prop]),ie})),y}),ce={pageData:{comp:w==null?void 0:w.comp,name:w==null?void 0:w.name,isShow:w==null?void 0:w.isShow,compData:ne}};c.push({key:K,value:ce})})}(c==null?void 0:c.length)>0&&await k.batchAddInsofDataApi({dataList:c})}let u=await ue.getItemData(v,sessionStorage.getItem("systemKey"),""),b=[];S!=null&&S.table&&((R=S==null?void 0:S.table)==null||R.forEach(c=>{var ne,ve,ce,T;let K={type:"data",pageKey:v,tableId:(ne=u==null?void 0:u[0])==null?void 0:ne.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ve=fe.value)==null?void 0:ve.id,createUserOrg:((ce=fe.value)==null?void 0:ce.dept)||((T=fe.value)==null?void 0:T.部门名称)},w={tableData:c};b.push({key:K,value:w})})),(b==null?void 0:b.length)>0&&await k.batchAddInsofDataApi({dataList:b}),hl(!0),ye.setImportLoading(!1)},la=(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=la(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)"}]}),ar=()=>{De.show=!1},rr=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)},Vl=async(e,a,n)=>{var r,o,i,p,d,f,m,t,E,M,v,B,_,S,F;if(Ge.value="",Bl.value=!0,El.value=!0,te("onButtonClick",e,a),e==="删除")ue.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,L;(x=Y.value)!=null&&x.find(D=>(D==null?void 0:D.id)===(a==null?void 0:a.id))?Y.value=(L=k.cloneDeep(Y.value))==null?void 0:L.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)):Y.value=la(k.cloneDeep(Y.value),a),Jr(Al.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=Ke.value)==null?void 0:r.length)===0)return k.ElMessage.warning("请先勾选操作的数据");ue.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var L,D;const x=(L=Ke.value)==null?void 0:L.map(g=>g.id);Y.value=(D=k.cloneDeep(Y.value))==null?void 0:D.filter(g=>!(x!=null&&x.includes(g.id))),Te.setTableLoading(s==null?void 0:s.index),te("change",{content:Y.value,singleContent:null,selectItems:Ke.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:V.value})})}else if(e==="复制新增"){Me.value="新增";const x=k.cloneDeep(a),L=(o=V.value)==null?void 0:o.find(h=>h==null?void 0:h.isMainKey),D=L||((i=V.value)==null?void 0:i[0]),g=(p=el.value)==null?void 0:p.find(h=>(h==null?void 0:h.label)==="新建");await ra(!0,g,{data:x,firstCol:D})}else if(e==="新增")Me.value="新增",gl(""),Qe.value=!0;else if(e==="编辑")Me.value="编辑",gl(a),Qe.value=!0;else if(e==="查看")Me.value="查看",gl(a),Bl.value=!1,El.value=!1,Qe.value=!0;else if(e==="查看三维模型"){const x={};for(let D in a)D!=="id"&&(x[D]=a[D]);let L=(d=Object.values(x))==null?void 0:d[1];We.setTableShowThree(L)}else if(((f=n==null?void 0:n.extra)==null?void 0:f.type)==="modelExample")Me.value=e,Nl.value=!0;else if(e==="新建"){let x=Ze.value,L=[];for(let b in x)b!=null&&b.includes(`loading${((m=fe.value)==null?void 0:m.account)||((t=fe.value)==null?void 0:t.账号)}`)&&(L=[...L,...b]);let D=[];for(let b in x)b!=null&&b.includes(`updateLoading${((E=fe.value)==null?void 0:E.account)||((M=fe.value)==null?void 0:M.账号)}`)&&(D=[...D,...b]);let g=L==null?void 0:L.map(b=>b==null?void 0:b.id);const h=D==null?void 0:D.map(b=>b==null?void 0:b.id);g=[...k.cloneDeep(g),...h],(g==null?void 0:g.length)>0&&(g!=null&&g.every(b=>b!==null&&b))&&await k.batchDeleteInsofDataApi({ids:g});const u=(v=el.value)==null?void 0:v.find(b=>(b==null?void 0:b.label)==="新建");await ra(!1,u)}else if(e==="修改模板"){let x=k.cloneDeep(W).value;Te.setRouteToChildPath(x),ye.setActiveMenuPath(x+le)}else if(e==="执行")lr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((B=Ke.value)==null?void 0:B.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((_=Y.value)==null?void 0:_.length)===0)return k.ElMessage.warning("暂无数据导出");const x=(F=(S=V.value)==null?void 0:S.map(D=>D==null?void 0:D.label))==null?void 0:F.filter(D=>D!=="操作"),L=e==="导出全部"?k.cloneDeep(Y.value):k.cloneDeep(Ke.value);L==null||L.forEach(D=>{D==null||delete D.id}),La(L,s==null?void 0:s.compName,x,s==null?void 0:s.compName)}else e==="迁移"&&(De.selectRow=a,De.show=!0)},nr=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(f=>{var m;return{id:f==null?void 0:f.id,...(m=f==null?void 0:f.value)==null?void 0:m.pageData}}):[]},or=async(e,a)=>{var n,r,o,i,p,d,f,m,t,E,M,v,B,_,S,F,x,L,D,g;try{let h,u;const b=(n=Ze.value[W.value+le])==null?void 0:n.filter(A=>{var j;return((j=A==null?void 0:A.key)==null?void 0:j.type)==="structureMethod"}),P=(r=Ze.value[W.value+le])==null?void 0:r.filter(A=>{var j;return((j=A==null?void 0:A.key)==null?void 0:j.type)==="structure"}),N=b==null?void 0:b.find(A=>{var j,z;return((z=(j=A==null?void 0:A.value)==null?void 0:j.pageData)==null?void 0:z.method)==="保存"});if(!N)return;const G=(d=(p=Ze.value[(i=(o=N==null?void 0:N.value)==null?void 0:o.pageData)==null?void 0:i.path])==null?void 0:p.filter(A=>{var j;return((j=A==null?void 0:A.key)==null?void 0:j.type)==="data"}))==null?void 0:d.find(A=>{var j,z,I,R;return((z=(j=A==null?void 0:A.value)==null?void 0:j.tableData)==null?void 0:z.算法名称)===((R=(I=N==null?void 0:N.value)==null?void 0:I.pageData)==null?void 0:R.method)});if(!G)return;const ae={buttonName:(m=(f=N==null?void 0:N.value)==null?void 0:f.pageData)==null?void 0:m.method,api:(E=(t=G==null?void 0:G.value)==null?void 0:t.tableData)==null?void 0:E.算法体,content:P==null?void 0:P.map(A=>{var j;return(j=A==null?void 0:A.value)==null?void 0:j.pageData}),extraContent:[],extraValues:(v=(M=N==null?void 0:N.value)==null?void 0:M.pageData)==null?void 0:v.data,methodName:(_=(B=N==null?void 0:N.value)==null?void 0:B.pageData)==null?void 0:_.path};if(!e)return;const X={...e,compData:(S=e==null?void 0:e.compData)==null?void 0:S.map(A=>{var j;return(A==null?void 0:A.key)==="formContent"?{...A,contents:(j=A==null?void 0:A.contents)==null?void 0:j.map(z=>(z==null?void 0:z.prop)===a?{...z,value:""}:z)}:A})},q={key:{pageKey:W.value+le,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:X}},H=await k.axios.post(ae.api,q,{headers:{"Content-Type":"application/json"}});return((F=H==null?void 0:H.data)==null?void 0:F.code)===200&&(h=(L=(x=H==null?void 0:H.data)==null?void 0:x.result)==null?void 0:L.latestReportCode,u=(g=(D=H==null?void 0:H.data)==null?void 0:D.result)==null?void 0:g.status),{newMainKeyValue:h,newStatus:u}}catch(h){throw k.ElMessage.error(h),new Error(h)}},aa=(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}:fl.value&&(d==null?void 0:d.prop)===fl.prop?{...d,value:fl.value}:d)}:i}),index:e==null?void 0:e.id},r)},fl=l.reactive({prop:"状态",value:""}),tr=l.ref(["系统自动生成信息","审批意见"]),sr=async(e,a,n)=>{var f,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){fl.value="",i=(f=Ze.value[d])==null?void 0:f.filter(M=>{var v;return((v=M==null?void 0:M.key)==null?void 0:v.type)==="structure"});const t=i==null?void 0:i.find(M=>{var v,B,_;return((_=(B=(v=M==null?void 0:M.value)==null?void 0:v.pageData)==null?void 0:B.comp)==null?void 0:_.toUpperCase())==="FORM"});p={...(m=t==null?void 0:t.value)==null?void 0:m.pageData,id:t==null?void 0:t.id};const E=await or(p,a==null?void 0:a.prop);if(fl.value=E==null?void 0:E.newStatus,E!=null&&E.newMainKeyValue)return E==null?void 0:E.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(E=>(E==null?void 0:E[a==null?void 0:a.prop])===`${t}(${o})`);)o++;r=`${t}(${o})`}return r},ra=async(e,a,n)=>{var p,d,f,m,t,E,M,v;let r,o;const i=await sr(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[(f=n==null?void 0:n.firstCol)==null?void 0:f.prop]),o=k.cloneDeep(W).value+le+i):(r=k.cloneDeep(W).value+le,o=k.cloneDeep(r)+`loading${((p=fe.value)==null?void 0:p.account)||((d=fe.value)==null?void 0:d.账号)}`),a){const B=(E=(t=Ze.value[o])==null?void 0:t.filter(_=>{var S;return((S=_==null?void 0:_.key)==null?void 0:S.parentTable)===""}))==null?void 0:E.map(_=>{var S;return{id:_==null?void 0:_.id,...(S=_==null?void 0:_.value)==null?void 0:S.pageData}});if((B==null?void 0:B.length)>0)if(e){const _=B==null?void 0:B.find(S=>{var F;return((F=S==null?void 0:S.comp)==null?void 0:F.toUpperCase())==="FORM"});_&&aa(_,(M=n==null?void 0:n.firstCol)==null?void 0:M.label,i,W.value)}else Te.setRouteToChildPath(k.cloneDeep(W).value),ye.setActiveMenuPath(o);else if(await ue.loadingConstruct(r,o,null,null,e?tr.value:null),e){const _=await nr(o);if((_==null?void 0:_.length)>0){const S=_==null?void 0:_.find(F=>{var x;return((x=F==null?void 0:F.comp)==null?void 0:x.toUpperCase())==="FORM"});S&&aa(S,(v=n==null?void 0:n.firstCol)==null?void 0:v.label,i,W.value)}}else Te.setRouteToChildPath(k.cloneDeep(W).value),ye.setActiveMenuPath(o)}else e?(Ge.value="",Be.value=n==null?void 0:n.data,hl(!0,n==null?void 0:n.firstCol,i)):(Te.setRouteToChildPath(k.cloneDeep(W).value),ye.setActiveMenuPath(o))},ir=()=>{qe.value=!1,cl.value=[],Oe.value=!1},gl=e=>{var o,i,p,d,f,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=ue.getColumnChild((o=k.cloneDeep(V.value))==null?void 0:o.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||i.forEach((t,E)=>{var M;n.find(v=>v===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((M=t==null?void 0:t.formType)==null?void 0:M.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"+E,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)??E,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"+E,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)??E,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=ue.getColumnChild((p=k.cloneDeep(V.value))==null?void 0:p.filter(t=>(t==null?void 0:t.label)!=="操作"));Le.value&&((d=Le.value)==null?void 0:d.length)>0&&(Le.value=(f=k.cloneDeep(Le).value)==null?void 0:f.map(t=>{var M;let E=(t==null?void 0:t.prop)||((M=r==null?void 0:r.find(v=>(v==null?void 0:v.label)===(t==null?void 0:t.label)))==null?void 0:M.prop);return E&&(t.value=e[E]),t})),Xe.value=Le.value&&((m=Le.value)==null?void 0:m.length)>0?ue.getTableFormToForm(Le.value):a},ur=()=>{var a;const e=(a=U.value)==null?void 0:a.$el;e&&Wl.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,f)=>{if(d.label==="操作")return 1;if(f.label==="操作")return-1;const m=pl.value.findIndex(E=>E.label===d.label),t=pl.value.findIndex(E=>E.label===f.label);return m-t})}})};l.onMounted(()=>{Ml.value=window.innerWidth-240*2});const cr=()=>{l.nextTick(()=>{ur()})},Rl=(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 f in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:i.label;m?d[f]=(p=Be.value)==null?void 0:p[m]:d[f]=o[f]}o=Object.assign(d,Be.value),n=o}else{let d=Rl(o,a);o=d==null?void 0:d.contents,n=d==null?void 0:d.currentSelectContents}return o}),{contents:e,currentSelectContents:n}},na=(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 f in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:i.label;m?d[f]=(p=Be.value)==null?void 0:p[m]:d[f]=o[f]}o=Object.assign(d,Be.value),r=o}return o}):n=e==null?void 0:e.map(o=>{var i,p,d,f;if((o==null?void 0:o.id)===Ge.value){let m={};for(let t in o){let E=(i=a==null?void 0:a.find(M=>(M==null?void 0:M.prop)===t))==null?void 0:i.label;E?m[t]=(p=Be.value)==null?void 0:p[E]:m[t]=o[t]}o=Object.assign(m,Be.value),r=o}else o=(d=Rl(o,a))==null?void 0:d.contents,r=(f=Rl(o,a))==null?void 0:f.currentSelectContents;return o}),{newContents:n,currentSelectContents:r}},oa=(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(oa)),e},ql=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(...ql(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const o={...r};return delete o.children,o}):[]},hl=(e=!0,a,n)=>{var m,t,E,M,v,B,_,S,F;let r=ue.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(L=>oa(L,a,n))}),i.push(Object.assign(Be.value,x)),o=Object.assign(Be.value,x)}else i=(E=na(i,r))==null?void 0:E.newContents,o=(M=na(i,r))==null?void 0:M.currentSelectContents;const p=(v=s.itemData)==null?void 0:v.filter(x=>(x==null?void 0:x.key)==="childTree")[0];if(((B=p==null?void 0:p.contents)==null?void 0:B.length)>0){Me.value="编辑";const x=[];i==null||i.forEach((L,D)=>{var h;let g={};if(Array.isArray(L)){let u=[];L==null||L.filter(b=>!(b!=null&&b.id)).forEach((b,P)=>{var N,G,ae,X,q,H,A;if((G=(N=$e.value)==null?void 0:N[P])!=null&&G.prop&&!Array.isArray(b)){let j={};j[$e.value[P].column]=b,be!=null&&be.value&&((ae=be==null?void 0:be.value)==null?void 0:ae.length)>0&&((X=be==null?void 0:be.value)!=null&&X.find(z=>JSON.stringify(z==null?void 0:z[0])===JSON.stringify(j)))&&(u=(q=be==null?void 0:be.value)==null?void 0:q.find(z=>JSON.stringify(z==null?void 0:z[0])===JSON.stringify(j))),u&&u.length>0?g[$e.value[P].prop]=u!=null&&u.find(z=>{var I;return((I=Object.keys(z))==null?void 0:I[0])===$e.value[P].column})?(H=u==null?void 0:u.find(z=>{var I;return((I=Object.keys(z))==null?void 0:I[0])===$e.value[P].column}))==null?void 0:H[$e.value[P].column]:b:g[$e.value[P].prop]=b}else Array.isArray(b)&&((A=$e.value[P])!=null&&A.prop?g[$e.value[P].prop]=b:g.children=Hl(b,$e.value))})}else g=L;Array.isArray(L)&&L.some(u=>u==null?void 0:u.id)?x.push(Object.assign(g,{id:(h=L==null?void 0:L.find(u=>u.id))==null?void 0:h.id})):g.id?x.push(g):x.push(Object.assign(g,{id:D.toString()}))}),Y.value=ca(x,p,V.value)}else Y.value=i;ia(Y.value),Al.value=Y.value;const d=Gr(Al.value,Ye.value,i);let f=[];if(il.value?(f=(_=k.cloneDeep(il).value.singleContent)==null?void 0:_.filter(x=>(x==null?void 0:x.id)!==(o==null?void 0:o.id)),f.push(o)):f=[o],Pe.value){const x={content:d,singleContent:((S=p==null?void 0:p.contents)==null?void 0:S.length)>0?f==null?void 0:f.flatMap(ql):f,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:((F=p==null?void 0:p.contents)==null?void 0:F.length)>0?ql(o):o,index:s==null?void 0:s.index,buttonName:Me.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=[],Le.value=[],Ie.value=[],cl.value=[],ol.value=[],Xe.value=[],Ke.value=[],U.value=null});const ta=async(e,a,n)=>{var m,t,E,M,v,B,_,S,F,x,L;al.value=n==null?void 0:n.prop;const r=k.cloneDeep(s.itemData),o=r==null?void 0:r.map(D=>{var g;return(D==null?void 0:D.key)==="header"&&((g=D.contents)==null||g.map((h,u)=>{var b,P,N,G,ae,X,q,H,A,j,z,I,R,c,K,w,ne,ve,ce;return h.type=h!=null&&h.type?h.type:(G=(N=(P=(b=h==null?void 0:h.key)==null?void 0:b.split("$"))==null?void 0:P[1])==null?void 0:N.split("("))!=null&&G[0]?(X=(ae=ue.FormType)==null?void 0:ae.find(T=>{var y,se,ie,de;return(T==null?void 0:T.key)===((de=(ie=(se=(y=h==null?void 0:h.key)==null?void 0:y.split("$"))==null?void 0:se[1])==null?void 0:ie.split("("))==null?void 0:de[0])}))==null?void 0:X.value:"Input",h.options=h!=null&&h.options?h.options:((A=(H=(q=h==null?void 0:h.key)==null?void 0:q.split("$"))==null?void 0:H[1])==null?void 0:A.length)>0?(R=(I=Gl((z=(j=h==null?void 0:h.key)==null?void 0:j.split("$"))==null?void 0:z[1]))==null?void 0:I.split(","))==null?void 0:R.map(T=>({label:T,value:T})):[],(c=h==null?void 0:h.key)!=null&&c.includes("$")&&(h.key=(w=(K=h==null?void 0:h.key)==null?void 0:K.split("$"))==null?void 0:w[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(T=>T.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 g;return D.value=(g=p==null?void 0:p.find((h,u)=>u===(D==null?void 0:D.id)))==null?void 0:g.value,D});let d="",f=(v=(M=(E=k.cloneDeep(o))==null?void 0:E.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:M.contents)==null?void 0:v.find((D,g)=>{var h,u,b;return(D==null?void 0:D.label)===al.value||(g==null?void 0:g.toString())===((b=(u=(h=al.value)==null?void 0:h.split("a"))==null?void 0:u[1])==null?void 0:b.toString())});if((S=(_=(B=k.cloneDeep(o))==null?void 0:B.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:_.contents)==null||S.forEach(D=>{var g,h,u,b,P;d===""&&((u=(h=(g=D==null?void 0:D.optionUrl)==null?void 0:g.groupSelect)==null?void 0:h[1])!=null&&u.includes("["))&&(d=(P=(b=D==null?void 0:D.optionUrl)==null?void 0:b.groupSelect)==null?void 0:P[1])}),(F=f==null?void 0:f.optionUrl)!=null&&F.menuSelect){let D=await Ql(f),g;if(D==null||D.forEach(h=>{var u,b,P,N,G,ae,X,q,H,A;d===((b=(u=f==null?void 0:f.optionUrl)==null?void 0:u.groupSelect)==null?void 0:b[1])&&((G=(N=(P=f==null?void 0:f.optionUrl)==null?void 0:P.groupSelect)==null?void 0:N[1])!=null&&G.includes("["))&&((A=k.cloneDeep(h))==null?void 0:A[(H=(q=(X=(ae=f==null?void 0:f.optionUrl)==null?void 0:ae.groupSelect)==null?void 0:X[1])==null?void 0:q.replaceAll("[",""))==null?void 0:H.replaceAll("]","")])===(f==null?void 0:f.value)&&(g=h)}),g){let h=k.cloneDeep(i);h=h==null?void 0:h.map(b=>{var P,N,G,ae,X,q,H,A,j,z,I;return(g!=null&&g[b==null?void 0:b.label]||g!=null&&g[(ae=(G=(N=(P=b==null?void 0:b.optionUrl)==null?void 0:P.groupSelect)==null?void 0:N[1])==null?void 0:G.replaceAll("[",""))==null?void 0:ae.replaceAll("]","")])&&((H=(q=(X=b==null?void 0:b.optionUrl)==null?void 0:X.groupSelect)==null?void 0:q[1])!=null&&H.includes("["))&&(b.value=(g==null?void 0:g[b==null?void 0:b.label])||(g==null?void 0:g[(I=(z=(j=(A=b==null?void 0:b.optionUrl)==null?void 0:A.groupSelect)==null?void 0:j[1])==null?void 0:z.replaceAll("[",""))==null?void 0:I.replaceAll("]","")])),b}),Y.value=(x=k.cloneDeep(Y.value))==null?void 0:x.map(b=>{if((b==null?void 0:b.id)===(a==null?void 0:a.id)){const P={};return h==null||h.forEach(N=>{P[N.name]=N.value}),P.id=b==null?void 0:b.id,P}return b});let u=k.cloneDeep(h);u=u==null?void 0:u.map(b=>{var P,N,G,ae;return(N=(P=b==null?void 0:b.optionUrl)==null?void 0:P.menuSelect)!=null&&N.some(X=>X==null?void 0:X.includes)&&(b.optionUrl.menuSelect=(ae=(G=b==null?void 0:b.optionUrl)==null?void 0:G.menuSelect)==null?void 0:ae.map(X=>{var q,H,A,j;if(X!=null&&X.includes("[")){let z=(H=(q=X==null?void 0:X.replaceAll("[","").replaceAll("]",""))==null?void 0:q.split(":"))==null?void 0:H[1];X=(j=(A=k.cloneDeep(h))==null?void 0:A.find(I=>(I==null?void 0:I.label)===z))==null?void 0:j.value}return X})),b}),Y.value=(L=k.cloneDeep(Y.value))==null?void 0:L.map(b=>{if((b==null?void 0:b.id)===(a==null?void 0:a.id)){const P={};return u==null||u.forEach(N=>{P[N.name]=N.value}),P.id=b==null?void 0:b.id,P}return b})}}},dr=async e=>{var m,t,E,M,v,B,_,S,F,x,L,D;if(!e)return;Be.value=e;const a=k.cloneDeep(s.itemData);let n=a==null?void 0:a.map(g=>{var h;return(g==null?void 0:g.key)==="header"&&((h=g.contents)==null||h.map((u,b)=>{var P,N,G,ae,X,q,H,A,j,z,I,R,c,K,w,ne,ve,ce,T;return u.type=u!=null&&u.type?u.type:(ae=(G=(N=(P=u==null?void 0:u.key)==null?void 0:P.split("$"))==null?void 0:N[1])==null?void 0:G.split("("))!=null&&ae[0]?(q=(X=ue.FormType)==null?void 0:X.find(y=>{var se,ie,de,Ce;return(y==null?void 0:y.key)===((Ce=(de=(ie=(se=u==null?void 0:u.key)==null?void 0:se.split("$"))==null?void 0:ie[1])==null?void 0:de.split("("))==null?void 0:Ce[0])}))==null?void 0:q.value:"Input",u.options=u!=null&&u.options?u.options:((j=(A=(H=u==null?void 0:u.key)==null?void 0:H.split("$"))==null?void 0:A[1])==null?void 0:j.length)>0?(c=(R=Gl((I=(z=u==null?void 0:u.key)==null?void 0:z.split("$"))==null?void 0:I[1]))==null?void 0:R.split(","))==null?void 0:c.map(y=>({label:y,value:y})):[],(K=u==null?void 0:u.key)!=null&&K.includes("$")&&(u.key=(ne=(w=u==null?void 0:u.key)==null?void 0:w.split("$"))==null?void 0:ne[0]),u.value=(ve=Object.values(e))==null?void 0:ve[b],u.optionUrl=u!=null&&u.formMenuSelect&&((ce=u==null?void 0:u.formMenuSelect)==null?void 0:ce.length)>0?{groupSelect:(T=u==null?void 0:u.groupSelect)==null?void 0:T.split(/[::]/).map(y=>y.trim()),menuSelect:u==null?void 0:u.formMenuSelect,selectRelateType:"",type:(u==null?void 0:u.formType)??(u!=null&&u.groupSelect?"Select":"")}:null,u})),g}),r=Xe.value,o=(t=(m=k.cloneDeep(n))==null?void 0:m.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:t.contents;if(r=r==null?void 0:r.map(g=>{var h;return g.value=(h=o==null?void 0:o.find((u,b)=>(u==null?void 0:u.prop)===(g==null?void 0:g.name)))==null?void 0:h.value,g}),!dl.value)return;let i="",p=(v=(M=(E=k.cloneDeep(n))==null?void 0:E.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:M.contents)==null?void 0:v.find((g,h)=>{var u,b,P;return(g==null?void 0:g.label)===al.value||(h==null?void 0:h.toString())===((P=(b=(u=al.value)==null?void 0:u.split("a"))==null?void 0:b[1])==null?void 0:P.toString())}),d=(B=p==null?void 0:p.optionUrl)==null?void 0:B.menuSelect,f=!0;if((F=(S=(_=k.cloneDeep(n))==null?void 0:_.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:S.contents)==null||F.forEach(g=>{var h,u,b,P,N,G;f&&((b=(u=(h=g==null?void 0:g.optionUrl)==null?void 0:h.groupSelect)==null?void 0:u[1])!=null&&b.includes("["))&&(i=(N=(P=g==null?void 0:g.optionUrl)==null?void 0:P.groupSelect)==null?void 0:N[1],JSON.stringify(d)===JSON.stringify((G=g==null?void 0:g.optionUrl)==null?void 0:G.menuSelect)&&(f=!1))}),(x=p==null?void 0:p.optionUrl)!=null&&x.menuSelect&&dl.value){let g=await Ql(p),h;if((L=p==null?void 0:p.optionUrl)==null||L.menuSelect,g==null||g.forEach(u=>{var b,P,N,G,ae,X,q,H,A,j;i===((P=(b=p==null?void 0:p.optionUrl)==null?void 0:b.groupSelect)==null?void 0:P[1])&&((ae=(G=(N=p==null?void 0:p.optionUrl)==null?void 0:N.groupSelect)==null?void 0:G[1])!=null&&ae.includes("["))&&((j=k.cloneDeep(u))==null?void 0:j[(A=(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:A.replaceAll("]","")])===(p==null?void 0:p.value)&&(h=u)}),h){let u=k.cloneDeep(r);u=u==null?void 0:u.map(N=>{var G,ae,X,q,H,A,j,z,I,R,c;return(h!=null&&h[N==null?void 0:N.label]||h!=null&&h[(q=(X=(ae=(G=N==null?void 0:N.optionUrl)==null?void 0:G.groupSelect)==null?void 0:ae[1])==null?void 0:X.replaceAll("[",""))==null?void 0:q.replaceAll("]","")])&&((j=(A=(H=N==null?void 0:N.optionUrl)==null?void 0:H.groupSelect)==null?void 0:A[1])!=null&&j.includes("["))&&(N.value=(h==null?void 0:h[N==null?void 0:N.label])||(h==null?void 0:h[(c=(R=(I=(z=N==null?void 0:N.optionUrl)==null?void 0:z.groupSelect)==null?void 0:I[1])==null?void 0:R.replaceAll("[",""))==null?void 0:c.replaceAll("]","")])),N}),Xe.value=k.cloneDeep(u);let b=k.cloneDeep(u);b=b==null?void 0:b.map(N=>{var G,ae,X,q,H,A;return(ae=(G=N==null?void 0:N.optionUrl)==null?void 0:G.menuSelect)!=null&&ae.some(j=>j==null?void 0:j.includes("["))&&(N.optionUrl.oldMenuSelect=(q=(X=k.cloneDeep(N))==null?void 0:X.optionUrl)==null?void 0:q.menuSelect,N.optionUrl.menuSelect=(A=(H=N==null?void 0:N.optionUrl)==null?void 0:H.menuSelect)==null?void 0:A.map(j=>{var z,I,R,c;if(j!=null&&j.includes("[")){let K=(I=(z=j==null?void 0:j.replaceAll("[","").replaceAll("]",""))==null?void 0:z.split(":"))==null?void 0:I[1];j=(c=(R=k.cloneDeep(u))==null?void 0:R.find(w=>(w==null?void 0:w.label)===K))==null?void 0:c.value}return j})),N}),Xe.value=b;let P={};(D=Xe.value)==null||D.forEach(N=>{P[N.prop]=N==null?void 0:N.value}),Be.value=P}}dl.value=!1},pr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",fr=e=>{var i,p;const a=(p=(i=Le.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 f=d==null?void 0:d[n];a&&ga.isString(f)&&(d[n]=[f]),!a&&!ga.isString(f)&&(d[n]="")})},sa=(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=>sa(r,a))),e},Jl=e=>{var n,r,o,i,p,d;gl("");const a=(n=Xe.value)==null?void 0:n.reduce((f,m)=>(f[m.name]=m.value,f),{});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 f=(d=(p=Ee.value)==null?void 0:p.filter(m=>(m==null?void 0:m.label)!=="操作"))==null?void 0:d.map(m=>{var E,M,v;const t=(M=(E=Le.value)==null?void 0:E.find(B=>(B==null?void 0:B.label)===(m==null?void 0:m.label)))==null?void 0:M.multiple;return fr(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=f==null?void 0:f.map(m=>sa(m,[{prop:"type",value:"edit"},{prop:"columnType",value:pr(m==null?void 0:m.formType)||(m==null?void 0:m.columnType)}])),e==="createClick"&&hl(!1)}},tl={START:"开始时间",END:"结束时间",HOURS:"工时"},gr=(e,a)=>Number(Wl.dayjs(a).diff(Wl.dayjs(e),"day",!0).toFixed(1)),ia=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:f}=p;r.set(f,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],f=p==null?void 0:p[tl.END],m=gr(d,f);return d&&f&&(p[tl.HOURS]=`${m}天`),p})},ua=(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[f,...m]=d,t={...f};n+1===((a==null?void 0:a.length)??"")?t.children=d==null?void 0:d.map(E=>(E.level=k.cloneDeep(n)+1,E)).filter((E,M)=>M!==0):m.length>0&&(t.children=ua(m,a,n+1)),t.level=n,i.push(t)}return i},ca=(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=ua(e,a==null?void 0:a.contents,0),r},da=(e,a)=>{var M,v,B,_,S,F,x,L,D,g,h,u,b,P,N,G,ae,X,q,H,A,j,z,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"),f=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");Le.value=(v=(M=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableToForm"))==null?void 0:M[0])==null?void 0:v.contents,Xl.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 E=[];if(ll.value===""?E=m==null?void 0:m[0]:E=(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))),((B=t==null?void 0:t.contents)==null?void 0:B.length)>0){let c=[];if(t!=null&&t.contents.some(T=>Array.isArray(T)&&(T==null?void 0:T.find(y=>y.children))))Ye.value===""?c=(S=(_=ue.getGradeColumns(t==null?void 0:t.contents))==null?void 0:_[0])==null?void 0:S.filter(T=>!Array.isArray(T)):(Ye.value.split("-"),c=(F=ue.getGradeColumns(t==null?void 0:t.contents))==null?void 0:F[0]);else{let T=t!=null&&t.contents.some(y=>Array.isArray(y))?(x=t==null?void 0:t.contents)==null?void 0:x[0]:t==null?void 0:t.contents;T==null||T.forEach((y,se)=>{var Ce,Se,yl,vl;let ie="";(Se=(Ce=W.value)==null?void 0:Ce.split("/"))==null||Se.forEach(Fe=>{var bl,ml,kl;if(Fe!==""){let sl=(kl=(ml=(bl=Fe==null?void 0:Fe.split(le+"updateLoading"))==null?void 0:bl[0])==null?void 0:ml.split(le+"loading"))==null?void 0:kl[0];ie=ie===""?ie+sl:ie+"/"+sl}}),ie=ie+le+(y==null?void 0:y.directiveLabel);const de=(yl=Le.value)==null?void 0:yl.find(Fe=>(Fe==null?void 0:Fe.prop)===(y==null?void 0:y.prop));c.push({label:(y==null?void 0:y.label)??"",prop:(y==null?void 0:y.label)==="操作"?"operate":(y==null?void 0:y.prop)??"a"+se,width:y!=null&&y.width?parseInt(y.width):"",fixed:(y==null?void 0:y.fixed)??void 0,sortable:(y==null?void 0:y.sortable)??!1,filterable:(y==null?void 0:y.filterable)??!1,operable:(y==null?void 0:y.operable)??!1,showSummary:(y==null?void 0:y.showSummary)??!1,align:(y==null?void 0:y.align)??"left",showOverflowTooltip:(y==null?void 0:y.showOverflowTooltip)??!0,isNotDrag:(y==null?void 0:y.isNotDrag)??!1,isEditCol:(y==null?void 0:y.isEditCol)??!1,isOperate:(y==null?void 0:y.isOperate)??!1,id:(y==null?void 0:y.id)??se,type:(y==null?void 0:y.label)==="操作"?"operate":void 0,formType:(y==null?void 0:y.formType)??(y!=null&&y.groupSelect?"Select":""),isTableColHidden:y==null?void 0:y.isTableColHidden,isFormColHidden:y==null?void 0:y.isFormColHidden,disabled:y==null?void 0:y.disabled,options:(y==null?void 0:y.options)??[],value:(y==null?void 0:y.value)??"",formMenuSelect:(y==null?void 0:y.formMenuSelect)??[],isRoute:(y==null?void 0:y.isRoute)??!1,groupSelect:y!=null&&y.groupSelect?(vl=y==null?void 0:y.groupSelect)==null?void 0:vl.replaceAll('"',"").split(":"):[],isMainKey:(y==null?void 0:y.isMainKey)||(y==null?void 0:y.directiveLabel)&&!o[ie],columnType:(de==null?void 0:de.type)||(y==null?void 0:y.columnType)||"TEXTAREA",directiveLabel:y==null?void 0:y.directiveLabel,isExistChild:!!(y!=null&&y.directiveLabel&&o[ie]),childPath:ie})})}V.value=ue.getNewColumnChild(c),Je.value=ue.getNewColumnChild(c),Q.value=(L=V.value)==null?void 0:L.map(T=>T==null?void 0:T.label),Ue.value=(D=V.value)==null?void 0:D.every(T=>T==null?void 0:T.filterable),pe.value=(g=V.value)==null?void 0:g.every(T=>T==null?void 0:T.operable),_e.value=(h=V.value)==null?void 0:h.every(T=>T==null?void 0:T.sortable);let K=(b=(u=ue.getAllLeafNodes(V.value))==null?void 0:u.filter(T=>(T==null?void 0:T.type)!=="operate"))==null?void 0:b.map((T,y)=>({prop:(T==null?void 0:T.prop)??"a"+y,column:T.label}));$e.value=K;let w=[];ll.value===""?w=f==null?void 0:f[0]:w=(f==null?void 0:f.find(T=>(T==null?void 0:T.selectLabel)==="("+ll.value+")"))??(f==null?void 0:f.find(T=>!(T!=null&&T.selectLabel)));let ne=Array.isArray((P=w==null?void 0:w.contents)==null?void 0:P[0])&&((N=w==null?void 0:w.contents)!=null&&N[0].every(T=>Array.isArray(T)))?(G=w==null?void 0:w.contents)==null?void 0:G[0]:w==null?void 0:w.contents;E!=null&&E.contents&&((ae=E==null?void 0:E.contents)==null?void 0:ae.length)!==0&&(ne=(X=k.cloneDeep(ne))==null?void 0:X.map((T,y)=>{if(!Array.isArray(T)){let se={};for(let ie in T)ie!=="id"&&ie!=="index"&&(se[ie]=T[ie]);T=Object.values(se)}return T}));const ve=!!((q=V.value)!=null&&q.find(T=>T.prop==="index"));ne=ba(ne,E==null?void 0:E.contents,ve);const ce=[];ne==null||ne.forEach((T,y)=>{var ie;let se={};if(Array.isArray(T)){let de=[];T==null||T.filter(Ce=>!(Ce!=null&&Ce.id)).forEach((Ce,Se)=>{var yl,vl,Fe,bl,ml,kl;if((yl=K==null?void 0:K[Se])!=null&&yl.prop&&!Array.isArray(Ce)){let sl={};sl[K[Se].column]=Ce,be!=null&&be.value&&((vl=be==null?void 0:be.value)==null?void 0:vl.length)>0&&((Fe=be==null?void 0:be.value)!=null&&Fe.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl)))&&(de=(bl=be==null?void 0:be.value)==null?void 0:bl.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl))),de&&de.length>0?se[K[Se].prop]=de!=null&&de.find(ze=>{var Sl;return((Sl=Object.keys(ze))==null?void 0:Sl[0])===K[Se].column})?(ml=de==null?void 0:de.find(ze=>{var Sl;return((Sl=Object.keys(ze))==null?void 0:Sl[0])===K[Se].column}))==null?void 0:ml[K[Se].column]:Ce:se[K[Se].prop]=Ce}else Array.isArray(Ce)&&((kl=K[Se])!=null&&kl.prop?se[K[Se].prop]=Ce:se.children=Hl(Ce,K))})}else se=T;Array.isArray(T)&&T.some(de=>de==null?void 0:de.id)?ce.push(Object.assign(se,{id:(ie=T==null?void 0:T.find(de=>de.id))==null?void 0:ie.id})):se.id?ce.push(se):ce.push(Object.assign(se,{id:y.toString()}))}),Y.value=ca(ce,r,V.value),xl.value=ce,(H=xl.value)==null||H.forEach(T=>{var y;(y=Tl.value)==null||y.set(T.id,T)})}else V.value=[],Ee.value=[],Y.value=[],xl.value=[],Tl.value=new Map;((A=p==null?void 0:p.contents)==null?void 0:A.length)>0?Ie.value=p==null?void 0:p.contents:Ie.value=[],((j=d==null?void 0:d.contents)==null?void 0:j.length)>0?(ol.value=d==null?void 0:d.contents,el.value=d==null?void 0:d.contents):(ol.value=[],el.value=[]),nl.value=((z=Y==null?void 0:Y.value)==null?void 0:z.length)??0,ia(Y.value),Al.value=Y.value,Pe.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 K;return{...c,type:"edit",optionUrl:c!=null&&c.formMenuSelect&&((K=c==null?void 0:c.formMenuSelect)==null?void 0:K.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}}),Jl())};l.watch(()=>[s.itemData,ll.value,xa.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,f;return(p==null?void 0:p.key)===((f=(d=s==null?void 0:s.itemData)==null?void 0:d.find(m=>(m==null?void 0:m.key)==="columnPath"))==null?void 0:f.contents)}))){let p=ul.value,d={key:(r=(n=s==null?void 0:s.itemData)==null?void 0:n.find(f=>(f==null?void 0:f.key)==="columnPath"))==null?void 0:r.contents,value:(i=(o=s==null?void 0:s.itemData)==null?void 0:o.find(f=>(f==null?void 0:f.key)==="columnUsingPath"))==null?void 0:i.contents};p!=null&&p.find(f=>(f==null?void 0:f.key)===(d==null?void 0:d.key))?p=p==null?void 0:p.map(f=>((f==null?void 0:f.key)===(d==null?void 0:d.key)&&(f.value=d.value),f)):p.push(d),Te.setTableViewContents(p)}da(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(gl(e==null?void 0:e.form),Me.value=e==null?void 0:e.dialogTitle,Bl.value=!0,Qe.value=!0)},{immediate:!0,deep:!0});const pa=()=>{var e;(e=me.value)!=null&&e.includes("read")&&(Pe.value=!Pe.value)},hr=()=>{_l.value=!_l.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?Pe.value=!1:(e!=null&&e.includes("read")||(Pe.value=!0),e!=null&&e.includes("edit")||(Pe.value=!1)),ge.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||Pe.value},{immediate:!0}),l.watch(()=>Pe.value,e=>{var a;e?(Jl("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,ge.value=e||((a=s==null?void 0:s.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=Zl.value)==null?void 0:e.length},e=>{e===0&&(re.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 yr=(e,a)=>{var n;Jl("createClick"),a===re.pageSize&&(re.currentPage=Math.ceil(((n=Y.value)==null?void 0:n.length)/re.pageSize))},vr=(e,a,n)=>{var r;ta(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,Me.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",hl(!1)},Ae=e=>{var f,m,t,E,M,v,B,_,S,F;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=(f=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:f[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]):((E=(t=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:t[0])==null?void 0:E.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((v=(M=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:M[0])==null?void 0:v.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((S=(_=a==null?void 0:a[(B=r==null?void 0:r.child)==null?void 0:B.prop])==null?void 0:_[0])==null?void 0:S.contents)??(a==null?void 0:a[(F=r==null?void 0:r.child)==null?void 0:F.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},br=e=>{var m,t,E,M,v,B,_,S,F,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]):((M=(E=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:E[0])==null?void 0:M.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((B=(v=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:v[0])==null?void 0:B.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((F=(S=a==null?void 0:a[(_=r==null?void 0:r.child)==null?void 0:_.prop])==null?void 0:S[0])==null?void 0:F.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(L=>typeof L=="string"||typeof L=="number")),f=Array.isArray(i)&&(i==null?void 0:i.find(L=>L==null?void 0:L.url));return d&&f},mr=(e,a)=>e.find(n=>Object.values(n).some(r=>r===a));return l.watch(()=>Ne.value,async e=>{if(e){ye.setContentLoading(!0),await l.nextTick();const a=mr(Y.value,e==null?void 0:e.data);if(!a)return ye.setContentLoading(!1);await ea(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),ye.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,E,M;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"),f=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",Qr,[Yl.value?(l.openBlock(),l.createBlock(Re.ssTable,{id:"excel-table",pageObj:re,showIndex:ge.value,isTree:(m=O.compItem)==null?void 0:m.isTree,summaryInfo:oe,columns:V.value,defaultSort:xe,isCardViewport:_l.value,checkedColumns:Q.value,key:$l.value+JSON.stringify(V.value),tableData:Zl.value,isEditViewport:Pe.value,isShowPagination:Xl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ee.value,onDbClickRow:Ha,extraButton:ol.value,rowButton:Ie.value,cacheExtraButtons:el.value,isClearSelection:((t=Ke.value)==null?void 0:t.length)===0,onDoCurrentChange:wa,onDoSizeChange:_a,onContentClick:ea,onRowClick:Xa,onSelectChange:$a,onCellChange:vr,onChange:ta,onPreview:Fl,onSubmitEditingTable:Ma,onHandleColEditChange:Va,onHandleColTypeChange:ja,onClickButton:Vl},l.createSlots({headerButton:l.withCtx(v=>{var B,_;return[O.showHeader?(l.openBlock(),l.createBlock(Mr,{key:0,pageLayout:O.pageLayout,lockingPage:l.unref(Dl)===l.unref(W),filterValues:Il.value,selectNums:(B=Ke.value)==null?void 0:B.length,dataNums:(_=Y.value)==null?void 0:_.length,compName:O.compName,isDevMode:O.isDevMode,buttons:v.buttons,onButtonClick:a[0]||(a[0]=S=>Vl(S,"",{})),columns:V.value,onFilter:Ga,onGetImportData:Oa,level:O.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var v,B,_,S;return[((v=Y.value)==null?void 0:v.length)>0&&O.allowOperate?(l.openBlock(),l.createElementBlock("div",Zr,[(B=me.value)!=null&&B.includes("read")&&((_=me.value)!=null&&_.includes("edit"))&&((S=Ie.value)!=null&&S.some(F=>(F==null?void 0:F.label)==="编辑"))&&!_l.value&&l.unref(Dl)!==l.unref(W)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:pa},[l.createVNode(n,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:hr},[l.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:v,index:B})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:_=>yr(v,B)},[l.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,Ir)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:cr},{reference:l.withCtx(()=>[l.createElementVNode("span",en,[l.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",ln,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(o,{"model-value":_e.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=v=>Kl(v,"sortable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":Ue.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=v=>Kl(v,"filterable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":pe.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=v=>Kl(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:U},{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,an)]),_: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 B;return[l.createElementVNode("div",rn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((B=Object.keys(v))==null?void 0:B.filter(_=>{var S;return(S=he.value)==null?void 0:S.find(F=>(F==null?void 0:F.value)===_)}),_=>{var S,F;return l.openBlock(),l.createElementBlock("div",{key:_},[l.createVNode(o,{"model-value":v==null?void 0:v[_],"active-text":(F=(S=he.value)==null?void 0:S.find(x=>(x==null?void 0:x.value)===_))==null?void 0:F.label,onChange:x=>Ka(x,_,v)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",nn,[l.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(v=>{var B,_,S,F,x,L,D,g,h,u,b,P,N,G,ae,X,q,H;return[br(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",on,l.toDisplayString(Ae(v)),1)]),default:l.withCtx(()=>{var A;return[l.createElementVNode("div",tn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v==null?void 0:v.row[(A=v==null?void 0:v.column)==null?void 0:A.prop],j=>(l.openBlock(),l.createElementBlock("div",sn,[l.createElementVNode("div",{class:"prop-url",title:Ll(j),onClick:z=>Ra(j)},l.toDisplayString(Ll(j)),9,un),l.createElementVNode("div",{class:"prop-download",onClick:z=>qa(j)}," 下载 ",8,cn)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Ae(v))&&((_=(B=Ae(v))==null?void 0:B.toString())!=null&&_.includes(".txt")||(F=(S=Ae(v))==null?void 0:S.toString())!=null&&F.includes(".cpt")||(L=(x=Ae(v))==null?void 0:x.toString())!=null&&L.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ae(v))&&((g=(D=Ae(v))==null?void 0:D.toString())!=null&&g.includes(".txt")||(u=(h=Ae(v))==null?void 0:h.toString())!=null&&u.includes(".cpt")||(P=(b=Ae(v))==null?void 0:b.toString())!=null&&P.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ae(v))&&((G=(N=Ae(v))==null?void 0:N.toString())!=null&&G.includes(".txt")||(X=(ae=Ae(v))==null?void 0:ae.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:A=>Aa(Ae(v))},l.toDisplayString(Ae(v)===0?"0":Ae(v)),13,dn))]}),_:2},[((E=Ie.value)==null?void 0:E.length)>0&&l.unref(Dl)!==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(()=>[l.createElementVNode("div",Xr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ja(Ie.value,v),(B,_)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:_,onClick:S=>Vl(B==null?void 0:B.label,v,{extra:B})},[l.createElementVNode("div",{style:l.normalizeStyle({color:B==null?void 0:B.textColor}),class:"extra-button-label"},l.toDisplayString(B==null?void 0:B.label),5)],8,Yr))),128))])]),_:2},1024)]),key:"0"}:void 0,((M=Y.value)==null?void 0:M.length)>0?{name:"batchButton",fn:l.withCtx(v=>[l.withDirectives(l.createVNode(Pr,{lockingPage:l.unref(Dl)===l.unref(W),buttons:v.buttons,selectTableItems:Ke.value,onButtonClick:a[1]||(a[1]=B=>Vl(B,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,ee.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!ee.value]])]),key:"1"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):l.createCommentVNode("",!0),l.createVNode(Cl.ssDialog,{title:Me.value,visible:Qe.value,width:Ea.value,onBeforeDestroy:Fa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",pn,[l.createVNode(Re.ssForm,{rowContents:Xe.value,isEnableWrap:!1,showOperator:!1,onChange:dr,onClickTrigger:za,isEdit:El.value,onBlurChange:Pa,onPreview:Fl},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[Bl.value?(l.openBlock(),l.createElementBlock("div",fn,[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=>hl(!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(Cl.ssDialog,{title:Me.value,visible:Nl.value,width:Ml.value,onBeforeDestroy:a[9]||(a[9]=v=>Nl.value=!1)},{default:l.withCtx(()=>[l.createVNode(qr)]),footer:l.withCtx(()=>[l.createElementVNode("div",gn,[l.createVNode(d,{onClick:a[8]||(a[8]=v=>Nl.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:Ya,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(Re.ssFilePreview,{key:1,fileDataList:C.value,onDestroy:Qa},null,8,["fileDataList"])):l.createCommentVNode("",!0),qe.value?(l.openBlock(),l.createBlock(Cl.ssDialog,{key:2,visible:qe.value,onBeforeDestroy:ir,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:l.withCtx(()=>[l.createVNode(Ve.ThreeViewerHost,{"file-urls":cl.value,isThreeScene:Oe.value,isSelfWindow:!0,threeData:rl.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Cl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=v=>e.componentVisible=!1),width:Ml.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(f,{dialogItem:Ul.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(Cl.ssDialog,{title:De.title,visible:De.show,width:De.width,onBeforeDestroy:ar},{default:l.withCtx(()=>[l.createElementVNode("div",hn,[l.createVNode(Re.ssForm,{rowContents:De==null?void 0:De.contents,formRules:De==null?void 0:De.formRules,showOperator:!1,buttonValue:De.buttonValue,isEdit:El.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:rr},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},vn=jl._export_sfc(yn,[["__scopeId","data-v-20e45bfb"]]);exports.formGetOptions=Gl;exports.getSelectRow=Ql;exports.ssTable=vn;exports.useFormComp=Sa;exports.useFormToTableComp=ya;exports.useUnit=va;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as b } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-
|
|
2
|
-
import { s as K } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-
|
|
1
|
+
import { _ as b } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-BnVkqouB.js";
|
|
2
|
+
import { s as K } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-BnVkqouB.js";
|
|
3
3
|
import { resolveComponent as r, createElementBlock as s, openBlock as n, Fragment as p, createVNode as l, createCommentVNode as k, withCtx as i, createElementVNode as d, normalizeStyle as w, toDisplayString as c, renderList as v, createTextVNode as _, createBlock as B, resolveDynamicComponent as I } from "vue";
|
|
4
4
|
import { _ as m } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const L = ["title"], V = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-NG0JZKkn.cjs"),n=require("./index-BNoXaSh0.cjs"),u=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=e.ref([]),i=e.computed(()=>[{key:"extraButton",contents:[{label:"清空",background:"#f56c6c",color:"#ffffff"}]},{key:"rowButton",contents:[]},{key:"header",contents:[{label:"模块名称",prop:"module",filterable:!0},{label:"操作类型",prop:"type",filterable:!0},{label:"账号",prop:"account",filterable:!0},{label:"姓名",prop:"userName",filterable:!0},{label:"时间",prop:"timeStamp",sortable:!0}]},{key:"tableContents",contents:r.value}]),p=Object.freeze(Object.defineProperty({__proto__:null,pageData:i,tableData:r},Symbol.toStringTag,{value:"Module"})),b={class:"log-wrap"},d=e.defineComponent({__name:"index",setup(_){const t=e.reactive({...p});e.onMounted(async()=>{t.tableData=await n.getLogTableDataAsync("operate")});const c=l=>{var a;n.clickButton(l,(a=t.tableData)==null?void 0:a.map(o=>o.id),o=>{o&&(t.tableData=[])})};return(l,a)=>(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(s.ssTable,{itemData:t.pageData,allowOperate:!1,allowSelect:!1,onOnButtonClick:c},null,8,["itemData"])]))}}),f=u._export_sfc(d,[["__scopeId","data-v-3d3b471d"]]);exports.default=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue");require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue");require("./index-Bq-dJJvd.cjs");const h=require("./index-CEwxrYB-.cjs");require("./array-BaQcwJTD.cjs");const C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");require("./index.vue_vue_type_style_index_1_lang-CrR96PnG.cjs");require("./index.vue_vue_type_style_index_0_scoped_92477073_lang-BEFZSjlw.cjs");require("./index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BU_MX7_0.cjs");require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DwX8qItu.cjs");require("./index.vue_vue_type_style_index_1_lang-DXs-lrLT.cjs");require("./index-C4UuTGqh.cjs");require("vue-router");require("./index-C6aP1eIU.cjs");require("./dataUtil-DdKPfmZ6.cjs");;/* empty css */require("./index-ISL-UVnN.cjs");const S={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},systemInfo:{type:Object,default:()=>{}},systemKey:{type:String,default:""},pathContent:{type:String,default:""},mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},nodeDev:{type:String,default:""},pageKey:{type:String,default:""}},emits:["buildContent","openThreeBuild","threeData"],setup(o,{emit:c}){const e=o,i=c,s=h.useLoginState();n.watch(()=>e==null?void 0:e.systemKey,t=>{s.setSystemKey(t),t!==""&&sessionStorage.setItem("systemKey",t)},{immediate:!0}),n.watch(()=>e==null?void 0:e.systemInfo,t=>{s.setSystemInfo(t)},{immediate:!0});const l=()=>{i("buildContent")},m=()=>{i("setLoginInfo")},y=t=>{i("openThreeBuild",t)},f=t=>{i("threeData",t)},u=()=>{var a;const t=e!=null&&e.windowConfig?(a=e==null?void 0:e.windowConfig)==null?void 0:a.width:window.innerWidth,r=1920,d=16,w=t/r,g=d*w;document.documentElement.style.fontSize=`${g}px`};return n.onMounted(()=>{u(),window.addEventListener("resize",u)}),n.onUnmounted(()=>{window.removeEventListener("resize",u)}),(t,r)=>{const d=n.resolveComponent("router-view");return n.openBlock(),n.createElementBlock("div",null,[n.createVNode(d,{mode:e==null?void 0:e.mode,content:e==null?void 0:e.content,jsonContents:e==null?void 0:e.jsonContents,pathContent:e==null?void 0:e.pathContent,showButton:e==null?void 0:e.showButton,nodeDev:e==null?void 0:e.nodeDev,windowConfig:o.windowConfig,systemInfo:o.systemInfo,"old-systemKey":o.systemKey,onBuildContent:l,onOpenThreeBuild:y,pageKey:o.pageKey,onThreeData:f,onSetLoginInfo:m},null,8,["mode","content","jsonContents","pathContent","showButton","nodeDev","windowConfig","systemInfo","old-systemKey","pageKey"])])}}},q=C._export_sfc(S,[["__scopeId","data-v-8729380f"]]);exports.default=q;
|
|
@@ -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-
|
|
2
|
+
import { s as m } from "./index-BZrGQ9o1.js";
|
|
3
3
|
import { u as d, ay as p, aw as l } from "./index.vue_vue_type_style_index_1_lang-mHz69z2I.js";
|
|
4
4
|
import { s as g, u as h } from "./index-CA0SFykF.js";
|
|
5
5
|
const _ = { class: "routerPage-wrapper" }, B = /* @__PURE__ */ o({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-NG0JZKkn.cjs"),o=require("./index-DOMZ9ZOi.cjs"),n=require("./index.vue_vue_type_style_index_1_lang-CrR96PnG.cjs"),c=require("./index-CEwxrYB-.cjs"),i=e.defineComponent({__name:"index",setup(s){const t=e.reactive({...o.State}),a=n.useMenuState(),{activeMenuPath:r}=c.storeToRefs(a);return e.onMounted(async()=>{t.structureId=await n.getActivePageStructureId(r.value)}),(d,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(u.ssTable,{itemData:t.pageData,onChange:t.handleItemDataChange},null,8,["itemData","onChange"])]))}});exports.default=i;
|