ss-component-new 1.1.968 → 1.1.970
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/{animationData-CgXg3aWP.js → animationData-Cs1xyi1A.js} +3 -3
- package/dist/{animationData-vIUPsax5.cjs → animationData-DkzG4wWh.cjs} +1 -1
- package/dist/{array-CAtuJ0Ce.cjs → array-DecM9H4l.cjs} +1 -1
- package/dist/{array-CJ3NaEEf.js → array-NKfRbH0h.js} +1 -1
- package/dist/config.js +1 -1
- package/dist/{index-C_uHbUqr.cjs → index-0lr165xC.cjs} +1 -1
- package/dist/{index-_lT_HEqC.js → index-2Yqq67IU.js} +6 -6
- package/dist/{index-CYhfJZ5v.js → index-B39shW3q.js} +1 -1
- package/dist/{index-Dedec4ge.cjs → index-B3S02VaR.cjs} +1 -1
- package/dist/{index-CIYgpADx.cjs → index-BA9qwfKE.cjs} +1 -1
- package/dist/{index-D6KPdpP0.cjs → index-BDdnhKwm.cjs} +1 -1
- package/dist/{index-CUwwHEzW.js → index-BDmRbPuQ.js} +2 -2
- package/dist/{index-CcuOHcIO.cjs → index-BEKa9i86.cjs} +1 -1
- package/dist/{index-DQ828YJ3.cjs → index-BGpDTuVY.cjs} +1 -1
- package/dist/{index-0VYkrhJG.cjs → index-BIDCc1G8.cjs} +1 -1
- package/dist/{index-DRTFRXRa.js → index-BNbgnFHv.js} +1 -1
- package/dist/{index-CdfTuxGb.cjs → index-BOA7HMCD.cjs} +1 -1
- package/dist/{index-EJijm_gT.cjs → index-BavrW-fo.cjs} +1 -1
- package/dist/{index-De5eoiw8.js → index-Bd-euVm_.js} +2962 -2958
- package/dist/{index-CHaodEQ4.cjs → index-BgPOSTQs.cjs} +1 -1
- package/dist/{index-BbqNb19X.cjs → index-Bn1aDzTt.cjs} +1 -1
- package/dist/index-BpO_tdLl.cjs +1 -0
- package/dist/{index-rn9SX9Nl.cjs → index-Bpf2owNM.cjs} +1 -1
- package/dist/{index-Cq3syoIX.js → index-Brhf4ViU.js} +806 -806
- package/dist/{index-CBbAqPtN.js → index-BwPZurBP.js} +3 -3
- package/dist/{index-D9F8SKLx.cjs → index-BzC6eWC8.cjs} +1 -1
- package/dist/{index-D0iUTRGH.js → index-C0HRdd_c.js} +3 -3
- package/dist/{index-i-G3yrP3.cjs → index-C4R0CfEE.cjs} +1 -1
- package/dist/{index-ClbwQSnc.cjs → index-C8G_IwB1.cjs} +13 -13
- package/dist/{index-Cn1CAT5v.js → index-CEKH6kdU.js} +1 -1
- package/dist/{index-CdMRtchd.js → index-CExK-pXu.js} +2 -2
- package/dist/{index-DepJzm_V.js → index-CFyNIMNy.js} +2 -2
- package/dist/{index-DKUUYMq4.cjs → index-CHyYHZBB.cjs} +1 -1
- package/dist/{index-BKqNnsf0.cjs → index-CN6vGDE8.cjs} +1 -1
- package/dist/{index-BwL4IL28.cjs → index-CNb3G2v8.cjs} +1 -1
- package/dist/{index-BxEki0jM.cjs → index-CXLYjBEr.cjs} +1 -1
- package/dist/{index-disrgkJ3.js → index-CYkldwGL.js} +2 -2
- package/dist/{index-VNfOCqKl.cjs → index-CZxB1qs5.cjs} +1 -1
- package/dist/{index-DjFfYbPX.js → index-Ca2f0VUg.js} +6 -6
- package/dist/{index-B1XIkz_I.js → index-CcWv2JMn.js} +2 -2
- package/dist/{index-C_rCUjYa.js → index-ClwnmBI2.js} +2 -2
- package/dist/{index-BxGHSUPl.cjs → index-CmSvv5sz.cjs} +1 -1
- package/dist/{index-B6SS1Bmw.js → index-CtFW037j.js} +1 -1
- package/dist/{index-D5-da4-g.js → index-CwH74rkT.js} +5 -5
- package/dist/{index-Bt91L-4V.cjs → index-CwyjIWlq.cjs} +1 -1
- package/dist/{index-jsWJ1pPX.cjs → index-D1qiSl4z.cjs} +1 -1
- package/dist/{index-ZZPgG1-B.cjs → index-D5qQ230r.cjs} +1 -1
- package/dist/{index-BdHcdEnw.cjs → index-D6XpMz35.cjs} +1 -1
- package/dist/{index-9_77UsVI.js → index-D7G9AJWF.js} +2 -2
- package/dist/{index-DpsBCJ_W.js → index-DGk8PC6I.js} +2 -2
- package/dist/{index-BITQf-IP.js → index-DXQvtODI.js} +3 -3
- package/dist/{index-iWe5mgri.cjs → index-DZ1Lftny.cjs} +1 -1
- package/dist/{index-B2rYLxXt.js → index-DZezlj6e.js} +4 -4
- package/dist/{index-HASvh5ZQ.js → index-D_0XLuS9.js} +3 -3
- package/dist/{index-Cysq1-Lh.js → index-D_We23lH.js} +11 -11
- package/dist/{index-BZFlG1sR.js → index-DmMJJ0Jf.js} +3 -3
- package/dist/{index-U_9xRe4o.js → index-DmuGYM5h.js} +19 -19
- package/dist/{index-x-j1smHg.cjs → index-DuQHeRpA.cjs} +1 -1
- package/dist/{index-D5npP3EM.cjs → index-DvWyTRLB.cjs} +1 -1
- package/dist/{index-CsQHODXt.js → index-Dzd34mso.js} +1 -1
- package/dist/{index-CP_TZr3w.cjs → index-Ekt8m_1C.cjs} +1 -1
- package/dist/{index-CP3-EZXr.js → index-LB81kaSe.js} +6 -6
- package/dist/{index-4bnmiKnw.js → index-UpV405LB.js} +10 -10
- package/dist/{index-BzwifOO1.js → index-c1LZxfv-.js} +6 -6
- package/dist/{index-CRKAT5Xa.js → index-cu1e_o9m.js} +2 -2
- package/dist/{index-BPHEc-g6.cjs → index-dSxc93u_.cjs} +1 -1
- package/dist/{index-C_EQzYyN.js → index-enkFmdPq.js} +4 -4
- package/dist/{index-ChrTJ1W6.js → index-iKElN44U.js} +1 -1
- package/dist/{index-CgJJ7PbV.cjs → index-wJwy2tSX.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DBQPkAbZ.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bkf-CuS1.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-9oJPX8GC.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Ct7whq54.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-Cvm84UNX.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-Cx0s-ean.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CC00QRwn.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Dbljel7j.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CzQC3P3d.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-9YdwQa2u.js} +14 -14
- package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CQa0CS1h.cjs → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DKICgO-I.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-DnIBHMkQ.cjs → index.vue_vue_type_style_index_1_lang-BpnUtA8o.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-IgCzvgcg.cjs → index.vue_vue_type_style_index_1_lang-CletbRcG.cjs} +2 -2
- package/dist/{index.vue_vue_type_style_index_1_lang-F_FjApJY.js → index.vue_vue_type_style_index_1_lang-DEUcHlZd.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_1_lang-ChD2Hmhy.js → index.vue_vue_type_style_index_1_lang-DQF03uWi.js} +2 -2
- package/dist/{isString-DRPPYOfx.js → isString-BMd91i2E.js} +1 -1
- package/dist/{isString-9uUnZx8o.cjs → isString-CS7YCv9X.cjs} +1 -1
- package/dist/{isUndefined-0SDwo3OT.js → isUndefined-BAPZm5c1.js} +1 -1
- package/dist/{isUndefined-BMUWuDCd.cjs → isUndefined-CkboWss0.cjs} +1 -1
- package/dist/{main-SYj23ymE.cjs → main-BmmcLWmM.cjs} +1 -1
- package/dist/{main-V_8TBVI5.js → main-FbCHbEH9.js} +5 -5
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeLatheView-CVb17wAI.cjs → threeLatheView-B__-ooFI.cjs} +1 -1
- package/dist/{threeLatheView-BwdNkKJr.js → threeLatheView-Bl2igq1g.js} +2 -2
- package/dist/{threeModel-84rNSik2.js → threeModel-4uFHxx8P.js} +3 -3
- package/dist/{threeModel-wxWlWxtG.cjs → threeModel-DqqiLPCU.cjs} +1 -1
- package/dist/{threePreview-CCPOdEt6.js → threePreview-1VkG7-qJ.js} +1 -1
- package/dist/{threePreview-D8GMBJD2.cjs → threePreview-BuRwDPP-.cjs} +1 -1
- package/dist/{threeSceneView-DRmiFIah.cjs → threeSceneView-BRCKwrsg.cjs} +1 -1
- package/dist/{threeSceneView-C1G0Mt5Y.js → threeSceneView-CRWQXkBv.js} +8 -8
- package/dist/{threeSceneViewForCPMPIP-DtZV5jVr.cjs → threeSceneViewForCPMPIP-DeKWat2R.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Dody72Vh.js → threeSceneViewForCPMPIP-rdRrOQgn.js} +3 -3
- package/dist/{threeViewerHost-DW1H-gNy.cjs → threeViewerHost-C7J24Dzw.cjs} +1 -1
- package/dist/{threeViewerHost-DdFJuluc.js → threeViewerHost-EDXsKeN5.js} +4 -4
- package/package.json +1 -1
- package/public/config.js +1 -1
- package/dist/index-D26u2Y9X.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),S=require("./index-x-j1smHg.cjs"),Vl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-9oJPX8GC.cjs"),Ie=require("./index-ClbwQSnc.cjs"),vl=require("./threeViewerHost-DW1H-gNy.cjs"),oe=require("./index.vue_vue_type_style_index_1_lang-IgCzvgcg.cjs"),nl=require("./URDFLoader-C6HnI6A2.cjs");require("./index.vue_vue_type_style_index_1_lang-DnIBHMkQ.cjs");const Bl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");require("./three-viewport-gizmo-BV37JzRa.cjs");const _l=require("./index-BxEki0jM.cjs");require("./index-EJijm_gT.cjs");const sa=require("./isString-9uUnZx8o.cjs"),zl=j=>j.match(/\((.*)\)/)[1],cr={class:"extra-button-content"},dr={class:"table-operator-wrap"},pr={class:"extra-button-filter"},fr={class:"form-content-value"},gr={key:0,class:"extra-header"},hr={class:"drop-menu",style:{width:"120px"}},yr={key:0},vr={key:1},br={__name:"header",props:{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(j,{emit:ue}){const H=ue,O=j,B=a.ref(""),v=a.ref(!1),ae=a.ref([]),ge=a.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),xe=M=>{const L=M.raw;if(!L)return;const fe=new FileReader;fe.onload=Z=>{try{const ye=new Uint8Array(Z.target.result),$e=nl.readSync(ye,{type:"array"}),Fe=$e.SheetNames[0],Re=$e.Sheets[Fe],We=nl.utils.decode_range(Re["!ref"]).e.c+1,P=new Array(We).fill(""),Te=[];for(const he in Re){if(he[0]==="!")continue;const{r:ve,c:Se}=nl.utils.decode_cell(he);let Be=Re[he].v;if(Re[he].t==="n"&&Be>0&&Be<1e6&&(Be=new Date((Be-25569)*86400*1e3).toISOString().split("T")[0]),(Be==null||Be==="")&&(Be=""),ve===0)P[Se]=Be;else{if(!Te[ve-1]){Te[ve-1]={};for(let be=0;be<We;be++)Te[ve-1][`col_${be}`]=""}Te[ve-1][`col_${Se}`]=Be}}for(let he=0;he<We;he++)P[he]===void 0&&(P[he]="");const de=Te==null?void 0:Te[0];if(!(de!=null&&de.hasOwnProperty("col_0")))return S.ElMessage.error("导入的数据列不匹配,请检查是否错位");H("getImportData",P,Te)}catch(ye){throw S.ElMessage.error(ye.message),new Error(ye.message)}},fe.readAsArrayBuffer(L)},J=M=>{var fe;const L=(fe=ae.value)==null?void 0:fe.reduce((Z,ye,$e)=>($e===0?Z[ye.label]=M:Z[ye.label]=ye==null?void 0:ye.value,Z),{});H("filter",L,M,!0)},Ue=M=>{H("buttonClick",M)},qe=M=>{var L,fe;ae.value=(fe=(L=oe.getColumnChild(S.cloneDeep(M)))==null?void 0:L.filter(Z=>(Z==null?void 0:Z.label)!==""&&(Z==null?void 0:Z.label)!=="操作"))==null?void 0:fe.map(Z=>({label:(Z==null?void 0:Z.label)??"",value:"",name:(Z==null?void 0:Z.label)??"",isFormColHidden:Z==null?void 0:Z.isTableColHidden,width:2}))},me=a.ref(!1),Je=M=>{var L;if((M==null?void 0:M.buttonName)==="确认"&&(H("filter",M==null?void 0:M.content),me.value=(M==null?void 0:M.content)&&Object.values(M==null?void 0:M.content).length>0),(M==null?void 0:M.buttonName)==="清空"){const fe=S.cloneDeep(M==null?void 0:M.content);for(const Z in fe)fe[Z]="";ae.value=(L=ae.value)==null?void 0:L.map(Z=>({...Z,value:""})),H("filter",fe),me.value=!1}v.value=!1},ke=()=>{var L,fe;ae.value=(L=ae.value)==null?void 0:L.map(Z=>({...Z,value:""}));const M=(fe=ae.value)==null?void 0:fe.reduce((Z,ye)=>(Z[ye.label]=ye.value,Z),{});H("filter",M)};return a.onMounted(()=>{qe(O.columns)}),a.watch(()=>O.columns,()=>{qe(O.columns)},{deep:!0,immediate:!0}),(M,L)=>{var tl,We;const fe=a.resolveComponent("el-icon"),Z=a.resolveComponent("svg-icon"),ye=a.resolveComponent("el-input"),$e=a.resolveComponent("ss-popOver"),Fe=a.resolveComponent("el-button"),Re=a.resolveComponent("el-upload");return a.openBlock(),a.createElementBlock("div",cr,[a.createElementVNode("div",{class:a.normalizeClass(j.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(O==null?void 0:O.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:(O==null?void 0:O.level)>1?"0px":"8px",fontWeight:600-((O==null?void 0:O.level)-1)*100>=400?600-((O==null?void 0:O.level)-1)*100:400,fontSize:17-(O==null?void 0:O.level)>=14?17-(O==null?void 0:O.level)+"px":"14px"})},a.toDisplayString(j.compName),7),a.createElementVNode("div",dr,[a.createElementVNode("div",pr,[a.createVNode($e,{title:"",width:800,placement:"bottom-start",isVisible:v.value},{reference:a.withCtx(()=>{var P,Te,de,he;return[a.createVNode(ye,{modelValue:B.value,"onUpdate:modelValue":L[1]||(L[1]=ve=>B.value=ve),style:{"min-width":"80px"},placeholder:me.value?(de=(Te=(P=j.filterValues)==null?void 0:P.filter(ve=>ve))==null?void 0:Te.slice(0,3))==null?void 0:de.join("/"):"搜索","prefix-icon":a.unref(S.search_default),clearable:"",onInput:J,disabled:((he=ae.value)==null?void 0:he.length)===0},{suffix:a.withCtx(()=>{var ve,Se;return[!B.value&&((Se=(ve=j.filterValues)==null?void 0:ve.filter(Be=>Be))!=null&&Se.join("/"))?(a.openBlock(),a.createBlock(fe,{key:0,style:{cursor:"pointer"},onClick:ke},{default:a.withCtx(()=>[a.createVNode(a.unref(S.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:L[0]||(L[0]=ve=>v.value=!v.value)},[a.createVNode(Z,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",fr,[(a.openBlock(),a.createBlock(Ie.ssForm,{rowContents:ae.value,buttonValue:ge.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ge.value,isStartJustify:!1,onOnButtonClick:Je},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),j.buttons&&((tl=j.buttons)==null?void 0:tl.length)>0?(a.openBlock(),a.createElementBlock("div",gr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((We=j.buttons)==null?void 0:We.filter(P=>j.isDevMode||(P==null?void 0:P.label)!=="修改模板"),(P,Te)=>(a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:Te},[(P==null?void 0:P.type)==="upload"?(a.openBlock(),a.createBlock(Re,{key:0,class:"upload-button-wrap","on-change":xe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:a.withCtx(()=>[a.createVNode(Fe,{style:a.normalizeStyle({background:(P==null?void 0:P.background)??"var(--ssbutton-theme-bg)",color:(P==null?void 0:P.color)??"var(--ssbutton-theme-color)"})},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(P==null?void 0:P.label),1)]),_:2},1032,["style"])]),_:2},1024)):a.createCommentVNode("",!0),(P==null?void 0:P.type)==="popover"?(a.openBlock(),a.createBlock(Ie._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(P==null?void 0:P.type)==="popover"?(a.openBlock(),a.createBlock(Fe,{key:0,style:a.normalizeStyle({background:(P==null?void 0:P.background)??"var(--ssbutton-theme-bg)",color:(P==null?void 0:P.color)??"var(--ssbutton-theme-color)"})},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(P==null?void 0:P.label),1)]),_:2},1032,["style"])):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",hr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(P==null?void 0:P.contents,de=>(a.openBlock(),a.createBlock(Fe,{key:de==null?void 0:de.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:he=>Ue(de==null?void 0:de.label)},{default:a.withCtx(()=>{var he,ve;return[a.createTextVNode(a.toDisplayString(de==null?void 0:de.label),1),(he=de==null?void 0:de.label)!=null&&he.includes("选中")?(a.openBlock(),a.createElementBlock("span",yr,"("+a.toDisplayString(j.selectNums)+")",1)):a.createCommentVNode("",!0),(ve=de==null?void 0:de.label)!=null&&ve.includes("全部")?(a.openBlock(),a.createElementBlock("span",vr,"("+a.toDisplayString(j.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),P!=null&&P.type?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(Fe,{key:2,id:"themeButton",style:a.normalizeStyle({background:(P==null?void 0:P.background)??"var(--ssbutton-theme-bg)",color:(P==null?void 0:P.color)??"var(--ssbutton-theme-color)"}),onClick:de=>Ue(P==null?void 0:P.label)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(P==null?void 0:P.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):a.createCommentVNode("",!0)])])}}},mr=Bl._export_sfc(br,[["__scopeId","data-v-a817ffde"]]),kr=a.defineComponent({__name:"batch",props:{buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(j,{emit:ue}){const H=j,O=ue,B=ae=>{O("buttonClick",ae)},v=ae=>{var ge;return ae!=null&&ae.includes("删除")?((ge=H.selectTableItems)==null?void 0:ge.length)>0?"warning-active-type":"warning-type":"default-type"};return(ae,ge)=>{const xe=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(j.buttons,J=>(a.openBlock(),a.createBlock(xe,{key:J==null?void 0:J.label,class:a.normalizeClass(v(J==null?void 0:J.label)),onClick:Ue=>B(J==null?void 0:J.label)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(J==null?void 0:J.label),1)]),_:2},1032,["class","onClick"]))),128))])}}}),Sr=Bl._export_sfc(kr,[["__scopeId","data-v-1d3c11ad"]]),ia=S.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(j){this.selectArray=j},setSelectString(j){this.selectString=j}}}),Dr={class:"calculator-content"},Tr={class:"calculator-child"},Cr={class:"calculator-child"},Ar=a.defineComponent({__name:"calculator",setup(j){const ue=a.ref(),H=a.ref();return a.onMounted(()=>{ue.value=[{type:"Upload",label:"输入",name:"input"}],H.value=[{type:"Upload",label:"输出",name:"output"}]}),(O,B)=>(a.openBlock(),a.createElementBlock("div",Dr,[a.createElementVNode("div",Tr,[a.createVNode(Ie.ssForm,{rowContents:ue.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",Cr,[a.createVNode(Ie.ssForm,{rowContents:H.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Er=Bl._export_sfc(Ar,[["__scopeId","data-v-73db0fe7"]]),ta=S.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(j){this.selectIndex=j},setSelectMenu(j){this.selectMenu=j},setSelectTitle(j){this.selectTitle=j}}}),ql=(j,ue)=>{let H=j,O=ue;return Array.isArray(H)&&(H=H==null?void 0:H.map((B,v)=>{if(Array.isArray(B)){let ae={};return B=B==null?void 0:B.forEach((ge,xe)=>{var J;(J=O==null?void 0:O[xe])!=null&&J.prop?ae[O[xe].prop]=ge:Array.isArray(ge)&&(ae.children=ql(ge,O))}),Object.assign(ae,{id:v})}else return B})),H},ua=(j,ue,H)=>{let O=j,B=ue;return O=O==null?void 0:O.map((v,ae)=>{var ge,xe;return!Array.isArray(v)||!((ge=B==null?void 0:B[ae])!=null&&ge.label)&&!H||(v.unshift(((xe=B==null?void 0:B[ae])==null?void 0:xe.label)??""),v.some(J=>Array.isArray(J))&&(v=v==null?void 0:v.map(J=>{var Ue;return Array.isArray(J)&&(J=ua(J,(Ue=B==null?void 0:B[ae])==null?void 0:Ue.children,H)),J}))),v}),O},xr=(j,ue,H)=>{if(ue==="")return j==null?void 0:j.filter(O=>(O==null?void 0:O.id)!==H);{const O=ue.split("-");return Nr(j,O,H)}},Nr=(j,ue,H)=>{let O=j,B=ue;return(B==null?void 0:B.length)===0?O=O==null?void 0:O.filter(v=>v.id!==H):O=O==null?void 0:O.map(v=>(v.id.toString()===(B==null?void 0:B[0])&&(B==null||B.shift(),v=ca(v,B,H)),v)),O},ca=(j,ue,H)=>{var v,ae;let O=j,B=ue;return(B==null?void 0:B.length)===0?O.children=(v=O.children)==null?void 0:v.filter(ge=>ge.id!==H):O.children=(ae=O.children)==null?void 0:ae.map(ge=>(ge.id.toString()===(B==null?void 0:B[0])&&(B==null||B.shift(),ge=ca(ge,B,H)),ge)),O},_r=(j,ue,H)=>{if(ue==="")return H;{const O=ue.split("-");return Br(j,O,H)}},Br=(j,ue,H)=>{let O=j,B=ue;return(B==null?void 0:B.length)===0?O=H:O=O==null?void 0:O.map(v=>(v.id.toString()===(B==null?void 0:B[0])&&(B==null||B.shift(),v=da(v,B,H)),v)),O},da=(j,ue,H)=>{var v;let O=j,B=ue;return(B==null?void 0:B.length)===0?O.children=H:O.children=(v=O.children)==null?void 0:v.map(ae=>(ae.id.toString()===(B==null?void 0:B[0])&&(B==null||B.shift(),ae=da(ae,B,H)),ae)),O},pa=S.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(j){this.objUrl=j},setBlobUrls(j){this.blobUrls=j}}}),Jl=async j=>{var v,ae,ge,xe,J,Ue,qe;let ue=(ae=(v=S.cloneDeep(j))==null?void 0:v.optionUrl)==null?void 0:ae.menuSelect,H=[];ue==null||ue.forEach(me=>{});let O="";const B=await oe.menuToParent(ue);if(B==null||B.forEach(me=>{var Je,ke,M,L;(me==null?void 0:me.name)===(((L=(M=(ke=(Je=S.cloneDeep(j))==null?void 0:Je.optionUrl)==null?void 0:ke.groupSelect)==null?void 0:M[0])==null?void 0:L.replaceAll("'",""))??"")&&(O=me==null?void 0:me.id)}),O!==""){const me=(ge=B==null?void 0:B.find(M=>{var L,fe,Z,ye;return(M==null?void 0:M.name)===(((fe=(L=j==null?void 0:j.groupSelect)==null?void 0:L.split(":"))==null?void 0:fe[0])||((ye=(Z=j==null?void 0:j.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:ye[0]))}))==null?void 0:ge.compData;let Je=(J=(xe=me==null?void 0:me.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:xe.contents)==null?void 0:J.map(M=>M==null?void 0:M.label),ke=(qe=(Ue=me==null?void 0:me.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:Ue.contents)==null?void 0:qe.map(M=>(M=M==null?void 0:M.filter(L=>!(L!=null&&L.id)),M));ke==null||ke.forEach(M=>{H.push(oe.getValueToObjectValue(M,Je))})}return H},Ur={class:"table-content"},Or={class:"menu-config-wrap"},wr=["onClick"],Lr={key:0,class:"viewport-wrap"},Mr=["onClick"],jr={title:"选择显示列信息"},Kr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},$r=["title"],Fr={class:"col-operate-wrap"},Pr={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Vr={class:"pop-view"},zr={class:"pop-wrapper"},qr={class:"file-list-pop"},Jr=["title","onClick"],Rr=["onClick"],Wr=["onClick"],Gr={class:"form-content"},Hr={key:0,class:"dialog-footer"},Qr={class:"dialog-footer"},Xr={__name:"index",props:{level:{type:Number,default:1},compName:{type:String,default:"",required:!1},operatingForm:{type:Object,default:()=>{}},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:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(j,{emit:ue}){const H=a.ref([]),O=pa(S.pinia),B=a.ref(null),v=j,ae=a.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),ge=oe.useOriginalState(S.pinia),{originalPath:xe}=S.storeToRefs(ge),J=xe.value,Ue=a.ref(!1),qe=a.ref(!1),me=a.ref(!1),Je=a.reactive({column:{},status:!1,text:"合计"}),ke=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),M=ue,L=a.ref([]),fe=a.ref([]),Z=a.ref(!1),ye=a.ref(!1),$e=a.ref(null),{isUseBackdrop:Fe,isThreeSystem:Re,isTrackPathFile:tl,initTrackFileType:We,getFileExtension:P,setData:Te}=vl.useThreeSystem(),de=a.ref([]),he=a.ref(!1),ve=a.ref(),Se=oe.useMenuState(),{importLoading:Be,activeMenuPath:be,contentLoading:Yr}=S.storeToRefs(Se),fa=oe.useTableComp(S.pinia),De=oe.useModelComp(S.pinia),{extraContents:pe,cacheUpdatingData:ul,tableViewContents:cl,tableLoading:Zr,pageMapState:Ul}=S.storeToRefs(De),X=a.ref([]),bl=a.ref([]),ml=a.ref(new Map);a.ref(!1);const Ke=a.ref("");a.ref();const Ol=a.ref(!0),ol=a.ref(0),Rl=a.ref(!0),we=a.ref(""),Pe=a.ref(!1),ga=a.ref({label:"查看三维模型"}),kl=a.ref(!1),wl=a.ref(),Oe=a.ref([]),Ye=a.ref([]),Sl=a.ref(!1),dl=a.ref([]),sl=a.ref([]),Ze=a.ref([]),Ge=a.ref([]),Le=a.ref(),Ae=a.ref(),ha=ia(S.pinia),Dl=a.ref(),Ll=a.ref(0),Tl=ta(S.pinia),{selectIndex:ya,selectMenu:Ve,selectTitle:Ml}=S.storeToRefs(Tl),{selectString:el}=S.storeToRefs(ha),va=S.useLoginState(S.pinia),{loginUserInfo:se}=S.storeToRefs(va),ba=a.ref(720),ll=a.ref(!1),Cl=a.ref(!1),Me=a.ref([]),al=a.ref(),pl=a.ref(!0),Wl=a.ref(!0),Al=a.ref([]),ma=a.inject("contentRef");a.provide("contentRef",ma),a.watch(()=>{var e;return(e=X.value)==null?void 0:e.length},e=>{ke.total=e}),a.watch(()=>cl.value,async()=>{var t,p,c,d,b,s,x,k,C,N,w,T,$,A,_,g,h,i;if(((t=cl.value)==null?void 0:t.length)===0||!((p=v==null?void 0:v.itemData)!=null&&p.find(m=>(m==null?void 0:m.key)==="columnPath"))||!((c=v==null?void 0:v.itemData)!=null&&c.find(m=>(m==null?void 0:m.key)==="pageColumn")))return;let e=(C=(k=(x=(s=(b=(d=v==null?void 0:v.itemData)==null?void 0:d.find(m=>(m==null?void 0:m.key)==="pageColumn"))==null?void 0:b.contents)==null?void 0:s.split("["))==null?void 0:x[1])==null?void 0:k.split("]"))==null?void 0:C[0],l=(($=(T=(w=(N=v==null?void 0:v.itemData)==null?void 0:N.find(m=>(m==null?void 0:m.key)==="pageColumn"))==null?void 0:w.contents)==null?void 0:T.split("["))==null?void 0:$[0])+((_=(A=cl.value)==null?void 0:A.find(m=>(m==null?void 0:m.key)===e))==null?void 0:_.value),o=((h=(g=v==null?void 0:v.itemData)==null?void 0:g.find(m=>(m==null?void 0:m.key)==="pageGroup"))==null?void 0:h.contents)??"",r=await oe.getItemData(l,sessionStorage.getItem("systemKey"),""),n=(i=r==null?void 0:r.find(m=>(m==null?void 0:m.name)===(o===""?v==null?void 0:v.compName:o)))==null?void 0:i.compData;na(n,v.allMapContents)},{deep:!0});const ka=async(e,l)=>{var o;try{const r={type:"data",pageKey:be.value,tableId:v.index,systemKey:sessionStorage.getItem("systemKey")},n=l==null?void 0:l.map(c=>{const d=Object.keys(c),b={};return d.forEach((s,x)=>{b[e[x]]=c[s]}),b}),t=n==null?void 0:n.map(c=>({key:r,value:{tableData:c}})),p=await S.batchAddInsofDataApi({dataList:t});((o=p==null?void 0:p.data)==null?void 0:o.code)===200?(De.setRefreshCurStructure(!0),S.ElMessage.success("导入数据成功")):S.ElMessage.error("导入数据响应失败")}catch(r){throw S.ElMessage.error("导入数据处理失败"),new Error(r)}},Sa=async e=>{var l,o;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await S.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),n=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let t=URL.createObjectURL(n);ve.value=[{name:(o=e==null?void 0:e.split("/"))==null?void 0:o[((l=e==null?void 0:e.split("/"))==null?void 0:l.length)-1],blobUrl:t}],he.value=!0}};a.onBeforeUnmount(()=>{Wl.value=!1;let e=Ll.value;Ll.value=e+1});const Da=a.computed(()=>{var o;const e=(ke.currentPage-1)*ke.pageSize,l=e+ke.pageSize;return(o=X.value)==null?void 0:o.slice(e,l)}),Ta=e=>{ke.currentPage=e},Ca=e=>{var l;ke.pageSize=e,e*ke.currentPage>((l=X.value)==null?void 0:l.length)&&(ke.currentPage=1,S.ElMessage.warning("分页无效,返回第一页"))},Aa=(e,l)=>{var p,c;const o=(c=(p=L.value)==null?void 0:p.map(d=>d==null?void 0:d.prop))==null?void 0:c.filter(d=>d!=="operate");let r;const n=(e==null?void 0:e.length)===(o==null?void 0:o.length);if(e!=null&&e.includes("序号"))return S.ElMessage.error("导入的数据不需要包含序号列");if(r=n?e:e.slice(0,o==null?void 0:o.length),!(r==null?void 0:r.every(d=>o==null?void 0:o.find(b=>d===b))))return S.ElMessage.error("导入的数据表头不匹配");ka(r,l)},Ea=(e,l)=>{var o;De.setRefreshCurStructure(!1),((o=L.value)==null?void 0:o.length)===0||Aa(e,l)},xa=(e,l,o,r)=>{const n=[],t=[],p=b=>Object.keys(b).length;for(const b in e)if(e[b]!==void 0){const s=e[b],x=[];for(const[k,C]of Object.entries(s))x.push(C),t.length<p(s)&&t.push(k);n.push(x)}n.unshift(t);const c=nl.utils.aoa_to_sheet(n),d=nl.utils.book_new();nl.utils.book_append_sheet(d,c,r),nl.writeFileSync(d,`${l}.xlsx`),Me.value=[]},El=async(e,l,o,r=!1,n)=>{var t,p,c,d,b,s,x,k;try{De.setRefreshCurStructure(!1);const C=await S.getInsofDataApi({id:v==null?void 0:v.index});if(((t=C==null?void 0:C.data)==null?void 0:t.code)===200){let N=(b=(d=(c=(p=C==null?void 0:C.data)==null?void 0:p.result)==null?void 0:c[0])==null?void 0:d.value)==null?void 0:b.pageData;r?N={...N,compData:(x=N==null?void 0:N.compData)==null?void 0:x.map(T=>{var $;return(T==null?void 0:T.key)==="header"?{...T,contents:($=T==null?void 0:T.contents)==null?void 0:$.map(A=>({...A,[e]:o}))}:T})}:N={...N,compData:(s=N==null?void 0:N.compData)==null?void 0:s.map(T=>{var $,A;return(T==null?void 0:T.key)==="header"?{...T,contents:($=T==null?void 0:T.contents)==null?void 0:$.map(_=>(_==null?void 0:_.prop)===(l==null?void 0:l.prop)?{..._,[e]:o}:_)}:(T==null?void 0:T.key)==="tableToForm"&&n?{...T,contents:(A=T==null?void 0:T.contents)==null?void 0:A.map(_=>(_==null?void 0:_.prop)===(l==null?void 0:l.prop)?{..._,[n]:o}:_)}:T})};const w=await S.updateInsofDataApi({id:v==null?void 0:v.index,value:{pageData:N}});((k=w==null?void 0:w.data)==null?void 0:k.code)===200?(S.ElMessage.success("编辑成功"),De.setRefreshCurStructure(!0)):S.ElMessage.error("编辑响应失败")}}catch(C){S.ElMessage.error(C)}},Na=async(e,l)=>{await El("label",l,e)},_a=async(e,l)=>{await El("columnType",l,e,!1,"type")},Ba=()=>{ul.value?ll.value=!1:oa()},Ua=e=>{Me.value=e},Oa=(e,l)=>{al.value===l?pl.value=!1:pl.value=!0,al.value=l==null?void 0:l.changeProp},fl=a.computed(()=>{var o,r,n;const e=(o=L.value)==null?void 0:o.some(t=>t==null?void 0:t.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(n=(r=L.value)==null?void 0:r.filter(t=>(t==null?void 0:t.label)!=="操作"))==null?void 0:n.map(t=>({...t,filterable:!!(t!=null&&t.filterable),showSummary:!!(t!=null&&t.showSummary),operable:!!(t!=null&&t.operable)}))}),wa=async(e,l,o)=>{const r=S.cloneDeep(L.value);await a.nextTick(),L.value=r==null?void 0:r.map(n=>(o==null?void 0:o.label)===(n==null?void 0:n.label)?{...n,[l]:e}:n),await El(l,o,e)},jl=async(e,l)=>{await El(l,null,e,!0)},La=()=>{Pe.value=!1},Ma=e=>{M("clickTrigger",e)},Gl=async e=>{var t,p,c,d,b,s,x,k,C,N,w,T,$,A,_,g;const l=e==null?void 0:e.row,o=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix;if((t=l==null?void 0:l.toString())!=null&&t.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(l.includes(",")){S.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(Fe(l)){Te({url:[l]});return}dl.value=[l],ye.value=!0,$e.value={data:S.cloneDeep(o)},Z.value=!0;return}let n=[];if((p=l==null?void 0:l.toString())!=null&&p.includes(".stl")||(c=l==null?void 0:l.toString())!=null&&c.includes(".STL")||(d=l==null?void 0:l.toString())!=null&&d.includes(".obj")||(b=l==null?void 0:l.toString())!=null&&b.includes(".mtl")){if(Re()){const h=(s=l==null?void 0:l.toString())==null?void 0:s.split(",");Te({url:h,isThreeScene:!1});return}dl.value=(x=l==null?void 0:l.toString())==null?void 0:x.split(","),ye.value=!1,Z.value=!0;return}if((k=l==null?void 0:l.toString())!=null&&k.includes(".stl")||(C=l==null?void 0:l.toString())!=null&&C.includes(".STL")||(N=l==null?void 0:l.toString())!=null&&N.includes(".obj")||(w=l==null?void 0:l.toString())!=null&&w.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let h,i=[],m={};if(Array.isArray(l)?h=l:h=l==null?void 0:l.split(","),h==null||h.forEach(u=>{u.includes(".mtl")?i.push(u):m.blob=m.blob?m.blob+","+u:u}),(i==null?void 0:i.length)>0&&(m.mtlBlobs=i),r&&(m.suffix=r),($=(T=Object.values(m))==null?void 0:T[0])!=null&&$.includes("http:"))n.push(m);else{const u=new Blob([m.blob],{type:"application/octet-stream;charset=UTF-8"});let K=URL.createObjectURL(u),F="";(A=l==null?void 0:l.split("/"))==null||A.forEach((Q,I)=>{var R;I===((R=l==null?void 0:l.split("/"))==null?void 0:R.length)-1&&(F=Q)}),(_=m.blob)!=null&&_.includes(".stl")&&(F=(F==null?void 0:F.replaceAll(">",""))+".urdf"),ve.value=[{name:F,blobUrl:K}],he.value=!0}}else{const h=await S.axios.get(l,{responseType:"blob",headers:{"Content-Type":"application/json"}}),i=new Blob([h.data],{type:"application/octet-stream;charset=UTF-8"});let m=URL.createObjectURL(i),u="";if((g=l==null?void 0:l.split("/"))==null||g.forEach((K,F)=>{var Q;F===((Q=l==null?void 0:l.split("/"))==null?void 0:Q.length)-1&&(u=K)}),Fe(u)&&tl(u)){const K=We(u),F=P(u);Te({extension:F,url:[m],data:{trackFileType:K}});return}ve.value=[{name:u,blobUrl:m}],he.value=!0}(n==null?void 0:n.length)>0&&O.setBlobUrls(n)},xl=e=>{var r,n,t,p;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const l=(p=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:p[((t=(n=e==null?void 0:e.url)==null?void 0:n.split("."))==null?void 0:t.length)-1];return(e==null?void 0:e.name)+"."+l},ja=async e=>{let l=null,o=null,r=null;if(e!=null&&e.downloadUrl){const t=await Kl(),p=Ie.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),c=await S.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:t,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{p.close()}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});l=URL.createObjectURL(d),o=e==null?void 0:e.name;const b=o==null?void 0:o.lastIndexOf(".");r=o==null?void 0:o.slice(b)}else{const t=await vl.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")?(l=URL.createObjectURL(t.data),o=xl(e)):l=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 t={row:`${l}`,suffix:r};Gl(t);return}const n={name:o,blobUrl:l};ve.value=[n],he.value=!0},Ka=async e=>{let l=null,o=null;if(e!=null&&e.downloadUrl){const t=await Kl(),p=await S.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:t,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),c=new Blob([p.data],{type:"application/octet-stream;charset=UTF-8"});l=URL.createObjectURL(c),o=e==null?void 0:e.name}else{const t=await vl.downloadAvatarApi({url:e==null?void 0:e.url});l=URL.createObjectURL(t.data),o=xl(e)}const r={name:o,blobUrl:l},n=document.createElement("a");n.href=r.blobUrl,n.download=r.name,n.style.display="none",document.body.appendChild(n),n.click(),setTimeout(()=>{document.body.removeChild(n)},100)},$a=(e,l)=>{if(Object.values(l).length!==0)return Object.values(l).find(o=>{var r,n,t;return((r=o==null?void 0:o.toString())==null?void 0:r.includes(".txt"))||((n=o==null?void 0:o.toString())==null?void 0:n.includes(".cpt"))||((t=o==null?void 0:o.toString())==null?void 0:t.includes(".obj"))})?[...e,ga.value]:e},Fa=(e,l={})=>[...e==null?void 0:e.values()].filter(o=>Object.keys(l).every(r=>{var p;const n=o[r],t=(p=l[r])==null?void 0:p.toLowerCase();return t&&n&&typeof n=="string"?n.toLowerCase().includes(t):!0})),Hl=a.ref([]),Pa=async(e,l,o=!1)=>{var r;if(e){if(De.setTableLoading(!0),Hl.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(n=>!n)))return X.value=bl.value;if(o){X.value=[...ml.value.values()].filter(n=>Object.values(n).some(t=>typeof t=="string"?t==null?void 0:t.toLowerCase().includes(l==null?void 0:l.toLowerCase()):!1));return}X.value=Fa(ml.value,e),De.setTableLoading(!1)}},Va=async e=>{var p,c,d,b,s,x,k,C,N,w,T,$,A,_,g;const l=await S.getInsofDataApi({keyLikes:{pageKey:`loading${((p=se.value)==null?void 0:p.account)||((c=se.value)==null?void 0:c.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),o=await S.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((d=se.value)==null?void 0:d.account)||((b=se.value)==null?void 0:b.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(x=(s=l==null?void 0:l.data)==null?void 0:s.result)==null?void 0:x.map(h=>h==null?void 0:h.id);const n=(C=(k=o==null?void 0:o.data)==null?void 0:k.result)==null?void 0:C.map(h=>h==null?void 0:h.id);r=[...S.cloneDeep(r),...n],(r==null?void 0:r.length)>0&&(r!=null&&r.every(h=>h!==null&&h))&&await S.batchDeleteInsofDataApi({ids:r});let t=await oe.getItemData(be.value,sessionStorage.getItem("systemKey"),e.id);if(t=t==null?void 0:t.filter(h=>h.comp!=="methodButton"),t&&t.length>0){const h=!Array.isArray(Ml.value)&&((N=Ml.value)==null?void 0:N.key)!=="main"?[]:Ml.value;h.push({key:Ve.value===""?(w=e==null?void 0:e.id)==null?void 0:w.toString():Ve.value+"-"+((T=e==null?void 0:e.id)==null?void 0:T.toString()),value:e[($=Object.keys(e))==null?void 0:$.filter(i=>i!=="index"&&i!=="id")[0]]}),Tl.setSelectMenu(Ve.value===""?(A=e==null?void 0:e.id)==null?void 0:A.toString():Ve.value+"-"+((_=e==null?void 0:e.id)==null?void 0:_.toString())),Tl.setSelectTitle(h),Tl.setSelectIndex((g=e==null?void 0:e.id)==null?void 0:g.toString()),M("pageChange",t)}},za=async(e,l,o,r)=>{var b,s,x,k,C,N,w,T,$,A,_,g,h,i,m,u,K,F,Q,I,R,re,W,ee,te,ne,ie,Ce,y,G,E;const n=await S.getInsofDataApi({keyLikes:{pageKey:`loading${((b=se.value)==null?void 0:b.account)||((s=se.value)==null?void 0:s.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),t=await S.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((x=se.value)==null?void 0:x.account)||((k=se.value)==null?void 0:k.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});if((r==null?void 0:r.isExistChild)===!0){let V=(N=(C=L.value)==null?void 0:C.find(U=>(U==null?void 0:U.isMainKey)===!0))==null?void 0:N.prop,ce=(w=r==null?void 0:r.rowContent)==null?void 0:w[V],q=($=(T=r==null?void 0:r.columnType)==null?void 0:T.childPath)==null?void 0:$.split(J),D=[];q==null||q.forEach((U,z)=>{(q==null?void 0:q.length)-1===z&&D.push(ce),D.push(U)}),D=D.join(J);let f=await oe.getItemData(D,sessionStorage.getItem("systemKey"),""),Y=await oe.getItemData((A=r==null?void 0:r.columnType)==null?void 0:A.childPath,sessionStorage.getItem("systemKey"),"");if(!f||(f==null?void 0:f.length)===0){let U=[];Y==null||Y.forEach(le=>{var He,_e,Qe,Xe;let Ne={type:"structure",pageKey:D,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(He=se.value)==null?void 0:He.id,parentPageKey:"",createUserLayer:((_e=se.value)==null?void 0:_e.dept)||((Qe=se.value)==null?void 0:Qe.部门名称)},rl={pageData:{comp:le==null?void 0:le.comp,compData:(Xe=le==null?void 0:le.compData)==null?void 0:Xe.filter(ze=>(ze==null?void 0:ze.key)!=="tableContents"),name:le==null?void 0:le.name,isShow:le==null?void 0:le.isShow}};U.push({key:Ne,value:rl})}),(U==null?void 0:U.length)>0&&await S.batchAddInsofDataApi({dataList:U});let z=await oe.getItemData(D,sessionStorage.getItem("systemKey"),"");Al.value=z}else Al.value=f;M("routeUrl",Al.value,{isEdit:!0,routerUrl:D});return}let p=(g=(_=n==null?void 0:n.data)==null?void 0:_.result)==null?void 0:g.map(V=>V==null?void 0:V.id);const c=(i=(h=t==null?void 0:t.data)==null?void 0:h.result)==null?void 0:i.map(V=>V==null?void 0:V.id);if(p=[...S.cloneDeep(p),...c],(p==null?void 0:p.length)>0&&(p!=null&&p.every(V=>V!==null&&V))&&(r==null?void 0:r.data)!=="查看"&&await S.batchDeleteInsofDataApi({ids:p}),(r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(V=>(V==null?void 0:V.url)&&(V==null?void 0:V.name)))){let V=S.cloneDeep(e);V=await((m=S.cloneDeep(V))==null?void 0:m.map(async q=>{var Y,U,z,le;const D=await vl.downloadAvatarApi({url:q==null?void 0:q.url});let f=URL.createObjectURL(D.data);return{name:(q==null?void 0:q.name)+"."+((le=(Y=q==null?void 0:q.url)==null?void 0:Y.split("."))==null?void 0:le[((z=(U=q==null?void 0:q.url)==null?void 0:U.split("."))==null?void 0:z.length)-1]),blobUrl:f}}));let ce=await Promise.all(V);ve.value=ce,he.value=!0}const d=S.cloneDeep(L.value);if((r==null?void 0:r.isMainKey)===!0&&(d==null?void 0:d.length)>0){(u=d==null?void 0:d[0])==null||u.prop;let V=S.cloneDeep(be).value+J+(r==null?void 0:r.data),ce=S.cloneDeep(be).value,q=(F=(K=Ul.value[V])==null?void 0:K.filter(U=>{var z,le;return((z=U==null?void 0:U.key)==null?void 0:z.type)==="structure"&&((le=U==null?void 0:U.key)==null?void 0:le.parentTable)===""}))==null?void 0:F.map(U=>{var z;return(z=U==null?void 0:U.value)==null?void 0:z.pageData}),D={};(Q=L.value)==null||Q.forEach(U=>{(U==null?void 0:U.label)!=="操作"&&(D[U.label]=o[U.prop]??o[U.label])});let f=(R=(I=v==null?void 0:v.itemData)==null?void 0:I.find(U=>(U==null?void 0:U.key)==="mainRouters"))==null?void 0:R.contents,Y;if((f==null?void 0:f.length)>0){let U=V==null?void 0:V.split(J)[((re=V==null?void 0:V.split(J))==null?void 0:re.length)-1],z=f==null?void 0:f.find(le=>(le==null?void 0:le.key)===U);Y=(z==null?void 0:z.routerContent)+J+(z==null?void 0:z.key)}if((q==null?void 0:q.length)>0)await oe.loadingConstruct(V,V+J+`updateLoading${((W=se.value)==null?void 0:W.account)||((ee=se.value)==null?void 0:ee.账号)}`,D,Y),De.setRouteToChildPath(ce),Se.setActiveMenuPath(V+J+`updateLoading${((te=se.value)==null?void 0:te.account)||((ne=se.value)==null?void 0:ne.账号)}`);else{(ie=d==null?void 0:d[0])==null||ie.prop;let U=S.cloneDeep(be).value+J+(r==null?void 0:r.data),z=S.cloneDeep(be).value;await oe.getItemData(z+J,sessionStorage.getItem("systemKey"),""),await oe.loadingConstruct(z+J,U,D),await oe.loadingConstruct(U,U+J+`updateLoading${((Ce=se.value)==null?void 0:Ce.account)||((y=se.value)==null?void 0:y.账号)}`,D,Y),De.setRouteToChildPath(z),Se.setActiveMenuPath(U+J+`updateLoading${((G=se.value)==null?void 0:G.account)||((E=se.value)==null?void 0:E.账号)}`)}}},qa=()=>{he.value=!1},Ja=e=>{M("rowClick",e)};a.watch(()=>v.changedContent,()=>{var o,r;if(!v.changedContent)return;let e=(o=X.value)==null?void 0:o.map(n=>{var t;return n.id===((t=v.changedContent)==null?void 0:t.id)&&(n={...v.changedContent,id:v.changedContent.newId?v.changedContent.newId:v.changedContent.id},delete n.newId),n});const l=(r=v.itemData)==null?void 0:r.map(n=>((n==null?void 0:n.key)==="tableContents"&&(n.contents=e),n));X.value=e,M("contentChange",{contents:l,index:v.index}),M("change",{content:e,index:v==null?void 0:v.index,buttonName:"",id:v==null?void 0:v.index})},{deep:!0,immediate:!0});const Ra=()=>{},Wa=async()=>{const e=be.value,l=sessionStorage.getItem("systemKey"),o=await oe.getItemData(e,l,""),r=o==null?void 0:o.find(c=>(c==null?void 0:c.name)==="方法明细"),n=(r==null?void 0:r.compData)||[],t=n==null?void 0:n.find(c=>(c==null?void 0:c.key)==="formContent");return t==null?void 0:t.contents},Kl=async()=>`Bearer ${S.Local.get("access-token")}`,Ga=async(e,{token:l,inputData:o}={})=>await S.axios.post(e,o,{headers:{Authorization:l}}).catch(n=>(Se.setImportLoading(!1),Promise.reject(n))),Ha=e=>{var r;let l={};const o=[];return l.form={},(r=S.cloneDeep(e))==null||r.forEach((n,t)=>{var p,c,d,b,s,x,k,C,N,w,T,$,A,_;if((n==null?void 0:n.comp)==="Table"){(c=(p=n==null?void 0:n.compData)==null?void 0:p.find(m=>(m==null?void 0:m.key)==="header"))==null||c.contents;let g=(s=(b=(d=n==null?void 0:n.compData)==null?void 0:d.find(m=>(m==null?void 0:m.key)==="tableContents"))==null?void 0:b.contents)==null?void 0:s.map(m=>m.slice(1));(w=(N=(C=(k=(x=n==null?void 0:n.compData)==null?void 0:x.find(m=>(m==null?void 0:m.key)==="header"))==null?void 0:k.contents)==null?void 0:C[0])==null?void 0:N[0])==null||w.label;let h=($=(T=n==null?void 0:n.compData)==null?void 0:T.find(m=>(m==null?void 0:m.key)==="header"))==null?void 0:$.contents,i=[];g==null||g.forEach(m=>{let u=[];m==null||m.forEach((K,F)=>{var I;let Q={};((I=h[F])==null?void 0:I.label)!=="操作"&&(Q[h[F].label]=K,u.push(Q))}),i.push(u)}),l[n.name]=i}else{const g=(_=(A=n.compData)==null?void 0:A.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:_.contents;g==null||g.forEach(h=>{var i,m;if(h.prop!==""){let u=h==null?void 0:h.value;Array.isArray(u)?u=((i=u==null?void 0:u[0])==null?void 0:i.oldUrl)||"http://222.92.178.198:62001/"+((m=u==null?void 0:u[0])==null?void 0:m.url):u=u.toString(),h={key:(h==null?void 0:h.prop)??(h==null?void 0:h.label),value:u},o.push(h)}})}}),l.form=oe.getFormContents(o),l},Qa=async(e,l,o)=>{var K,F,Q,I,R,re,W,ee,te,ne,ie,Ce;Se.setImportLoading(!0);const r=await Wa().catch(y=>(Se.setImportLoading(!1),Promise.reject(y))),n=r==null?void 0:r.find(y=>(y==null?void 0:y.key)==="算法体"),t=n==null?void 0:n.value;if(!t){console.log("未搜索到isMain, 缺少算法执行接口"),Se.setImportLoading(!1);return}const p=L.value||[],c=p.find(y=>(y==null?void 0:y.prop)==="输入"),d=c==null?void 0:c.prop;let b=l==null?void 0:l[d];const s=await Kl().catch(y=>(Se.setImportLoading(!1),Promise.reject(y)));let x=!1,k="";(K=L.value)==null||K.forEach(y=>{(y==null?void 0:y.prop)===d&&(x=!!(y!=null&&y.childPath),k=y==null?void 0:y.childPath)});let C="",N="";if(x){let y=(Q=(F=L.value)==null?void 0:F.find(ce=>(ce==null?void 0:ce.isMainKey)===!0))==null?void 0:Q.prop;N=l==null?void 0:l[y];let G=k==null?void 0:k.split(J),E=[];G==null||G.forEach((ce,q)=>{(G==null?void 0:G.length)-1===q&&E.push(N),E.push(ce)}),E=E.join(J),C=E;let V=await oe.getItemData(E,sessionStorage.getItem("systemKey"),"");b=Ha(V)}const w=await Ga(t,{token:s,inputData:b}).catch(y=>(Se.setImportLoading(!1),Promise.reject(y))),T=(I=w==null?void 0:w.data)==null?void 0:I.data,$=r==null?void 0:r.find(y=>(y==null?void 0:y.prop)==="算法名称");$==null||$.value;const A=p.find(y=>(y==null?void 0:y.prop)==="输出"),_=A==null?void 0:A.directiveLabel;C=C==null?void 0:C.replaceAll(c==null?void 0:c.directiveLabel,_);const g=(R=S.cloneDeep(C))==null?void 0:R.replaceAll(J+N,"");let h=await oe.getItemData(C,sessionStorage.getItem("systemKey"),""),i=await oe.getItemData(g,sessionStorage.getItem("systemKey"),"");if(h){let y=[],G=[];h==null||h.forEach(E=>{var V,ce;if((E==null?void 0:E.comp)==="Table")(V=E==null?void 0:E.compData)==null||V.forEach(q=>{var D;(q==null?void 0:q.key)==="tableContents"&&((D=q==null?void 0:q.contents)==null||D.forEach(f=>{var Y,U;(Y=f==null?void 0:f[0])!=null&&Y.id&&y.push((U=f==null?void 0:f[0])==null?void 0:U.id)}))});else if((E==null?void 0:E.comp)==="Form"){E.compData=(ce=E==null?void 0:E.compData)==null?void 0:ce.map(D=>{var f;return(D==null?void 0:D.key)==="formContent"&&(D.contents=(f=D==null?void 0:D.contents)==null?void 0:f.map(Y=>{var U,z;return(U=T==null?void 0:T.form)!=null&&U[Y.prop]&&(Y.value=(z=T==null?void 0:T.form)==null?void 0:z[Y.prop]),Y})),D});let q={pageData:{comp:E==null?void 0:E.comp,name:E==null?void 0:E.name,isShow:E==null?void 0:E.isShow,compData:E==null?void 0:E.compData}};G.push({id:E==null?void 0:E.id,value:q})}}),(G==null?void 0:G.length)>0&&await S.batchUpdateInsofDataApi({dataList:G}),y=[...new Set(y)],(y==null?void 0:y.length)>0&&await S.batchDeleteInsofDataApi({ids:y})}else{let y=[];if(T!=null&&T.table){let G={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:C,parentTable:"",createUserId:(re=se.value)==null?void 0:re.id,createUserOrg:((W=se.value)==null?void 0:W.dept)||((ee=se.value)==null?void 0:ee.部门名称)};i==null||i.forEach(E=>{let ce={pageData:{comp:E==null?void 0:E.comp,name:E==null?void 0:E.name,isShow:E==null?void 0:E.isShow,compData:E==null?void 0:E.compData}};y.push({key:G,value:ce})})}if(T!=null&&T.form){let G={type:"structure",pageKey:C,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(te=se.value)==null?void 0:te.id,parentPageKey:"",createUserLayer:((ne=se.value)==null?void 0:ne.dept)||((ie=se.value)==null?void 0:ie.部门名称)};i==null||i.forEach(E=>{var D;let V=(D=E==null?void 0:E.compData)==null?void 0:D.map(f=>{var Y;return(f==null?void 0:f.key)==="formContent"&&(f.contents=(Y=f.contents)==null?void 0:Y.map(U=>{var z,le;return(z=T==null?void 0:T.form)!=null&&z[U.prop]&&(U.value=(le=T==null?void 0:T.form)==null?void 0:le[U.prop]),U})),f}),q={pageData:{comp:E==null?void 0:E.comp,name:E==null?void 0:E.name,isShow:E==null?void 0:E.isShow,compData:V}};y.push({key:G,value:q})})}(y==null?void 0:y.length)>0&&await S.batchAddInsofDataApi({dataList:y})}let m=await oe.getItemData(C,sessionStorage.getItem("systemKey"),""),u=[];T!=null&&T.table&&((Ce=T==null?void 0:T.table)==null||Ce.forEach(y=>{var V,ce,q,D;let G={type:"data",pageKey:C,tableId:(V=m==null?void 0:m[0])==null?void 0:V.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ce=se.value)==null?void 0:ce.id,createUserOrg:((q=se.value)==null?void 0:q.dept)||((D=se.value)==null?void 0:D.部门名称)},E={tableData:y};u.push({key:G,value:E})})),(u==null?void 0:u.length)>0&&await S.batchAddInsofDataApi({dataList:u}),hl(!0),Se.setImportLoading(!1)},Ql=(e,l)=>(e=e==null?void 0:e.map(o=>{var r,n;return o!=null&&o.children&&((r=o.children)!=null&&r.find(t=>t.id===(l==null?void 0:l.id))?o.children=(n=o.children)==null?void 0:n.filter(t=>(t==null?void 0:t.id)!==(l==null?void 0:l.id)):o.children=Ql(o.children,l)),o}),e),Nl=async(e,l,o)=>{var r,n,t,p,c,d,b,s,x,k,C,N,w,T,$;if(Ke.value="",Sl.value=!0,Ol.value=!0,M("onButtonClick",e,l),e==="删除")oe.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,_;(A=X.value)!=null&&A.find(g=>(g==null?void 0:g.id)===(l==null?void 0:l.id))?X.value=(_=S.cloneDeep(X.value))==null?void 0:_.filter(g=>(g==null?void 0:g.id)!==(l==null?void 0:l.id)):X.value=Ql(S.cloneDeep(X.value),l),xr(Dl.value,Ve.value,l==null?void 0:l.id),De.setTableLoading(v==null?void 0:v.index),M("change",{content:X.value,singleContent:l,index:v==null?void 0:v.index,type:"delete",buttonName:e,column:L.value})});else if(e==="批量删除"){if(((r=Me.value)==null?void 0:r.length)===0)return S.ElMessage.warning("请先勾选操作的数据");oe.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,g;const A=(_=Me.value)==null?void 0:_.map(h=>h.id);X.value=(g=S.cloneDeep(X.value))==null?void 0:g.filter(h=>!(A!=null&&A.includes(h.id))),De.setTableLoading(v==null?void 0:v.index),M("change",{content:X.value,singleContent:null,selectItems:Me.value,index:v==null?void 0:v.index,type:"batchDelete",buttonName:e,column:L.value})})}else if(e==="复制新增"){we.value="新增";const A=S.cloneDeep(l),_=(n=L.value)==null?void 0:n.find(i=>i==null?void 0:i.isMainKey),g=_||((t=L.value)==null?void 0:t[0]),h=(p=Ze.value)==null?void 0:p.find(i=>(i==null?void 0:i.label)==="新建");await Il(!0,h,{data:A,firstCol:g})}else if(e==="新增")we.value="新增",gl(""),Pe.value=!0;else if(e==="编辑")we.value="编辑",gl(l),Pe.value=!0;else if(e==="查看")we.value="查看",gl(l),Sl.value=!1,Ol.value=!1,Pe.value=!0;else if(e==="查看三维模型"){const A={};for(let g in l)g!=="id"&&(A[g]=l[g]);let _=(c=Object.values(A))==null?void 0:c[1];fa.setTableShowThree(_)}else if(((d=o==null?void 0:o.extra)==null?void 0:d.type)==="modelExample")we.value=e,kl.value=!0;else if(e==="新建"){let A=Ul.value,_=[];for(let u in A)u!=null&&u.includes(`loading${((b=se.value)==null?void 0:b.account)||((s=se.value)==null?void 0:s.账号)}`)&&(_=[..._,...u]);let g=[];for(let u in A)u!=null&&u.includes(`updateLoading${((x=se.value)==null?void 0:x.account)||((k=se.value)==null?void 0:k.账号)}`)&&(g=[...g,...u]);let h=_==null?void 0:_.map(u=>u==null?void 0:u.id);const i=g==null?void 0:g.map(u=>u==null?void 0:u.id);h=[...S.cloneDeep(h),...i],(h==null?void 0:h.length)>0&&(h!=null&&h.every(u=>u!==null&&u))&&await S.batchDeleteInsofDataApi({ids:h});const m=(C=Ze.value)==null?void 0:C.find(u=>(u==null?void 0:u.label)==="新建");await Il(!1,m)}else if(e==="修改模板"){let A=S.cloneDeep(be).value;De.setRouteToChildPath(A),Se.setActiveMenuPath(A+J)}else if(e==="执行")Qa(e,l);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((N=Me.value)==null?void 0:N.length)===0)return S.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((w=X.value)==null?void 0:w.length)===0)return S.ElMessage.warning("暂无数据导出");const A=($=(T=L.value)==null?void 0:T.map(g=>g==null?void 0:g.label))==null?void 0:$.filter(g=>g!=="操作"),_=e==="导出全部"?S.cloneDeep(X.value):S.cloneDeep(Me.value);_==null||_.forEach(g=>{g==null||delete g.id}),xa(_,v==null?void 0:v.compName,A,v==null?void 0:v.compName)}},Xa=async e=>{var o,r,n,t,p,c;const l=await S.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((o=l==null?void 0:l.data)==null?void 0:o.code)===200)return Array.isArray((r=l==null?void 0:l.data)==null?void 0:r.result)&&((t=(n=l==null?void 0:l.data)==null?void 0:n.result)==null?void 0:t.length)>0?(c=(p=l==null?void 0:l.data)==null?void 0:p.result)==null?void 0:c.map(d=>{var b;return{id:d==null?void 0:d.id,...(b=d==null?void 0:d.value)==null?void 0:b.pageData}}):[]},Xl=(e,l,o,r)=>{var n;M("contentChange",{contents:(n=e==null?void 0:e.compData)==null?void 0:n.map(t=>{var p;return(t==null?void 0:t.key)==="formContent"?{...t,contents:(p=t==null?void 0:t.contents)==null?void 0:p.map(c=>(c==null?void 0:c.key)===l?{...c,value:o}:c)}:t}),index:e==null?void 0:e.id},r)},Ia=(e,l,o)=>{let r=e==null?void 0:e[l==null?void 0:l.prop],n=1;if(X.value.some(t=>(t==null?void 0:t[l==null?void 0:l.prop])===r)){const t=r;for(;X.value.some(p=>(p==null?void 0:p[l==null?void 0:l.prop])===`${t}(${n})`);)n++;r=`${t}(${n})`}return r},Il=async(e,l,o)=>{var p,c,d,b,s,x,k,C;let r,n;const t=Ia(o==null?void 0:o.data,o==null?void 0:o.firstCol);if(e?(r=S.cloneDeep(be).value+J+((b=o==null?void 0:o.data)==null?void 0:b[(d=o==null?void 0:o.firstCol)==null?void 0:d.prop]),n=S.cloneDeep(be).value+J+t):(r=S.cloneDeep(be).value+J,n=S.cloneDeep(r)+`loading${((p=se.value)==null?void 0:p.account)||((c=se.value)==null?void 0:c.账号)}`),l){const N=(x=(s=Ul.value[n])==null?void 0:s.filter(w=>{var T;return((T=w==null?void 0:w.key)==null?void 0:T.parentTable)===""}))==null?void 0:x.map(w=>{var T;return{id:w==null?void 0:w.id,...(T=w==null?void 0:w.value)==null?void 0:T.pageData}});if((N==null?void 0:N.length)>0)if(e){const w=N==null?void 0:N.find(T=>{var $;return(($=T==null?void 0:T.comp)==null?void 0:$.toUpperCase())==="FORM"});w&&Xl(w,(k=o==null?void 0:o.firstCol)==null?void 0:k.label,t,be.value)}else De.setRouteToChildPath(S.cloneDeep(be).value),Se.setActiveMenuPath(n);else if(await oe.loadingConstruct(r,n,null,null),e){const w=await Xa(n);if((w==null?void 0:w.length)>0){const T=w==null?void 0:w.find($=>{var A;return((A=$==null?void 0:$.comp)==null?void 0:A.toUpperCase())==="FORM"});T&&Xl(T,(C=o==null?void 0:o.firstCol)==null?void 0:C.label,t,be.value)}}else De.setRouteToChildPath(S.cloneDeep(be).value),Se.setActiveMenuPath(n)}else e?(Ke.value="",Ae.value=o==null?void 0:o.data,hl(!0,o==null?void 0:o.firstCol,t)):(De.setRouteToChildPath(S.cloneDeep(be).value),Se.setActiveMenuPath(n))},Ya=()=>{Z.value=!1,dl.value=[],ye.value=!1},gl=e=>{var n,t,p,c,d,b;const l=[];let o=[];for(let s in e)Array.isArray(e==null?void 0:e[s])&&o.push(s);fe.value=S.cloneDeep(L.value),(t=oe.getColumnChild((n=S.cloneDeep(L.value))==null?void 0:n.filter(s=>(s==null?void 0:s.label)!=="操作")))==null||t.forEach((s,x)=>{var k;o.find(C=>C===(s==null?void 0:s.prop))||(s!=null&&s.formType&&((k=s==null?void 0:s.formType)==null?void 0:k.toUpperCase())==="SELECT"?l.push({label:(s==null?void 0:s.prop)||(s==null?void 0:s.label)||"",name:(s==null?void 0:s.prop)??"t"+x,prop:s==null?void 0:s.prop,type:!(s!=null&&s.formType)||(s==null?void 0:s.formType)===""?"Input":s==null?void 0:s.formType,value:(e==null?void 0:e[s==null?void 0:s.prop])??(s==null?void 0:s.value)??"",id:(s==null?void 0:s.id)??x,contents:(s==null?void 0:s.options)??[],width:1,isFormColHidden:s==null?void 0:s.isFormColHidden,disabled:s==null?void 0:s.disabled,optionUrl:{groupSelect:s==null?void 0:s.groupSelect,menuSelect:s==null?void 0:s.formMenuSelect,type:"Select",selectRelateType:s==null?void 0:s.selectRelateType}}):l.push({label:(s==null?void 0:s.prop)||(s==null?void 0:s.label)||"",prop:s==null?void 0:s.prop,name:(s==null?void 0:s.prop)??"t"+x,type:!(s!=null&&s.formType)||(s==null?void 0:s.formType)===""?"Input":s==null?void 0:s.formType,value:(e==null?void 0:e[s==null?void 0:s.prop])??(s==null?void 0:s.value)??"",id:(s==null?void 0:s.id)??x,contents:(s==null?void 0:s.options)??[],width:1,isFormColHidden:s==null?void 0:s.isFormColHidden,disabled:s==null?void 0:s.disabled}))}),e===""||!e||(Ke.value=(e==null?void 0:e.id)??"");let r=oe.getColumnChild((p=S.cloneDeep(L.value))==null?void 0:p.filter(s=>(s==null?void 0:s.label)!=="操作"));Oe.value&&((c=Oe.value)==null?void 0:c.length)>0&&(Oe.value=(d=S.cloneDeep(Oe).value)==null?void 0:d.map(s=>{var k;let x=(s==null?void 0:s.prop)||((k=r==null?void 0:r.find(C=>(C==null?void 0:C.label)===(s==null?void 0:s.label)))==null?void 0:k.prop);return x&&(s.value=e[x]),s})),Ge.value=Oe.value&&((b=Oe.value)==null?void 0:b.length)>0?oe.getTableFormToForm(Oe.value):l},Za=()=>{var l;const e=(l=B.value)==null?void 0:l.$el;e&&Vl.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:o=>{var p;const{oldIndex:r,newIndex:n}=o;if(r===n)return;const t=fl.value.splice(r,1)[0];fl.value.splice(n,0,t),L.value=(p=L.value)==null?void 0:p.slice().sort((c,d)=>{if(c.label==="操作")return 1;if(d.label==="操作")return-1;const b=fl.value.findIndex(x=>x.label===c.label),s=fl.value.findIndex(x=>x.label===d.label);return b-s})}})};a.onMounted(()=>{wl.value=window.innerWidth-240*2});const er=()=>{a.nextTick(()=>{Za()})},$l=(e,l)=>{var r;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let o;return e.children=(r=e.children)==null?void 0:r.map(n=>{var t,p;if((n==null?void 0:n.id)===Ke.value){let c={};for(let d in n){let b=(t=l==null?void 0:l.find(s=>(s==null?void 0:s.prop)===d))==null?void 0:t.label;b?c[d]=(p=Ae.value)==null?void 0:p[b]:c[d]=n[d]}n=Object.assign(c,Ae.value),o=n}else{let c=$l(n,l);n=c==null?void 0:c.contents,o=c==null?void 0:c.currentSelectContents}return n}),{contents:e,currentSelectContents:o}},Yl=(e,l)=>{let o,r;return e!=null&&e.find(n=>(n==null?void 0:n.id)===Ke.value)?o=e==null?void 0:e.map(n=>{var t,p;if((n==null?void 0:n.id)===Ke.value){let c={};for(let d in n){let b=(t=l==null?void 0:l.find(s=>(s==null?void 0:s.prop)===d))==null?void 0:t.label;b?c[d]=(p=Ae.value)==null?void 0:p[b]:c[d]=n[d]}n=Object.assign(c,Ae.value),r=n}return n}):o=e==null?void 0:e.map(n=>{var t,p,c,d;if((n==null?void 0:n.id)===Ke.value){let b={};for(let s in n){let x=(t=l==null?void 0:l.find(k=>(k==null?void 0:k.prop)===s))==null?void 0:t.label;x?b[s]=(p=Ae.value)==null?void 0:p[x]:b[s]=n[s]}n=Object.assign(b,Ae.value),r=n}else n=(c=$l(n,l))==null?void 0:c.contents,r=(d=$l(n,l))==null?void 0:d.currentSelectContents;return n}),{newContents:o,currentSelectContents:r}},Zl=(e,l,o)=>{var r,n;return e[l==null?void 0:l.prop]=o,typeof e.id=="number"&&(e.id=(r=e.id)==null?void 0:r.toString()),e.children&&((n=e.children)==null?void 0:n.length)>0&&(e.children=e.children.map(Zl)),e},Fl=e=>{var o;const l=[];return l.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((o=e.children)==null||o.forEach(r=>{l.push(...Fl(r))})),(l==null?void 0:l.length)>0?l==null?void 0:l.map(r=>{const n={...r};return delete n.children,n}):[]},hl=(e=!0,l,o)=>{var b,s,x,k,C,N,w,T,$;let r=oe.getColumnChild((b=S.cloneDeep(L.value))==null?void 0:b.filter(A=>(A==null?void 0:A.label)!=="操作")),n,t=S.cloneDeep(X.value);if(!Ae.value){Pe.value=!1;return}if(Ke.value===""){ol.value++;let A;l&&o?A={id:ol.value.toString(),[l==null?void 0:l.prop]:o,children:Ae.value.children}:A={id:ol.value.toString()},A!=null&&A.children&&(A={...A,children:(s=A.children)==null?void 0:s.map(_=>Zl(_,l,o))}),t.push(Object.assign(Ae.value,A)),n=Object.assign(Ae.value,A)}else t=(x=Yl(t,r))==null?void 0:x.newContents,n=(k=Yl(t,r))==null?void 0:k.currentSelectContents;const p=(C=v.itemData)==null?void 0:C.filter(A=>(A==null?void 0:A.key)==="childTree")[0];if(((N=p==null?void 0:p.contents)==null?void 0:N.length)>0){we.value="编辑";const A=[];t==null||t.forEach((_,g)=>{var i;let h={};if(Array.isArray(_)){let m=[];_==null||_.filter(u=>!(u!=null&&u.id)).forEach((u,K)=>{var F,Q,I,R,re,W,ee;if((Q=(F=Le.value)==null?void 0:F[K])!=null&&Q.prop&&!Array.isArray(u)){let te={};te[Le.value[K].column]=u,pe!=null&&pe.value&&((I=pe==null?void 0:pe.value)==null?void 0:I.length)>0&&((R=pe==null?void 0:pe.value)!=null&&R.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(te)))&&(m=(re=pe==null?void 0:pe.value)==null?void 0:re.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(te))),m&&m.length>0?h[Le.value[K].prop]=m!=null&&m.find(ne=>{var ie;return((ie=Object.keys(ne))==null?void 0:ie[0])===Le.value[K].column})?(W=m==null?void 0:m.find(ne=>{var ie;return((ie=Object.keys(ne))==null?void 0:ie[0])===Le.value[K].column}))==null?void 0:W[Le.value[K].column]:u:h[Le.value[K].prop]=u}else Array.isArray(u)&&((ee=Le.value[K])!=null&&ee.prop?h[Le.value[K].prop]=u:h.children=ql(u,Le.value))})}else h=_;Array.isArray(_)&&_.some(m=>m==null?void 0:m.id)?A.push(Object.assign(h,{id:(i=_==null?void 0:_.find(m=>m.id))==null?void 0:i.id})):h.id?A.push(h):A.push(Object.assign(h,{id:g.toString()}))}),X.value=ra(A,p,L.value)}else X.value=t;Dl.value=X.value;const c=_r(Dl.value,Ve.value,t);let d=[];if(ul.value?(d=(w=S.cloneDeep(ul).value.singleContent)==null?void 0:w.filter(A=>(A==null?void 0:A.id)!==(n==null?void 0:n.id)),d.push(n)):d=[n],ll.value){const A={content:c,singleContent:((T=p==null?void 0:p.contents)==null?void 0:T.length)>0?d==null?void 0:d.flatMap(Fl):d,index:v==null?void 0:v.index,buttonName:"编辑",column:L.value,parentTableId:v==null?void 0:v.parentTableId};De.setCacheUpdatingData(A)}if(e){const A={content:c,singleContent:(($=p==null?void 0:p.contents)==null?void 0:$.length)>0?Fl(n):n,index:v==null?void 0:v.index,buttonName:we.value,column:L.value,parentTableId:v==null?void 0:v.parentTableId};De.setTableLoading(v==null?void 0:v.index),Pe.value=!1,Ae.value=void 0,M("change",A)}};a.onUnmounted(()=>{L.value=[],X.value=[],fe.value=[],de.value=[],Oe.value=[],Ye.value=[],dl.value=[],sl.value=[],Ge.value=[],Me.value=[],B.value=null});const ea=async(e,l,o)=>{var b,s,x,k,C,N,w,T,$,A,_;al.value=o==null?void 0:o.prop;const r=S.cloneDeep(v.itemData),n=r==null?void 0:r.map(g=>{var h;return(g==null?void 0:g.key)==="header"&&((h=g.contents)==null||h.map((i,m)=>{var u,K,F,Q,I,R,re,W,ee,te,ne,ie,Ce,y,G,E,V,ce,q;return i.type=i!=null&&i.type?i.type:(Q=(F=(K=(u=i==null?void 0:i.key)==null?void 0:u.split("$"))==null?void 0:K[1])==null?void 0:F.split("("))!=null&&Q[0]?(R=(I=oe.FormType)==null?void 0:I.find(D=>{var f,Y,U,z;return(D==null?void 0:D.key)===((z=(U=(Y=(f=i==null?void 0:i.key)==null?void 0:f.split("$"))==null?void 0:Y[1])==null?void 0:U.split("("))==null?void 0:z[0])}))==null?void 0:R.value:"Input",i.options=i!=null&&i.options?i.options:((ee=(W=(re=i==null?void 0:i.key)==null?void 0:re.split("$"))==null?void 0:W[1])==null?void 0:ee.length)>0?(Ce=(ie=zl((ne=(te=i==null?void 0:i.key)==null?void 0:te.split("$"))==null?void 0:ne[1]))==null?void 0:ie.split(","))==null?void 0:Ce.map(D=>({label:D,value:D})):[],(y=i==null?void 0:i.key)!=null&&y.includes("$")&&(i.key=(E=(G=i==null?void 0:i.key)==null?void 0:G.split("$"))==null?void 0:E[0]),i.value=(V=Object.values(l))==null?void 0:V[m],i.optionUrl=i!=null&&i.formMenuSelect&&((ce=i==null?void 0:i.formMenuSelect)==null?void 0:ce.length)>0?{groupSelect:(q=i==null?void 0:i.groupSelect)==null?void 0:q.split(/[::]/).map(D=>D.trim()),menuSelect:i==null?void 0:i.formMenuSelect,selectRelateType:"",type:(i==null?void 0:i.formType)??(i!=null&&i.groupSelect?"Select":"")}:null,i})),g});let t=S.cloneDeep(Ge.value),p=(s=(b=S.cloneDeep(n))==null?void 0:b.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:s.contents;t=t==null?void 0:t.map(g=>{var h;return g.value=(h=p==null?void 0:p.find((i,m)=>m===(g==null?void 0:g.id)))==null?void 0:h.value,g});let c="",d=(C=(k=(x=S.cloneDeep(n))==null?void 0:x.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:k.contents)==null?void 0:C.find((g,h)=>{var i,m,u;return(g==null?void 0:g.label)===al.value||(h==null?void 0:h.toString())===((u=(m=(i=al.value)==null?void 0:i.split("a"))==null?void 0:m[1])==null?void 0:u.toString())});if((T=(w=(N=S.cloneDeep(n))==null?void 0:N.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:w.contents)==null||T.forEach(g=>{var h,i,m,u,K;c===""&&((m=(i=(h=g==null?void 0:g.optionUrl)==null?void 0:h.groupSelect)==null?void 0:i[1])!=null&&m.includes("["))&&(c=(K=(u=g==null?void 0:g.optionUrl)==null?void 0:u.groupSelect)==null?void 0:K[1])}),($=d==null?void 0:d.optionUrl)!=null&&$.menuSelect){let g=await Jl(d),h;if(g==null||g.forEach(i=>{var m,u,K,F,Q,I,R,re,W,ee;c===((u=(m=d==null?void 0:d.optionUrl)==null?void 0:m.groupSelect)==null?void 0:u[1])&&((Q=(F=(K=d==null?void 0:d.optionUrl)==null?void 0:K.groupSelect)==null?void 0:F[1])!=null&&Q.includes("["))&&((ee=S.cloneDeep(i))==null?void 0:ee[(W=(re=(R=(I=d==null?void 0:d.optionUrl)==null?void 0:I.groupSelect)==null?void 0:R[1])==null?void 0:re.replaceAll("[",""))==null?void 0:W.replaceAll("]","")])===(d==null?void 0:d.value)&&(h=i)}),h){let i=S.cloneDeep(t);i=i==null?void 0:i.map(u=>{var K,F,Q,I,R,re,W,ee,te,ne,ie;return(h!=null&&h[u==null?void 0:u.label]||h!=null&&h[(I=(Q=(F=(K=u==null?void 0:u.optionUrl)==null?void 0:K.groupSelect)==null?void 0:F[1])==null?void 0:Q.replaceAll("[",""))==null?void 0:I.replaceAll("]","")])&&((W=(re=(R=u==null?void 0:u.optionUrl)==null?void 0:R.groupSelect)==null?void 0:re[1])!=null&&W.includes("["))&&(u.value=(h==null?void 0:h[u==null?void 0:u.label])||(h==null?void 0:h[(ie=(ne=(te=(ee=u==null?void 0:u.optionUrl)==null?void 0:ee.groupSelect)==null?void 0:te[1])==null?void 0:ne.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])),u}),X.value=(A=S.cloneDeep(X.value))==null?void 0:A.map(u=>{if((u==null?void 0:u.id)===(l==null?void 0:l.id)){const K={};return i==null||i.forEach(F=>{K[F.name]=F.value}),K.id=u==null?void 0:u.id,K}return u});let m=S.cloneDeep(i);m=m==null?void 0:m.map(u=>{var K,F,Q,I;return(F=(K=u==null?void 0:u.optionUrl)==null?void 0:K.menuSelect)!=null&&F.some(R=>R==null?void 0:R.includes)&&(u.optionUrl.menuSelect=(I=(Q=u==null?void 0:u.optionUrl)==null?void 0:Q.menuSelect)==null?void 0:I.map(R=>{var re,W,ee,te;if(R!=null&&R.includes("[")){let ne=(W=(re=R==null?void 0:R.replaceAll("[","").replaceAll("]",""))==null?void 0:re.split(":"))==null?void 0:W[1];R=(te=(ee=S.cloneDeep(i))==null?void 0:ee.find(ie=>(ie==null?void 0:ie.label)===ne))==null?void 0:te.value}return R})),u}),X.value=(_=S.cloneDeep(X.value))==null?void 0:_.map(u=>{if((u==null?void 0:u.id)===(l==null?void 0:l.id)){const K={};return m==null||m.forEach(F=>{K[F.name]=F.value}),K.id=u==null?void 0:u.id,K}return u})}}},lr=async e=>{var b,s,x,k,C,N,w,T,$,A,_;if(!e)return;Ae.value=e;const l=S.cloneDeep(v.itemData);let o=l==null?void 0:l.map(g=>{var h;return(g==null?void 0:g.key)==="header"&&((h=g.contents)==null||h.map((i,m)=>{var u,K,F,Q,I,R,re,W,ee,te,ne,ie,Ce,y,G,E,V,ce,q;return i.type=i!=null&&i.type?i.type:(Q=(F=(K=(u=i==null?void 0:i.key)==null?void 0:u.split("$"))==null?void 0:K[1])==null?void 0:F.split("("))!=null&&Q[0]?(R=(I=oe.FormType)==null?void 0:I.find(D=>{var f,Y,U,z;return(D==null?void 0:D.key)===((z=(U=(Y=(f=i==null?void 0:i.key)==null?void 0:f.split("$"))==null?void 0:Y[1])==null?void 0:U.split("("))==null?void 0:z[0])}))==null?void 0:R.value:"Input",i.options=i!=null&&i.options?i.options:((ee=(W=(re=i==null?void 0:i.key)==null?void 0:re.split("$"))==null?void 0:W[1])==null?void 0:ee.length)>0?(Ce=(ie=zl((ne=(te=i==null?void 0:i.key)==null?void 0:te.split("$"))==null?void 0:ne[1]))==null?void 0:ie.split(","))==null?void 0:Ce.map(D=>({label:D,value:D})):[],(y=i==null?void 0:i.key)!=null&&y.includes("$")&&(i.key=(E=(G=i==null?void 0:i.key)==null?void 0:G.split("$"))==null?void 0:E[0]),i.value=(V=Object.values(e))==null?void 0:V[m],i.optionUrl=i!=null&&i.formMenuSelect&&((ce=i==null?void 0:i.formMenuSelect)==null?void 0:ce.length)>0?{groupSelect:(q=i==null?void 0:i.groupSelect)==null?void 0:q.split(/[::]/).map(D=>D.trim()),menuSelect:i==null?void 0:i.formMenuSelect,selectRelateType:"",type:(i==null?void 0:i.formType)??(i!=null&&i.groupSelect?"Select":"")}:null,i})),g}),r=S.cloneDeep(Ge.value),n=(s=(b=S.cloneDeep(o))==null?void 0:b.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:s.contents;if(r=r==null?void 0:r.map(g=>{var h;return g.value=(h=n==null?void 0:n.find((i,m)=>(i==null?void 0:i.prop)===(g==null?void 0:g.name)))==null?void 0:h.value,g}),!pl.value)return;let t="",p=(C=(k=(x=S.cloneDeep(o))==null?void 0:x.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:k.contents)==null?void 0:C.find((g,h)=>{var i,m,u;return(g==null?void 0:g.label)===al.value||(h==null?void 0:h.toString())===((u=(m=(i=al.value)==null?void 0:i.split("a"))==null?void 0:m[1])==null?void 0:u.toString())}),c=(N=p==null?void 0:p.optionUrl)==null?void 0:N.menuSelect,d=!0;if(($=(T=(w=S.cloneDeep(o))==null?void 0:w.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:T.contents)==null||$.forEach(g=>{var h,i,m,u,K,F;d&&((m=(i=(h=g==null?void 0:g.optionUrl)==null?void 0:h.groupSelect)==null?void 0:i[1])!=null&&m.includes("["))&&(t=(K=(u=g==null?void 0:g.optionUrl)==null?void 0:u.groupSelect)==null?void 0:K[1],JSON.stringify(c)===JSON.stringify((F=g==null?void 0:g.optionUrl)==null?void 0:F.menuSelect)&&(d=!1))}),(A=p==null?void 0:p.optionUrl)!=null&&A.menuSelect&&pl.value){let g=await Jl(p),h;if((_=p==null?void 0:p.optionUrl)==null||_.menuSelect,g==null||g.forEach(i=>{var m,u,K,F,Q,I,R,re,W,ee;t===((u=(m=p==null?void 0:p.optionUrl)==null?void 0:m.groupSelect)==null?void 0:u[1])&&((Q=(F=(K=p==null?void 0:p.optionUrl)==null?void 0:K.groupSelect)==null?void 0:F[1])!=null&&Q.includes("["))&&((ee=S.cloneDeep(i))==null?void 0:ee[(W=(re=(R=(I=p==null?void 0:p.optionUrl)==null?void 0:I.groupSelect)==null?void 0:R[1])==null?void 0:re.replaceAll("[",""))==null?void 0:W.replaceAll("]","")])===(p==null?void 0:p.value)&&(h=i)}),h){let i=S.cloneDeep(r);i=i==null?void 0:i.map(u=>{var K,F,Q,I,R,re,W,ee,te,ne,ie;return(h!=null&&h[u==null?void 0:u.label]||h!=null&&h[(I=(Q=(F=(K=u==null?void 0:u.optionUrl)==null?void 0:K.groupSelect)==null?void 0:F[1])==null?void 0:Q.replaceAll("[",""))==null?void 0:I.replaceAll("]","")])&&((W=(re=(R=u==null?void 0:u.optionUrl)==null?void 0:R.groupSelect)==null?void 0:re[1])!=null&&W.includes("["))&&(u.value=(h==null?void 0:h[u==null?void 0:u.label])||(h==null?void 0:h[(ie=(ne=(te=(ee=u==null?void 0:u.optionUrl)==null?void 0:ee.groupSelect)==null?void 0:te[1])==null?void 0:ne.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])),u}),Ge.value=S.cloneDeep(i);let m=S.cloneDeep(i);m=m==null?void 0:m.map(u=>{var K,F,Q,I,R,re;return(F=(K=u==null?void 0:u.optionUrl)==null?void 0:K.menuSelect)!=null&&F.some(W=>W==null?void 0:W.includes("["))&&(u.optionUrl.oldMenuSelect=(I=(Q=S.cloneDeep(u))==null?void 0:Q.optionUrl)==null?void 0:I.menuSelect,u.optionUrl.menuSelect=(re=(R=u==null?void 0:u.optionUrl)==null?void 0:R.menuSelect)==null?void 0:re.map(W=>{var ee,te,ne,ie;if(W!=null&&W.includes("[")){let Ce=(te=(ee=W==null?void 0:W.replaceAll("[","").replaceAll("]",""))==null?void 0:ee.split(":"))==null?void 0:te[1];W=(ie=(ne=S.cloneDeep(i))==null?void 0:ne.find(y=>(y==null?void 0:y.label)===Ce))==null?void 0:ie.value}return W})),u}),Ge.value=m}}pl.value=!1},ar=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",rr=e=>{var t,p;const l=(p=(t=Oe.value)==null?void 0:t.find(c=>(c==null?void 0:c.label)===(e==null?void 0:e.label)))==null?void 0:p.multiple,o=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;X.value.forEach(c=>{const d=c==null?void 0:c[o];l&&sa.isString(d)&&(c[o]=[d]),!l&&!sa.isString(d)&&(c[o]="")})},la=(e,l)=>{var o;return l==null||l.forEach(r=>{e[r==null?void 0:r.prop]=r==null?void 0:r.value}),e.children&&((o=e.children)==null?void 0:o.length)>0&&(e.children=e.children.map(r=>la(r,l))),e},Pl=e=>{var o,r,n,t,p,c;gl("");const l=(o=Ge.value)==null?void 0:o.reduce((d,b)=>(d[b.name]=b.value,d),{});if(((r=Object.keys(l))==null?void 0:r.length)>0){Ae.value=l,Ke.value="",ol.value=(n=X.value)==null?void 0:n.length,sl.value=(t=Ze.value)==null?void 0:t.filter(b=>(b==null?void 0:b.label)!=="新增");const d=(c=(p=fe.value)==null?void 0:p.filter(b=>(b==null?void 0:b.label)!=="操作"))==null?void 0:c.map(b=>{var x,k,C;const s=(k=(x=Oe.value)==null?void 0:x.find(N=>(N==null?void 0:N.label)===(b==null?void 0:b.label)))==null?void 0:k.multiple;return rr(b),{...b,contents:(b==null?void 0:b.options)??[],optionUrl:b!=null&&b.formMenuSelect&&((C=b==null?void 0:b.formMenuSelect)==null?void 0:C.length)>0?{groupSelect:b==null?void 0:b.groupSelect,menuSelect:b==null?void 0:b.formMenuSelect,selectRelateType:"",type:b==null?void 0:b.formType,multiple:s}:null}});L.value=d==null?void 0:d.map(b=>la(b,[{prop:"type",value:"edit"},{prop:"columnType",value:ar(b==null?void 0:b.formType)||(b==null?void 0:b.columnType)}])),e==="createClick"&&hl(!1)}},nr=(e,l)=>Number(Vl.dayjs(l).diff(Vl.dayjs(e),"day",!0).toFixed(1)),or=(e,l)=>{var p;const o=(p=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:p.contents,r={START:"开始时间",END:"结束时间",HOURS:"工时"},n=new Map;return o==null||o.forEach((c,d)=>{const{label:b}=c;n.set(b,d)}),!n.has(r.START)||!n.has(r.END)||!n.has(r.HOURS)?l:l==null?void 0:l.map(c=>{const d=c==null?void 0:c[r.START],b=c==null?void 0:c[r.END],s=nr(d,b);return d&&b&&(c[r.HOURS]=`${s}天`),c})},aa=(e,l,o=0)=>{if(o>((l==null?void 0:l.length)??""))return e;const r=l==null?void 0:l[o],n=new Map;for(const p of e){const c=p[r];n.has(c)||n.set(c,[]),n.get(c)&&n.get(c).push(p)}const t=[];for(const[p,c]of n){const[d,...b]=c,s={...d};o+1===((l==null?void 0:l.length)??"")?s.children=c==null?void 0:c.map(x=>(x.level=S.cloneDeep(o)+1,x)).filter((x,k)=>k!==0):b.length>0&&(s.children=aa(b,l,o+1)),s.level=o,t.push(s)}return t},ra=(e,l,o)=>{var n;if(!(l!=null&&l.contents)||((n=l==null?void 0:l.contents)==null?void 0:n.length)===0)return e;let r=[];return r=aa(e,l==null?void 0:l.contents,0),r},na=(e,l)=>{var k,C,N,w,T,$,A,_,g,h,i,m,u,K,F,Q,I,R,re,W,ee,te,ne,ie,Ce;const o=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="header");e==null||e.filter(y=>(y==null?void 0:y.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="childTree")[0];let n=l;const t=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="page"),p=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="rowButton"),c=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="extraButton"),d=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableContents"),b=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableIndex");Oe.value=(C=(k=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableToForm"))==null?void 0:k[0])==null?void 0:C.contents,Rl.value=(t==null?void 0:t.contents)??!0;let s=[];el.value===""?s=o==null?void 0:o[0]:s=(o==null?void 0:o.find(y=>(y==null?void 0:y.selectLabel)==="("+el.value+")"))??(o==null?void 0:o.find(y=>!(y!=null&&y.selectLabel)));let x=[];if(el.value===""?x=b==null?void 0:b[0]:x=(b==null?void 0:b.find(y=>(y==null?void 0:y.selectLabel)==="("+el.value+")"))??(b==null?void 0:b.find(y=>!(y!=null&&y.selectLabel))),((N=s==null?void 0:s.contents)==null?void 0:N.length)>0){let y=[];if(s!=null&&s.contents.some(D=>Array.isArray(D)&&(D==null?void 0:D.find(f=>f.children))))Ve.value===""?y=(T=(w=oe.getGradeColumns(s==null?void 0:s.contents))==null?void 0:w[0])==null?void 0:T.filter(D=>!Array.isArray(D)):(Ve.value.split("-"),y=($=oe.getGradeColumns(s==null?void 0:s.contents))==null?void 0:$[0]);else{let D=s!=null&&s.contents.some(f=>Array.isArray(f))?(A=s==null?void 0:s.contents)==null?void 0:A[0]:s==null?void 0:s.contents;D==null||D.forEach((f,Y)=>{var le,Ne,rl,He;let U="";(Ne=(le=be.value)==null?void 0:le.split("/"))==null||Ne.forEach(_e=>{var Qe,Xe,ze;if(_e!==""){let il=(ze=(Xe=(Qe=_e==null?void 0:_e.split(J+"updateLoading"))==null?void 0:Qe[0])==null?void 0:Xe.split(J+"loading"))==null?void 0:ze[0];U=U===""?U+il:U+"/"+il}}),U=U+J+(f==null?void 0:f.directiveLabel);const z=(rl=Oe.value)==null?void 0:rl.find(_e=>(_e==null?void 0:_e.prop)===(f==null?void 0:f.prop));y.push({label:(f==null?void 0:f.label)??"",prop:(f==null?void 0:f.label)==="操作"?"operate":(f==null?void 0:f.prop)??"a"+Y,width:f!=null&&f.width?parseInt(f.width):"",fixed:(f==null?void 0:f.fixed)??void 0,sortable:(f==null?void 0:f.sortable)??!1,filterable:(f==null?void 0:f.filterable)??!1,operable:(f==null?void 0:f.operable)??!1,showSummary:(f==null?void 0:f.showSummary)??!1,align:(f==null?void 0:f.align)??"left",showOverflowTooltip:(f==null?void 0:f.showOverflowTooltip)??!0,isNotDrag:(f==null?void 0:f.isNotDrag)??!1,isEditCol:(f==null?void 0:f.isEditCol)??!1,isOperate:(f==null?void 0:f.isOperate)??!1,id:(f==null?void 0:f.id)??Y,type:(f==null?void 0:f.label)==="操作"?"operate":void 0,formType:(f==null?void 0:f.formType)??(f!=null&&f.groupSelect?"Select":""),isTableColHidden:f==null?void 0:f.isTableColHidden,isFormColHidden:f==null?void 0:f.isFormColHidden,disabled:f==null?void 0:f.disabled,options:(f==null?void 0:f.options)??[],value:(f==null?void 0:f.value)??"",formMenuSelect:(f==null?void 0:f.formMenuSelect)??[],isRoute:(f==null?void 0:f.isRoute)??!1,groupSelect:f!=null&&f.groupSelect?(He=f==null?void 0:f.groupSelect)==null?void 0:He.replaceAll('"',"").split(":"):[],isMainKey:(f==null?void 0:f.isMainKey)||(f==null?void 0:f.directiveLabel)&&!n[U],columnType:(z==null?void 0:z.type)||(f==null?void 0:f.columnType)||"TEXTAREA",directiveLabel:f==null?void 0:f.directiveLabel,isExistChild:!!(f!=null&&f.directiveLabel&&n[U]),childPath:U})})}L.value=oe.getNewColumnChild(y),de.value=oe.getNewColumnChild(y),H.value=(_=L.value)==null?void 0:_.map(D=>D==null?void 0:D.label),qe.value=(g=L.value)==null?void 0:g.every(D=>D==null?void 0:D.filterable),me.value=(h=L.value)==null?void 0:h.every(D=>D==null?void 0:D.operable),Ue.value=(i=L.value)==null?void 0:i.every(D=>D==null?void 0:D.sortable);let G=(u=(m=oe.getAllLeafNodes(L.value))==null?void 0:m.filter(D=>(D==null?void 0:D.type)!=="operate"))==null?void 0:u.map((D,f)=>({prop:(D==null?void 0:D.prop)??"a"+f,column:D.label}));Le.value=G;let E=[];el.value===""?E=d==null?void 0:d[0]:E=(d==null?void 0:d.find(D=>(D==null?void 0:D.selectLabel)==="("+el.value+")"))??(d==null?void 0:d.find(D=>!(D!=null&&D.selectLabel)));let V=Array.isArray((K=E==null?void 0:E.contents)==null?void 0:K[0])&&((F=E==null?void 0:E.contents)!=null&&F[0].every(D=>Array.isArray(D)))?(Q=E==null?void 0:E.contents)==null?void 0:Q[0]:E==null?void 0:E.contents;x!=null&&x.contents&&((I=x==null?void 0:x.contents)==null?void 0:I.length)!==0&&(V=(R=S.cloneDeep(V))==null?void 0:R.map((D,f)=>{if(!Array.isArray(D)){let Y={};for(let U in D)U!=="id"&&U!=="index"&&(Y[U]=D[U]);D=Object.values(Y)}return D}));const ce=!!((re=L.value)!=null&&re.find(D=>D.prop==="index"));V=ua(V,x==null?void 0:x.contents,ce);const q=[];V==null||V.forEach((D,f)=>{var U;let Y={};if(Array.isArray(D)){let z=[];D==null||D.filter(le=>!(le!=null&&le.id)).forEach((le,Ne)=>{var rl,He,_e,Qe,Xe,ze;if((rl=G==null?void 0:G[Ne])!=null&&rl.prop&&!Array.isArray(le)){let il={};il[G[Ne].column]=le,pe!=null&&pe.value&&((He=pe==null?void 0:pe.value)==null?void 0:He.length)>0&&((_e=pe==null?void 0:pe.value)!=null&&_e.find(je=>JSON.stringify(je==null?void 0:je[0])===JSON.stringify(il)))&&(z=(Qe=pe==null?void 0:pe.value)==null?void 0:Qe.find(je=>JSON.stringify(je==null?void 0:je[0])===JSON.stringify(il))),z&&z.length>0?Y[G[Ne].prop]=z!=null&&z.find(je=>{var yl;return((yl=Object.keys(je))==null?void 0:yl[0])===G[Ne].column})?(Xe=z==null?void 0:z.find(je=>{var yl;return((yl=Object.keys(je))==null?void 0:yl[0])===G[Ne].column}))==null?void 0:Xe[G[Ne].column]:le:Y[G[Ne].prop]=le}else Array.isArray(le)&&((ze=G[Ne])!=null&&ze.prop?Y[G[Ne].prop]=le:Y.children=ql(le,G))})}else Y=D;Array.isArray(D)&&D.some(z=>z==null?void 0:z.id)?q.push(Object.assign(Y,{id:(U=D==null?void 0:D.find(z=>z.id))==null?void 0:U.id})):Y.id?q.push(Y):q.push(Object.assign(Y,{id:f.toString()}))}),or(e,q),X.value=ra(q,r,L.value),bl.value=q,(W=bl.value)==null||W.forEach(D=>{var f;(f=ml.value)==null||f.set(D.id,D)})}else L.value=[],fe.value=[],X.value=[],bl.value=[],ml.value=new Map;((ee=p==null?void 0:p.contents)==null?void 0:ee.length)>0?Ye.value=p==null?void 0:p.contents:Ye.value=[],((te=c==null?void 0:c.contents)==null?void 0:te.length)>0?(sl.value=c==null?void 0:c.contents,Ze.value=c==null?void 0:c.contents):(sl.value=[],Ze.value=[]),ol.value=((ne=X==null?void 0:X.value)==null?void 0:ne.length)??0,Dl.value=X.value,ll.value&&(L.value=(Ce=(ie=fe.value)==null?void 0:ie.filter(y=>(y==null?void 0:y.label)!=="操作"))==null?void 0:Ce.map(y=>{var G;return{...y,type:"edit",optionUrl:y!=null&&y.formMenuSelect&&((G=y==null?void 0:y.formMenuSelect)==null?void 0:G.length)>0?{groupSelect:y==null?void 0:y.groupSelect,menuSelect:y==null?void 0:y.formMenuSelect,selectRelateType:"",type:y==null?void 0:y.formType}:null}}),Pl())};a.watch(()=>[v.itemData,el.value,ya.value,Ve.value,pe==null?void 0:pe.value],async()=>{var e,l,o,r,n,t;if((e=v==null?void 0:v.itemData)!=null&&e.find(p=>(p==null?void 0:p.key)==="columnPath")&&!((l=cl.value)!=null&&l.find(p=>{var c,d;return(p==null?void 0:p.key)===((d=(c=v==null?void 0:v.itemData)==null?void 0:c.find(b=>(b==null?void 0:b.key)==="columnPath"))==null?void 0:d.contents)}))){let p=cl.value,c={key:(r=(o=v==null?void 0:v.itemData)==null?void 0:o.find(d=>(d==null?void 0:d.key)==="columnPath"))==null?void 0:r.contents,value:(t=(n=v==null?void 0:v.itemData)==null?void 0:n.find(d=>(d==null?void 0:d.key)==="columnUsingPath"))==null?void 0:t.contents};p!=null&&p.find(d=>(d==null?void 0:d.key)===(c==null?void 0:c.key))?p=p==null?void 0:p.map(d=>((d==null?void 0:d.key)===(c==null?void 0:c.key)&&(d.value=c.value),d)):p.push(c),De.setTableViewContents(p)}na(v.itemData,v.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>v==null?void 0:v.operatingForm,e=>{e!=null&&e.form&&(gl(e==null?void 0:e.form),we.value=e==null?void 0:e.dialogTitle,Sl.value=!0,Pe.value=!0)},{immediate:!0,deep:!0});const oa=()=>{ll.value=!ll.value},sr=()=>{Cl.value=!Cl.value};a.watch(()=>ll.value,e=>{e?(Pl("viewChange"),De.setCacheUpdatingData(null)):(sl.value=Ze.value,L.value=de.value,ul.value&&(De.setTableLoading(v==null?void 0:v.index),M("change",ul.value)))},{immediate:!0}),a.ref(!1);const ir=(e,l)=>{var o;Pl("createClick"),l===ke.pageSize&&(ke.currentPage=Math.ceil(((o=X.value)==null?void 0:o.length)/ke.pageSize))},tr=(e,l,o)=>{var r;ea(o,e,l),Ae.value=S.cloneDeep(e),Ke.value=e==null?void 0:e.id,ol.value=(r=X.value)==null?void 0:r.length,we.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",hl(!1)},Ee=e=>{var d,b,s,x,k,C,N,w,T,$;const{row:l,column:o,item:r,slotData:n}=e;let t=l!=null&&l[o==null?void 0:o.prop]?((b=(d=l==null?void 0:l[o==null?void 0:o.prop])==null?void 0:d[0])==null?void 0:b.contents)??(l==null?void 0:l[o==null?void 0:o.prop]):((x=(s=l==null?void 0:l[r==null?void 0:r.prop])==null?void 0:s[0])==null?void 0:x.contents)??(l==null?void 0:l[r==null?void 0:r.prop])??((C=(k=n==null?void 0:n[r==null?void 0:r.prop])==null?void 0:k[0])==null?void 0:C.contents)??(n==null?void 0:n[r==null?void 0:r.prop])??((T=(w=l==null?void 0:l[(N=r==null?void 0:r.child)==null?void 0:N.prop])==null?void 0:w[0])==null?void 0:T.contents)??(l==null?void 0:l[($=r==null?void 0:r.child)==null?void 0:$.prop]),c=Array.isArray(t)&&!(t!=null&&t.every(A=>typeof A=="string"||typeof A=="number"))?"查看":t;return c=Array.isArray(c)?c.join(","):c,c},ur=e=>{var b,s,x,k,C,N,w,T,$,A;const{row:l,column:o,item:r,slotData:n}=e;let t=l!=null&&l[o==null?void 0:o.prop]?((s=(b=l==null?void 0:l[o==null?void 0:o.prop])==null?void 0:b[0])==null?void 0:s.contents)??(l==null?void 0:l[o==null?void 0:o.prop]):((k=(x=l==null?void 0:l[r==null?void 0:r.prop])==null?void 0:x[0])==null?void 0:k.contents)??(l==null?void 0:l[r==null?void 0:r.prop])??((N=(C=n==null?void 0:n[r==null?void 0:r.prop])==null?void 0:C[0])==null?void 0:N.contents)??(n==null?void 0:n[r==null?void 0:r.prop])??(($=(T=l==null?void 0:l[(w=r==null?void 0:r.child)==null?void 0:w.prop])==null?void 0:T[0])==null?void 0:$.contents)??(l==null?void 0:l[(A=r==null?void 0:r.child)==null?void 0:A.prop]);const c=Array.isArray(t)&&!(t!=null&&t.every(_=>typeof _=="string"||typeof _=="number")),d=Array.isArray(t)&&(t==null?void 0:t.find(_=>_==null?void 0:_.url));return c&&d};return(e,l)=>{var b,s,x;const o=a.resolveComponent("svg-icon"),r=a.resolveComponent("el-popover"),n=a.resolveComponent("el-switch"),t=a.resolveComponent("el-checkbox"),p=a.resolveComponent("el-checkbox-group"),c=a.resolveComponent("el-button"),d=a.resolveComponent("LookComponent");return a.openBlock(),a.createElementBlock("div",Ur,[Wl.value?(a.openBlock(),a.createBlock(Ie.ssTable,{id:"excel-table",pageObj:ke,summaryInfo:Je,columns:L.value,isCardViewport:Cl.value,checkedColumns:H.value,key:Ll.value+JSON.stringify(L.value),tableData:Da.value,isEditViewport:ll.value,isShowPagination:Rl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:j.allowSelect,onDbClickRow:Va,extraButton:sl.value,rowButton:Ye.value,cacheExtraButtons:Ze.value,isClearSelection:((b=Me.value)==null?void 0:b.length)===0,onDoCurrentChange:Ta,onDoSizeChange:Ca,onContentClick:za,onRowClick:Ja,onSelectChange:Ua,onCellChange:tr,onChange:ea,onPreview:Gl,onSubmitEditingTable:Ba,onHandleColEditChange:Na,onHandleColTypeChange:_a,onClickButton:Nl},a.createSlots({headerButton:a.withCtx(k=>{var C,N;return[j.showHeader?(a.openBlock(),a.createBlock(mr,{key:0,filterValues:Hl.value,selectNums:(C=Me.value)==null?void 0:C.length,dataNums:(N=X.value)==null?void 0:N.length,compName:j.compName,isDevMode:j.isDevMode,buttons:k.buttons,onButtonClick:l[0]||(l[0]=w=>Nl(w,"",{})),columns:L.value,onFilter:Pa,onGetImportData:Ea,level:j.level},null,8,["filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var k,C;return[((k=X.value)==null?void 0:k.length)>0&&j.allowOperate?(a.openBlock(),a.createElementBlock("div",Lr,[(C=Ye.value)!=null&&C.some(N=>(N==null?void 0:N.label)==="编辑")&&!Cl.value?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:oa},[a.createVNode(o,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0),a.createElementVNode("span",{title:"卡片视图",onClick:sr},[a.createVNode(o,{name:"cardViewport",class:"view-icon"})])])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:k,index:C})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:N=>ir(k,C)},[a.createVNode(o,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,Mr)]),operateCol:a.withCtx(()=>[a.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:er},{reference:a.withCtx(()=>[a.createElementVNode("span",jr,[a.createVNode(o,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",Kr,[l[11]||(l[11]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(n,{"model-value":Ue.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:l[2]||(l[2]=k=>jl(k,"sortable"))},null,8,["model-value"]),a.createVNode(n,{"model-value":qe.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:l[3]||(l[3]=k=>jl(k,"filterable"))},null,8,["model-value"]),a.createVNode(n,{"model-value":me.value,"active-text":"编辑所有表头","inactive-text":"",onChange:l[4]||(l[4]=k=>jl(k,"operable"))},null,8,["model-value"]),l[12]||(l[12]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(p,{modelValue:H.value,"onUpdate:modelValue":l[5]||(l[5]=k=>H.value=k),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:B},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(fl.value,k=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:k.label},[a.createVNode(t,{value:k.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:k.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(k.label),9,$r)]),_:2},1032,["value"]),a.createVNode(r,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(o,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var C;return[a.createElementVNode("div",Fr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((C=Object.keys(k))==null?void 0:C.filter(N=>{var w;return(w=ae.value)==null?void 0:w.find(T=>(T==null?void 0:T.value)===N)}),N=>{var w,T;return a.openBlock(),a.createElementBlock("div",{key:N},[a.createVNode(n,{"model-value":k==null?void 0:k[N],"active-text":(T=(w=ae.value)==null?void 0:w.find($=>($==null?void 0:$.value)===N))==null?void 0:T.label,onChange:$=>wa($,N,k)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",Pr,[a.createVNode(o,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(k=>{var C,N,w,T,$,A,_,g,h,i,m,u,K,F,Q,I,R,re;return[ur(k)?(a.openBlock(),a.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",Vr,a.toDisplayString(Ee(k)),1)]),default:a.withCtx(()=>{var W;return[a.createElementVNode("div",zr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(k==null?void 0:k.row[(W=k==null?void 0:k.column)==null?void 0:W.prop],ee=>(a.openBlock(),a.createElementBlock("div",qr,[a.createElementVNode("div",{class:"prop-url",title:xl(ee),onClick:te=>ja(ee)},a.toDisplayString(xl(ee)),9,Jr),a.createElementVNode("div",{class:"prop-download",onClick:te=>Ka(ee)}," 下载 ",8,Rr)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock("div",{key:1,style:a.normalizeStyle({color:!Array.isArray(Ee(k))&&((N=(C=Ee(k))==null?void 0:C.toString())!=null&&N.includes(".txt")||(T=(w=Ee(k))==null?void 0:w.toString())!=null&&T.includes(".cpt")||(A=($=Ee(k))==null?void 0:$.toString())!=null&&A.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ee(k))&&((g=(_=Ee(k))==null?void 0:_.toString())!=null&&g.includes(".txt")||(i=(h=Ee(k))==null?void 0:h.toString())!=null&&i.includes(".cpt")||(u=(m=Ee(k))==null?void 0:m.toString())!=null&&u.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ee(k))&&((F=(K=Ee(k))==null?void 0:K.toString())!=null&&F.includes(".txt")||(I=(Q=Ee(k))==null?void 0:Q.toString())!=null&&I.includes(".cpt")||(re=(R=Ee(k))==null?void 0:R.toString())!=null&&re.includes(".cyd"))?"pointer":"",marginLeft:(k==null?void 0:k.colIndex)===0?`${((k==null?void 0:k.level)??0)*20}px`:0}),onClick:W=>Sa(Ee(k))},a.toDisplayString(Ee(k)),13,Wr))]}),_:2},[((s=Ye.value)==null?void 0:s.length)>0?{name:"actions",fn:a.withCtx(({item:k})=>[a.createVNode(r,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(o,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:a.withCtx(()=>[a.createElementVNode("div",Or,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList($a(Ye.value,k),(C,N)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:N,onClick:w=>Nl(C==null?void 0:C.label,k,{extra:C})},[a.createElementVNode("div",{style:a.normalizeStyle({color:C==null?void 0:C.textColor}),class:"extra-button-label"},a.toDisplayString(C==null?void 0:C.label),5)],8,wr))),128))])]),_:2},1024)]),key:"0"}:void 0,((x=X.value)==null?void 0:x.length)>0?{name:"batchButton",fn:a.withCtx(k=>[a.createVNode(Sr,{buttons:k.buttons,selectTableItems:Me.value,onButtonClick:l[1]||(l[1]=C=>Nl(C,"",{}))},null,8,["buttons","selectTableItems"])]),key:"1"}:void 0]),1032,["pageObj","summaryInfo","columns","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):a.createCommentVNode("",!0),a.createVNode(_l.ssDialog,{title:we.value,visible:Pe.value,width:ba.value,onBeforeDestroy:La,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",Gr,[a.createVNode(Ie.ssForm,{rowContents:Ge.value,isEnableWrap:!1,showOperator:!1,onChange:lr,onClickTrigger:Ma,isEdit:Ol.value,onBlurChange:Oa},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[Sl.value?(a.openBlock(),a.createElementBlock("div",Hr,[a.createVNode(c,{onClick:l[6]||(l[6]=k=>Pe.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>l[13]||(l[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(c,{class:"ok-button",onClick:l[7]||(l[7]=k=>hl(!0)),id:"themeButton"},{default:a.withCtx(()=>l[14]||(l[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])):a.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),a.createVNode(_l.ssDialog,{title:we.value,visible:kl.value,width:wl.value,onBeforeDestroy:l[9]||(l[9]=k=>kl.value=!1)},{default:a.withCtx(()=>[a.createVNode(Er)]),footer:a.withCtx(()=>[a.createElementVNode("div",Qr,[a.createVNode(c,{onClick:l[8]||(l[8]=k=>kl.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>l[15]||(l[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(c,{class:"ok-button",onClick:Ra,id:"themeButton"},{default:a.withCtx(()=>l[16]||(l[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["title","visible","width"]),he.value?(a.openBlock(),a.createBlock(Ie.ssFilePreview,{key:1,fileDataList:ve.value,onDestroy:qa},null,8,["fileDataList"])):a.createCommentVNode("",!0),Z.value?(a.openBlock(),a.createBlock(_l.ssDialog,{key:2,visible:Z.value,onBeforeDestroy:Ya,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(vl.ThreeViewerHost,{"file-urls":dl.value,isThreeScene:ye.value,isSelfWindow:!0,threeData:$e.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(_l.ssDialog,{visible:e.componentVisible,onBeforeDestroy:l[10]||(l[10]=k=>e.componentVisible=!1),width:wl.value,style:{height:"70vh"}},{default:a.withCtx(()=>[a.createVNode(d,{dialogItem:Al.value},null,8,["dialogItem"])]),_:1},8,["visible","width"])])}}},Ir=Bl._export_sfc(Xr,[["__scopeId","data-v-af1bdba0"]]);exports.formGetOptions=zl;exports.getSelectRow=Jl;exports.ssTable=Ir;exports.useFormComp=pa;exports.useFormToTableComp=ia;exports.useUnit=ta;
|
|
1
|
+
"use strict";const a=require("vue"),S=require("./index-DuQHeRpA.cjs"),Vl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Ct7whq54.cjs"),Ie=require("./index-C8G_IwB1.cjs"),vl=require("./threeViewerHost-C7J24Dzw.cjs"),oe=require("./index.vue_vue_type_style_index_1_lang-CletbRcG.cjs"),nl=require("./URDFLoader-C6HnI6A2.cjs");require("./index.vue_vue_type_style_index_1_lang-BpnUtA8o.cjs");const Bl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");require("./three-viewport-gizmo-BV37JzRa.cjs");const _l=require("./index-CXLYjBEr.cjs");require("./index-BavrW-fo.cjs");const sa=require("./isString-CS7YCv9X.cjs"),zl=j=>j.match(/\((.*)\)/)[1],cr={class:"extra-button-content"},dr={class:"table-operator-wrap"},pr={class:"extra-button-filter"},fr={class:"form-content-value"},gr={key:0,class:"extra-header"},hr={class:"drop-menu",style:{width:"120px"}},yr={key:0},vr={key:1},br={__name:"header",props:{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(j,{emit:ue}){const H=ue,O=j,B=a.ref(""),v=a.ref(!1),ae=a.ref([]),ge=a.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),xe=M=>{const L=M.raw;if(!L)return;const fe=new FileReader;fe.onload=Z=>{try{const ye=new Uint8Array(Z.target.result),$e=nl.readSync(ye,{type:"array"}),Fe=$e.SheetNames[0],Re=$e.Sheets[Fe],We=nl.utils.decode_range(Re["!ref"]).e.c+1,P=new Array(We).fill(""),Te=[];for(const he in Re){if(he[0]==="!")continue;const{r:ve,c:Se}=nl.utils.decode_cell(he);let Be=Re[he].v;if(Re[he].t==="n"&&Be>0&&Be<1e6&&(Be=new Date((Be-25569)*86400*1e3).toISOString().split("T")[0]),(Be==null||Be==="")&&(Be=""),ve===0)P[Se]=Be;else{if(!Te[ve-1]){Te[ve-1]={};for(let be=0;be<We;be++)Te[ve-1][`col_${be}`]=""}Te[ve-1][`col_${Se}`]=Be}}for(let he=0;he<We;he++)P[he]===void 0&&(P[he]="");const de=Te==null?void 0:Te[0];if(!(de!=null&&de.hasOwnProperty("col_0")))return S.ElMessage.error("导入的数据列不匹配,请检查是否错位");H("getImportData",P,Te)}catch(ye){throw S.ElMessage.error(ye.message),new Error(ye.message)}},fe.readAsArrayBuffer(L)},J=M=>{var fe;const L=(fe=ae.value)==null?void 0:fe.reduce((Z,ye,$e)=>($e===0?Z[ye.label]=M:Z[ye.label]=ye==null?void 0:ye.value,Z),{});H("filter",L,M,!0)},Ue=M=>{H("buttonClick",M)},qe=M=>{var L,fe;ae.value=(fe=(L=oe.getColumnChild(S.cloneDeep(M)))==null?void 0:L.filter(Z=>(Z==null?void 0:Z.label)!==""&&(Z==null?void 0:Z.label)!=="操作"))==null?void 0:fe.map(Z=>({label:(Z==null?void 0:Z.label)??"",value:"",name:(Z==null?void 0:Z.label)??"",isFormColHidden:Z==null?void 0:Z.isTableColHidden,width:2}))},me=a.ref(!1),Je=M=>{var L;if((M==null?void 0:M.buttonName)==="确认"&&(H("filter",M==null?void 0:M.content),me.value=(M==null?void 0:M.content)&&Object.values(M==null?void 0:M.content).length>0),(M==null?void 0:M.buttonName)==="清空"){const fe=S.cloneDeep(M==null?void 0:M.content);for(const Z in fe)fe[Z]="";ae.value=(L=ae.value)==null?void 0:L.map(Z=>({...Z,value:""})),H("filter",fe),me.value=!1}v.value=!1},ke=()=>{var L,fe;ae.value=(L=ae.value)==null?void 0:L.map(Z=>({...Z,value:""}));const M=(fe=ae.value)==null?void 0:fe.reduce((Z,ye)=>(Z[ye.label]=ye.value,Z),{});H("filter",M)};return a.onMounted(()=>{qe(O.columns)}),a.watch(()=>O.columns,()=>{qe(O.columns)},{deep:!0,immediate:!0}),(M,L)=>{var tl,We;const fe=a.resolveComponent("el-icon"),Z=a.resolveComponent("svg-icon"),ye=a.resolveComponent("el-input"),$e=a.resolveComponent("ss-popOver"),Fe=a.resolveComponent("el-button"),Re=a.resolveComponent("el-upload");return a.openBlock(),a.createElementBlock("div",cr,[a.createElementVNode("div",{class:a.normalizeClass(j.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(O==null?void 0:O.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:(O==null?void 0:O.level)>1?"0px":"8px",fontWeight:600-((O==null?void 0:O.level)-1)*100>=400?600-((O==null?void 0:O.level)-1)*100:400,fontSize:17-(O==null?void 0:O.level)>=14?17-(O==null?void 0:O.level)+"px":"14px"})},a.toDisplayString(j.compName),7),a.createElementVNode("div",dr,[a.createElementVNode("div",pr,[a.createVNode($e,{title:"",width:800,placement:"bottom-start",isVisible:v.value},{reference:a.withCtx(()=>{var P,Te,de,he;return[a.createVNode(ye,{modelValue:B.value,"onUpdate:modelValue":L[1]||(L[1]=ve=>B.value=ve),style:{"min-width":"80px"},placeholder:me.value?(de=(Te=(P=j.filterValues)==null?void 0:P.filter(ve=>ve))==null?void 0:Te.slice(0,3))==null?void 0:de.join("/"):"搜索","prefix-icon":a.unref(S.search_default),clearable:"",onInput:J,disabled:((he=ae.value)==null?void 0:he.length)===0},{suffix:a.withCtx(()=>{var ve,Se;return[!B.value&&((Se=(ve=j.filterValues)==null?void 0:ve.filter(Be=>Be))!=null&&Se.join("/"))?(a.openBlock(),a.createBlock(fe,{key:0,style:{cursor:"pointer"},onClick:ke},{default:a.withCtx(()=>[a.createVNode(a.unref(S.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:L[0]||(L[0]=ve=>v.value=!v.value)},[a.createVNode(Z,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",fr,[(a.openBlock(),a.createBlock(Ie.ssForm,{rowContents:ae.value,buttonValue:ge.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ge.value,isStartJustify:!1,onOnButtonClick:Je},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),j.buttons&&((tl=j.buttons)==null?void 0:tl.length)>0?(a.openBlock(),a.createElementBlock("div",gr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((We=j.buttons)==null?void 0:We.filter(P=>j.isDevMode||(P==null?void 0:P.label)!=="修改模板"),(P,Te)=>(a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:Te},[(P==null?void 0:P.type)==="upload"?(a.openBlock(),a.createBlock(Re,{key:0,class:"upload-button-wrap","on-change":xe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:a.withCtx(()=>[a.createVNode(Fe,{style:a.normalizeStyle({background:(P==null?void 0:P.background)??"var(--ssbutton-theme-bg)",color:(P==null?void 0:P.color)??"var(--ssbutton-theme-color)"})},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(P==null?void 0:P.label),1)]),_:2},1032,["style"])]),_:2},1024)):a.createCommentVNode("",!0),(P==null?void 0:P.type)==="popover"?(a.openBlock(),a.createBlock(Ie._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(P==null?void 0:P.type)==="popover"?(a.openBlock(),a.createBlock(Fe,{key:0,style:a.normalizeStyle({background:(P==null?void 0:P.background)??"var(--ssbutton-theme-bg)",color:(P==null?void 0:P.color)??"var(--ssbutton-theme-color)"})},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(P==null?void 0:P.label),1)]),_:2},1032,["style"])):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",hr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(P==null?void 0:P.contents,de=>(a.openBlock(),a.createBlock(Fe,{key:de==null?void 0:de.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:he=>Ue(de==null?void 0:de.label)},{default:a.withCtx(()=>{var he,ve;return[a.createTextVNode(a.toDisplayString(de==null?void 0:de.label),1),(he=de==null?void 0:de.label)!=null&&he.includes("选中")?(a.openBlock(),a.createElementBlock("span",yr,"("+a.toDisplayString(j.selectNums)+")",1)):a.createCommentVNode("",!0),(ve=de==null?void 0:de.label)!=null&&ve.includes("全部")?(a.openBlock(),a.createElementBlock("span",vr,"("+a.toDisplayString(j.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),P!=null&&P.type?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(Fe,{key:2,id:"themeButton",style:a.normalizeStyle({background:(P==null?void 0:P.background)??"var(--ssbutton-theme-bg)",color:(P==null?void 0:P.color)??"var(--ssbutton-theme-color)"}),onClick:de=>Ue(P==null?void 0:P.label)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(P==null?void 0:P.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):a.createCommentVNode("",!0)])])}}},mr=Bl._export_sfc(br,[["__scopeId","data-v-a817ffde"]]),kr=a.defineComponent({__name:"batch",props:{buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(j,{emit:ue}){const H=j,O=ue,B=ae=>{O("buttonClick",ae)},v=ae=>{var ge;return ae!=null&&ae.includes("删除")?((ge=H.selectTableItems)==null?void 0:ge.length)>0?"warning-active-type":"warning-type":"default-type"};return(ae,ge)=>{const xe=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(j.buttons,J=>(a.openBlock(),a.createBlock(xe,{key:J==null?void 0:J.label,class:a.normalizeClass(v(J==null?void 0:J.label)),onClick:Ue=>B(J==null?void 0:J.label)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(J==null?void 0:J.label),1)]),_:2},1032,["class","onClick"]))),128))])}}}),Sr=Bl._export_sfc(kr,[["__scopeId","data-v-1d3c11ad"]]),ia=S.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(j){this.selectArray=j},setSelectString(j){this.selectString=j}}}),Dr={class:"calculator-content"},Tr={class:"calculator-child"},Cr={class:"calculator-child"},Ar=a.defineComponent({__name:"calculator",setup(j){const ue=a.ref(),H=a.ref();return a.onMounted(()=>{ue.value=[{type:"Upload",label:"输入",name:"input"}],H.value=[{type:"Upload",label:"输出",name:"output"}]}),(O,B)=>(a.openBlock(),a.createElementBlock("div",Dr,[a.createElementVNode("div",Tr,[a.createVNode(Ie.ssForm,{rowContents:ue.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",Cr,[a.createVNode(Ie.ssForm,{rowContents:H.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Er=Bl._export_sfc(Ar,[["__scopeId","data-v-73db0fe7"]]),ta=S.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(j){this.selectIndex=j},setSelectMenu(j){this.selectMenu=j},setSelectTitle(j){this.selectTitle=j}}}),ql=(j,ue)=>{let H=j,O=ue;return Array.isArray(H)&&(H=H==null?void 0:H.map((B,v)=>{if(Array.isArray(B)){let ae={};return B=B==null?void 0:B.forEach((ge,xe)=>{var J;(J=O==null?void 0:O[xe])!=null&&J.prop?ae[O[xe].prop]=ge:Array.isArray(ge)&&(ae.children=ql(ge,O))}),Object.assign(ae,{id:v})}else return B})),H},ua=(j,ue,H)=>{let O=j,B=ue;return O=O==null?void 0:O.map((v,ae)=>{var ge,xe;return!Array.isArray(v)||!((ge=B==null?void 0:B[ae])!=null&&ge.label)&&!H||(v.unshift(((xe=B==null?void 0:B[ae])==null?void 0:xe.label)??""),v.some(J=>Array.isArray(J))&&(v=v==null?void 0:v.map(J=>{var Ue;return Array.isArray(J)&&(J=ua(J,(Ue=B==null?void 0:B[ae])==null?void 0:Ue.children,H)),J}))),v}),O},xr=(j,ue,H)=>{if(ue==="")return j==null?void 0:j.filter(O=>(O==null?void 0:O.id)!==H);{const O=ue.split("-");return Nr(j,O,H)}},Nr=(j,ue,H)=>{let O=j,B=ue;return(B==null?void 0:B.length)===0?O=O==null?void 0:O.filter(v=>v.id!==H):O=O==null?void 0:O.map(v=>(v.id.toString()===(B==null?void 0:B[0])&&(B==null||B.shift(),v=ca(v,B,H)),v)),O},ca=(j,ue,H)=>{var v,ae;let O=j,B=ue;return(B==null?void 0:B.length)===0?O.children=(v=O.children)==null?void 0:v.filter(ge=>ge.id!==H):O.children=(ae=O.children)==null?void 0:ae.map(ge=>(ge.id.toString()===(B==null?void 0:B[0])&&(B==null||B.shift(),ge=ca(ge,B,H)),ge)),O},_r=(j,ue,H)=>{if(ue==="")return H;{const O=ue.split("-");return Br(j,O,H)}},Br=(j,ue,H)=>{let O=j,B=ue;return(B==null?void 0:B.length)===0?O=H:O=O==null?void 0:O.map(v=>(v.id.toString()===(B==null?void 0:B[0])&&(B==null||B.shift(),v=da(v,B,H)),v)),O},da=(j,ue,H)=>{var v;let O=j,B=ue;return(B==null?void 0:B.length)===0?O.children=H:O.children=(v=O.children)==null?void 0:v.map(ae=>(ae.id.toString()===(B==null?void 0:B[0])&&(B==null||B.shift(),ae=da(ae,B,H)),ae)),O},pa=S.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(j){this.objUrl=j},setBlobUrls(j){this.blobUrls=j}}}),Jl=async j=>{var v,ae,ge,xe,J,Ue,qe;let ue=(ae=(v=S.cloneDeep(j))==null?void 0:v.optionUrl)==null?void 0:ae.menuSelect,H=[];ue==null||ue.forEach(me=>{});let O="";const B=await oe.menuToParent(ue);if(B==null||B.forEach(me=>{var Je,ke,M,L;(me==null?void 0:me.name)===(((L=(M=(ke=(Je=S.cloneDeep(j))==null?void 0:Je.optionUrl)==null?void 0:ke.groupSelect)==null?void 0:M[0])==null?void 0:L.replaceAll("'",""))??"")&&(O=me==null?void 0:me.id)}),O!==""){const me=(ge=B==null?void 0:B.find(M=>{var L,fe,Z,ye;return(M==null?void 0:M.name)===(((fe=(L=j==null?void 0:j.groupSelect)==null?void 0:L.split(":"))==null?void 0:fe[0])||((ye=(Z=j==null?void 0:j.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:ye[0]))}))==null?void 0:ge.compData;let Je=(J=(xe=me==null?void 0:me.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:xe.contents)==null?void 0:J.map(M=>M==null?void 0:M.label),ke=(qe=(Ue=me==null?void 0:me.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:Ue.contents)==null?void 0:qe.map(M=>(M=M==null?void 0:M.filter(L=>!(L!=null&&L.id)),M));ke==null||ke.forEach(M=>{H.push(oe.getValueToObjectValue(M,Je))})}return H},Ur={class:"table-content"},Or={class:"menu-config-wrap"},wr=["onClick"],Lr={key:0,class:"viewport-wrap"},Mr=["onClick"],jr={title:"选择显示列信息"},Kr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},$r=["title"],Fr={class:"col-operate-wrap"},Pr={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Vr={class:"pop-view"},zr={class:"pop-wrapper"},qr={class:"file-list-pop"},Jr=["title","onClick"],Rr=["onClick"],Wr=["onClick"],Gr={class:"form-content"},Hr={key:0,class:"dialog-footer"},Qr={class:"dialog-footer"},Xr={__name:"index",props:{level:{type:Number,default:1},compName:{type:String,default:"",required:!1},operatingForm:{type:Object,default:()=>{}},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:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(j,{emit:ue}){const H=a.ref([]),O=pa(S.pinia),B=a.ref(null),v=j,ae=a.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),ge=oe.useOriginalState(S.pinia),{originalPath:xe}=S.storeToRefs(ge),J=xe.value,Ue=a.ref(!1),qe=a.ref(!1),me=a.ref(!1),Je=a.reactive({column:{},status:!1,text:"合计"}),ke=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),M=ue,L=a.ref([]),fe=a.ref([]),Z=a.ref(!1),ye=a.ref(!1),$e=a.ref(null),{isUseBackdrop:Fe,isThreeSystem:Re,isTrackPathFile:tl,initTrackFileType:We,getFileExtension:P,setData:Te}=vl.useThreeSystem(),de=a.ref([]),he=a.ref(!1),ve=a.ref(),Se=oe.useMenuState(),{importLoading:Be,activeMenuPath:be,contentLoading:Yr}=S.storeToRefs(Se),fa=oe.useTableComp(S.pinia),De=oe.useModelComp(S.pinia),{extraContents:pe,cacheUpdatingData:ul,tableViewContents:cl,tableLoading:Zr,pageMapState:Ul}=S.storeToRefs(De),X=a.ref([]),bl=a.ref([]),ml=a.ref(new Map);a.ref(!1);const Ke=a.ref("");a.ref();const Ol=a.ref(!0),ol=a.ref(0),Rl=a.ref(!0),we=a.ref(""),Pe=a.ref(!1),ga=a.ref({label:"查看三维模型"}),kl=a.ref(!1),wl=a.ref(),Oe=a.ref([]),Ye=a.ref([]),Sl=a.ref(!1),dl=a.ref([]),sl=a.ref([]),Ze=a.ref([]),Ge=a.ref([]),Le=a.ref(),Ae=a.ref(),ha=ia(S.pinia),Dl=a.ref(),Ll=a.ref(0),Tl=ta(S.pinia),{selectIndex:ya,selectMenu:Ve,selectTitle:Ml}=S.storeToRefs(Tl),{selectString:el}=S.storeToRefs(ha),va=S.useLoginState(S.pinia),{loginUserInfo:se}=S.storeToRefs(va),ba=a.ref(720),ll=a.ref(!1),Cl=a.ref(!1),Me=a.ref([]),al=a.ref(),pl=a.ref(!0),Wl=a.ref(!0),Al=a.ref([]),ma=a.inject("contentRef");a.provide("contentRef",ma),a.watch(()=>{var e;return(e=X.value)==null?void 0:e.length},e=>{ke.total=e}),a.watch(()=>cl.value,async()=>{var t,p,c,d,b,s,x,k,C,N,w,T,$,A,_,g,h,i;if(((t=cl.value)==null?void 0:t.length)===0||!((p=v==null?void 0:v.itemData)!=null&&p.find(m=>(m==null?void 0:m.key)==="columnPath"))||!((c=v==null?void 0:v.itemData)!=null&&c.find(m=>(m==null?void 0:m.key)==="pageColumn")))return;let e=(C=(k=(x=(s=(b=(d=v==null?void 0:v.itemData)==null?void 0:d.find(m=>(m==null?void 0:m.key)==="pageColumn"))==null?void 0:b.contents)==null?void 0:s.split("["))==null?void 0:x[1])==null?void 0:k.split("]"))==null?void 0:C[0],l=(($=(T=(w=(N=v==null?void 0:v.itemData)==null?void 0:N.find(m=>(m==null?void 0:m.key)==="pageColumn"))==null?void 0:w.contents)==null?void 0:T.split("["))==null?void 0:$[0])+((_=(A=cl.value)==null?void 0:A.find(m=>(m==null?void 0:m.key)===e))==null?void 0:_.value),o=((h=(g=v==null?void 0:v.itemData)==null?void 0:g.find(m=>(m==null?void 0:m.key)==="pageGroup"))==null?void 0:h.contents)??"",r=await oe.getItemData(l,sessionStorage.getItem("systemKey"),""),n=(i=r==null?void 0:r.find(m=>(m==null?void 0:m.name)===(o===""?v==null?void 0:v.compName:o)))==null?void 0:i.compData;na(n,v.allMapContents)},{deep:!0});const ka=async(e,l)=>{var o;try{const r={type:"data",pageKey:be.value,tableId:v.index,systemKey:sessionStorage.getItem("systemKey")},n=l==null?void 0:l.map(c=>{const d=Object.keys(c),b={};return d.forEach((s,x)=>{b[e[x]]=c[s]}),b}),t=n==null?void 0:n.map(c=>({key:r,value:{tableData:c}})),p=await S.batchAddInsofDataApi({dataList:t});((o=p==null?void 0:p.data)==null?void 0:o.code)===200?(De.setRefreshCurStructure(!0),S.ElMessage.success("导入数据成功")):S.ElMessage.error("导入数据响应失败")}catch(r){throw S.ElMessage.error("导入数据处理失败"),new Error(r)}},Sa=async e=>{var l,o;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await S.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),n=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let t=URL.createObjectURL(n);ve.value=[{name:(o=e==null?void 0:e.split("/"))==null?void 0:o[((l=e==null?void 0:e.split("/"))==null?void 0:l.length)-1],blobUrl:t}],he.value=!0}};a.onBeforeUnmount(()=>{Wl.value=!1;let e=Ll.value;Ll.value=e+1});const Da=a.computed(()=>{var o;const e=(ke.currentPage-1)*ke.pageSize,l=e+ke.pageSize;return(o=X.value)==null?void 0:o.slice(e,l)}),Ta=e=>{ke.currentPage=e},Ca=e=>{var l;ke.pageSize=e,e*ke.currentPage>((l=X.value)==null?void 0:l.length)&&(ke.currentPage=1,S.ElMessage.warning("分页无效,返回第一页"))},Aa=(e,l)=>{var p,c;const o=(c=(p=L.value)==null?void 0:p.map(d=>d==null?void 0:d.prop))==null?void 0:c.filter(d=>d!=="operate");let r;const n=(e==null?void 0:e.length)===(o==null?void 0:o.length);if(e!=null&&e.includes("序号"))return S.ElMessage.error("导入的数据不需要包含序号列");if(r=n?e:e.slice(0,o==null?void 0:o.length),!(r==null?void 0:r.every(d=>o==null?void 0:o.find(b=>d===b))))return S.ElMessage.error("导入的数据表头不匹配");ka(r,l)},Ea=(e,l)=>{var o;De.setRefreshCurStructure(!1),((o=L.value)==null?void 0:o.length)===0||Aa(e,l)},xa=(e,l,o,r)=>{const n=[],t=[],p=b=>Object.keys(b).length;for(const b in e)if(e[b]!==void 0){const s=e[b],x=[];for(const[k,C]of Object.entries(s))x.push(C),t.length<p(s)&&t.push(k);n.push(x)}n.unshift(t);const c=nl.utils.aoa_to_sheet(n),d=nl.utils.book_new();nl.utils.book_append_sheet(d,c,r),nl.writeFileSync(d,`${l}.xlsx`),Me.value=[]},El=async(e,l,o,r=!1,n)=>{var t,p,c,d,b,s,x,k;try{De.setRefreshCurStructure(!1);const C=await S.getInsofDataApi({id:v==null?void 0:v.index});if(((t=C==null?void 0:C.data)==null?void 0:t.code)===200){let N=(b=(d=(c=(p=C==null?void 0:C.data)==null?void 0:p.result)==null?void 0:c[0])==null?void 0:d.value)==null?void 0:b.pageData;r?N={...N,compData:(x=N==null?void 0:N.compData)==null?void 0:x.map(T=>{var $;return(T==null?void 0:T.key)==="header"?{...T,contents:($=T==null?void 0:T.contents)==null?void 0:$.map(A=>({...A,[e]:o}))}:T})}:N={...N,compData:(s=N==null?void 0:N.compData)==null?void 0:s.map(T=>{var $,A;return(T==null?void 0:T.key)==="header"?{...T,contents:($=T==null?void 0:T.contents)==null?void 0:$.map(_=>(_==null?void 0:_.prop)===(l==null?void 0:l.prop)?{..._,[e]:o}:_)}:(T==null?void 0:T.key)==="tableToForm"&&n?{...T,contents:(A=T==null?void 0:T.contents)==null?void 0:A.map(_=>(_==null?void 0:_.prop)===(l==null?void 0:l.prop)?{..._,[n]:o}:_)}:T})};const w=await S.updateInsofDataApi({id:v==null?void 0:v.index,value:{pageData:N}});((k=w==null?void 0:w.data)==null?void 0:k.code)===200?(S.ElMessage.success("编辑成功"),De.setRefreshCurStructure(!0)):S.ElMessage.error("编辑响应失败")}}catch(C){S.ElMessage.error(C)}},Na=async(e,l)=>{await El("label",l,e)},_a=async(e,l)=>{await El("columnType",l,e,!1,"type")},Ba=()=>{ul.value?ll.value=!1:oa()},Ua=e=>{Me.value=e},Oa=(e,l)=>{al.value===l?pl.value=!1:pl.value=!0,al.value=l==null?void 0:l.changeProp},fl=a.computed(()=>{var o,r,n;const e=(o=L.value)==null?void 0:o.some(t=>t==null?void 0:t.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(n=(r=L.value)==null?void 0:r.filter(t=>(t==null?void 0:t.label)!=="操作"))==null?void 0:n.map(t=>({...t,filterable:!!(t!=null&&t.filterable),showSummary:!!(t!=null&&t.showSummary),operable:!!(t!=null&&t.operable)}))}),wa=async(e,l,o)=>{const r=S.cloneDeep(L.value);await a.nextTick(),L.value=r==null?void 0:r.map(n=>(o==null?void 0:o.label)===(n==null?void 0:n.label)?{...n,[l]:e}:n),await El(l,o,e)},jl=async(e,l)=>{await El(l,null,e,!0)},La=()=>{Pe.value=!1},Ma=e=>{M("clickTrigger",e)},Gl=async e=>{var t,p,c,d,b,s,x,k,C,N,w,T,$,A,_,g;const l=e==null?void 0:e.row,o=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix;if((t=l==null?void 0:l.toString())!=null&&t.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(l.includes(",")){S.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(Fe(l)){Te({url:[l]});return}dl.value=[l],ye.value=!0,$e.value={data:S.cloneDeep(o)},Z.value=!0;return}let n=[];if((p=l==null?void 0:l.toString())!=null&&p.includes(".stl")||(c=l==null?void 0:l.toString())!=null&&c.includes(".STL")||(d=l==null?void 0:l.toString())!=null&&d.includes(".obj")||(b=l==null?void 0:l.toString())!=null&&b.includes(".mtl")){if(Re()){const h=(s=l==null?void 0:l.toString())==null?void 0:s.split(",");Te({url:h,isThreeScene:!1});return}dl.value=(x=l==null?void 0:l.toString())==null?void 0:x.split(","),ye.value=!1,Z.value=!0;return}if((k=l==null?void 0:l.toString())!=null&&k.includes(".stl")||(C=l==null?void 0:l.toString())!=null&&C.includes(".STL")||(N=l==null?void 0:l.toString())!=null&&N.includes(".obj")||(w=l==null?void 0:l.toString())!=null&&w.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let h,i=[],m={};if(Array.isArray(l)?h=l:h=l==null?void 0:l.split(","),h==null||h.forEach(u=>{u.includes(".mtl")?i.push(u):m.blob=m.blob?m.blob+","+u:u}),(i==null?void 0:i.length)>0&&(m.mtlBlobs=i),r&&(m.suffix=r),($=(T=Object.values(m))==null?void 0:T[0])!=null&&$.includes("http:"))n.push(m);else{const u=new Blob([m.blob],{type:"application/octet-stream;charset=UTF-8"});let K=URL.createObjectURL(u),F="";(A=l==null?void 0:l.split("/"))==null||A.forEach((Q,I)=>{var R;I===((R=l==null?void 0:l.split("/"))==null?void 0:R.length)-1&&(F=Q)}),(_=m.blob)!=null&&_.includes(".stl")&&(F=(F==null?void 0:F.replaceAll(">",""))+".urdf"),ve.value=[{name:F,blobUrl:K}],he.value=!0}}else{const h=await S.axios.get(l,{responseType:"blob",headers:{"Content-Type":"application/json"}}),i=new Blob([h.data],{type:"application/octet-stream;charset=UTF-8"});let m=URL.createObjectURL(i),u="";if((g=l==null?void 0:l.split("/"))==null||g.forEach((K,F)=>{var Q;F===((Q=l==null?void 0:l.split("/"))==null?void 0:Q.length)-1&&(u=K)}),Fe(u)&&tl(u)){const K=We(u),F=P(u);Te({extension:F,url:[m],data:{trackFileType:K}});return}ve.value=[{name:u,blobUrl:m}],he.value=!0}(n==null?void 0:n.length)>0&&O.setBlobUrls(n)},xl=e=>{var r,n,t,p;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const l=(p=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:p[((t=(n=e==null?void 0:e.url)==null?void 0:n.split("."))==null?void 0:t.length)-1];return(e==null?void 0:e.name)+"."+l},ja=async e=>{let l=null,o=null,r=null;if(e!=null&&e.downloadUrl){const t=await Kl(),p=Ie.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),c=await S.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:t,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{p.close()}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});l=URL.createObjectURL(d),o=e==null?void 0:e.name;const b=o==null?void 0:o.lastIndexOf(".");r=o==null?void 0:o.slice(b)}else{const t=await vl.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")?(l=URL.createObjectURL(t.data),o=xl(e)):l=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 t={row:`${l}`,suffix:r};Gl(t);return}const n={name:o,blobUrl:l};ve.value=[n],he.value=!0},Ka=async e=>{let l=null,o=null;if(e!=null&&e.downloadUrl){const t=await Kl(),p=await S.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:t,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),c=new Blob([p.data],{type:"application/octet-stream;charset=UTF-8"});l=URL.createObjectURL(c),o=e==null?void 0:e.name}else{const t=await vl.downloadAvatarApi({url:e==null?void 0:e.url});l=URL.createObjectURL(t.data),o=xl(e)}const r={name:o,blobUrl:l},n=document.createElement("a");n.href=r.blobUrl,n.download=r.name,n.style.display="none",document.body.appendChild(n),n.click(),setTimeout(()=>{document.body.removeChild(n)},100)},$a=(e,l)=>{if(Object.values(l).length!==0)return Object.values(l).find(o=>{var r,n,t;return((r=o==null?void 0:o.toString())==null?void 0:r.includes(".txt"))||((n=o==null?void 0:o.toString())==null?void 0:n.includes(".cpt"))||((t=o==null?void 0:o.toString())==null?void 0:t.includes(".obj"))})?[...e,ga.value]:e},Fa=(e,l={})=>[...e==null?void 0:e.values()].filter(o=>Object.keys(l).every(r=>{var p;const n=o[r],t=(p=l[r])==null?void 0:p.toLowerCase();return t&&n&&typeof n=="string"?n.toLowerCase().includes(t):!0})),Hl=a.ref([]),Pa=async(e,l,o=!1)=>{var r;if(e){if(De.setTableLoading(!0),Hl.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(n=>!n)))return X.value=bl.value;if(o){X.value=[...ml.value.values()].filter(n=>Object.values(n).some(t=>typeof t=="string"?t==null?void 0:t.toLowerCase().includes(l==null?void 0:l.toLowerCase()):!1));return}X.value=Fa(ml.value,e),De.setTableLoading(!1)}},Va=async e=>{var p,c,d,b,s,x,k,C,N,w,T,$,A,_,g;const l=await S.getInsofDataApi({keyLikes:{pageKey:`loading${((p=se.value)==null?void 0:p.account)||((c=se.value)==null?void 0:c.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),o=await S.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((d=se.value)==null?void 0:d.account)||((b=se.value)==null?void 0:b.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(x=(s=l==null?void 0:l.data)==null?void 0:s.result)==null?void 0:x.map(h=>h==null?void 0:h.id);const n=(C=(k=o==null?void 0:o.data)==null?void 0:k.result)==null?void 0:C.map(h=>h==null?void 0:h.id);r=[...S.cloneDeep(r),...n],(r==null?void 0:r.length)>0&&(r!=null&&r.every(h=>h!==null&&h))&&await S.batchDeleteInsofDataApi({ids:r});let t=await oe.getItemData(be.value,sessionStorage.getItem("systemKey"),e.id);if(t=t==null?void 0:t.filter(h=>h.comp!=="methodButton"),t&&t.length>0){const h=!Array.isArray(Ml.value)&&((N=Ml.value)==null?void 0:N.key)!=="main"?[]:Ml.value;h.push({key:Ve.value===""?(w=e==null?void 0:e.id)==null?void 0:w.toString():Ve.value+"-"+((T=e==null?void 0:e.id)==null?void 0:T.toString()),value:e[($=Object.keys(e))==null?void 0:$.filter(i=>i!=="index"&&i!=="id")[0]]}),Tl.setSelectMenu(Ve.value===""?(A=e==null?void 0:e.id)==null?void 0:A.toString():Ve.value+"-"+((_=e==null?void 0:e.id)==null?void 0:_.toString())),Tl.setSelectTitle(h),Tl.setSelectIndex((g=e==null?void 0:e.id)==null?void 0:g.toString()),M("pageChange",t)}},za=async(e,l,o,r)=>{var b,s,x,k,C,N,w,T,$,A,_,g,h,i,m,u,K,F,Q,I,R,re,W,ee,te,ne,ie,Ce,y,G,E;const n=await S.getInsofDataApi({keyLikes:{pageKey:`loading${((b=se.value)==null?void 0:b.account)||((s=se.value)==null?void 0:s.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),t=await S.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((x=se.value)==null?void 0:x.account)||((k=se.value)==null?void 0:k.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});if((r==null?void 0:r.isExistChild)===!0){let V=(N=(C=L.value)==null?void 0:C.find(U=>(U==null?void 0:U.isMainKey)===!0))==null?void 0:N.prop,ce=(w=r==null?void 0:r.rowContent)==null?void 0:w[V],q=($=(T=r==null?void 0:r.columnType)==null?void 0:T.childPath)==null?void 0:$.split(J),D=[];q==null||q.forEach((U,z)=>{(q==null?void 0:q.length)-1===z&&D.push(ce),D.push(U)}),D=D.join(J);let f=await oe.getItemData(D,sessionStorage.getItem("systemKey"),""),Y=await oe.getItemData((A=r==null?void 0:r.columnType)==null?void 0:A.childPath,sessionStorage.getItem("systemKey"),"");if(!f||(f==null?void 0:f.length)===0){let U=[];Y==null||Y.forEach(le=>{var He,_e,Qe,Xe;let Ne={type:"structure",pageKey:D,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(He=se.value)==null?void 0:He.id,parentPageKey:"",createUserLayer:((_e=se.value)==null?void 0:_e.dept)||((Qe=se.value)==null?void 0:Qe.部门名称)},rl={pageData:{comp:le==null?void 0:le.comp,compData:(Xe=le==null?void 0:le.compData)==null?void 0:Xe.filter(ze=>(ze==null?void 0:ze.key)!=="tableContents"),name:le==null?void 0:le.name,isShow:le==null?void 0:le.isShow}};U.push({key:Ne,value:rl})}),(U==null?void 0:U.length)>0&&await S.batchAddInsofDataApi({dataList:U});let z=await oe.getItemData(D,sessionStorage.getItem("systemKey"),"");Al.value=z}else Al.value=f;M("routeUrl",Al.value,{isEdit:!0,routerUrl:D});return}let p=(g=(_=n==null?void 0:n.data)==null?void 0:_.result)==null?void 0:g.map(V=>V==null?void 0:V.id);const c=(i=(h=t==null?void 0:t.data)==null?void 0:h.result)==null?void 0:i.map(V=>V==null?void 0:V.id);if(p=[...S.cloneDeep(p),...c],(p==null?void 0:p.length)>0&&(p!=null&&p.every(V=>V!==null&&V))&&(r==null?void 0:r.data)!=="查看"&&await S.batchDeleteInsofDataApi({ids:p}),(r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(V=>(V==null?void 0:V.url)&&(V==null?void 0:V.name)))){let V=S.cloneDeep(e);V=await((m=S.cloneDeep(V))==null?void 0:m.map(async q=>{var Y,U,z,le;const D=await vl.downloadAvatarApi({url:q==null?void 0:q.url});let f=URL.createObjectURL(D.data);return{name:(q==null?void 0:q.name)+"."+((le=(Y=q==null?void 0:q.url)==null?void 0:Y.split("."))==null?void 0:le[((z=(U=q==null?void 0:q.url)==null?void 0:U.split("."))==null?void 0:z.length)-1]),blobUrl:f}}));let ce=await Promise.all(V);ve.value=ce,he.value=!0}const d=S.cloneDeep(L.value);if((r==null?void 0:r.isMainKey)===!0&&(d==null?void 0:d.length)>0){(u=d==null?void 0:d[0])==null||u.prop;let V=S.cloneDeep(be).value+J+(r==null?void 0:r.data),ce=S.cloneDeep(be).value,q=(F=(K=Ul.value[V])==null?void 0:K.filter(U=>{var z,le;return((z=U==null?void 0:U.key)==null?void 0:z.type)==="structure"&&((le=U==null?void 0:U.key)==null?void 0:le.parentTable)===""}))==null?void 0:F.map(U=>{var z;return(z=U==null?void 0:U.value)==null?void 0:z.pageData}),D={};(Q=L.value)==null||Q.forEach(U=>{(U==null?void 0:U.label)!=="操作"&&(D[U.label]=o[U.prop]??o[U.label])});let f=(R=(I=v==null?void 0:v.itemData)==null?void 0:I.find(U=>(U==null?void 0:U.key)==="mainRouters"))==null?void 0:R.contents,Y;if((f==null?void 0:f.length)>0){let U=V==null?void 0:V.split(J)[((re=V==null?void 0:V.split(J))==null?void 0:re.length)-1],z=f==null?void 0:f.find(le=>(le==null?void 0:le.key)===U);Y=(z==null?void 0:z.routerContent)+J+(z==null?void 0:z.key)}if((q==null?void 0:q.length)>0)await oe.loadingConstruct(V,V+J+`updateLoading${((W=se.value)==null?void 0:W.account)||((ee=se.value)==null?void 0:ee.账号)}`,D,Y),De.setRouteToChildPath(ce),Se.setActiveMenuPath(V+J+`updateLoading${((te=se.value)==null?void 0:te.account)||((ne=se.value)==null?void 0:ne.账号)}`);else{(ie=d==null?void 0:d[0])==null||ie.prop;let U=S.cloneDeep(be).value+J+(r==null?void 0:r.data),z=S.cloneDeep(be).value;await oe.getItemData(z+J,sessionStorage.getItem("systemKey"),""),await oe.loadingConstruct(z+J,U,D),await oe.loadingConstruct(U,U+J+`updateLoading${((Ce=se.value)==null?void 0:Ce.account)||((y=se.value)==null?void 0:y.账号)}`,D,Y),De.setRouteToChildPath(z),Se.setActiveMenuPath(U+J+`updateLoading${((G=se.value)==null?void 0:G.account)||((E=se.value)==null?void 0:E.账号)}`)}}},qa=()=>{he.value=!1},Ja=e=>{M("rowClick",e)};a.watch(()=>v.changedContent,()=>{var o,r;if(!v.changedContent)return;let e=(o=X.value)==null?void 0:o.map(n=>{var t;return n.id===((t=v.changedContent)==null?void 0:t.id)&&(n={...v.changedContent,id:v.changedContent.newId?v.changedContent.newId:v.changedContent.id},delete n.newId),n});const l=(r=v.itemData)==null?void 0:r.map(n=>((n==null?void 0:n.key)==="tableContents"&&(n.contents=e),n));X.value=e,M("contentChange",{contents:l,index:v.index}),M("change",{content:e,index:v==null?void 0:v.index,buttonName:"",id:v==null?void 0:v.index})},{deep:!0,immediate:!0});const Ra=()=>{},Wa=async()=>{const e=be.value,l=sessionStorage.getItem("systemKey"),o=await oe.getItemData(e,l,""),r=o==null?void 0:o.find(c=>(c==null?void 0:c.name)==="方法明细"),n=(r==null?void 0:r.compData)||[],t=n==null?void 0:n.find(c=>(c==null?void 0:c.key)==="formContent");return t==null?void 0:t.contents},Kl=async()=>`Bearer ${S.Local.get("access-token")}`,Ga=async(e,{token:l,inputData:o}={})=>await S.axios.post(e,o,{headers:{Authorization:l}}).catch(n=>(Se.setImportLoading(!1),Promise.reject(n))),Ha=e=>{var r;let l={};const o=[];return l.form={},(r=S.cloneDeep(e))==null||r.forEach((n,t)=>{var p,c,d,b,s,x,k,C,N,w,T,$,A,_;if((n==null?void 0:n.comp)==="Table"){(c=(p=n==null?void 0:n.compData)==null?void 0:p.find(m=>(m==null?void 0:m.key)==="header"))==null||c.contents;let g=(s=(b=(d=n==null?void 0:n.compData)==null?void 0:d.find(m=>(m==null?void 0:m.key)==="tableContents"))==null?void 0:b.contents)==null?void 0:s.map(m=>m.slice(1));(w=(N=(C=(k=(x=n==null?void 0:n.compData)==null?void 0:x.find(m=>(m==null?void 0:m.key)==="header"))==null?void 0:k.contents)==null?void 0:C[0])==null?void 0:N[0])==null||w.label;let h=($=(T=n==null?void 0:n.compData)==null?void 0:T.find(m=>(m==null?void 0:m.key)==="header"))==null?void 0:$.contents,i=[];g==null||g.forEach(m=>{let u=[];m==null||m.forEach((K,F)=>{var I;let Q={};((I=h[F])==null?void 0:I.label)!=="操作"&&(Q[h[F].label]=K,u.push(Q))}),i.push(u)}),l[n.name]=i}else{const g=(_=(A=n.compData)==null?void 0:A.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:_.contents;g==null||g.forEach(h=>{var i,m;if(h.prop!==""){let u=h==null?void 0:h.value;Array.isArray(u)?u=((i=u==null?void 0:u[0])==null?void 0:i.oldUrl)||"http://222.92.178.198:62009/"+((m=u==null?void 0:u[0])==null?void 0:m.url):u=u.toString(),h={key:(h==null?void 0:h.prop)??(h==null?void 0:h.label),value:u},o.push(h)}})}}),l.form=oe.getFormContents(o),l},Qa=async(e,l,o)=>{var K,F,Q,I,R,re,W,ee,te,ne,ie,Ce;Se.setImportLoading(!0);const r=await Wa().catch(y=>(Se.setImportLoading(!1),Promise.reject(y))),n=r==null?void 0:r.find(y=>(y==null?void 0:y.key)==="算法体"),t=n==null?void 0:n.value;if(!t){console.log("未搜索到isMain, 缺少算法执行接口"),Se.setImportLoading(!1);return}const p=L.value||[],c=p.find(y=>(y==null?void 0:y.prop)==="输入"),d=c==null?void 0:c.prop;let b=l==null?void 0:l[d];const s=await Kl().catch(y=>(Se.setImportLoading(!1),Promise.reject(y)));let x=!1,k="";(K=L.value)==null||K.forEach(y=>{(y==null?void 0:y.prop)===d&&(x=!!(y!=null&&y.childPath),k=y==null?void 0:y.childPath)});let C="",N="";if(x){let y=(Q=(F=L.value)==null?void 0:F.find(ce=>(ce==null?void 0:ce.isMainKey)===!0))==null?void 0:Q.prop;N=l==null?void 0:l[y];let G=k==null?void 0:k.split(J),E=[];G==null||G.forEach((ce,q)=>{(G==null?void 0:G.length)-1===q&&E.push(N),E.push(ce)}),E=E.join(J),C=E;let V=await oe.getItemData(E,sessionStorage.getItem("systemKey"),"");b=Ha(V)}const w=await Ga(t,{token:s,inputData:b}).catch(y=>(Se.setImportLoading(!1),Promise.reject(y))),T=(I=w==null?void 0:w.data)==null?void 0:I.data,$=r==null?void 0:r.find(y=>(y==null?void 0:y.prop)==="算法名称");$==null||$.value;const A=p.find(y=>(y==null?void 0:y.prop)==="输出"),_=A==null?void 0:A.directiveLabel;C=C==null?void 0:C.replaceAll(c==null?void 0:c.directiveLabel,_);const g=(R=S.cloneDeep(C))==null?void 0:R.replaceAll(J+N,"");let h=await oe.getItemData(C,sessionStorage.getItem("systemKey"),""),i=await oe.getItemData(g,sessionStorage.getItem("systemKey"),"");if(h){let y=[],G=[];h==null||h.forEach(E=>{var V,ce;if((E==null?void 0:E.comp)==="Table")(V=E==null?void 0:E.compData)==null||V.forEach(q=>{var D;(q==null?void 0:q.key)==="tableContents"&&((D=q==null?void 0:q.contents)==null||D.forEach(f=>{var Y,U;(Y=f==null?void 0:f[0])!=null&&Y.id&&y.push((U=f==null?void 0:f[0])==null?void 0:U.id)}))});else if((E==null?void 0:E.comp)==="Form"){E.compData=(ce=E==null?void 0:E.compData)==null?void 0:ce.map(D=>{var f;return(D==null?void 0:D.key)==="formContent"&&(D.contents=(f=D==null?void 0:D.contents)==null?void 0:f.map(Y=>{var U,z;return(U=T==null?void 0:T.form)!=null&&U[Y.prop]&&(Y.value=(z=T==null?void 0:T.form)==null?void 0:z[Y.prop]),Y})),D});let q={pageData:{comp:E==null?void 0:E.comp,name:E==null?void 0:E.name,isShow:E==null?void 0:E.isShow,compData:E==null?void 0:E.compData}};G.push({id:E==null?void 0:E.id,value:q})}}),(G==null?void 0:G.length)>0&&await S.batchUpdateInsofDataApi({dataList:G}),y=[...new Set(y)],(y==null?void 0:y.length)>0&&await S.batchDeleteInsofDataApi({ids:y})}else{let y=[];if(T!=null&&T.table){let G={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:C,parentTable:"",createUserId:(re=se.value)==null?void 0:re.id,createUserOrg:((W=se.value)==null?void 0:W.dept)||((ee=se.value)==null?void 0:ee.部门名称)};i==null||i.forEach(E=>{let ce={pageData:{comp:E==null?void 0:E.comp,name:E==null?void 0:E.name,isShow:E==null?void 0:E.isShow,compData:E==null?void 0:E.compData}};y.push({key:G,value:ce})})}if(T!=null&&T.form){let G={type:"structure",pageKey:C,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(te=se.value)==null?void 0:te.id,parentPageKey:"",createUserLayer:((ne=se.value)==null?void 0:ne.dept)||((ie=se.value)==null?void 0:ie.部门名称)};i==null||i.forEach(E=>{var D;let V=(D=E==null?void 0:E.compData)==null?void 0:D.map(f=>{var Y;return(f==null?void 0:f.key)==="formContent"&&(f.contents=(Y=f.contents)==null?void 0:Y.map(U=>{var z,le;return(z=T==null?void 0:T.form)!=null&&z[U.prop]&&(U.value=(le=T==null?void 0:T.form)==null?void 0:le[U.prop]),U})),f}),q={pageData:{comp:E==null?void 0:E.comp,name:E==null?void 0:E.name,isShow:E==null?void 0:E.isShow,compData:V}};y.push({key:G,value:q})})}(y==null?void 0:y.length)>0&&await S.batchAddInsofDataApi({dataList:y})}let m=await oe.getItemData(C,sessionStorage.getItem("systemKey"),""),u=[];T!=null&&T.table&&((Ce=T==null?void 0:T.table)==null||Ce.forEach(y=>{var V,ce,q,D;let G={type:"data",pageKey:C,tableId:(V=m==null?void 0:m[0])==null?void 0:V.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ce=se.value)==null?void 0:ce.id,createUserOrg:((q=se.value)==null?void 0:q.dept)||((D=se.value)==null?void 0:D.部门名称)},E={tableData:y};u.push({key:G,value:E})})),(u==null?void 0:u.length)>0&&await S.batchAddInsofDataApi({dataList:u}),hl(!0),Se.setImportLoading(!1)},Ql=(e,l)=>(e=e==null?void 0:e.map(o=>{var r,n;return o!=null&&o.children&&((r=o.children)!=null&&r.find(t=>t.id===(l==null?void 0:l.id))?o.children=(n=o.children)==null?void 0:n.filter(t=>(t==null?void 0:t.id)!==(l==null?void 0:l.id)):o.children=Ql(o.children,l)),o}),e),Nl=async(e,l,o)=>{var r,n,t,p,c,d,b,s,x,k,C,N,w,T,$;if(Ke.value="",Sl.value=!0,Ol.value=!0,M("onButtonClick",e,l),e==="删除")oe.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,_;(A=X.value)!=null&&A.find(g=>(g==null?void 0:g.id)===(l==null?void 0:l.id))?X.value=(_=S.cloneDeep(X.value))==null?void 0:_.filter(g=>(g==null?void 0:g.id)!==(l==null?void 0:l.id)):X.value=Ql(S.cloneDeep(X.value),l),xr(Dl.value,Ve.value,l==null?void 0:l.id),De.setTableLoading(v==null?void 0:v.index),M("change",{content:X.value,singleContent:l,index:v==null?void 0:v.index,type:"delete",buttonName:e,column:L.value})});else if(e==="批量删除"){if(((r=Me.value)==null?void 0:r.length)===0)return S.ElMessage.warning("请先勾选操作的数据");oe.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,g;const A=(_=Me.value)==null?void 0:_.map(h=>h.id);X.value=(g=S.cloneDeep(X.value))==null?void 0:g.filter(h=>!(A!=null&&A.includes(h.id))),De.setTableLoading(v==null?void 0:v.index),M("change",{content:X.value,singleContent:null,selectItems:Me.value,index:v==null?void 0:v.index,type:"batchDelete",buttonName:e,column:L.value})})}else if(e==="复制新增"){we.value="新增";const A=S.cloneDeep(l),_=(n=L.value)==null?void 0:n.find(i=>i==null?void 0:i.isMainKey),g=_||((t=L.value)==null?void 0:t[0]),h=(p=Ze.value)==null?void 0:p.find(i=>(i==null?void 0:i.label)==="新建");await Il(!0,h,{data:A,firstCol:g})}else if(e==="新增")we.value="新增",gl(""),Pe.value=!0;else if(e==="编辑")we.value="编辑",gl(l),Pe.value=!0;else if(e==="查看")we.value="查看",gl(l),Sl.value=!1,Ol.value=!1,Pe.value=!0;else if(e==="查看三维模型"){const A={};for(let g in l)g!=="id"&&(A[g]=l[g]);let _=(c=Object.values(A))==null?void 0:c[1];fa.setTableShowThree(_)}else if(((d=o==null?void 0:o.extra)==null?void 0:d.type)==="modelExample")we.value=e,kl.value=!0;else if(e==="新建"){let A=Ul.value,_=[];for(let u in A)u!=null&&u.includes(`loading${((b=se.value)==null?void 0:b.account)||((s=se.value)==null?void 0:s.账号)}`)&&(_=[..._,...u]);let g=[];for(let u in A)u!=null&&u.includes(`updateLoading${((x=se.value)==null?void 0:x.account)||((k=se.value)==null?void 0:k.账号)}`)&&(g=[...g,...u]);let h=_==null?void 0:_.map(u=>u==null?void 0:u.id);const i=g==null?void 0:g.map(u=>u==null?void 0:u.id);h=[...S.cloneDeep(h),...i],(h==null?void 0:h.length)>0&&(h!=null&&h.every(u=>u!==null&&u))&&await S.batchDeleteInsofDataApi({ids:h});const m=(C=Ze.value)==null?void 0:C.find(u=>(u==null?void 0:u.label)==="新建");await Il(!1,m)}else if(e==="修改模板"){let A=S.cloneDeep(be).value;De.setRouteToChildPath(A),Se.setActiveMenuPath(A+J)}else if(e==="执行")Qa(e,l);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((N=Me.value)==null?void 0:N.length)===0)return S.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((w=X.value)==null?void 0:w.length)===0)return S.ElMessage.warning("暂无数据导出");const A=($=(T=L.value)==null?void 0:T.map(g=>g==null?void 0:g.label))==null?void 0:$.filter(g=>g!=="操作"),_=e==="导出全部"?S.cloneDeep(X.value):S.cloneDeep(Me.value);_==null||_.forEach(g=>{g==null||delete g.id}),xa(_,v==null?void 0:v.compName,A,v==null?void 0:v.compName)}},Xa=async e=>{var o,r,n,t,p,c;const l=await S.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((o=l==null?void 0:l.data)==null?void 0:o.code)===200)return Array.isArray((r=l==null?void 0:l.data)==null?void 0:r.result)&&((t=(n=l==null?void 0:l.data)==null?void 0:n.result)==null?void 0:t.length)>0?(c=(p=l==null?void 0:l.data)==null?void 0:p.result)==null?void 0:c.map(d=>{var b;return{id:d==null?void 0:d.id,...(b=d==null?void 0:d.value)==null?void 0:b.pageData}}):[]},Xl=(e,l,o,r)=>{var n;M("contentChange",{contents:(n=e==null?void 0:e.compData)==null?void 0:n.map(t=>{var p;return(t==null?void 0:t.key)==="formContent"?{...t,contents:(p=t==null?void 0:t.contents)==null?void 0:p.map(c=>(c==null?void 0:c.key)===l?{...c,value:o}:c)}:t}),index:e==null?void 0:e.id},r)},Ia=(e,l,o)=>{let r=e==null?void 0:e[l==null?void 0:l.prop],n=1;if(X.value.some(t=>(t==null?void 0:t[l==null?void 0:l.prop])===r)){const t=r;for(;X.value.some(p=>(p==null?void 0:p[l==null?void 0:l.prop])===`${t}(${n})`);)n++;r=`${t}(${n})`}return r},Il=async(e,l,o)=>{var p,c,d,b,s,x,k,C;let r,n;const t=Ia(o==null?void 0:o.data,o==null?void 0:o.firstCol);if(e?(r=S.cloneDeep(be).value+J+((b=o==null?void 0:o.data)==null?void 0:b[(d=o==null?void 0:o.firstCol)==null?void 0:d.prop]),n=S.cloneDeep(be).value+J+t):(r=S.cloneDeep(be).value+J,n=S.cloneDeep(r)+`loading${((p=se.value)==null?void 0:p.account)||((c=se.value)==null?void 0:c.账号)}`),l){const N=(x=(s=Ul.value[n])==null?void 0:s.filter(w=>{var T;return((T=w==null?void 0:w.key)==null?void 0:T.parentTable)===""}))==null?void 0:x.map(w=>{var T;return{id:w==null?void 0:w.id,...(T=w==null?void 0:w.value)==null?void 0:T.pageData}});if((N==null?void 0:N.length)>0)if(e){const w=N==null?void 0:N.find(T=>{var $;return(($=T==null?void 0:T.comp)==null?void 0:$.toUpperCase())==="FORM"});w&&Xl(w,(k=o==null?void 0:o.firstCol)==null?void 0:k.label,t,be.value)}else De.setRouteToChildPath(S.cloneDeep(be).value),Se.setActiveMenuPath(n);else if(await oe.loadingConstruct(r,n,null,null),e){const w=await Xa(n);if((w==null?void 0:w.length)>0){const T=w==null?void 0:w.find($=>{var A;return((A=$==null?void 0:$.comp)==null?void 0:A.toUpperCase())==="FORM"});T&&Xl(T,(C=o==null?void 0:o.firstCol)==null?void 0:C.label,t,be.value)}}else De.setRouteToChildPath(S.cloneDeep(be).value),Se.setActiveMenuPath(n)}else e?(Ke.value="",Ae.value=o==null?void 0:o.data,hl(!0,o==null?void 0:o.firstCol,t)):(De.setRouteToChildPath(S.cloneDeep(be).value),Se.setActiveMenuPath(n))},Ya=()=>{Z.value=!1,dl.value=[],ye.value=!1},gl=e=>{var n,t,p,c,d,b;const l=[];let o=[];for(let s in e)Array.isArray(e==null?void 0:e[s])&&o.push(s);fe.value=S.cloneDeep(L.value),(t=oe.getColumnChild((n=S.cloneDeep(L.value))==null?void 0:n.filter(s=>(s==null?void 0:s.label)!=="操作")))==null||t.forEach((s,x)=>{var k;o.find(C=>C===(s==null?void 0:s.prop))||(s!=null&&s.formType&&((k=s==null?void 0:s.formType)==null?void 0:k.toUpperCase())==="SELECT"?l.push({label:(s==null?void 0:s.prop)||(s==null?void 0:s.label)||"",name:(s==null?void 0:s.prop)??"t"+x,prop:s==null?void 0:s.prop,type:!(s!=null&&s.formType)||(s==null?void 0:s.formType)===""?"Input":s==null?void 0:s.formType,value:(e==null?void 0:e[s==null?void 0:s.prop])??(s==null?void 0:s.value)??"",id:(s==null?void 0:s.id)??x,contents:(s==null?void 0:s.options)??[],width:1,isFormColHidden:s==null?void 0:s.isFormColHidden,disabled:s==null?void 0:s.disabled,optionUrl:{groupSelect:s==null?void 0:s.groupSelect,menuSelect:s==null?void 0:s.formMenuSelect,type:"Select",selectRelateType:s==null?void 0:s.selectRelateType}}):l.push({label:(s==null?void 0:s.prop)||(s==null?void 0:s.label)||"",prop:s==null?void 0:s.prop,name:(s==null?void 0:s.prop)??"t"+x,type:!(s!=null&&s.formType)||(s==null?void 0:s.formType)===""?"Input":s==null?void 0:s.formType,value:(e==null?void 0:e[s==null?void 0:s.prop])??(s==null?void 0:s.value)??"",id:(s==null?void 0:s.id)??x,contents:(s==null?void 0:s.options)??[],width:1,isFormColHidden:s==null?void 0:s.isFormColHidden,disabled:s==null?void 0:s.disabled}))}),e===""||!e||(Ke.value=(e==null?void 0:e.id)??"");let r=oe.getColumnChild((p=S.cloneDeep(L.value))==null?void 0:p.filter(s=>(s==null?void 0:s.label)!=="操作"));Oe.value&&((c=Oe.value)==null?void 0:c.length)>0&&(Oe.value=(d=S.cloneDeep(Oe).value)==null?void 0:d.map(s=>{var k;let x=(s==null?void 0:s.prop)||((k=r==null?void 0:r.find(C=>(C==null?void 0:C.label)===(s==null?void 0:s.label)))==null?void 0:k.prop);return x&&(s.value=e[x]),s})),Ge.value=Oe.value&&((b=Oe.value)==null?void 0:b.length)>0?oe.getTableFormToForm(Oe.value):l},Za=()=>{var l;const e=(l=B.value)==null?void 0:l.$el;e&&Vl.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:o=>{var p;const{oldIndex:r,newIndex:n}=o;if(r===n)return;const t=fl.value.splice(r,1)[0];fl.value.splice(n,0,t),L.value=(p=L.value)==null?void 0:p.slice().sort((c,d)=>{if(c.label==="操作")return 1;if(d.label==="操作")return-1;const b=fl.value.findIndex(x=>x.label===c.label),s=fl.value.findIndex(x=>x.label===d.label);return b-s})}})};a.onMounted(()=>{wl.value=window.innerWidth-240*2});const er=()=>{a.nextTick(()=>{Za()})},$l=(e,l)=>{var r;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let o;return e.children=(r=e.children)==null?void 0:r.map(n=>{var t,p;if((n==null?void 0:n.id)===Ke.value){let c={};for(let d in n){let b=(t=l==null?void 0:l.find(s=>(s==null?void 0:s.prop)===d))==null?void 0:t.label;b?c[d]=(p=Ae.value)==null?void 0:p[b]:c[d]=n[d]}n=Object.assign(c,Ae.value),o=n}else{let c=$l(n,l);n=c==null?void 0:c.contents,o=c==null?void 0:c.currentSelectContents}return n}),{contents:e,currentSelectContents:o}},Yl=(e,l)=>{let o,r;return e!=null&&e.find(n=>(n==null?void 0:n.id)===Ke.value)?o=e==null?void 0:e.map(n=>{var t,p;if((n==null?void 0:n.id)===Ke.value){let c={};for(let d in n){let b=(t=l==null?void 0:l.find(s=>(s==null?void 0:s.prop)===d))==null?void 0:t.label;b?c[d]=(p=Ae.value)==null?void 0:p[b]:c[d]=n[d]}n=Object.assign(c,Ae.value),r=n}return n}):o=e==null?void 0:e.map(n=>{var t,p,c,d;if((n==null?void 0:n.id)===Ke.value){let b={};for(let s in n){let x=(t=l==null?void 0:l.find(k=>(k==null?void 0:k.prop)===s))==null?void 0:t.label;x?b[s]=(p=Ae.value)==null?void 0:p[x]:b[s]=n[s]}n=Object.assign(b,Ae.value),r=n}else n=(c=$l(n,l))==null?void 0:c.contents,r=(d=$l(n,l))==null?void 0:d.currentSelectContents;return n}),{newContents:o,currentSelectContents:r}},Zl=(e,l,o)=>{var r,n;return e[l==null?void 0:l.prop]=o,typeof e.id=="number"&&(e.id=(r=e.id)==null?void 0:r.toString()),e.children&&((n=e.children)==null?void 0:n.length)>0&&(e.children=e.children.map(Zl)),e},Fl=e=>{var o;const l=[];return l.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((o=e.children)==null||o.forEach(r=>{l.push(...Fl(r))})),(l==null?void 0:l.length)>0?l==null?void 0:l.map(r=>{const n={...r};return delete n.children,n}):[]},hl=(e=!0,l,o)=>{var b,s,x,k,C,N,w,T,$;let r=oe.getColumnChild((b=S.cloneDeep(L.value))==null?void 0:b.filter(A=>(A==null?void 0:A.label)!=="操作")),n,t=S.cloneDeep(X.value);if(!Ae.value){Pe.value=!1;return}if(Ke.value===""){ol.value++;let A;l&&o?A={id:ol.value.toString(),[l==null?void 0:l.prop]:o,children:Ae.value.children}:A={id:ol.value.toString()},A!=null&&A.children&&(A={...A,children:(s=A.children)==null?void 0:s.map(_=>Zl(_,l,o))}),t.push(Object.assign(Ae.value,A)),n=Object.assign(Ae.value,A)}else t=(x=Yl(t,r))==null?void 0:x.newContents,n=(k=Yl(t,r))==null?void 0:k.currentSelectContents;const p=(C=v.itemData)==null?void 0:C.filter(A=>(A==null?void 0:A.key)==="childTree")[0];if(((N=p==null?void 0:p.contents)==null?void 0:N.length)>0){we.value="编辑";const A=[];t==null||t.forEach((_,g)=>{var i;let h={};if(Array.isArray(_)){let m=[];_==null||_.filter(u=>!(u!=null&&u.id)).forEach((u,K)=>{var F,Q,I,R,re,W,ee;if((Q=(F=Le.value)==null?void 0:F[K])!=null&&Q.prop&&!Array.isArray(u)){let te={};te[Le.value[K].column]=u,pe!=null&&pe.value&&((I=pe==null?void 0:pe.value)==null?void 0:I.length)>0&&((R=pe==null?void 0:pe.value)!=null&&R.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(te)))&&(m=(re=pe==null?void 0:pe.value)==null?void 0:re.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(te))),m&&m.length>0?h[Le.value[K].prop]=m!=null&&m.find(ne=>{var ie;return((ie=Object.keys(ne))==null?void 0:ie[0])===Le.value[K].column})?(W=m==null?void 0:m.find(ne=>{var ie;return((ie=Object.keys(ne))==null?void 0:ie[0])===Le.value[K].column}))==null?void 0:W[Le.value[K].column]:u:h[Le.value[K].prop]=u}else Array.isArray(u)&&((ee=Le.value[K])!=null&&ee.prop?h[Le.value[K].prop]=u:h.children=ql(u,Le.value))})}else h=_;Array.isArray(_)&&_.some(m=>m==null?void 0:m.id)?A.push(Object.assign(h,{id:(i=_==null?void 0:_.find(m=>m.id))==null?void 0:i.id})):h.id?A.push(h):A.push(Object.assign(h,{id:g.toString()}))}),X.value=ra(A,p,L.value)}else X.value=t;Dl.value=X.value;const c=_r(Dl.value,Ve.value,t);let d=[];if(ul.value?(d=(w=S.cloneDeep(ul).value.singleContent)==null?void 0:w.filter(A=>(A==null?void 0:A.id)!==(n==null?void 0:n.id)),d.push(n)):d=[n],ll.value){const A={content:c,singleContent:((T=p==null?void 0:p.contents)==null?void 0:T.length)>0?d==null?void 0:d.flatMap(Fl):d,index:v==null?void 0:v.index,buttonName:"编辑",column:L.value,parentTableId:v==null?void 0:v.parentTableId};De.setCacheUpdatingData(A)}if(e){const A={content:c,singleContent:(($=p==null?void 0:p.contents)==null?void 0:$.length)>0?Fl(n):n,index:v==null?void 0:v.index,buttonName:we.value,column:L.value,parentTableId:v==null?void 0:v.parentTableId};De.setTableLoading(v==null?void 0:v.index),Pe.value=!1,Ae.value=void 0,M("change",A)}};a.onUnmounted(()=>{L.value=[],X.value=[],fe.value=[],de.value=[],Oe.value=[],Ye.value=[],dl.value=[],sl.value=[],Ge.value=[],Me.value=[],B.value=null});const ea=async(e,l,o)=>{var b,s,x,k,C,N,w,T,$,A,_;al.value=o==null?void 0:o.prop;const r=S.cloneDeep(v.itemData),n=r==null?void 0:r.map(g=>{var h;return(g==null?void 0:g.key)==="header"&&((h=g.contents)==null||h.map((i,m)=>{var u,K,F,Q,I,R,re,W,ee,te,ne,ie,Ce,y,G,E,V,ce,q;return i.type=i!=null&&i.type?i.type:(Q=(F=(K=(u=i==null?void 0:i.key)==null?void 0:u.split("$"))==null?void 0:K[1])==null?void 0:F.split("("))!=null&&Q[0]?(R=(I=oe.FormType)==null?void 0:I.find(D=>{var f,Y,U,z;return(D==null?void 0:D.key)===((z=(U=(Y=(f=i==null?void 0:i.key)==null?void 0:f.split("$"))==null?void 0:Y[1])==null?void 0:U.split("("))==null?void 0:z[0])}))==null?void 0:R.value:"Input",i.options=i!=null&&i.options?i.options:((ee=(W=(re=i==null?void 0:i.key)==null?void 0:re.split("$"))==null?void 0:W[1])==null?void 0:ee.length)>0?(Ce=(ie=zl((ne=(te=i==null?void 0:i.key)==null?void 0:te.split("$"))==null?void 0:ne[1]))==null?void 0:ie.split(","))==null?void 0:Ce.map(D=>({label:D,value:D})):[],(y=i==null?void 0:i.key)!=null&&y.includes("$")&&(i.key=(E=(G=i==null?void 0:i.key)==null?void 0:G.split("$"))==null?void 0:E[0]),i.value=(V=Object.values(l))==null?void 0:V[m],i.optionUrl=i!=null&&i.formMenuSelect&&((ce=i==null?void 0:i.formMenuSelect)==null?void 0:ce.length)>0?{groupSelect:(q=i==null?void 0:i.groupSelect)==null?void 0:q.split(/[::]/).map(D=>D.trim()),menuSelect:i==null?void 0:i.formMenuSelect,selectRelateType:"",type:(i==null?void 0:i.formType)??(i!=null&&i.groupSelect?"Select":"")}:null,i})),g});let t=S.cloneDeep(Ge.value),p=(s=(b=S.cloneDeep(n))==null?void 0:b.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:s.contents;t=t==null?void 0:t.map(g=>{var h;return g.value=(h=p==null?void 0:p.find((i,m)=>m===(g==null?void 0:g.id)))==null?void 0:h.value,g});let c="",d=(C=(k=(x=S.cloneDeep(n))==null?void 0:x.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:k.contents)==null?void 0:C.find((g,h)=>{var i,m,u;return(g==null?void 0:g.label)===al.value||(h==null?void 0:h.toString())===((u=(m=(i=al.value)==null?void 0:i.split("a"))==null?void 0:m[1])==null?void 0:u.toString())});if((T=(w=(N=S.cloneDeep(n))==null?void 0:N.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:w.contents)==null||T.forEach(g=>{var h,i,m,u,K;c===""&&((m=(i=(h=g==null?void 0:g.optionUrl)==null?void 0:h.groupSelect)==null?void 0:i[1])!=null&&m.includes("["))&&(c=(K=(u=g==null?void 0:g.optionUrl)==null?void 0:u.groupSelect)==null?void 0:K[1])}),($=d==null?void 0:d.optionUrl)!=null&&$.menuSelect){let g=await Jl(d),h;if(g==null||g.forEach(i=>{var m,u,K,F,Q,I,R,re,W,ee;c===((u=(m=d==null?void 0:d.optionUrl)==null?void 0:m.groupSelect)==null?void 0:u[1])&&((Q=(F=(K=d==null?void 0:d.optionUrl)==null?void 0:K.groupSelect)==null?void 0:F[1])!=null&&Q.includes("["))&&((ee=S.cloneDeep(i))==null?void 0:ee[(W=(re=(R=(I=d==null?void 0:d.optionUrl)==null?void 0:I.groupSelect)==null?void 0:R[1])==null?void 0:re.replaceAll("[",""))==null?void 0:W.replaceAll("]","")])===(d==null?void 0:d.value)&&(h=i)}),h){let i=S.cloneDeep(t);i=i==null?void 0:i.map(u=>{var K,F,Q,I,R,re,W,ee,te,ne,ie;return(h!=null&&h[u==null?void 0:u.label]||h!=null&&h[(I=(Q=(F=(K=u==null?void 0:u.optionUrl)==null?void 0:K.groupSelect)==null?void 0:F[1])==null?void 0:Q.replaceAll("[",""))==null?void 0:I.replaceAll("]","")])&&((W=(re=(R=u==null?void 0:u.optionUrl)==null?void 0:R.groupSelect)==null?void 0:re[1])!=null&&W.includes("["))&&(u.value=(h==null?void 0:h[u==null?void 0:u.label])||(h==null?void 0:h[(ie=(ne=(te=(ee=u==null?void 0:u.optionUrl)==null?void 0:ee.groupSelect)==null?void 0:te[1])==null?void 0:ne.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])),u}),X.value=(A=S.cloneDeep(X.value))==null?void 0:A.map(u=>{if((u==null?void 0:u.id)===(l==null?void 0:l.id)){const K={};return i==null||i.forEach(F=>{K[F.name]=F.value}),K.id=u==null?void 0:u.id,K}return u});let m=S.cloneDeep(i);m=m==null?void 0:m.map(u=>{var K,F,Q,I;return(F=(K=u==null?void 0:u.optionUrl)==null?void 0:K.menuSelect)!=null&&F.some(R=>R==null?void 0:R.includes)&&(u.optionUrl.menuSelect=(I=(Q=u==null?void 0:u.optionUrl)==null?void 0:Q.menuSelect)==null?void 0:I.map(R=>{var re,W,ee,te;if(R!=null&&R.includes("[")){let ne=(W=(re=R==null?void 0:R.replaceAll("[","").replaceAll("]",""))==null?void 0:re.split(":"))==null?void 0:W[1];R=(te=(ee=S.cloneDeep(i))==null?void 0:ee.find(ie=>(ie==null?void 0:ie.label)===ne))==null?void 0:te.value}return R})),u}),X.value=(_=S.cloneDeep(X.value))==null?void 0:_.map(u=>{if((u==null?void 0:u.id)===(l==null?void 0:l.id)){const K={};return m==null||m.forEach(F=>{K[F.name]=F.value}),K.id=u==null?void 0:u.id,K}return u})}}},lr=async e=>{var b,s,x,k,C,N,w,T,$,A,_;if(!e)return;Ae.value=e;const l=S.cloneDeep(v.itemData);let o=l==null?void 0:l.map(g=>{var h;return(g==null?void 0:g.key)==="header"&&((h=g.contents)==null||h.map((i,m)=>{var u,K,F,Q,I,R,re,W,ee,te,ne,ie,Ce,y,G,E,V,ce,q;return i.type=i!=null&&i.type?i.type:(Q=(F=(K=(u=i==null?void 0:i.key)==null?void 0:u.split("$"))==null?void 0:K[1])==null?void 0:F.split("("))!=null&&Q[0]?(R=(I=oe.FormType)==null?void 0:I.find(D=>{var f,Y,U,z;return(D==null?void 0:D.key)===((z=(U=(Y=(f=i==null?void 0:i.key)==null?void 0:f.split("$"))==null?void 0:Y[1])==null?void 0:U.split("("))==null?void 0:z[0])}))==null?void 0:R.value:"Input",i.options=i!=null&&i.options?i.options:((ee=(W=(re=i==null?void 0:i.key)==null?void 0:re.split("$"))==null?void 0:W[1])==null?void 0:ee.length)>0?(Ce=(ie=zl((ne=(te=i==null?void 0:i.key)==null?void 0:te.split("$"))==null?void 0:ne[1]))==null?void 0:ie.split(","))==null?void 0:Ce.map(D=>({label:D,value:D})):[],(y=i==null?void 0:i.key)!=null&&y.includes("$")&&(i.key=(E=(G=i==null?void 0:i.key)==null?void 0:G.split("$"))==null?void 0:E[0]),i.value=(V=Object.values(e))==null?void 0:V[m],i.optionUrl=i!=null&&i.formMenuSelect&&((ce=i==null?void 0:i.formMenuSelect)==null?void 0:ce.length)>0?{groupSelect:(q=i==null?void 0:i.groupSelect)==null?void 0:q.split(/[::]/).map(D=>D.trim()),menuSelect:i==null?void 0:i.formMenuSelect,selectRelateType:"",type:(i==null?void 0:i.formType)??(i!=null&&i.groupSelect?"Select":"")}:null,i})),g}),r=S.cloneDeep(Ge.value),n=(s=(b=S.cloneDeep(o))==null?void 0:b.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:s.contents;if(r=r==null?void 0:r.map(g=>{var h;return g.value=(h=n==null?void 0:n.find((i,m)=>(i==null?void 0:i.prop)===(g==null?void 0:g.name)))==null?void 0:h.value,g}),!pl.value)return;let t="",p=(C=(k=(x=S.cloneDeep(o))==null?void 0:x.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:k.contents)==null?void 0:C.find((g,h)=>{var i,m,u;return(g==null?void 0:g.label)===al.value||(h==null?void 0:h.toString())===((u=(m=(i=al.value)==null?void 0:i.split("a"))==null?void 0:m[1])==null?void 0:u.toString())}),c=(N=p==null?void 0:p.optionUrl)==null?void 0:N.menuSelect,d=!0;if(($=(T=(w=S.cloneDeep(o))==null?void 0:w.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:T.contents)==null||$.forEach(g=>{var h,i,m,u,K,F;d&&((m=(i=(h=g==null?void 0:g.optionUrl)==null?void 0:h.groupSelect)==null?void 0:i[1])!=null&&m.includes("["))&&(t=(K=(u=g==null?void 0:g.optionUrl)==null?void 0:u.groupSelect)==null?void 0:K[1],JSON.stringify(c)===JSON.stringify((F=g==null?void 0:g.optionUrl)==null?void 0:F.menuSelect)&&(d=!1))}),(A=p==null?void 0:p.optionUrl)!=null&&A.menuSelect&&pl.value){let g=await Jl(p),h;if((_=p==null?void 0:p.optionUrl)==null||_.menuSelect,g==null||g.forEach(i=>{var m,u,K,F,Q,I,R,re,W,ee;t===((u=(m=p==null?void 0:p.optionUrl)==null?void 0:m.groupSelect)==null?void 0:u[1])&&((Q=(F=(K=p==null?void 0:p.optionUrl)==null?void 0:K.groupSelect)==null?void 0:F[1])!=null&&Q.includes("["))&&((ee=S.cloneDeep(i))==null?void 0:ee[(W=(re=(R=(I=p==null?void 0:p.optionUrl)==null?void 0:I.groupSelect)==null?void 0:R[1])==null?void 0:re.replaceAll("[",""))==null?void 0:W.replaceAll("]","")])===(p==null?void 0:p.value)&&(h=i)}),h){let i=S.cloneDeep(r);i=i==null?void 0:i.map(u=>{var K,F,Q,I,R,re,W,ee,te,ne,ie;return(h!=null&&h[u==null?void 0:u.label]||h!=null&&h[(I=(Q=(F=(K=u==null?void 0:u.optionUrl)==null?void 0:K.groupSelect)==null?void 0:F[1])==null?void 0:Q.replaceAll("[",""))==null?void 0:I.replaceAll("]","")])&&((W=(re=(R=u==null?void 0:u.optionUrl)==null?void 0:R.groupSelect)==null?void 0:re[1])!=null&&W.includes("["))&&(u.value=(h==null?void 0:h[u==null?void 0:u.label])||(h==null?void 0:h[(ie=(ne=(te=(ee=u==null?void 0:u.optionUrl)==null?void 0:ee.groupSelect)==null?void 0:te[1])==null?void 0:ne.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])),u}),Ge.value=S.cloneDeep(i);let m=S.cloneDeep(i);m=m==null?void 0:m.map(u=>{var K,F,Q,I,R,re;return(F=(K=u==null?void 0:u.optionUrl)==null?void 0:K.menuSelect)!=null&&F.some(W=>W==null?void 0:W.includes("["))&&(u.optionUrl.oldMenuSelect=(I=(Q=S.cloneDeep(u))==null?void 0:Q.optionUrl)==null?void 0:I.menuSelect,u.optionUrl.menuSelect=(re=(R=u==null?void 0:u.optionUrl)==null?void 0:R.menuSelect)==null?void 0:re.map(W=>{var ee,te,ne,ie;if(W!=null&&W.includes("[")){let Ce=(te=(ee=W==null?void 0:W.replaceAll("[","").replaceAll("]",""))==null?void 0:ee.split(":"))==null?void 0:te[1];W=(ie=(ne=S.cloneDeep(i))==null?void 0:ne.find(y=>(y==null?void 0:y.label)===Ce))==null?void 0:ie.value}return W})),u}),Ge.value=m}}pl.value=!1},ar=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",rr=e=>{var t,p;const l=(p=(t=Oe.value)==null?void 0:t.find(c=>(c==null?void 0:c.label)===(e==null?void 0:e.label)))==null?void 0:p.multiple,o=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;X.value.forEach(c=>{const d=c==null?void 0:c[o];l&&sa.isString(d)&&(c[o]=[d]),!l&&!sa.isString(d)&&(c[o]="")})},la=(e,l)=>{var o;return l==null||l.forEach(r=>{e[r==null?void 0:r.prop]=r==null?void 0:r.value}),e.children&&((o=e.children)==null?void 0:o.length)>0&&(e.children=e.children.map(r=>la(r,l))),e},Pl=e=>{var o,r,n,t,p,c;gl("");const l=(o=Ge.value)==null?void 0:o.reduce((d,b)=>(d[b.name]=b.value,d),{});if(((r=Object.keys(l))==null?void 0:r.length)>0){Ae.value=l,Ke.value="",ol.value=(n=X.value)==null?void 0:n.length,sl.value=(t=Ze.value)==null?void 0:t.filter(b=>(b==null?void 0:b.label)!=="新增");const d=(c=(p=fe.value)==null?void 0:p.filter(b=>(b==null?void 0:b.label)!=="操作"))==null?void 0:c.map(b=>{var x,k,C;const s=(k=(x=Oe.value)==null?void 0:x.find(N=>(N==null?void 0:N.label)===(b==null?void 0:b.label)))==null?void 0:k.multiple;return rr(b),{...b,contents:(b==null?void 0:b.options)??[],optionUrl:b!=null&&b.formMenuSelect&&((C=b==null?void 0:b.formMenuSelect)==null?void 0:C.length)>0?{groupSelect:b==null?void 0:b.groupSelect,menuSelect:b==null?void 0:b.formMenuSelect,selectRelateType:"",type:b==null?void 0:b.formType,multiple:s}:null}});L.value=d==null?void 0:d.map(b=>la(b,[{prop:"type",value:"edit"},{prop:"columnType",value:ar(b==null?void 0:b.formType)||(b==null?void 0:b.columnType)}])),e==="createClick"&&hl(!1)}},nr=(e,l)=>Number(Vl.dayjs(l).diff(Vl.dayjs(e),"day",!0).toFixed(1)),or=(e,l)=>{var p;const o=(p=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:p.contents,r={START:"开始时间",END:"结束时间",HOURS:"工时"},n=new Map;return o==null||o.forEach((c,d)=>{const{label:b}=c;n.set(b,d)}),!n.has(r.START)||!n.has(r.END)||!n.has(r.HOURS)?l:l==null?void 0:l.map(c=>{const d=c==null?void 0:c[r.START],b=c==null?void 0:c[r.END],s=nr(d,b);return d&&b&&(c[r.HOURS]=`${s}天`),c})},aa=(e,l,o=0)=>{if(o>((l==null?void 0:l.length)??""))return e;const r=l==null?void 0:l[o],n=new Map;for(const p of e){const c=p[r];n.has(c)||n.set(c,[]),n.get(c)&&n.get(c).push(p)}const t=[];for(const[p,c]of n){const[d,...b]=c,s={...d};o+1===((l==null?void 0:l.length)??"")?s.children=c==null?void 0:c.map(x=>(x.level=S.cloneDeep(o)+1,x)).filter((x,k)=>k!==0):b.length>0&&(s.children=aa(b,l,o+1)),s.level=o,t.push(s)}return t},ra=(e,l,o)=>{var n;if(!(l!=null&&l.contents)||((n=l==null?void 0:l.contents)==null?void 0:n.length)===0)return e;let r=[];return r=aa(e,l==null?void 0:l.contents,0),r},na=(e,l)=>{var k,C,N,w,T,$,A,_,g,h,i,m,u,K,F,Q,I,R,re,W,ee,te,ne,ie,Ce;const o=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="header");e==null||e.filter(y=>(y==null?void 0:y.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="childTree")[0];let n=l;const t=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="page"),p=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="rowButton"),c=e==null?void 0:e.find(y=>(y==null?void 0:y.key)==="extraButton"),d=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableContents"),b=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableIndex");Oe.value=(C=(k=e==null?void 0:e.filter(y=>(y==null?void 0:y.key)==="tableToForm"))==null?void 0:k[0])==null?void 0:C.contents,Rl.value=(t==null?void 0:t.contents)??!0;let s=[];el.value===""?s=o==null?void 0:o[0]:s=(o==null?void 0:o.find(y=>(y==null?void 0:y.selectLabel)==="("+el.value+")"))??(o==null?void 0:o.find(y=>!(y!=null&&y.selectLabel)));let x=[];if(el.value===""?x=b==null?void 0:b[0]:x=(b==null?void 0:b.find(y=>(y==null?void 0:y.selectLabel)==="("+el.value+")"))??(b==null?void 0:b.find(y=>!(y!=null&&y.selectLabel))),((N=s==null?void 0:s.contents)==null?void 0:N.length)>0){let y=[];if(s!=null&&s.contents.some(D=>Array.isArray(D)&&(D==null?void 0:D.find(f=>f.children))))Ve.value===""?y=(T=(w=oe.getGradeColumns(s==null?void 0:s.contents))==null?void 0:w[0])==null?void 0:T.filter(D=>!Array.isArray(D)):(Ve.value.split("-"),y=($=oe.getGradeColumns(s==null?void 0:s.contents))==null?void 0:$[0]);else{let D=s!=null&&s.contents.some(f=>Array.isArray(f))?(A=s==null?void 0:s.contents)==null?void 0:A[0]:s==null?void 0:s.contents;D==null||D.forEach((f,Y)=>{var le,Ne,rl,He;let U="";(Ne=(le=be.value)==null?void 0:le.split("/"))==null||Ne.forEach(_e=>{var Qe,Xe,ze;if(_e!==""){let il=(ze=(Xe=(Qe=_e==null?void 0:_e.split(J+"updateLoading"))==null?void 0:Qe[0])==null?void 0:Xe.split(J+"loading"))==null?void 0:ze[0];U=U===""?U+il:U+"/"+il}}),U=U+J+(f==null?void 0:f.directiveLabel);const z=(rl=Oe.value)==null?void 0:rl.find(_e=>(_e==null?void 0:_e.prop)===(f==null?void 0:f.prop));y.push({label:(f==null?void 0:f.label)??"",prop:(f==null?void 0:f.label)==="操作"?"operate":(f==null?void 0:f.prop)??"a"+Y,width:f!=null&&f.width?parseInt(f.width):"",fixed:(f==null?void 0:f.fixed)??void 0,sortable:(f==null?void 0:f.sortable)??!1,filterable:(f==null?void 0:f.filterable)??!1,operable:(f==null?void 0:f.operable)??!1,showSummary:(f==null?void 0:f.showSummary)??!1,align:(f==null?void 0:f.align)??"left",showOverflowTooltip:(f==null?void 0:f.showOverflowTooltip)??!0,isNotDrag:(f==null?void 0:f.isNotDrag)??!1,isEditCol:(f==null?void 0:f.isEditCol)??!1,isOperate:(f==null?void 0:f.isOperate)??!1,id:(f==null?void 0:f.id)??Y,type:(f==null?void 0:f.label)==="操作"?"operate":void 0,formType:(f==null?void 0:f.formType)??(f!=null&&f.groupSelect?"Select":""),isTableColHidden:f==null?void 0:f.isTableColHidden,isFormColHidden:f==null?void 0:f.isFormColHidden,disabled:f==null?void 0:f.disabled,options:(f==null?void 0:f.options)??[],value:(f==null?void 0:f.value)??"",formMenuSelect:(f==null?void 0:f.formMenuSelect)??[],isRoute:(f==null?void 0:f.isRoute)??!1,groupSelect:f!=null&&f.groupSelect?(He=f==null?void 0:f.groupSelect)==null?void 0:He.replaceAll('"',"").split(":"):[],isMainKey:(f==null?void 0:f.isMainKey)||(f==null?void 0:f.directiveLabel)&&!n[U],columnType:(z==null?void 0:z.type)||(f==null?void 0:f.columnType)||"TEXTAREA",directiveLabel:f==null?void 0:f.directiveLabel,isExistChild:!!(f!=null&&f.directiveLabel&&n[U]),childPath:U})})}L.value=oe.getNewColumnChild(y),de.value=oe.getNewColumnChild(y),H.value=(_=L.value)==null?void 0:_.map(D=>D==null?void 0:D.label),qe.value=(g=L.value)==null?void 0:g.every(D=>D==null?void 0:D.filterable),me.value=(h=L.value)==null?void 0:h.every(D=>D==null?void 0:D.operable),Ue.value=(i=L.value)==null?void 0:i.every(D=>D==null?void 0:D.sortable);let G=(u=(m=oe.getAllLeafNodes(L.value))==null?void 0:m.filter(D=>(D==null?void 0:D.type)!=="operate"))==null?void 0:u.map((D,f)=>({prop:(D==null?void 0:D.prop)??"a"+f,column:D.label}));Le.value=G;let E=[];el.value===""?E=d==null?void 0:d[0]:E=(d==null?void 0:d.find(D=>(D==null?void 0:D.selectLabel)==="("+el.value+")"))??(d==null?void 0:d.find(D=>!(D!=null&&D.selectLabel)));let V=Array.isArray((K=E==null?void 0:E.contents)==null?void 0:K[0])&&((F=E==null?void 0:E.contents)!=null&&F[0].every(D=>Array.isArray(D)))?(Q=E==null?void 0:E.contents)==null?void 0:Q[0]:E==null?void 0:E.contents;x!=null&&x.contents&&((I=x==null?void 0:x.contents)==null?void 0:I.length)!==0&&(V=(R=S.cloneDeep(V))==null?void 0:R.map((D,f)=>{if(!Array.isArray(D)){let Y={};for(let U in D)U!=="id"&&U!=="index"&&(Y[U]=D[U]);D=Object.values(Y)}return D}));const ce=!!((re=L.value)!=null&&re.find(D=>D.prop==="index"));V=ua(V,x==null?void 0:x.contents,ce);const q=[];V==null||V.forEach((D,f)=>{var U;let Y={};if(Array.isArray(D)){let z=[];D==null||D.filter(le=>!(le!=null&&le.id)).forEach((le,Ne)=>{var rl,He,_e,Qe,Xe,ze;if((rl=G==null?void 0:G[Ne])!=null&&rl.prop&&!Array.isArray(le)){let il={};il[G[Ne].column]=le,pe!=null&&pe.value&&((He=pe==null?void 0:pe.value)==null?void 0:He.length)>0&&((_e=pe==null?void 0:pe.value)!=null&&_e.find(je=>JSON.stringify(je==null?void 0:je[0])===JSON.stringify(il)))&&(z=(Qe=pe==null?void 0:pe.value)==null?void 0:Qe.find(je=>JSON.stringify(je==null?void 0:je[0])===JSON.stringify(il))),z&&z.length>0?Y[G[Ne].prop]=z!=null&&z.find(je=>{var yl;return((yl=Object.keys(je))==null?void 0:yl[0])===G[Ne].column})?(Xe=z==null?void 0:z.find(je=>{var yl;return((yl=Object.keys(je))==null?void 0:yl[0])===G[Ne].column}))==null?void 0:Xe[G[Ne].column]:le:Y[G[Ne].prop]=le}else Array.isArray(le)&&((ze=G[Ne])!=null&&ze.prop?Y[G[Ne].prop]=le:Y.children=ql(le,G))})}else Y=D;Array.isArray(D)&&D.some(z=>z==null?void 0:z.id)?q.push(Object.assign(Y,{id:(U=D==null?void 0:D.find(z=>z.id))==null?void 0:U.id})):Y.id?q.push(Y):q.push(Object.assign(Y,{id:f.toString()}))}),or(e,q),X.value=ra(q,r,L.value),bl.value=q,(W=bl.value)==null||W.forEach(D=>{var f;(f=ml.value)==null||f.set(D.id,D)})}else L.value=[],fe.value=[],X.value=[],bl.value=[],ml.value=new Map;((ee=p==null?void 0:p.contents)==null?void 0:ee.length)>0?Ye.value=p==null?void 0:p.contents:Ye.value=[],((te=c==null?void 0:c.contents)==null?void 0:te.length)>0?(sl.value=c==null?void 0:c.contents,Ze.value=c==null?void 0:c.contents):(sl.value=[],Ze.value=[]),ol.value=((ne=X==null?void 0:X.value)==null?void 0:ne.length)??0,Dl.value=X.value,ll.value&&(L.value=(Ce=(ie=fe.value)==null?void 0:ie.filter(y=>(y==null?void 0:y.label)!=="操作"))==null?void 0:Ce.map(y=>{var G;return{...y,type:"edit",optionUrl:y!=null&&y.formMenuSelect&&((G=y==null?void 0:y.formMenuSelect)==null?void 0:G.length)>0?{groupSelect:y==null?void 0:y.groupSelect,menuSelect:y==null?void 0:y.formMenuSelect,selectRelateType:"",type:y==null?void 0:y.formType}:null}}),Pl())};a.watch(()=>[v.itemData,el.value,ya.value,Ve.value,pe==null?void 0:pe.value],async()=>{var e,l,o,r,n,t;if((e=v==null?void 0:v.itemData)!=null&&e.find(p=>(p==null?void 0:p.key)==="columnPath")&&!((l=cl.value)!=null&&l.find(p=>{var c,d;return(p==null?void 0:p.key)===((d=(c=v==null?void 0:v.itemData)==null?void 0:c.find(b=>(b==null?void 0:b.key)==="columnPath"))==null?void 0:d.contents)}))){let p=cl.value,c={key:(r=(o=v==null?void 0:v.itemData)==null?void 0:o.find(d=>(d==null?void 0:d.key)==="columnPath"))==null?void 0:r.contents,value:(t=(n=v==null?void 0:v.itemData)==null?void 0:n.find(d=>(d==null?void 0:d.key)==="columnUsingPath"))==null?void 0:t.contents};p!=null&&p.find(d=>(d==null?void 0:d.key)===(c==null?void 0:c.key))?p=p==null?void 0:p.map(d=>((d==null?void 0:d.key)===(c==null?void 0:c.key)&&(d.value=c.value),d)):p.push(c),De.setTableViewContents(p)}na(v.itemData,v.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>v==null?void 0:v.operatingForm,e=>{e!=null&&e.form&&(gl(e==null?void 0:e.form),we.value=e==null?void 0:e.dialogTitle,Sl.value=!0,Pe.value=!0)},{immediate:!0,deep:!0});const oa=()=>{ll.value=!ll.value},sr=()=>{Cl.value=!Cl.value};a.watch(()=>ll.value,e=>{e?(Pl("viewChange"),De.setCacheUpdatingData(null)):(sl.value=Ze.value,L.value=de.value,ul.value&&(De.setTableLoading(v==null?void 0:v.index),M("change",ul.value)))},{immediate:!0}),a.ref(!1);const ir=(e,l)=>{var o;Pl("createClick"),l===ke.pageSize&&(ke.currentPage=Math.ceil(((o=X.value)==null?void 0:o.length)/ke.pageSize))},tr=(e,l,o)=>{var r;ea(o,e,l),Ae.value=S.cloneDeep(e),Ke.value=e==null?void 0:e.id,ol.value=(r=X.value)==null?void 0:r.length,we.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",hl(!1)},Ee=e=>{var d,b,s,x,k,C,N,w,T,$;const{row:l,column:o,item:r,slotData:n}=e;let t=l!=null&&l[o==null?void 0:o.prop]?((b=(d=l==null?void 0:l[o==null?void 0:o.prop])==null?void 0:d[0])==null?void 0:b.contents)??(l==null?void 0:l[o==null?void 0:o.prop]):((x=(s=l==null?void 0:l[r==null?void 0:r.prop])==null?void 0:s[0])==null?void 0:x.contents)??(l==null?void 0:l[r==null?void 0:r.prop])??((C=(k=n==null?void 0:n[r==null?void 0:r.prop])==null?void 0:k[0])==null?void 0:C.contents)??(n==null?void 0:n[r==null?void 0:r.prop])??((T=(w=l==null?void 0:l[(N=r==null?void 0:r.child)==null?void 0:N.prop])==null?void 0:w[0])==null?void 0:T.contents)??(l==null?void 0:l[($=r==null?void 0:r.child)==null?void 0:$.prop]),c=Array.isArray(t)&&!(t!=null&&t.every(A=>typeof A=="string"||typeof A=="number"))?"查看":t;return c=Array.isArray(c)?c.join(","):c,c},ur=e=>{var b,s,x,k,C,N,w,T,$,A;const{row:l,column:o,item:r,slotData:n}=e;let t=l!=null&&l[o==null?void 0:o.prop]?((s=(b=l==null?void 0:l[o==null?void 0:o.prop])==null?void 0:b[0])==null?void 0:s.contents)??(l==null?void 0:l[o==null?void 0:o.prop]):((k=(x=l==null?void 0:l[r==null?void 0:r.prop])==null?void 0:x[0])==null?void 0:k.contents)??(l==null?void 0:l[r==null?void 0:r.prop])??((N=(C=n==null?void 0:n[r==null?void 0:r.prop])==null?void 0:C[0])==null?void 0:N.contents)??(n==null?void 0:n[r==null?void 0:r.prop])??(($=(T=l==null?void 0:l[(w=r==null?void 0:r.child)==null?void 0:w.prop])==null?void 0:T[0])==null?void 0:$.contents)??(l==null?void 0:l[(A=r==null?void 0:r.child)==null?void 0:A.prop]);const c=Array.isArray(t)&&!(t!=null&&t.every(_=>typeof _=="string"||typeof _=="number")),d=Array.isArray(t)&&(t==null?void 0:t.find(_=>_==null?void 0:_.url));return c&&d};return(e,l)=>{var b,s,x;const o=a.resolveComponent("svg-icon"),r=a.resolveComponent("el-popover"),n=a.resolveComponent("el-switch"),t=a.resolveComponent("el-checkbox"),p=a.resolveComponent("el-checkbox-group"),c=a.resolveComponent("el-button"),d=a.resolveComponent("LookComponent");return a.openBlock(),a.createElementBlock("div",Ur,[Wl.value?(a.openBlock(),a.createBlock(Ie.ssTable,{id:"excel-table",pageObj:ke,summaryInfo:Je,columns:L.value,isCardViewport:Cl.value,checkedColumns:H.value,key:Ll.value+JSON.stringify(L.value),tableData:Da.value,isEditViewport:ll.value,isShowPagination:Rl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:j.allowSelect,onDbClickRow:Va,extraButton:sl.value,rowButton:Ye.value,cacheExtraButtons:Ze.value,isClearSelection:((b=Me.value)==null?void 0:b.length)===0,onDoCurrentChange:Ta,onDoSizeChange:Ca,onContentClick:za,onRowClick:Ja,onSelectChange:Ua,onCellChange:tr,onChange:ea,onPreview:Gl,onSubmitEditingTable:Ba,onHandleColEditChange:Na,onHandleColTypeChange:_a,onClickButton:Nl},a.createSlots({headerButton:a.withCtx(k=>{var C,N;return[j.showHeader?(a.openBlock(),a.createBlock(mr,{key:0,filterValues:Hl.value,selectNums:(C=Me.value)==null?void 0:C.length,dataNums:(N=X.value)==null?void 0:N.length,compName:j.compName,isDevMode:j.isDevMode,buttons:k.buttons,onButtonClick:l[0]||(l[0]=w=>Nl(w,"",{})),columns:L.value,onFilter:Pa,onGetImportData:Ea,level:j.level},null,8,["filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var k,C;return[((k=X.value)==null?void 0:k.length)>0&&j.allowOperate?(a.openBlock(),a.createElementBlock("div",Lr,[(C=Ye.value)!=null&&C.some(N=>(N==null?void 0:N.label)==="编辑")&&!Cl.value?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:oa},[a.createVNode(o,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0),a.createElementVNode("span",{title:"卡片视图",onClick:sr},[a.createVNode(o,{name:"cardViewport",class:"view-icon"})])])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:k,index:C})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:N=>ir(k,C)},[a.createVNode(o,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,Mr)]),operateCol:a.withCtx(()=>[a.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:er},{reference:a.withCtx(()=>[a.createElementVNode("span",jr,[a.createVNode(o,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",Kr,[l[11]||(l[11]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(n,{"model-value":Ue.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:l[2]||(l[2]=k=>jl(k,"sortable"))},null,8,["model-value"]),a.createVNode(n,{"model-value":qe.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:l[3]||(l[3]=k=>jl(k,"filterable"))},null,8,["model-value"]),a.createVNode(n,{"model-value":me.value,"active-text":"编辑所有表头","inactive-text":"",onChange:l[4]||(l[4]=k=>jl(k,"operable"))},null,8,["model-value"]),l[12]||(l[12]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(p,{modelValue:H.value,"onUpdate:modelValue":l[5]||(l[5]=k=>H.value=k),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:B},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(fl.value,k=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:k.label},[a.createVNode(t,{value:k.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:k.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(k.label),9,$r)]),_:2},1032,["value"]),a.createVNode(r,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(o,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var C;return[a.createElementVNode("div",Fr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((C=Object.keys(k))==null?void 0:C.filter(N=>{var w;return(w=ae.value)==null?void 0:w.find(T=>(T==null?void 0:T.value)===N)}),N=>{var w,T;return a.openBlock(),a.createElementBlock("div",{key:N},[a.createVNode(n,{"model-value":k==null?void 0:k[N],"active-text":(T=(w=ae.value)==null?void 0:w.find($=>($==null?void 0:$.value)===N))==null?void 0:T.label,onChange:$=>wa($,N,k)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",Pr,[a.createVNode(o,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(k=>{var C,N,w,T,$,A,_,g,h,i,m,u,K,F,Q,I,R,re;return[ur(k)?(a.openBlock(),a.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",Vr,a.toDisplayString(Ee(k)),1)]),default:a.withCtx(()=>{var W;return[a.createElementVNode("div",zr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(k==null?void 0:k.row[(W=k==null?void 0:k.column)==null?void 0:W.prop],ee=>(a.openBlock(),a.createElementBlock("div",qr,[a.createElementVNode("div",{class:"prop-url",title:xl(ee),onClick:te=>ja(ee)},a.toDisplayString(xl(ee)),9,Jr),a.createElementVNode("div",{class:"prop-download",onClick:te=>Ka(ee)}," 下载 ",8,Rr)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock("div",{key:1,style:a.normalizeStyle({color:!Array.isArray(Ee(k))&&((N=(C=Ee(k))==null?void 0:C.toString())!=null&&N.includes(".txt")||(T=(w=Ee(k))==null?void 0:w.toString())!=null&&T.includes(".cpt")||(A=($=Ee(k))==null?void 0:$.toString())!=null&&A.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ee(k))&&((g=(_=Ee(k))==null?void 0:_.toString())!=null&&g.includes(".txt")||(i=(h=Ee(k))==null?void 0:h.toString())!=null&&i.includes(".cpt")||(u=(m=Ee(k))==null?void 0:m.toString())!=null&&u.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ee(k))&&((F=(K=Ee(k))==null?void 0:K.toString())!=null&&F.includes(".txt")||(I=(Q=Ee(k))==null?void 0:Q.toString())!=null&&I.includes(".cpt")||(re=(R=Ee(k))==null?void 0:R.toString())!=null&&re.includes(".cyd"))?"pointer":"",marginLeft:(k==null?void 0:k.colIndex)===0?`${((k==null?void 0:k.level)??0)*20}px`:0}),onClick:W=>Sa(Ee(k))},a.toDisplayString(Ee(k)),13,Wr))]}),_:2},[((s=Ye.value)==null?void 0:s.length)>0?{name:"actions",fn:a.withCtx(({item:k})=>[a.createVNode(r,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(o,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:a.withCtx(()=>[a.createElementVNode("div",Or,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList($a(Ye.value,k),(C,N)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:N,onClick:w=>Nl(C==null?void 0:C.label,k,{extra:C})},[a.createElementVNode("div",{style:a.normalizeStyle({color:C==null?void 0:C.textColor}),class:"extra-button-label"},a.toDisplayString(C==null?void 0:C.label),5)],8,wr))),128))])]),_:2},1024)]),key:"0"}:void 0,((x=X.value)==null?void 0:x.length)>0?{name:"batchButton",fn:a.withCtx(k=>[a.createVNode(Sr,{buttons:k.buttons,selectTableItems:Me.value,onButtonClick:l[1]||(l[1]=C=>Nl(C,"",{}))},null,8,["buttons","selectTableItems"])]),key:"1"}:void 0]),1032,["pageObj","summaryInfo","columns","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):a.createCommentVNode("",!0),a.createVNode(_l.ssDialog,{title:we.value,visible:Pe.value,width:ba.value,onBeforeDestroy:La,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",Gr,[a.createVNode(Ie.ssForm,{rowContents:Ge.value,isEnableWrap:!1,showOperator:!1,onChange:lr,onClickTrigger:Ma,isEdit:Ol.value,onBlurChange:Oa},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[Sl.value?(a.openBlock(),a.createElementBlock("div",Hr,[a.createVNode(c,{onClick:l[6]||(l[6]=k=>Pe.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>l[13]||(l[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(c,{class:"ok-button",onClick:l[7]||(l[7]=k=>hl(!0)),id:"themeButton"},{default:a.withCtx(()=>l[14]||(l[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])):a.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),a.createVNode(_l.ssDialog,{title:we.value,visible:kl.value,width:wl.value,onBeforeDestroy:l[9]||(l[9]=k=>kl.value=!1)},{default:a.withCtx(()=>[a.createVNode(Er)]),footer:a.withCtx(()=>[a.createElementVNode("div",Qr,[a.createVNode(c,{onClick:l[8]||(l[8]=k=>kl.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>l[15]||(l[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(c,{class:"ok-button",onClick:Ra,id:"themeButton"},{default:a.withCtx(()=>l[16]||(l[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["title","visible","width"]),he.value?(a.openBlock(),a.createBlock(Ie.ssFilePreview,{key:1,fileDataList:ve.value,onDestroy:qa},null,8,["fileDataList"])):a.createCommentVNode("",!0),Z.value?(a.openBlock(),a.createBlock(_l.ssDialog,{key:2,visible:Z.value,onBeforeDestroy:Ya,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(vl.ThreeViewerHost,{"file-urls":dl.value,isThreeScene:ye.value,isSelfWindow:!0,threeData:$e.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(_l.ssDialog,{visible:e.componentVisible,onBeforeDestroy:l[10]||(l[10]=k=>e.componentVisible=!1),width:wl.value,style:{height:"70vh"}},{default:a.withCtx(()=>[a.createVNode(d,{dialogItem:Al.value},null,8,["dialogItem"])]),_:1},8,["visible","width"])])}}},Ir=Bl._export_sfc(Xr,[["__scopeId","data-v-af1bdba0"]]);exports.formGetOptions=zl;exports.getSelectRow=Jl;exports.ssTable=Ir;exports.useFormComp=pa;exports.useFormToTableComp=ia;exports.useUnit=ta;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as k, ref as C, reactive as T, resolveComponent as m, createElementBlock as x, openBlock as B, createVNode as u, withCtx as d, createElementVNode as l, createTextVNode as w, toDisplayString as z, nextTick as N, Fragment as q, withDirectives as H, renderSlot as $, vShow as M } from "vue";
|
|
2
|
-
import { C as V } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
3
|
-
import { F as X, U as J, ai as G, y as U, z as c, ah as I, P as g } from "./index-
|
|
2
|
+
import { C as V } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bkf-CuS1.js";
|
|
3
|
+
import { F as X, U as J, ai as G, y as U, z as c, ah as I, P as g } from "./index-BNbgnFHv.js";
|
|
4
4
|
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const K = "ElUpload";
|
|
6
6
|
class Q extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),u=require("./index-BDdnhKwm.cjs"),n=require("./index.vue_vue_type_style_index_1_lang-CletbRcG.cjs"),a=require("./index-DuQHeRpA.cjs"),s={class:"routerPage-wrapper"},i=t.defineComponent({__name:"index",setup(d){const o=n.useMenuState(),{activeMenuPath:c}=a.storeToRefs(o),r=a.useLoginState(),e=t.reactive({...n.State});return t.onMounted(async()=>{r.getModelSecretAsync(),e.structureId=await n.getActivePageStructureId(c.value)}),(l,_)=>(t.openBlock(),t.createElementBlock("div",s,[t.createVNode(u.ssTable,{index:e.structureId,compName:e.compName,itemData:e.pageData,changedContent:e.changedRow,onChange:e.handleItemDataChange,onOnButtonClick:e.clickRowButton},null,8,["index","compName","itemData","changedContent","onChange","onOnButtonClick"])]))}});exports.default=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./index-
|
|
1
|
+
"use strict";const a=require("./index-DuQHeRpA.cjs"),M=require("./index.vue_vue_type_style_index_1_lang-CletbRcG.cjs"),E=require("vue"),h=M.useMenuState(a.pinia),p=a.useLoginState(a.pinia),x=E.ref(!1),D=E.ref(!1),q=async()=>{const _=a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),I=a.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});return await Promise.all([_,I]).then(s=>{var r,u,n,o,i,l,c,y,g,d,S,f,m,v;const t=s==null?void 0:s[0],e=s==null?void 0:s[1];if(t.data.code===200){const K=(c=(l=(i=(o=(n=(u=(r=t==null?void 0:t.data)==null?void 0:r.result)==null?void 0:u[0])==null?void 0:n.value)==null?void 0:o.pageData)==null?void 0:i.compData)==null?void 0:l[0])==null?void 0:c.contents;h.setRawMenus(K??[]),x.value=((y=t==null?void 0:t.data)==null?void 0:y.result)&&((d=(g=t==null?void 0:t.data)==null?void 0:g.result)==null?void 0:d.length)>0}else a.ElMessage.error("获取模型菜单响应失败");e.data.code===200?e.data.result&&((S=e.data.result)==null?void 0:S.length)>0&&(p.setStructureData(e.data.result),p.setIsStructureExist(!0),D.value=((f=e==null?void 0:e.data)==null?void 0:f.result)&&((v=(m=e==null?void 0:e.data)==null?void 0:m.result)==null?void 0:v.length)>0):a.ElMessage.error("获取模型结构响应失败")}),{menuExist:x.value,structureExist:D.value}};exports.verifyStructureDataToStore=q;
|
|
@@ -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-BDdnhKwm.cjs"),o=require("./index-B3S02VaR.cjs"),n=require("./index.vue_vue_type_style_index_1_lang-CletbRcG.cjs"),c=require("./index-DuQHeRpA.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;
|
|
@@ -8668,7 +8668,7 @@ const Ue = {
|
|
|
8668
8668
|
window.localStorage.clear();
|
|
8669
8669
|
}
|
|
8670
8670
|
}, F1 = /* @__PURE__ */ new Map(), Oe = j.create({
|
|
8671
|
-
baseURL: "http://222.92.178.198:
|
|
8671
|
+
baseURL: "http://222.92.178.198:62009",
|
|
8672
8672
|
timeout: 5e4
|
|
8673
8673
|
//headers: { 'Content-Type': 'application/json' }, 这个会导致生成代码的上传文件 file为空
|
|
8674
8674
|
}), _2 = "access-token", Q2 = `x-${_2}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-DuQHeRpA.cjs"),f=require("./index.vue_vue_type_style_index_1_lang-CletbRcG.cjs"),C=require("./index-BDdnhKwm.cjs"),r=require("./index-CmSvv5sz.cjs"),g=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),v={class:"menu-content"},x=l.defineComponent({__name:"index",setup(q){const m=f.useMenuState(u.pinia),{menus:_}=u.storeToRefs(m),p=l.ref([]),c=async()=>{var i,t,n,a;const e=await u.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey")}});if(((i=e==null?void 0:e.data)==null?void 0:i.type)==="success"){let o=(n=(t=e==null?void 0:e.data)==null?void 0:t.result)==null?void 0:n.map(s=>s);return o=(a=u.cloneDeep(o))==null?void 0:a.map(s=>{var d;const b=Object.values((d=s==null?void 0:s.value)==null?void 0:d.tableData);return b.unshift({id:s==null?void 0:s.id}),b}),o}else return[]};l.onMounted(async()=>{var n;const e=await c(),t=[{key:"header",contents:[{label:"主菜单名称",formType:"Select",options:(n=u.cloneDeep(_.value))==null?void 0:n.map(a=>({label:a==null?void 0:a.title,value:a==null?void 0:a.title})),prop:"主菜单名称"},{label:"隐藏三维显示",formType:"Switch",value:!1,prop:"隐藏三维显示"},{label:"操作"}]},{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}];t.push({key:"tableContents",contents:e}),p.value=t});const y=e=>{(e==null?void 0:e.buttonName)==="新增"?r.addMenuContent(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="删除"?r.deleteMenuContent(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="编辑"&&r.fixMenuContent(e==null?void 0:e.singleContent)};return(e,i)=>(l.openBlock(),l.createElementBlock("div",v,[l.createVNode(C.ssTable,{itemData:p.value,class:"table-content",onChange:y},null,8,["itemData"])]))}}),h=g._export_sfc(x,[["__scopeId","data-v-26f5cadc"]]);exports.default=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const g=require("vue"),p=require("./index-
|
|
1
|
+
"use strict";const g=require("vue"),p=require("./index-DuQHeRpA.cjs"),w=require("./index.vue_vue_type_style_index_1_lang-CletbRcG.cjs"),D=p.useLoginState(p.pinia),{loginUserInfo:u,cryptoInfo:m}=p.storeToRefs(D),V=w.useMenuState(p.pinia),{activeMenuPath:y}=p.storeToRefs(V),E=g.ref(0),P=g.computed(()=>{var s,a,t,r,n,l,e,o,d,v,f;return[{label:"",name:"账号",prop:"账号",value:((s=u.value)==null?void 0:s.account)||(((a=u.value)==null?void 0:a.账号)??"未知")},{label:"",name:"角色名称",prop:"角色名称",value:((t=u.value)==null?void 0:t.layer)==="superAdmin"?"超级管理员":(r=u.value)==null?void 0:r.角色名称},{label:"",name:"部门名称",prop:"部门名称",value:((n=u.value)==null?void 0:n.部门名称)??"未知"},{label:"",name:"状态",prop:"状态",value:((l=u.value)==null?void 0:l.layer)==="superAdmin"?"启用":((e=u.value)==null?void 0:e.状态)??"未知"},{label:"",prop:"头像",isFormColHidden:!0,value:((o=u.value)==null?void 0:o.layer)==="superAdmin"?"启用":((d=u.value)==null?void 0:d.状态)??"未知"},{label:"",prop:"签名",isFormColHidden:!0,value:((v=u.value)==null?void 0:v.layer)==="superAdmin"?"启用":((f=u.value)==null?void 0:f.状态)??"未知"}]}),W=()=>{},U=g.ref(!1),h=g.reactive({dialogTitle:"电子签名",dialogWidth:"30",dialogShow:!1,url:""}),S=g.ref([{label:"签字版",icon:p.edit_pen_default,type:"button",disabled:!1},{label:"电子签名",icon:p.edit_default,type:"button",disabled:!1},{label:"上传手写签名",icon:p.upload_filled_default,type:"buttonUpload",disabled:!1}]),_=g.ref(!1),I=g.ref(!1),R=g.ref(!1),M=g.computed(()=>{var r,n,l;const s=sessionStorage.getItem("authority"),a=JSON.parse(s||""),t=(r=y.value)!=null&&r.startsWith("/")?(n=y.value)==null?void 0:n.substring(1):y.value;return Array.isArray(a)?(R.value=!(a!=null&&a.includes(`${t}/上传头像`)),(l=S.value)==null?void 0:l.map(e=>({...e,disabled:!(a!=null&&a.includes(`${t}/签名`))}))):typeof a=="string"&&(a==null?void 0:a.toUpperCase())==="SUPERADMIN"?S.value:[]}),O=g.computed(()=>[{key:"signConfig",contents:h},{key:"signTypeList",contents:M.value}]),$=s=>{h.dialogShow=s.label==="电子签名"},L=()=>{h.dialogShow=!1},N=async s=>{var t,r,n,l,e,o,d,v,f;const a=await p.getInsofDataApi({id:s});if(((t=a==null?void 0:a.data)==null?void 0:t.code)===200&&a.data.result&&Array.isArray(a.data.result)&&a.data.result.length>0){const b={...(l=(n=(r=a.data.result)==null?void 0:r[0])==null?void 0:n.value)==null?void 0:l.tableData,id:(o=(e=a.data.result)==null?void 0:e[0])==null?void 0:o.id,layer:(f=(v=(d=a.data.result)==null?void 0:d[0])==null?void 0:v.key)==null?void 0:f.layer};D.setLoginUserInfo(b)}},q=async(s,a)=>{var r,n,l;const t=p.cloneDeep(s);t==null||delete t.id;try{const e=await p.updateInsofDataApi({id:(r=u.value)==null?void 0:r.id,value:{tableData:t}});((n=e==null?void 0:e.data)==null?void 0:n.code)===200&&(L(),p.ElMessage.success("修改成功"),await N((l=u.value)==null?void 0:l.id),await D.setLogRecordAsync({type:a,data:s},y.value))}catch{p.ElMessage.error("修改响应失败")}finally{U.value=!1,_.value=!1,I.value=!1}},x=async(s,a)=>{var n;const t=s==="avatarUrl"?"头像":"签名",r={...u.value,status:((n=u.value)==null?void 0:n.status)??"启用",[t]:a};_.value=s==="avatarUrl",I.value=s==="signature",await q(r,"图片修改")},c=g.reactive({baseCols:[],otherCols:[]}),K=g.ref([]),k=g.ref(),B=(s,a,t)=>{var l,e,o,d,v,f;let r;const n=a;((e=(l=u.value)==null?void 0:l.layer)==null?void 0:e.toUpperCase())!=="SUPERADMIN"?r=(o=u.value)!=null&&o.password?w.decryptData((d=u.value)==null?void 0:d.password,(v=m==null?void 0:m.value)==null?void 0:v.privateKey):w.resetPassword:r=(f=u.value)==null?void 0:f.password,r===n?t():t(new Error("输入的密码与原密码不匹配,请重新输入"))},H=(s,a,t)=>{a?t():t(new Error("请输入密码"))},j=(s,a,t)=>{var r;a!==((r=k.value)==null?void 0:r.newtPass)?t(new Error("两次输入的密码不一致")):t()},J=async()=>{var a,t,r,n,l,e,o,d,v,f;const s=await p.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:"系统管理/用户管理"}});if(((a=s==null?void 0:s.data)==null?void 0:a.code)===200&&s.data.result&&((t=s.data.result)==null?void 0:t.length)>0){const b=(o=(e=(l=(n=(r=s.data.result)==null?void 0:r[0])==null?void 0:n.value)==null?void 0:l.pageData)==null?void 0:e.compData)==null?void 0:o.find(i=>(i==null?void 0:i.key)==="header"),C=(d=P.value)==null?void 0:d.map(i=>i==null?void 0:i.prop);c.baseCols=b&&((v=b.contents)==null?void 0:v.map(i=>({...i,isFormColHidden:(C==null?void 0:C.includes(i==null?void 0:i.prop))||(i==null?void 0:i.label)==="操作"})));const A=(f=b.contents)==null?void 0:f.find(i=>(i==null?void 0:i.prop)==="password"),F=[{...A,label:"当前密码",prop:"currentPass",validator:B},{...A,label:"新密码",prop:"newtPass",validator:H},{...A,label:"确认密码",prop:"confirmNewPass",validator:j}];c.otherCols=F,Q(u.value)}},z=s=>{k.value=s},G=async({content:s,buttonName:a})=>{var r,n,l,e,o;let t;a==="确定"&&(t={...u.value,status:((r=u.value)==null?void 0:r.status)??"启用",password:((l=(n=u.value)==null?void 0:n.layer)==null?void 0:l.toUpperCase())==="SUPERADMIN"?s==null?void 0:s.confirmNewPass:w.encryptData(s==null?void 0:s.confirmNewPass,(e=m.value)==null?void 0:e.publicKey)}),a==="保存基本信息"&&(t={...u.value,...s,status:((o=u.value)==null?void 0:o.status)??"启用"}),U.value=!0,await q(t,a)},T=()=>{var r,n;const s={base:[{label:"保存基本信息"}],other:[{label:"重置",background:"#b7b8b8"},{label:"确定"}]},a=sessionStorage.getItem("authority"),t=JSON.parse(a||"");if(Array.isArray(t)){const l=(r=y.value)!=null&&r.startsWith("/")?(n=y.value)==null?void 0:n.substring(1):y.value,e=t!=null&&t.includes(`${l}/基本信息`)?s==null?void 0:s.base:[],o=t!=null&&t.includes(`${l}/修改密码`)?s==null?void 0:s.other:[];return{base:e,other:o}}else return typeof t=="string"&&(t==null?void 0:t.toUpperCase())==="SUPERADMIN"?s:null},Q=s=>{var a,t,r,n,l;K.value=[{value:"基础信息",label:"基础信息",children:[{type:"form",content:{rowContents:(a=c.baseCols)==null?void 0:a.map(e=>({...e,width:2,type:e==null?void 0:e.formType,name:e==null?void 0:e.prop,prop:e==null?void 0:e.prop,contents:e==null?void 0:e.options,value:s[e==null?void 0:e.prop]})),formRules:{userName:[{required:!0,message:"输入不能为空",trigger:"blur"}],birthDay:[{required:!0,message:"输入不能为空",trigger:"blur"}],phone:[{required:!0,message:"输入不能为空",trigger:"blur"}]},buttonValue:(t=T())==null?void 0:t.base,isEnableWrap:!1,isButtonRow:!1},value:""}]},{value:"修改密码",label:"修改密码",children:[{type:"form",content:{rowContents:(r=c.otherCols)==null?void 0:r.map(e=>({...e,width:1,type:e==null?void 0:e.formType,name:e==null?void 0:e.prop,contents:e==null?void 0:e.options})),formRules:(n=c.otherCols)==null?void 0:n.reduce((e,o)=>(e[o.prop]=[{required:!0,message:"输入有误",trigger:"change"},{validator:(d,v,f)=>o.validator(d,v,f),trigger:"blur"}],e),{}),buttonValue:(l=T())==null?void 0:l.other,isEnableWrap:!1},value:""}]}]},X=Object.freeze(Object.defineProperty({__proto__:null,avatarLoading:_,beforeSignDestroy:L,changeFormTrigger:z,clickFormButton:W,clickSignButton:$,clickTabButton:G,getUserTableHeadersAsync:J,itemData:O,loading:U,refreshLoginUserInfoAsync:N,rowContents:P,signPadInfo:h,signTypes:M,signatureLoading:I,submitImageAsync:x,tabKey:E,tabsContents:K,tempSignTypes:S,uploadDisabled:R},Symbol.toStringTag,{value:"Module"}));exports.State=X;exports.tabKey=E;
|