ss-component-new 1.2.4 → 1.2.6
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-CfT99nMO.cjs → animationData-B0K2ghu6.cjs} +1 -1
- package/dist/{animationData-9n1X4UvO.js → animationData-GqECkAbz.js} +4 -4
- package/dist/{array-pg68Qbs1.js → array-D65aMM6H.js} +1 -1
- package/dist/{array-BPHS7JFA.cjs → array-DMPAgNcb.cjs} +1 -1
- package/dist/config.js +1 -1
- package/dist/{index-bj8hK6Pe.js → index--rLSLEk3.js} +2 -2
- package/dist/{index-B8J_v2Ky.cjs → index-67QO-qDa.cjs} +1 -1
- package/dist/{index-DOlPMLvf.cjs → index-87kRWJv8.cjs} +1 -1
- package/dist/{index-CdPbJekh.js → index-8Dyi4QCI.js} +185 -186
- package/dist/{index-CK_O7QdV.cjs → index-8yRiF_z8.cjs} +1 -1
- package/dist/{index-B5srJr0o.js → index-9zEdW6xv.js} +2 -2
- package/dist/{index-CAHYTZ1Q.cjs → index-B14iwpkN.cjs} +1 -1
- package/dist/{index-DJ1PTHpx.cjs → index-B7hLDNQ6.cjs} +1 -1
- package/dist/{index-DBScQH7L.js → index-BEoEUXZe.js} +166 -166
- package/dist/{index-BOVdAFDH.cjs → index-BHJ-tVLT.cjs} +1 -1
- package/dist/{index-Dk8D9SRm.js → index-BMMYAqF1.js} +1 -1
- package/dist/{index-DFg-bhPI.js → index-BNOx3XL5.js} +1 -1
- package/dist/{index-CMlYJD5U.cjs → index-BNvpuVyw.cjs} +1 -1
- package/dist/{index-d6tSWKtY.cjs → index-BOJUyAaV.cjs} +2 -2
- package/dist/{index-B5vIeQUq.cjs → index-BYUPvuvs.cjs} +1 -1
- package/dist/{index-LXb5DfDE.cjs → index-BaRkv5oc.cjs} +1 -1
- package/dist/{index-Bx4qIiIa.cjs → index-BpR7F1Fp.cjs} +1 -1
- package/dist/{index-BjXcyVvp.js → index-Bs2K1FVH.js} +2 -2
- package/dist/{index-Bsdjuxq1.cjs → index-BsM9qdbC.cjs} +1 -1
- package/dist/{index-CyP2hcVu.js → index-BsfJJu0R.js} +6 -6
- package/dist/{index-BAj0dyBF.js → index-Bw_JtuzR.js} +3 -3
- package/dist/{index-BuKHInQb.js → index-C1FOuBuy.js} +1 -1
- package/dist/{index-NFCeQcv4.cjs → index-C5CKSB0e.cjs} +1 -1
- package/dist/{index-CCsSOTaB.js → index-C8UOMPgt.js} +2 -2
- package/dist/{index-CCIJ-P3X.cjs → index-CA-FC_OL.cjs} +1 -1
- package/dist/{index-CDXq3gs4.js → index-CArSUfnV.js} +19 -19
- package/dist/{index-8CcD03tl.js → index-CBuqdsPh.js} +6 -6
- package/dist/{index---6UATT0.js → index-CMCrQ36H.js} +3 -3
- package/dist/{index-CpE8hbs0.js → index-CRj9VM12.js} +6 -6
- package/dist/{index-C1lB8apW.js → index-CRrAiL5l.js} +4 -4
- package/dist/{index-BNNxPuEV.js → index-CShBWCYm.js} +1 -1
- package/dist/{index-FxX6NP0J.js → index-CTkF2kl_.js} +1 -1
- package/dist/{index-DCf7Tz40.cjs → index-CZaBF851.cjs} +1 -1
- package/dist/{index-Y7MUJdPv.js → index-CbA74tCL.js} +2 -2
- package/dist/{index-B5gNufYw.js → index-CbDu4gfZ.js} +2 -2
- package/dist/{index-zQVJFawn.cjs → index-CePZE-QA.cjs} +1 -1
- package/dist/{index-Bi7yv8jC.cjs → index-CedgKpsz.cjs} +1 -1
- package/dist/{index-C0HHmjrg.cjs → index-Cm3z0Vmi.cjs} +1 -1
- package/dist/{index-BEJOd_29.js → index-D-WcrLQv.js} +4 -4
- package/dist/{index-D-r_YKrq.cjs → index-D6mwkqWY.cjs} +2 -2
- package/dist/index-D8510-YQ.cjs +1 -0
- package/dist/{index-DPyzaxnq.cjs → index-D9oqICYV.cjs} +1 -1
- package/dist/{index-DSsZtYMz.js → index-DGepdvRW.js} +2 -2
- package/dist/{index-D0_4keB8.js → index-DGi-ANHr.js} +5 -5
- package/dist/{index-CLtFz5gE.js → index-DJGsDpDp.js} +3 -3
- package/dist/{index-B9nZeing.cjs → index-DPBmAgEA.cjs} +1 -1
- package/dist/{index-xHEf6hcO.js → index-DPWc4No_.js} +2 -2
- package/dist/{index-BrsIZVyD.cjs → index-DSchKIyh.cjs} +1 -1
- package/dist/{index-UN4JU0ly.js → index-DV_ZZQBO.js} +2 -2
- package/dist/{index-1DtctdYW.cjs → index-DVmoPvzr.cjs} +1 -1
- package/dist/{index-BKhDFqMM.cjs → index-DWs7-g1h.cjs} +1 -1
- package/dist/{index-DszzdQnM.cjs → index-DZ8a7BZ1.cjs} +1 -1
- package/dist/{index-nUEWiqy9.cjs → index-DcUUpSE1.cjs} +1 -1
- package/dist/{index-DsHRVZ0E.js → index-DvpVQvAe.js} +2 -2
- package/dist/{index-DPaTtF3h.cjs → index-FK1YYpjN.cjs} +1 -1
- package/dist/{index-DEwcUkb-.js → index-HvKjB6_P.js} +3 -3
- package/dist/{index-PIEkAjRf.js → index-LADv0t0E.js} +11 -11
- package/dist/{index-DS5z17Mc.js → index-_66uQhcl.js} +7 -7
- package/dist/{index-CxNBcsll.cjs → index-_uyv24Pt.cjs} +1 -1
- package/dist/{index-pLeOyTaj.js → index-g4qw0jRy.js} +6 -6
- package/dist/{index-C-AOuDkl.cjs → index-mtuIEfrj.cjs} +1 -1
- package/dist/{index-CmlXlH2b.cjs → index-tttYIzsn.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cmc1oALS.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BSOYWm_U.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BTu7I4mn.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DIMJusrg.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-C795GAHK.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-D2VLEzGB.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-Bg_c-oAL.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-D58IzjOR.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-Bn5qXF4J.cjs → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BnNwKutS.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-9kDr7Iek.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CJCvJvBM.js} +13 -13
- package/dist/{index.vue_vue_type_style_index_1_lang-Exyt6qTf.js → index.vue_vue_type_style_index_1_lang-D5Hjs-g0.js} +31 -25
- package/dist/{index.vue_vue_type_style_index_1_lang-Bn7P4fYM.cjs → index.vue_vue_type_style_index_1_lang-H_pReDxj.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-zN5mc8b0.cjs → index.vue_vue_type_style_index_1_lang-N-_9ZJEf.cjs} +2 -2
- package/dist/{index.vue_vue_type_style_index_1_lang-D1n_3_F6.js → index.vue_vue_type_style_index_1_lang-hBa3nAgx.js} +3 -3
- package/dist/{isString-BAN9KLwf.js → isString--ZVOCy4V.js} +1 -1
- package/dist/{isString-ChvWbctO.cjs → isString-CELwppr9.cjs} +1 -1
- package/dist/{main-BUEuCNq-.cjs → main-C6Iw-pcH.cjs} +1 -1
- package/dist/{main-Dk3BZDsa.js → main-CygliYyN.js} +5 -5
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeLatheView-DfSxRY8B.cjs → threeLatheView-CdUoB0Te.cjs} +1 -1
- package/dist/{threeLatheView-DcuDjVv0.js → threeLatheView-DzpPpdDr.js} +2 -2
- package/dist/{threeModel-DjjtL0-a.cjs → threeModel-BUCLJlE5.cjs} +1 -1
- package/dist/{threeModel-YRFvkgXU.js → threeModel-BfMMeZCc.js} +3 -3
- package/dist/{threePreview-CyYfnbB6.js → threePreview-BEqzg370.js} +1 -1
- package/dist/{threePreview-ByUYJkts.cjs → threePreview-C-JW_pcY.cjs} +1 -1
- package/dist/threeSceneView-BTsG2QJg.cjs +5 -0
- package/dist/threeSceneView-DV5dsTZZ.js +1471 -0
- package/dist/{threeSceneViewForCPMPIP-axjwKt9X.js → threeSceneViewForCPMPIP-Bexwqkry.js} +7 -7
- package/dist/{threeSceneViewForCPMPIP-DA-twBdG.cjs → threeSceneViewForCPMPIP-DwLWGNUd.cjs} +1 -1
- package/dist/{threeViewerHost-B02OtfCk.cjs → threeViewerHost-CRqcYbJE.cjs} +1 -1
- package/dist/{threeViewerHost-D7L1FW__.js → threeViewerHost-CTjd2V1D.js} +4 -4
- package/dist/{useRayCaster-CAqupK7D.js → useRayCaster-D0_7oJan.js} +1 -1
- package/dist/{useRayCaster-ClcofJkf.cjs → useRayCaster-DN56HpNP.cjs} +1 -1
- package/package.json +1 -1
- package/public/config.js +1 -1
- package/dist/index-5hLZZ6t-.cjs +0 -1
- package/dist/threeSceneView-mhrcH0WG.cjs +0 -5
- package/dist/threeSceneView-zvyCHrp1.js +0 -1469
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),k=require("./index-d6tSWKtY.cjs"),zl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cmc1oALS.cjs"),Je=require("./index-D-r_YKrq.cjs"),bl=require("./threeViewerHost-B02OtfCk.cjs"),re=require("./index.vue_vue_type_style_index_1_lang-zN5mc8b0.cjs"),Ye=require("./index.vue_vue_type_style_index_1_lang-Bn7P4fYM.cjs"),Ol=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");require("./three-viewport-gizmo-BV37JzRa.cjs");const Ul=require("./index-CK_O7QdV.cjs");require("./index-DJ1PTHpx.cjs");const ca=require("./isString-ChvWbctO.cjs"),ql=M=>M.match(/\((.*)\)/)[1],fr={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(M){const Z=M,Q=a.ref(null),L=a.ref(!1),w=a.ref(null);return a.watch(()=>Z==null?void 0:Z.isVisible,()=>{L.value=Z==null?void 0:Z.isVisible},{deep:!0,immediate:!0}),a.watch(()=>w.value,()=>{a.nextTick(()=>{var c,le;(le=(c=Q.value)==null?void 0:c.updatePopper)==null||le.call(c)})},{deep:!0,immediate:!0}),(c,le)=>{const fe=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(fe,{visible:L.value,title:Z==null?void 0:Z.title,placement:Z==null?void 0:Z.placement,width:Z==null?void 0:Z.width,ref_key:"popOverRef",ref:Q},{reference:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"reference",{ref_key:"referenceRef",ref:w})])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},gr={class:"extra-button-content"},hr={class:"table-operator-wrap"},yr={class:"extra-button-filter"},vr={class:"form-content-value"},br={key:0,class:"extra-header"},mr={class:"drop-menu",style:{width:"120px"}},kr={key:0},Sr={key:1},Dr={__name:"header",props:{lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(M,{emit:Z}){const Q=Z,L=M,w=a.ref(""),c=a.ref(!1),le=a.ref([]),fe=a.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Ee=$=>{const K=$.raw;if(!K)return;const ve=new FileReader;ve.onload=ae=>{try{const be=new Uint8Array(ae.target.result),xe=Ye.readSync(be,{type:"array"}),Ze=xe.SheetNames[0],Ne=xe.Sheets[Ze],q=Ye.utils.decode_range(Ne["!ref"]).e.c+1,ge=new Array(q).fill(""),pe=[];for(const Se in Ne){if(Se[0]==="!")continue;const{r:Pe,c:Ie}=Ye.utils.decode_cell(Se);let ue=Ne[Se].v;if(Ne[Se].t==="n"&&ue>0&&ue<1e6&&(ue=new Date((ue-25569)*86400*1e3).toISOString().split("T")[0]),(ue==null||ue==="")&&(ue=""),Pe===0)ge[Ie]=ue;else{if(!pe[Pe-1]){pe[Pe-1]={};for(let se=0;se<q;se++)pe[Pe-1][`col_${se}`]=""}pe[Pe-1][`col_${Ie}`]=ue}}for(let Se=0;Se<q;Se++)ge[Se]===void 0&&(ge[Se]="");const ne=pe==null?void 0:pe[0];if(!(ne!=null&&ne.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");Q("getImportData",ge,pe)}catch(be){throw k.ElMessage.error(be.message),new Error(be.message)}},ve.readAsArrayBuffer(K)},W=$=>{var ve;const K=(ve=le.value)==null?void 0:ve.reduce((ae,be,xe)=>(xe===0?ae[be.label]=$:ae[be.label]=be==null?void 0:be.value,ae),{});Q("filter",K,$,!0)},Ae=$=>{Q("buttonClick",$)},ze=$=>{var K,ve;le.value=(ve=(K=re.getColumnChild(k.cloneDeep($)))==null?void 0:K.filter(ae=>(ae==null?void 0:ae.label)!==""&&(ae==null?void 0:ae.label)!=="操作"))==null?void 0:ve.map(ae=>({label:(ae==null?void 0:ae.label)??"",value:"",name:(ae==null?void 0:ae.label)??"",isFormColHidden:ae==null?void 0:ae.isTableColHidden,width:2}))},ke=a.ref(!1),qe=$=>{var K;if(($==null?void 0:$.buttonName)==="确认"&&(Q("filter",$==null?void 0:$.content),ke.value=($==null?void 0:$.content)&&Object.values($==null?void 0:$.content).length>0),($==null?void 0:$.buttonName)==="清空"){const ve=k.cloneDeep($==null?void 0:$.content);for(const ae in ve)ve[ae]="";le.value=(K=le.value)==null?void 0:K.map(ae=>({...ae,value:""})),Q("filter",ve),ke.value=!1}c.value=!1},me=()=>{var K,ve;le.value=(K=le.value)==null?void 0:K.map(ae=>({...ae,value:""}));const $=(ve=le.value)==null?void 0:ve.reduce((ae,be)=>(ae[be.label]=be.value,ae),{});Q("filter",$)};return a.onMounted(()=>{ze(L.columns)}),a.watch(()=>L.columns,()=>{ze(L.columns)},{deep:!0,immediate:!0}),($,K)=>{var Ne,Ue;const ve=a.resolveComponent("el-icon"),ae=a.resolveComponent("svg-icon"),be=a.resolveComponent("el-input"),xe=a.resolveComponent("el-button"),Ze=a.resolveComponent("el-upload");return a.openBlock(),a.createElementBlock("div",gr,[a.createElementVNode("div",{class:a.normalizeClass(M.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(L==null?void 0:L.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:(L==null?void 0:L.level)>1?"0px":"8px",fontWeight:600-((L==null?void 0:L.level)-1)*100>=400?600-((L==null?void 0:L.level)-1)*100:400,fontSize:17-(L==null?void 0:L.level)>=14?17-(L==null?void 0:L.level)+"px":"14px"})},a.toDisplayString(M.compName),7),a.createElementVNode("div",hr,[a.createElementVNode("div",yr,[a.createVNode(fr,{title:"",width:800,placement:"bottom-start",isVisible:c.value},{reference:a.withCtx(()=>{var q,ge,pe,ne;return[a.createVNode(be,{modelValue:w.value,"onUpdate:modelValue":K[1]||(K[1]=Se=>w.value=Se),style:{"min-width":"80px"},placeholder:ke.value?(pe=(ge=(q=M.filterValues)==null?void 0:q.filter(Se=>Se))==null?void 0:ge.slice(0,3))==null?void 0:pe.join("/"):"搜索","prefix-icon":a.unref(k.search_default),clearable:"",onInput:W,disabled:((ne=le.value)==null?void 0:ne.length)===0},{suffix:a.withCtx(()=>{var Se,Pe;return[!w.value&&((Pe=(Se=M.filterValues)==null?void 0:Se.filter(Ie=>Ie))!=null&&Pe.join("/"))?(a.openBlock(),a.createBlock(ve,{key:0,style:{cursor:"pointer"},onClick:me},{default:a.withCtx(()=>[a.createVNode(a.unref(k.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:K[0]||(K[0]=Se=>c.value=!c.value)},[a.createVNode(ae,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",vr,[(a.openBlock(),a.createBlock(Je.ssForm,{rowContents:le.value,buttonValue:fe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:fe.value,isStartJustify:!1,onOnButtonClick:qe},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),M.buttons&&((Ne=M.buttons)==null?void 0:Ne.length)>0?(a.openBlock(),a.createElementBlock("div",br,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ue=M.buttons)==null?void 0:Ue.filter(q=>M.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,ge)=>(a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:ge},[(q==null?void 0:q.type)==="upload"?(a.openBlock(),a.createBlock(Ze,{key:0,class:"upload-button-wrap","on-change":Ee,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!M.lockingPage},{default:a.withCtx(()=>[a.createVNode(xe,{disabled:!!M.lockingPage,style:a.normalizeStyle({background:(q==null?void 0:q.background)??"var(--ssbutton-theme-bg)",color:(q==null?void 0:q.color)??"var(--ssbutton-theme-color)"})},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(q==null?void 0:q.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(Je._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(xe,{key:0,disabled:!!M.lockingPage,style:a.normalizeStyle({background:(q==null?void 0:q.background)??"var(--ssbutton-theme-bg)",color:(q==null?void 0:q.color)??"var(--ssbutton-theme-color)"})},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(q==null?void 0:q.label),1)]),_:2},1032,["disabled","style"])):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",mr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(q==null?void 0:q.contents,pe=>(a.openBlock(),a.createBlock(xe,{key:pe==null?void 0:pe.label,disabled:!!M.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:ne=>Ae(pe==null?void 0:pe.label)},{default:a.withCtx(()=>{var ne,Se;return[a.createTextVNode(a.toDisplayString(pe==null?void 0:pe.label),1),(ne=pe==null?void 0:pe.label)!=null&&ne.includes("选中")?(a.openBlock(),a.createElementBlock("span",kr,"("+a.toDisplayString(M.selectNums)+")",1)):a.createCommentVNode("",!0),(Se=pe==null?void 0:pe.label)!=null&&Se.includes("全部")?(a.openBlock(),a.createElementBlock("span",Sr,"("+a.toDisplayString(M.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),q!=null&&q.type?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(xe,{key:2,id:"themeButton",disabled:!!M.lockingPage,style:a.normalizeStyle({background:(q==null?void 0:q.background)??"var(--ssbutton-theme-bg)",color:(q==null?void 0:q.color)??"var(--ssbutton-theme-color)"}),onClick:pe=>Ae(q==null?void 0:q.label)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(q==null?void 0:q.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):a.createCommentVNode("",!0)])])}}},Tr=Ol._export_sfc(Dr,[["__scopeId","data-v-0f9ba5cc"]]),Cr=a.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(M,{emit:Z}){const Q=M,L=Z,w=le=>{L("buttonClick",le)},c=le=>{var fe;return le!=null&&le.includes("删除")?((fe=Q.selectTableItems)==null?void 0:fe.length)>0?"warning-active-type":"warning-type":"default-type"};return(le,fe)=>{const Ee=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(M.buttons,W=>(a.openBlock(),a.createBlock(Ee,{key:W==null?void 0:W.label,disabled:!!M.lockingPage,class:a.normalizeClass(c(W==null?void 0:W.label)),onClick:Ae=>w(W==null?void 0:W.label)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(W==null?void 0:W.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Er=Ol._export_sfc(Cr,[["__scopeId","data-v-70b12973"]]),da=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(M){this.selectArray=M},setSelectString(M){this.selectString=M}}}),xr={class:"calculator-content"},Ar={class:"calculator-child"},_r={class:"calculator-child"},Br=a.defineComponent({__name:"calculator",setup(M){const Z=a.ref(),Q=a.ref();return a.onMounted(()=>{Z.value=[{type:"Upload",label:"输入",name:"input"}],Q.value=[{type:"Upload",label:"输出",name:"output"}]}),(L,w)=>(a.openBlock(),a.createElementBlock("div",xr,[a.createElementVNode("div",Ar,[a.createVNode(Je.ssForm,{rowContents:Z.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",_r,[a.createVNode(Je.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Nr=Ol._export_sfc(Br,[["__scopeId","data-v-73db0fe7"]]),pa=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(M){this.selectIndex=M},setSelectMenu(M){this.selectMenu=M},setSelectTitle(M){this.selectTitle=M}}}),Jl=(M,Z)=>{let Q=M,L=Z;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((w,c)=>{if(Array.isArray(w)){let le={};return w=w==null?void 0:w.forEach((fe,Ee)=>{var W;(W=L==null?void 0:L[Ee])!=null&&W.prop?le[L[Ee].prop]=fe:Array.isArray(fe)&&(le.children=Jl(fe,L))}),Object.assign(le,{id:c})}else return w})),Q},fa=(M,Z,Q)=>{let L=M,w=Z;return L=L==null?void 0:L.map((c,le)=>{var fe,Ee;return!Array.isArray(c)||!((fe=w==null?void 0:w[le])!=null&&fe.label)&&!Q||(c.unshift(((Ee=w==null?void 0:w[le])==null?void 0:Ee.label)??""),c.some(W=>Array.isArray(W))&&(c=c==null?void 0:c.map(W=>{var Ae;return Array.isArray(W)&&(W=fa(W,(Ae=w==null?void 0:w[le])==null?void 0:Ae.children,Q)),W}))),c}),L},Ur=(M,Z,Q)=>{if(Z==="")return M==null?void 0:M.filter(L=>(L==null?void 0:L.id)!==Q);{const L=Z.split("-");return Or(M,L,Q)}},Or=(M,Z,Q)=>{let L=M,w=Z;return(w==null?void 0:w.length)===0?L=L==null?void 0:L.filter(c=>c.id!==Q):L=L==null?void 0:L.map(c=>(c.id.toString()===(w==null?void 0:w[0])&&(w==null||w.shift(),c=ga(c,w,Q)),c)),L},ga=(M,Z,Q)=>{var c,le;let L=M,w=Z;return(w==null?void 0:w.length)===0?L.children=(c=L.children)==null?void 0:c.filter(fe=>fe.id!==Q):L.children=(le=L.children)==null?void 0:le.map(fe=>(fe.id.toString()===(w==null?void 0:w[0])&&(w==null||w.shift(),fe=ga(fe,w,Q)),fe)),L},wr=(M,Z,Q)=>{if(Z==="")return Q;{const L=Z.split("-");return Lr(M,L,Q)}},Lr=(M,Z,Q)=>{let L=M,w=Z;return(w==null?void 0:w.length)===0?L=Q:L=L==null?void 0:L.map(c=>(c.id.toString()===(w==null?void 0:w[0])&&(w==null||w.shift(),c=ha(c,w,Q)),c)),L},ha=(M,Z,Q)=>{var c;let L=M,w=Z;return(w==null?void 0:w.length)===0?L.children=Q:L.children=(c=L.children)==null?void 0:c.map(le=>(le.id.toString()===(w==null?void 0:w[0])&&(w==null||w.shift(),le=ha(le,w,Q)),le)),L},ya=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(M){this.objUrl=M},setBlobUrls(M){this.blobUrls=M}}}),Rl=async M=>{var c,le,fe,Ee,W,Ae,ze;let Z=(le=(c=k.cloneDeep(M))==null?void 0:c.optionUrl)==null?void 0:le.menuSelect,Q=[];Z==null||Z.forEach(ke=>{});let L="";const w=await re.menuToParent(Z);if(w==null||w.forEach(ke=>{var qe,me,$,K;(ke==null?void 0:ke.name)===(((K=($=(me=(qe=k.cloneDeep(M))==null?void 0:qe.optionUrl)==null?void 0:me.groupSelect)==null?void 0:$[0])==null?void 0:K.replaceAll("'",""))??"")&&(L=ke==null?void 0:ke.id)}),L!==""){const ke=(fe=w==null?void 0:w.find($=>{var K,ve,ae,be;return($==null?void 0:$.name)===(((ve=(K=M==null?void 0:M.groupSelect)==null?void 0:K.split(":"))==null?void 0:ve[0])||((be=(ae=M==null?void 0:M.optionUrl)==null?void 0:ae.groupSelect)==null?void 0:be[0]))}))==null?void 0:fe.compData;let qe=(W=(Ee=ke==null?void 0:ke.find($=>($==null?void 0:$.key)==="header"))==null?void 0:Ee.contents)==null?void 0:W.map($=>$==null?void 0:$.label),me=(ze=(Ae=ke==null?void 0:ke.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:Ae.contents)==null?void 0:ze.map($=>($=$==null?void 0:$.filter(K=>!(K!=null&&K.id)),$));me==null||me.forEach($=>{Q.push(re.getValueToObjectValue($,qe))})}return Q},jr={class:"table-content"},Mr={class:"menu-config-wrap"},Pr=["onClick"],Kr={key:0,class:"viewport-wrap"},$r=["onClick"],Fr={title:"选择显示列信息"},Vr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},zr=["title"],qr={class:"col-operate-wrap"},Jr={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Rr={class:"pop-view"},Wr={class:"pop-wrapper"},Gr={class:"file-list-pop"},Hr=["title","onClick"],Qr=["onClick"],Xr=["onClick"],Yr={class:"form-content"},Zr={key:0,class:"dialog-footer"},Ir={class:"dialog-footer"},en={__name:"index",props:{level:{type:Number,default:1},compName:{type:String,default:"",required:!1},operatingForm:{type:Object,default:()=>{}},cacheNewData:{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(M,{emit:Z}){const Q=a.ref([]),L=ya(k.pinia),w=a.ref(null),c=M,le=a.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),fe=re.useOriginalState(k.pinia),{originalPath:Ee}=k.storeToRefs(fe),W=Ee.value,Ae=a.ref(!1),ze=a.ref(!1),ke=a.ref(!1),qe=a.reactive({column:{},status:!1,text:"合计"}),me=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),$=Z,K=a.ref([]),ve=a.reactive({prop:"",order:null}),ae=a.ref([]),be=a.ref(!1),xe=a.ref(!1),Ze=a.ref(null);bl.useThreeSystem();const Ne=a.ref([]),Ue=a.ref(!1),q=a.ref(),ge=re.useMenuState(),{importLoading:pe,activeMenuPath:ne,contentLoading:Se,linkMenuInfo:Pe}=k.storeToRefs(ge),Ie=re.useTableComp(k.pinia),ue=re.useModelComp(k.pinia),{extraContents:se,cacheUpdatingData:nl,tableViewContents:ol,tableLoading:an,pageMapState:Re,lockingPage:ml}=k.storeToRefs(ue),Y=a.ref([]),kl=a.ref([]),Sl=a.ref(new Map);a.ref(!1);const Ke=a.ref("");a.ref();const wl=a.ref(!0),el=a.ref(0),Wl=a.ref(!0),Oe=a.ref(""),$e=a.ref(!1),va=a.ref({label:"查看三维模型"}),Dl=a.ref(!1),Ll=a.ref(),_e=a.ref([]),We=a.ref([]),Tl=a.ref(!1),tl=a.ref([]),ll=a.ref([]),Ge=a.ref([]),Fe=a.ref([]),we=a.ref(),Te=a.ref(),ba=da(k.pinia),Cl=a.ref(),jl=a.ref(0),El=pa(k.pinia),{selectIndex:ma,selectMenu:Ve,selectTitle:Ml}=k.storeToRefs(El),{selectString:He}=k.storeToRefs(ba),ka=k.useLoginState(k.pinia),{loginUserInfo:ie}=k.storeToRefs(ka),Sa=a.ref(720),Qe=a.ref(!1),xl=a.ref(!1),Le=a.ref([]),Xe=a.ref(),sl=a.ref(!0),Gl=a.ref(!0),Al=a.ref([]),Da=a.inject("contentRef");a.provide("contentRef",Da),a.watch(()=>{var e;return(e=Y.value)==null?void 0:e.length},e=>{me.total=e}),a.watch(()=>ol.value,async()=>{var s,d,u,f,m,t,C,b,T,B,U,S,V,A,O,D,g,h;if(((s=ol.value)==null?void 0:s.length)===0||!((d=c==null?void 0:c.itemData)!=null&&d.find(i=>(i==null?void 0:i.key)==="columnPath"))||!((u=c==null?void 0:c.itemData)!=null&&u.find(i=>(i==null?void 0:i.key)==="pageColumn")))return;let e=(T=(b=(C=(t=(m=(f=c==null?void 0:c.itemData)==null?void 0:f.find(i=>(i==null?void 0:i.key)==="pageColumn"))==null?void 0:m.contents)==null?void 0:t.split("["))==null?void 0:C[1])==null?void 0:b.split("]"))==null?void 0:T[0],l=((V=(S=(U=(B=c==null?void 0:c.itemData)==null?void 0:B.find(i=>(i==null?void 0:i.key)==="pageColumn"))==null?void 0:U.contents)==null?void 0:S.split("["))==null?void 0:V[0])+((O=(A=ol.value)==null?void 0:A.find(i=>(i==null?void 0:i.key)===e))==null?void 0:O.value),n=((g=(D=c==null?void 0:c.itemData)==null?void 0:D.find(i=>(i==null?void 0:i.key)==="pageGroup"))==null?void 0:g.contents)??"",r=await re.getItemData(l,sessionStorage.getItem("systemKey"),""),o=(h=r==null?void 0:r.find(i=>(i==null?void 0:i.name)===(n===""?c==null?void 0:c.compName:n)))==null?void 0:h.compData;ia(o,c.allMapContents)},{deep:!0});const Ta=async(e,l)=>{var n,r,o,s,d;try{const u=await k.getInsofDataApi({id:(c==null?void 0:c.parentTableId)||(c==null?void 0:c.index)});let f;((n=u==null?void 0:u.data)==null?void 0:n.code)===200&&(f=((o=(r=u==null?void 0:u.data)==null?void 0:r.result)==null?void 0:o[0])||null);const m={type:"data",pageKey:c!=null&&c.parentTableId?(s=f==null?void 0:f.key)==null?void 0:s.pageKey:ne.value,tableId:(c==null?void 0:c.parentTableId)||(c==null?void 0:c.index),systemKey:sessionStorage.getItem("systemKey")},t=l==null?void 0:l.map(T=>{const B=Object.keys(T),U={};return B.forEach((S,V)=>{U[e[V]]=T[S]}),U}),C=t==null?void 0:t.map(T=>({key:m,value:{tableData:T}})),b=await k.batchAddInsofDataApi({dataList:C});((d=b==null?void 0:b.data)==null?void 0:d.code)===200?(ue.setRefreshCurStructure(!0),k.ElMessage.success("导入数据成功")):k.ElMessage.error("导入数据响应失败")}catch(u){throw k.ElMessage.error("导入数据处理失败"),new Error(u)}},Ca=async e=>{var l,n;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await k.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),o=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let s=URL.createObjectURL(o);q.value=[{name:(n=e==null?void 0:e.split("/"))==null?void 0:n[((l=e==null?void 0:e.split("/"))==null?void 0:l.length)-1],blobUrl:s}],Ue.value=!0}};a.onBeforeUnmount(()=>{Gl.value=!1;let e=jl.value;jl.value=e+1});const Hl=a.computed(()=>{var r,o;const e=(me.currentPage-1)*me.pageSize,l=e+me.pageSize,n=(r=K.value)==null?void 0:r.find(s=>{var d;return(s==null?void 0:s.sortable)&&((d=s==null?void 0:s.label)==null?void 0:d.includes("时间"))});return n&&(ve.order="descending",ve.prop=n==null?void 0:n.prop),(o=Y.value)==null?void 0:o.slice(e,l)}),Ea=e=>{me.currentPage=e},xa=e=>{var l;me.pageSize=e,e*me.currentPage>((l=Y.value)==null?void 0:l.length)&&(me.currentPage=1,k.ElMessage.warning("分页无效,返回第一页"))},Aa=(e,l)=>{var d,u;const n=(u=(d=K.value)==null?void 0:d.map(f=>f==null?void 0:f.prop))==null?void 0:u.filter(f=>f!=="operate");let r;const o=(e==null?void 0:e.length)===(n==null?void 0:n.length);if(e!=null&&e.includes("序号"))return k.ElMessage.error("导入的数据不需要包含序号列");if(r=o?e:e.slice(0,n==null?void 0:n.length),!(r==null?void 0:r.every(f=>n==null?void 0:n.find(m=>f===m))))return k.ElMessage.error("导入的数据表头不匹配");Ta(r,l)},_a=(e,l)=>{var n;ue.setRefreshCurStructure(!1),((n=K.value)==null?void 0:n.length)===0||Aa(e,l)},Ba=(e,l,n,r)=>{const o=[],s=[],d=m=>Object.keys(m).length;for(const m in e)if(e[m]!==void 0){const t=e[m],C=[];for(const[b,T]of Object.entries(t))C.push(T),s.length<d(t)&&s.push(b);o.push(C)}o.unshift(s);const u=Ye.utils.aoa_to_sheet(o),f=Ye.utils.book_new();Ye.utils.book_append_sheet(f,u,r),Ye.writeFileSync(f,`${l}.xlsx`),Le.value=[]},_l=async(e,l,n,r=!1,o)=>{var s,d,u,f,m,t,C,b;try{ue.setRefreshCurStructure(!1);const T=await k.getInsofDataApi({id:c==null?void 0:c.index});if(((s=T==null?void 0:T.data)==null?void 0:s.code)===200){let B=(m=(f=(u=(d=T==null?void 0:T.data)==null?void 0:d.result)==null?void 0:u[0])==null?void 0:f.value)==null?void 0:m.pageData;r?B={...B,compData:(C=B==null?void 0:B.compData)==null?void 0:C.map(S=>{var V;return(S==null?void 0:S.key)==="header"?{...S,contents:(V=S==null?void 0:S.contents)==null?void 0:V.map(A=>({...A,[e]:n}))}:S})}:B={...B,compData:(t=B==null?void 0:B.compData)==null?void 0:t.map(S=>{var V,A;return(S==null?void 0:S.key)==="header"?{...S,contents:(V=S==null?void 0:S.contents)==null?void 0:V.map(O=>(O==null?void 0:O.prop)===(l==null?void 0:l.prop)?{...O,[e]:n}:O)}:(S==null?void 0:S.key)==="tableToForm"&&o?{...S,contents:(A=S==null?void 0:S.contents)==null?void 0:A.map(O=>(O==null?void 0:O.prop)===(l==null?void 0:l.prop)?{...O,[o]:n}:O)}:S})};const U=await k.updateInsofDataApi({id:c==null?void 0:c.index,value:{pageData:B}});((b=U==null?void 0:U.data)==null?void 0:b.code)===200?(k.ElMessage.success("编辑成功"),ue.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(T){k.ElMessage.error(T)}},Na=async(e,l)=>{await _l("label",l,e)},Ua=async(e,l)=>{await _l("columnType",l,e,!1,"type")},Oa=()=>{nl.value?Qe.value=!1:ua()},wa=e=>{Le.value=e},La=(e,l)=>{Xe.value===l?sl.value=!1:sl.value=!0,Xe.value=l==null?void 0:l.changeProp},il=a.computed(()=>{var n,r,o;const e=(n=K.value)==null?void 0:n.some(s=>s==null?void 0:s.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(o=(r=K.value)==null?void 0:r.filter(s=>(s==null?void 0:s.label)!=="操作"))==null?void 0:o.map(s=>({...s,filterable:!!(s!=null&&s.filterable),showSummary:!!(s!=null&&s.showSummary),operable:!!(s!=null&&s.operable)}))}),ja=async(e,l,n)=>{const r=k.cloneDeep(K.value);await a.nextTick(),K.value=r==null?void 0:r.map(o=>(n==null?void 0:n.label)===(o==null?void 0:o.label)?{...o,[l]:e}:o),await _l(l,n,e)},Pl=async(e,l)=>{await _l(l,null,e,!0)},Ma=()=>{$e.value=!1},Pa=e=>{$("clickTrigger",e)},Ql=async e=>{var s,d,u,f,m,t,C,b,T,B,U,S,V,A,O;const l=e==null?void 0:e.row,n=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix;if((s=l==null?void 0:l.toString())!=null&&s.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(l.includes(",")){k.ElMessage.error("当前版本仅允许单个urdf预览!");return}tl.value=[l],xe.value=!0,Ze.value={data:k.cloneDeep(n)},be.value=!0;return}let o=[];if((d=l==null?void 0:l.toString())!=null&&d.includes(".stl")||(u=l==null?void 0:l.toString())!=null&&u.includes(".STL")||(f=l==null?void 0:l.toString())!=null&&f.includes(".obj")||(m=l==null?void 0:l.toString())!=null&&m.includes(".mtl")){tl.value=(t=l==null?void 0:l.toString())==null?void 0:t.split(","),xe.value=!1,be.value=!0;return}if((C=l==null?void 0:l.toString())!=null&&C.includes(".stl")||(b=l==null?void 0:l.toString())!=null&&b.includes(".STL")||(T=l==null?void 0:l.toString())!=null&&T.includes(".obj")||(B=l==null?void 0:l.toString())!=null&&B.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let D,g=[],h={};if(Array.isArray(l)?D=l:D=l==null?void 0:l.split(","),D==null||D.forEach(i=>{i.includes(".mtl")?g.push(i):h.blob=h.blob?h.blob+","+i:i}),(g==null?void 0:g.length)>0&&(h.mtlBlobs=g),r&&(h.suffix=r),(S=(U=Object.values(h))==null?void 0:U[0])!=null&&S.includes("http:"))o.push(h);else{const i=new Blob([h.blob],{type:"application/octet-stream;charset=UTF-8"});let y=URL.createObjectURL(i),P="";(V=l==null?void 0:l.split("/"))==null||V.forEach((E,H)=>{var I;H===((I=l==null?void 0:l.split("/"))==null?void 0:I.length)-1&&(P=E)}),(A=h.blob)!=null&&A.includes(".stl")&&(P=(P==null?void 0:P.replaceAll(">",""))+".urdf"),q.value=[{name:P,blobUrl:y}],Ue.value=!0}}else{const D=await k.axios.get(l,{responseType:"blob",headers:{"Content-Type":"application/json"}}),g=new Blob([D.data],{type:"application/octet-stream;charset=UTF-8"});let h=URL.createObjectURL(g),i="";(O=l==null?void 0:l.split("/"))==null||O.forEach((y,P)=>{var E;P===((E=l==null?void 0:l.split("/"))==null?void 0:E.length)-1&&(i=y)}),q.value=[{name:i,blobUrl:h}],Ue.value=!0}(o==null?void 0:o.length)>0&&L.setBlobUrls(o)},Bl=e=>{var r,o,s,d;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const l=(d=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:d[((s=(o=e==null?void 0:e.url)==null?void 0:o.split("."))==null?void 0:s.length)-1];return(e==null?void 0:e.name)+"."+l},Ka=async e=>{let l=null,n=null,r=null;if(e!=null&&e.downloadUrl){const s=await Kl(),d=Je.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),u=await k.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:s,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{d.close()}),f=new Blob([u.data],{type:"application/octet-stream;charset=UTF-8"});l=URL.createObjectURL(f),n=e==null?void 0:e.name;const m=n==null?void 0:n.lastIndexOf(".");r=n==null?void 0:n.slice(m)}else{const s=await bl.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(s.data),n=Bl(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 s={row:`${l}`,suffix:r};Ql(s);return}const o={name:n,blobUrl:l};q.value=[o],Ue.value=!0},$a=async e=>{let l=null,n=null;if(e!=null&&e.downloadUrl){const s=await Kl(),d=await k.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:s,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),u=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});l=URL.createObjectURL(u),n=e==null?void 0:e.name}else{const s=await bl.downloadAvatarApi({url:e==null?void 0:e.url});l=URL.createObjectURL(s.data),n=Bl(e)}const r={name:n,blobUrl:l},o=document.createElement("a");o.href=r.blobUrl,o.download=r.name,o.style.display="none",document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o)},100)},Fa=(e,l)=>{if(Object.values(l).length!==0)return Object.values(l).find(n=>{var r,o,s;return((r=n==null?void 0:n.toString())==null?void 0:r.includes(".txt"))||((o=n==null?void 0:n.toString())==null?void 0:o.includes(".cpt"))||((s=n==null?void 0:n.toString())==null?void 0:s.includes(".obj"))})?[...e,va.value]:e},Va=(e,l={})=>[...e==null?void 0:e.values()].filter(n=>Object.keys(l).every(r=>{var d;const o=n[r],s=(d=l[r])==null?void 0:d.toLowerCase();return s&&o&&typeof o=="string"?o.toLowerCase().includes(s):!0})),Xl=a.ref([]),za=async(e,l,n=!1)=>{var r;if(e){if(ue.setTableLoading(!0),Xl.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(o=>!o)))return Y.value=kl.value;if(n){Y.value=[...Sl.value.values()].filter(o=>Object.values(o).some(s=>typeof s=="string"?s==null?void 0:s.toLowerCase().includes(l==null?void 0:l.toLowerCase()):!1));return}Y.value=Va(Sl.value,e),ue.setTableLoading(!1)}},qa=async e=>{var d,u,f,m,t,C,b,T,B,U,S,V,A,O,D;const l=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((d=ie.value)==null?void 0:d.account)||((u=ie.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((f=ie.value)==null?void 0:f.account)||((m=ie.value)==null?void 0:m.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(C=(t=l==null?void 0:l.data)==null?void 0:t.result)==null?void 0:C.map(g=>g==null?void 0:g.id);const o=(T=(b=n==null?void 0:n.data)==null?void 0:b.result)==null?void 0:T.map(g=>g==null?void 0:g.id);r=[...k.cloneDeep(r),...o],(r==null?void 0:r.length)>0&&(r!=null&&r.every(g=>g!==null&&g))&&await k.batchDeleteInsofDataApi({ids:r});let s=await re.getItemData(ne.value,sessionStorage.getItem("systemKey"),e.id);if(s=s==null?void 0:s.filter(g=>g.comp!=="methodButton"),s&&s.length>0){const g=!Array.isArray(Ml.value)&&((B=Ml.value)==null?void 0:B.key)!=="main"?[]:Ml.value;g.push({key:Ve.value===""?(U=e==null?void 0:e.id)==null?void 0:U.toString():Ve.value+"-"+((S=e==null?void 0:e.id)==null?void 0:S.toString()),value:e[(V=Object.keys(e))==null?void 0:V.filter(h=>h!=="index"&&h!=="id")[0]]}),El.setSelectMenu(Ve.value===""?(A=e==null?void 0:e.id)==null?void 0:A.toString():Ve.value+"-"+((O=e==null?void 0:e.id)==null?void 0:O.toString())),El.setSelectTitle(g),El.setSelectIndex((D=e==null?void 0:e.id)==null?void 0:D.toString()),$("pageChange",s)}},Yl=async(e,l,n,r)=>{var s,d,u,f,m,t,C,b,T,B,U,S,V,A,O,D,g,h,i,y,P,E,H,I,X;if((r==null?void 0:r.isExistChild)===!0){let J=(d=(s=K.value)==null?void 0:s.find(z=>(z==null?void 0:z.isMainKey)===!0))==null?void 0:d.prop,G=(u=r==null?void 0:r.rowContent)==null?void 0:u[J],_=(m=(f=r==null?void 0:r.columnType)==null?void 0:f.childPath)==null?void 0:m.split(W),j=[];_==null||_.forEach((z,p)=>{(_==null?void 0:_.length)-1===p&&j.push(G),j.push(z)}),j=j.join(W);let R=await re.getItemData(j,sessionStorage.getItem("systemKey"),""),ee=await re.getItemData((t=r==null?void 0:r.columnType)==null?void 0:t.childPath,sessionStorage.getItem("systemKey"),"");if(!R||(R==null?void 0:R.length)===0){let z=[];ee==null||ee.forEach(F=>{var ye,de,x,v;let N={type:"structure",pageKey:j,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(ye=ie.value)==null?void 0:ye.id,parentPageKey:"",createUserLayer:((de=ie.value)==null?void 0:de.dept)||((x=ie.value)==null?void 0:x.部门名称)},he={pageData:{comp:F==null?void 0:F.comp,compData:(v=F==null?void 0:F.compData)==null?void 0:v.filter(oe=>(oe==null?void 0:oe.key)!=="tableContents"),name:F==null?void 0:F.name,isShow:F==null?void 0:F.isShow}};z.push({key:N,value:he})}),(z==null?void 0:z.length)>0&&await k.batchAddInsofDataApi({dataList:z});let p=await re.getItemData(j,sessionStorage.getItem("systemKey"),"");Al.value=p}else Al.value=R;$("routeUrl",Al.value,{isEdit:!0,routerUrl:j});return}if((r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(J=>(J==null?void 0:J.url)&&(J==null?void 0:J.name)))){let J=k.cloneDeep(e);J=await((C=k.cloneDeep(J))==null?void 0:C.map(async _=>{var ee,z,p,F;const j=await bl.downloadAvatarApi({url:_==null?void 0:_.url});let R=URL.createObjectURL(j.data);return{name:(_==null?void 0:_.name)+"."+((F=(ee=_==null?void 0:_.url)==null?void 0:ee.split("."))==null?void 0:F[((p=(z=_==null?void 0:_.url)==null?void 0:z.split("."))==null?void 0:p.length)-1]),blobUrl:R}}));let G=await Promise.all(J);q.value=G,Ue.value=!0}const o=k.cloneDeep(K.value);if((r==null?void 0:r.isMainKey)===!0&&(o==null?void 0:o.length)>0){(b=o==null?void 0:o[0])==null||b.prop;let J=k.cloneDeep(ne).value+W+(r==null?void 0:r.data),G=k.cloneDeep(ne).value,_=(B=(T=Re.value[J])==null?void 0:T.filter(z=>{var p,F;return((p=z==null?void 0:z.key)==null?void 0:p.type)==="structure"&&((F=z==null?void 0:z.key)==null?void 0:F.parentTable)===""}))==null?void 0:B.map(z=>{var p;return(p=z==null?void 0:z.value)==null?void 0:p.pageData}),j={};(U=K.value)==null||U.forEach(z=>{(z==null?void 0:z.label)!=="操作"&&(j[z.label]=n[z.prop]??n[z.label])});let R=(V=(S=c==null?void 0:c.itemData)==null?void 0:S.find(z=>(z==null?void 0:z.key)==="mainRouters"))==null?void 0:V.contents,ee;if((R==null?void 0:R.length)>0){let z=J==null?void 0:J.split(W)[((A=J==null?void 0:J.split(W))==null?void 0:A.length)-1],p=R==null?void 0:R.find(F=>(F==null?void 0:F.key)===z);ee=(p==null?void 0:p.routerContent)+W+(p==null?void 0:p.key)}if((_==null?void 0:_.length)>0)await re.getItemData(J+W+`updateLoading${((O=ie.value)==null?void 0:O.account)||((D=ie.value)==null?void 0:D.账号)}`,sessionStorage.getItem("systemKey"),"")||await re.loadingConstruct(J,J+W+`updateLoading${((g=ie.value)==null?void 0:g.account)||((h=ie.value)==null?void 0:h.账号)}`,j,ee),ue.setRouteToChildPath(G),ge.setActiveMenuPath(J+W+`updateLoading${((i=ie.value)==null?void 0:i.account)||((y=ie.value)==null?void 0:y.账号)}`);else{(P=o==null?void 0:o[0])==null||P.prop;let z=k.cloneDeep(ne).value+W+(r==null?void 0:r.data),p=k.cloneDeep(ne).value;await re.getItemData(p+W,sessionStorage.getItem("systemKey"),""),await re.loadingConstruct(p+W,z,j),await re.loadingConstruct(z,z+W+`updateLoading${((E=ie.value)==null?void 0:E.account)||((H=ie.value)==null?void 0:H.账号)}`,j,ee),ue.setRouteToChildPath(p),ge.setActiveMenuPath(z+W+`updateLoading${((I=ie.value)==null?void 0:I.account)||((X=ie.value)==null?void 0:X.账号)}`)}}},Ja=()=>{Ue.value=!1},Ra=e=>{$("rowClick",e)};a.watch(()=>c.changedContent,()=>{var n,r;if(!c.changedContent)return;let e=(n=Y.value)==null?void 0:n.map(o=>{var s;return o.id===((s=c.changedContent)==null?void 0:s.id)&&(o={...c.changedContent,id:c.changedContent.newId?c.changedContent.newId:c.changedContent.id},delete o.newId),o});const l=(r=c.itemData)==null?void 0:r.map(o=>((o==null?void 0:o.key)==="tableContents"&&(o.contents=e),o));Y.value=e,$("contentChange",{contents:l,index:c.index}),$("change",{content:e,index:c==null?void 0:c.index,buttonName:"",id:c==null?void 0:c.index})},{deep:!0,immediate:!0});const Wa=()=>{},Ga=async()=>{const e=ne.value,l=sessionStorage.getItem("systemKey"),n=await re.getItemData(e,l,""),r=n==null?void 0:n.find(u=>(u==null?void 0:u.name)==="方法明细"),o=(r==null?void 0:r.compData)||[],s=o==null?void 0:o.find(u=>(u==null?void 0:u.key)==="formContent");return s==null?void 0:s.contents},Kl=async()=>`Bearer ${k.Local.get("access-token")}`,Ha=async(e,{token:l,inputData:n}={})=>await k.axios.post(e,n,{headers:{Authorization:l}}).catch(o=>(ge.setImportLoading(!1),Promise.reject(o))),Qa=e=>{var r;let l={};const n=[];return l.form={},(r=k.cloneDeep(e))==null||r.forEach((o,s)=>{var d,u,f,m,t,C,b,T,B,U,S,V,A,O;if((o==null?void 0:o.comp)==="Table"){(u=(d=o==null?void 0:o.compData)==null?void 0:d.find(i=>(i==null?void 0:i.key)==="header"))==null||u.contents;let D=(t=(m=(f=o==null?void 0:o.compData)==null?void 0:f.find(i=>(i==null?void 0:i.key)==="tableContents"))==null?void 0:m.contents)==null?void 0:t.map(i=>i.slice(1));(U=(B=(T=(b=(C=o==null?void 0:o.compData)==null?void 0:C.find(i=>(i==null?void 0:i.key)==="header"))==null?void 0:b.contents)==null?void 0:T[0])==null?void 0:B[0])==null||U.label;let g=(V=(S=o==null?void 0:o.compData)==null?void 0:S.find(i=>(i==null?void 0:i.key)==="header"))==null?void 0:V.contents,h=[];D==null||D.forEach(i=>{let y=[];i==null||i.forEach((P,E)=>{var I;let H={};((I=g[E])==null?void 0:I.label)!=="操作"&&(H[g[E].label]=P,y.push(H))}),h.push(y)}),l[o.name]=h}else{const D=(O=(A=o.compData)==null?void 0:A.find(g=>(g==null?void 0:g.key)==="formContent"))==null?void 0:O.contents;D==null||D.forEach(g=>{var h,i;if(g.prop!==""){let y=g==null?void 0:g.value;Array.isArray(y)?y=((h=y==null?void 0:y[0])==null?void 0:h.oldUrl)||"http://222.92.178.198:62009/"+((i=y==null?void 0:y[0])==null?void 0:i.url):y=y.toString(),g={key:(g==null?void 0:g.prop)??(g==null?void 0:g.label),value:y},n.push(g)}})}}),l.form=re.getFormContents(n),l},Xa=async(e,l,n)=>{var P,E,H,I,X,J,G,_,j,R,ee,z;ge.setImportLoading(!0);const r=await Ga().catch(p=>(ge.setImportLoading(!1),Promise.reject(p))),o=r==null?void 0:r.find(p=>(p==null?void 0:p.key)==="算法体"),s=o==null?void 0:o.value;if(!s){console.log("未搜索到isMain, 缺少算法执行接口"),ge.setImportLoading(!1);return}const d=K.value||[],u=d.find(p=>(p==null?void 0:p.prop)==="输入"),f=u==null?void 0:u.prop;let m=l==null?void 0:l[f];const t=await Kl().catch(p=>(ge.setImportLoading(!1),Promise.reject(p)));let C=!1,b="";(P=K.value)==null||P.forEach(p=>{(p==null?void 0:p.prop)===f&&(C=!!(p!=null&&p.childPath),b=p==null?void 0:p.childPath)});let T="",B="";if(C){let p=(H=(E=K.value)==null?void 0:E.find(ye=>(ye==null?void 0:ye.isMainKey)===!0))==null?void 0:H.prop;B=l==null?void 0:l[p];let F=b==null?void 0:b.split(W),N=[];F==null||F.forEach((ye,de)=>{(F==null?void 0:F.length)-1===de&&N.push(B),N.push(ye)}),N=N.join(W),T=N;let he=await re.getItemData(N,sessionStorage.getItem("systemKey"),"");m=Qa(he)}const U=await Ha(s,{token:t,inputData:m}).catch(p=>(ge.setImportLoading(!1),Promise.reject(p))),S=(I=U==null?void 0:U.data)==null?void 0:I.data,V=r==null?void 0:r.find(p=>(p==null?void 0:p.prop)==="算法名称");V==null||V.value;const A=d.find(p=>(p==null?void 0:p.prop)==="输出"),O=A==null?void 0:A.directiveLabel;T=T==null?void 0:T.replaceAll(u==null?void 0:u.directiveLabel,O);const D=(X=k.cloneDeep(T))==null?void 0:X.replaceAll(W+B,"");let g=await re.getItemData(T,sessionStorage.getItem("systemKey"),""),h=await re.getItemData(D,sessionStorage.getItem("systemKey"),"");if(g){let p=[],F=[];g==null||g.forEach(N=>{var he,ye;if((N==null?void 0:N.comp)==="Table")(he=N==null?void 0:N.compData)==null||he.forEach(de=>{var x;(de==null?void 0:de.key)==="tableContents"&&((x=de==null?void 0:de.contents)==null||x.forEach(v=>{var oe,te;(oe=v==null?void 0:v[0])!=null&&oe.id&&p.push((te=v==null?void 0:v[0])==null?void 0:te.id)}))});else if((N==null?void 0:N.comp)==="Form"){N.compData=(ye=N==null?void 0:N.compData)==null?void 0:ye.map(x=>{var v;return(x==null?void 0:x.key)==="formContent"&&(x.contents=(v=x==null?void 0:x.contents)==null?void 0:v.map(oe=>{var te,ce;return(te=S==null?void 0:S.form)!=null&&te[oe.prop]&&(oe.value=(ce=S==null?void 0:S.form)==null?void 0:ce[oe.prop]),oe})),x});let de={pageData:{comp:N==null?void 0:N.comp,name:N==null?void 0:N.name,isShow:N==null?void 0:N.isShow,compData:N==null?void 0:N.compData}};F.push({id:N==null?void 0:N.id,value:de})}}),(F==null?void 0:F.length)>0&&await k.batchUpdateInsofDataApi({dataList:F}),p=[...new Set(p)],(p==null?void 0:p.length)>0&&await k.batchDeleteInsofDataApi({ids:p})}else{let p=[];if(S!=null&&S.table){let F={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:T,parentTable:"",createUserId:(J=ie.value)==null?void 0:J.id,createUserOrg:((G=ie.value)==null?void 0:G.dept)||((_=ie.value)==null?void 0:_.部门名称)};h==null||h.forEach(N=>{let ye={pageData:{comp:N==null?void 0:N.comp,name:N==null?void 0:N.name,isShow:N==null?void 0:N.isShow,compData:N==null?void 0:N.compData}};p.push({key:F,value:ye})})}if(S!=null&&S.form){let F={type:"structure",pageKey:T,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(j=ie.value)==null?void 0:j.id,parentPageKey:"",createUserLayer:((R=ie.value)==null?void 0:R.dept)||((ee=ie.value)==null?void 0:ee.部门名称)};h==null||h.forEach(N=>{var x;let he=(x=N==null?void 0:N.compData)==null?void 0:x.map(v=>{var oe;return(v==null?void 0:v.key)==="formContent"&&(v.contents=(oe=v.contents)==null?void 0:oe.map(te=>{var ce,De;return(ce=S==null?void 0:S.form)!=null&&ce[te.prop]&&(te.value=(De=S==null?void 0:S.form)==null?void 0:De[te.prop]),te})),v}),de={pageData:{comp:N==null?void 0:N.comp,name:N==null?void 0:N.name,isShow:N==null?void 0:N.isShow,compData:he}};p.push({key:F,value:de})})}(p==null?void 0:p.length)>0&&await k.batchAddInsofDataApi({dataList:p})}let i=await re.getItemData(T,sessionStorage.getItem("systemKey"),""),y=[];S!=null&&S.table&&((z=S==null?void 0:S.table)==null||z.forEach(p=>{var he,ye,de,x;let F={type:"data",pageKey:T,tableId:(he=i==null?void 0:i[0])==null?void 0:he.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ye=ie.value)==null?void 0:ye.id,createUserOrg:((de=ie.value)==null?void 0:de.dept)||((x=ie.value)==null?void 0:x.部门名称)},N={tableData:p};y.push({key:F,value:N})})),(y==null?void 0:y.length)>0&&await k.batchAddInsofDataApi({dataList:y}),dl(!0),ge.setImportLoading(!1)},Zl=(e,l)=>(e=e==null?void 0:e.map(n=>{var r,o;return n!=null&&n.children&&((r=n.children)!=null&&r.find(s=>s.id===(l==null?void 0:l.id))?n.children=(o=n.children)==null?void 0:o.filter(s=>(s==null?void 0:s.id)!==(l==null?void 0:l.id)):n.children=Zl(n.children,l)),n}),e),Nl=async(e,l,n)=>{var r,o,s,d,u,f,m,t,C,b,T,B,U,S,V;if(Ke.value="",Tl.value=!0,wl.value=!0,$("onButtonClick",e,l),e==="删除")re.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,O;(A=Y.value)!=null&&A.find(D=>(D==null?void 0:D.id)===(l==null?void 0:l.id))?Y.value=(O=k.cloneDeep(Y.value))==null?void 0:O.filter(D=>(D==null?void 0:D.id)!==(l==null?void 0:l.id)):Y.value=Zl(k.cloneDeep(Y.value),l),Ur(Cl.value,Ve.value,l==null?void 0:l.id),ue.setTableLoading(c==null?void 0:c.index),$("change",{content:Y.value,singleContent:l,index:c==null?void 0:c.index,type:"delete",buttonName:e,column:K.value})});else if(e==="批量删除"){if(((r=Le.value)==null?void 0:r.length)===0)return k.ElMessage.warning("请先勾选操作的数据");re.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var O,D;const A=(O=Le.value)==null?void 0:O.map(g=>g.id);Y.value=(D=k.cloneDeep(Y.value))==null?void 0:D.filter(g=>!(A!=null&&A.includes(g.id))),ue.setTableLoading(c==null?void 0:c.index),$("change",{content:Y.value,singleContent:null,selectItems:Le.value,index:c==null?void 0:c.index,type:"batchDelete",buttonName:e,column:K.value})})}else if(e==="复制新增"){Oe.value="新增";const A=k.cloneDeep(l),O=(o=K.value)==null?void 0:o.find(h=>h==null?void 0:h.isMainKey),D=O||((s=K.value)==null?void 0:s[0]),g=(d=Ge.value)==null?void 0:d.find(h=>(h==null?void 0:h.label)==="新建");await ea(!0,g,{data:A,firstCol:D})}else if(e==="新增")Oe.value="新增",cl(""),$e.value=!0;else if(e==="编辑")Oe.value="编辑",cl(l),$e.value=!0;else if(e==="查看")Oe.value="查看",cl(l),Tl.value=!1,wl.value=!1,$e.value=!0;else if(e==="查看三维模型"){const A={};for(let D in l)D!=="id"&&(A[D]=l[D]);let O=(u=Object.values(A))==null?void 0:u[1];Ie.setTableShowThree(O)}else if(((f=n==null?void 0:n.extra)==null?void 0:f.type)==="modelExample")Oe.value=e,Dl.value=!0;else if(e==="新建"){let A=Re.value,O=[];for(let y in A)y!=null&&y.includes(`loading${((m=ie.value)==null?void 0:m.account)||((t=ie.value)==null?void 0:t.账号)}`)&&(O=[...O,...y]);let D=[];for(let y in A)y!=null&&y.includes(`updateLoading${((C=ie.value)==null?void 0:C.account)||((b=ie.value)==null?void 0:b.账号)}`)&&(D=[...D,...y]);let g=O==null?void 0:O.map(y=>y==null?void 0:y.id);const h=D==null?void 0:D.map(y=>y==null?void 0:y.id);g=[...k.cloneDeep(g),...h],(g==null?void 0:g.length)>0&&(g!=null&&g.every(y=>y!==null&&y))&&await k.batchDeleteInsofDataApi({ids:g});const i=(T=Ge.value)==null?void 0:T.find(y=>(y==null?void 0:y.label)==="新建");await ea(!1,i)}else if(e==="修改模板"){let A=k.cloneDeep(ne).value;ue.setRouteToChildPath(A),ge.setActiveMenuPath(A+W)}else if(e==="执行")Xa(e,l);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((B=Le.value)==null?void 0:B.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((U=Y.value)==null?void 0:U.length)===0)return k.ElMessage.warning("暂无数据导出");const A=(V=(S=K.value)==null?void 0:S.map(D=>D==null?void 0:D.label))==null?void 0:V.filter(D=>D!=="操作"),O=e==="导出全部"?k.cloneDeep(Y.value):k.cloneDeep(Le.value);O==null||O.forEach(D=>{D==null||delete D.id}),Ba(O,c==null?void 0:c.compName,A,c==null?void 0:c.compName)}},Ya=async e=>{var n,r,o,s,d,u;const l=await k.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((n=l==null?void 0:l.data)==null?void 0:n.code)===200)return Array.isArray((r=l==null?void 0:l.data)==null?void 0:r.result)&&((s=(o=l==null?void 0:l.data)==null?void 0:o.result)==null?void 0:s.length)>0?(u=(d=l==null?void 0:l.data)==null?void 0:d.result)==null?void 0:u.map(f=>{var m;return{id:f==null?void 0:f.id,...(m=f==null?void 0:f.value)==null?void 0:m.pageData}}):[]},Za=async(e,l)=>{var n,r,o,s,d,u,f,m,t,C,b,T,B,U,S,V,A,O,D,g;try{let h,i;const y=(n=Re.value[ne.value+W])==null?void 0:n.filter(_=>{var j;return((j=_==null?void 0:_.key)==null?void 0:j.type)==="structureMethod"}),P=(r=Re.value[ne.value+W])==null?void 0:r.filter(_=>{var j;return((j=_==null?void 0:_.key)==null?void 0:j.type)==="structure"}),E=y==null?void 0:y.find(_=>{var j,R;return((R=(j=_==null?void 0:_.value)==null?void 0:j.pageData)==null?void 0:R.method)==="保存"});if(!E)return;const H=(u=(d=Re.value[(s=(o=E==null?void 0:E.value)==null?void 0:o.pageData)==null?void 0:s.path])==null?void 0:d.filter(_=>{var j;return((j=_==null?void 0:_.key)==null?void 0:j.type)==="data"}))==null?void 0:u.find(_=>{var j,R,ee,z;return((R=(j=_==null?void 0:_.value)==null?void 0:j.tableData)==null?void 0:R.算法名称)===((z=(ee=E==null?void 0:E.value)==null?void 0:ee.pageData)==null?void 0:z.method)});if(!H)return;const I={buttonName:(m=(f=E==null?void 0:E.value)==null?void 0:f.pageData)==null?void 0:m.method,api:(C=(t=H==null?void 0:H.value)==null?void 0:t.tableData)==null?void 0:C.算法体,content:P==null?void 0:P.map(_=>{var j;return(j=_==null?void 0:_.value)==null?void 0:j.pageData}),extraContent:[],extraValues:(T=(b=E==null?void 0:E.value)==null?void 0:b.pageData)==null?void 0:T.data,methodName:(U=(B=E==null?void 0:E.value)==null?void 0:B.pageData)==null?void 0:U.path};if(!e)return;const X={...e,compData:(S=e==null?void 0:e.compData)==null?void 0:S.map(_=>{var j;return(_==null?void 0:_.key)==="formContent"?{..._,contents:(j=_==null?void 0:_.contents)==null?void 0:j.map(R=>(R==null?void 0:R.prop)===l?{...R,value:""}:R)}:_})},J={key:{pageKey:ne.value+W,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:X}},G=await k.axios.post(I.api,J,{headers:{"Content-Type":"application/json"}});return((V=G==null?void 0:G.data)==null?void 0:V.code)===200&&(h=(O=(A=G==null?void 0:G.data)==null?void 0:A.result)==null?void 0:O.latestReportCode,i=(g=(D=G==null?void 0:G.data)==null?void 0:D.result)==null?void 0:g.status),{newMainKeyValue:h,newStatus:i}}catch(h){throw k.ElMessage.error(h),new Error(h)}},Il=(e,l,n,r)=>{var o;$("contentChange",{contents:(o=e==null?void 0:e.compData)==null?void 0:o.map(s=>{var d;return(s==null?void 0:s.key)==="formContent"?{...s,contents:(d=s==null?void 0:s.contents)==null?void 0:d.map(u=>(u==null?void 0:u.key)===l?{...u,value:n}:ul.value&&(u==null?void 0:u.prop)===ul.prop?{...u,value:ul.value}:u)}:s}),index:e==null?void 0:e.id},r)},ul=a.reactive({prop:"状态",value:""}),Ia=a.ref(["系统自动生成信息","审批意见"]),er=async(e,l,n)=>{var f,m;let r=e==null?void 0:e[l==null?void 0:l.prop],o=1,s,d;const u=k.cloneDeep(ne).value+W+r;if(u){ul.value="",s=(f=Re.value[u])==null?void 0:f.filter(b=>{var T;return((T=b==null?void 0:b.key)==null?void 0:T.type)==="structure"});const t=s==null?void 0:s.find(b=>{var T,B,U;return((U=(B=(T=b==null?void 0:b.value)==null?void 0:T.pageData)==null?void 0:B.comp)==null?void 0:U.toUpperCase())==="FORM"});d={...(m=t==null?void 0:t.value)==null?void 0:m.pageData,id:t==null?void 0:t.id};const C=await Za(d,l==null?void 0:l.prop);if(ul.value=C==null?void 0:C.newStatus,C!=null&&C.newMainKeyValue)return C==null?void 0:C.newMainKeyValue}if(Y.value.some(t=>(t==null?void 0:t[l==null?void 0:l.prop])===r)){const t=r;for(;Y.value.some(C=>(C==null?void 0:C[l==null?void 0:l.prop])===`${t}(${o})`);)o++;r=`${t}(${o})`}return r},ea=async(e,l,n)=>{var d,u,f,m,t,C,b,T;let r,o;const s=await er(n==null?void 0:n.data,n==null?void 0:n.firstCol);if(e?(r=k.cloneDeep(ne).value+W+((m=n==null?void 0:n.data)==null?void 0:m[(f=n==null?void 0:n.firstCol)==null?void 0:f.prop]),o=k.cloneDeep(ne).value+W+s):(r=k.cloneDeep(ne).value+W,o=k.cloneDeep(r)+`loading${((d=ie.value)==null?void 0:d.account)||((u=ie.value)==null?void 0:u.账号)}`),l){const B=(C=(t=Re.value[o])==null?void 0:t.filter(U=>{var S;return((S=U==null?void 0:U.key)==null?void 0:S.parentTable)===""}))==null?void 0:C.map(U=>{var S;return{id:U==null?void 0:U.id,...(S=U==null?void 0:U.value)==null?void 0:S.pageData}});if((B==null?void 0:B.length)>0)if(e){const U=B==null?void 0:B.find(S=>{var V;return((V=S==null?void 0:S.comp)==null?void 0:V.toUpperCase())==="FORM"});U&&Il(U,(b=n==null?void 0:n.firstCol)==null?void 0:b.label,s,ne.value)}else ue.setRouteToChildPath(k.cloneDeep(ne).value),ge.setActiveMenuPath(o);else if(await re.loadingConstruct(r,o,null,null,Ia.value),e){const U=await Ya(o);if((U==null?void 0:U.length)>0){const S=U==null?void 0:U.find(V=>{var A;return((A=V==null?void 0:V.comp)==null?void 0:A.toUpperCase())==="FORM"});S&&Il(S,(T=n==null?void 0:n.firstCol)==null?void 0:T.label,s,ne.value)}}else ue.setRouteToChildPath(k.cloneDeep(ne).value),ge.setActiveMenuPath(o)}else e?(Ke.value="",Te.value=n==null?void 0:n.data,dl(!0,n==null?void 0:n.firstCol,s)):(ue.setRouteToChildPath(k.cloneDeep(ne).value),ge.setActiveMenuPath(o))},lr=()=>{be.value=!1,tl.value=[],xe.value=!1},cl=e=>{var o,s,d,u,f,m;const l=[];let n=[];for(let t in e)Array.isArray(e==null?void 0:e[t])&&n.push(t);ae.value=k.cloneDeep(K.value),(s=re.getColumnChild((o=k.cloneDeep(K.value))==null?void 0:o.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||s.forEach((t,C)=>{var b;n.find(T=>T===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((b=t==null?void 0:t.formType)==null?void 0:b.toUpperCase())==="SELECT"?l.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",name:(t==null?void 0:t.prop)??"t"+C,prop:t==null?void 0:t.prop,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??C,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled,optionUrl:{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.formMenuSelect,type:"Select",selectRelateType:t==null?void 0:t.selectRelateType}}):l.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",prop:t==null?void 0:t.prop,name:(t==null?void 0:t.prop)??"t"+C,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??C,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled}))}),e===""||!e||(Ke.value=(e==null?void 0:e.id)??"");let r=re.getColumnChild((d=k.cloneDeep(K.value))==null?void 0:d.filter(t=>(t==null?void 0:t.label)!=="操作"));_e.value&&((u=_e.value)==null?void 0:u.length)>0&&(_e.value=(f=k.cloneDeep(_e).value)==null?void 0:f.map(t=>{var b;let C=(t==null?void 0:t.prop)||((b=r==null?void 0:r.find(T=>(T==null?void 0:T.label)===(t==null?void 0:t.label)))==null?void 0:b.prop);return C&&(t.value=e[C]),t})),Fe.value=_e.value&&((m=_e.value)==null?void 0:m.length)>0?re.getTableFormToForm(_e.value):l},ar=()=>{var l;const e=(l=w.value)==null?void 0:l.$el;e&&zl.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:n=>{var d;const{oldIndex:r,newIndex:o}=n;if(r===o)return;const s=il.value.splice(r,1)[0];il.value.splice(o,0,s),K.value=(d=K.value)==null?void 0:d.slice().sort((u,f)=>{if(u.label==="操作")return 1;if(f.label==="操作")return-1;const m=il.value.findIndex(C=>C.label===u.label),t=il.value.findIndex(C=>C.label===f.label);return m-t})}})};a.onMounted(()=>{Ll.value=window.innerWidth-240*2});const rr=()=>{a.nextTick(()=>{ar()})},$l=(e,l)=>{var r;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let n;return e.children=(r=e.children)==null?void 0:r.map(o=>{var s,d;if((o==null?void 0:o.id)===Ke.value){let u={};for(let f in o){let m=(s=l==null?void 0:l.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:s.label;m?u[f]=(d=Te.value)==null?void 0:d[m]:u[f]=o[f]}o=Object.assign(u,Te.value),n=o}else{let u=$l(o,l);o=u==null?void 0:u.contents,n=u==null?void 0:u.currentSelectContents}return o}),{contents:e,currentSelectContents:n}},la=(e,l)=>{let n,r;return e!=null&&e.find(o=>(o==null?void 0:o.id)===Ke.value)?n=e==null?void 0:e.map(o=>{var s,d;if((o==null?void 0:o.id)===Ke.value){let u={};for(let f in o){let m=(s=l==null?void 0:l.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:s.label;m?u[f]=(d=Te.value)==null?void 0:d[m]:u[f]=o[f]}o=Object.assign(u,Te.value),r=o}return o}):n=e==null?void 0:e.map(o=>{var s,d,u,f;if((o==null?void 0:o.id)===Ke.value){let m={};for(let t in o){let C=(s=l==null?void 0:l.find(b=>(b==null?void 0:b.prop)===t))==null?void 0:s.label;C?m[t]=(d=Te.value)==null?void 0:d[C]:m[t]=o[t]}o=Object.assign(m,Te.value),r=o}else o=(u=$l(o,l))==null?void 0:u.contents,r=(f=$l(o,l))==null?void 0:f.currentSelectContents;return o}),{newContents:n,currentSelectContents:r}},aa=(e,l,n)=>{var r,o;return e[l==null?void 0:l.prop]=n,typeof e.id=="number"&&(e.id=(r=e.id)==null?void 0:r.toString()),e.children&&((o=e.children)==null?void 0:o.length)>0&&(e.children=e.children.map(aa)),e},Fl=e=>{var n;const l=[];return l.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((n=e.children)==null||n.forEach(r=>{l.push(...Fl(r))})),(l==null?void 0:l.length)>0?l==null?void 0:l.map(r=>{const o={...r};return delete o.children,o}):[]},dl=(e=!0,l,n)=>{var m,t,C,b,T,B,U,S,V;let r=re.getColumnChild((m=k.cloneDeep(K.value))==null?void 0:m.filter(A=>(A==null?void 0:A.label)!=="操作")),o,s=k.cloneDeep(Y.value);if(!Te.value){$e.value=!1;return}if(Ke.value===""){el.value++;let A;l&&n?A={id:el.value.toString(),[l==null?void 0:l.prop]:n,children:Te.value.children}:A={id:el.value.toString()},A!=null&&A.children&&(A={...A,children:(t=A.children)==null?void 0:t.map(O=>aa(O,l,n))}),s.push(Object.assign(Te.value,A)),o=Object.assign(Te.value,A)}else s=(C=la(s,r))==null?void 0:C.newContents,o=(b=la(s,r))==null?void 0:b.currentSelectContents;const d=(T=c.itemData)==null?void 0:T.filter(A=>(A==null?void 0:A.key)==="childTree")[0];if(((B=d==null?void 0:d.contents)==null?void 0:B.length)>0){Oe.value="编辑";const A=[];s==null||s.forEach((O,D)=>{var h;let g={};if(Array.isArray(O)){let i=[];O==null||O.filter(y=>!(y!=null&&y.id)).forEach((y,P)=>{var E,H,I,X,J,G,_;if((H=(E=we.value)==null?void 0:E[P])!=null&&H.prop&&!Array.isArray(y)){let j={};j[we.value[P].column]=y,se!=null&&se.value&&((I=se==null?void 0:se.value)==null?void 0:I.length)>0&&((X=se==null?void 0:se.value)!=null&&X.find(R=>JSON.stringify(R==null?void 0:R[0])===JSON.stringify(j)))&&(i=(J=se==null?void 0:se.value)==null?void 0:J.find(R=>JSON.stringify(R==null?void 0:R[0])===JSON.stringify(j))),i&&i.length>0?g[we.value[P].prop]=i!=null&&i.find(R=>{var ee;return((ee=Object.keys(R))==null?void 0:ee[0])===we.value[P].column})?(G=i==null?void 0:i.find(R=>{var ee;return((ee=Object.keys(R))==null?void 0:ee[0])===we.value[P].column}))==null?void 0:G[we.value[P].column]:y:g[we.value[P].prop]=y}else Array.isArray(y)&&((_=we.value[P])!=null&&_.prop?g[we.value[P].prop]=y:g.children=Jl(y,we.value))})}else g=O;Array.isArray(O)&&O.some(i=>i==null?void 0:i.id)?A.push(Object.assign(g,{id:(h=O==null?void 0:O.find(i=>i.id))==null?void 0:h.id})):g.id?A.push(g):A.push(Object.assign(g,{id:D.toString()}))}),Y.value=sa(A,d,K.value)}else Y.value=s;oa(Y.value),Cl.value=Y.value;const u=wr(Cl.value,Ve.value,s);let f=[];if(nl.value?(f=(U=k.cloneDeep(nl).value.singleContent)==null?void 0:U.filter(A=>(A==null?void 0:A.id)!==(o==null?void 0:o.id)),f.push(o)):f=[o],Qe.value){const A={content:u,singleContent:((S=d==null?void 0:d.contents)==null?void 0:S.length)>0?f==null?void 0:f.flatMap(Fl):f,index:c==null?void 0:c.index,buttonName:"编辑",column:K.value,parentTableId:c==null?void 0:c.parentTableId};ue.setCacheUpdatingData(A)}if(e){const A={content:u,singleContent:((V=d==null?void 0:d.contents)==null?void 0:V.length)>0?Fl(o):o,index:c==null?void 0:c.index,buttonName:Oe.value,column:K.value,parentTableId:c==null?void 0:c.parentTableId};ue.setTableLoading(c==null?void 0:c.index),$e.value=!1,Te.value=void 0,$("change",A)}};a.onUnmounted(()=>{K.value=[],Y.value=[],ae.value=[],Ne.value=[],_e.value=[],We.value=[],tl.value=[],ll.value=[],Fe.value=[],Le.value=[],w.value=null});const ra=async(e,l,n)=>{var m,t,C,b,T,B,U,S,V,A,O;Xe.value=n==null?void 0:n.prop;const r=k.cloneDeep(c.itemData),o=r==null?void 0:r.map(D=>{var g;return(D==null?void 0:D.key)==="header"&&((g=D.contents)==null||g.map((h,i)=>{var y,P,E,H,I,X,J,G,_,j,R,ee,z,p,F,N,he,ye,de;return h.type=h!=null&&h.type?h.type:(H=(E=(P=(y=h==null?void 0:h.key)==null?void 0:y.split("$"))==null?void 0:P[1])==null?void 0:E.split("("))!=null&&H[0]?(X=(I=re.FormType)==null?void 0:I.find(x=>{var v,oe,te,ce;return(x==null?void 0:x.key)===((ce=(te=(oe=(v=h==null?void 0:h.key)==null?void 0:v.split("$"))==null?void 0:oe[1])==null?void 0:te.split("("))==null?void 0:ce[0])}))==null?void 0:X.value:"Input",h.options=h!=null&&h.options?h.options:((_=(G=(J=h==null?void 0:h.key)==null?void 0:J.split("$"))==null?void 0:G[1])==null?void 0:_.length)>0?(z=(ee=ql((R=(j=h==null?void 0:h.key)==null?void 0:j.split("$"))==null?void 0:R[1]))==null?void 0:ee.split(","))==null?void 0:z.map(x=>({label:x,value:x})):[],(p=h==null?void 0:h.key)!=null&&p.includes("$")&&(h.key=(N=(F=h==null?void 0:h.key)==null?void 0:F.split("$"))==null?void 0:N[0]),h.value=(he=Object.values(l))==null?void 0:he[i],h.optionUrl=h!=null&&h.formMenuSelect&&((ye=h==null?void 0:h.formMenuSelect)==null?void 0:ye.length)>0?{groupSelect:(de=h==null?void 0:h.groupSelect)==null?void 0:de.split(/[::]/).map(x=>x.trim()),menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":"")}:null,h})),D});let s=k.cloneDeep(Fe.value),d=(t=(m=k.cloneDeep(o))==null?void 0:m.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:t.contents;s=s==null?void 0:s.map(D=>{var g;return D.value=(g=d==null?void 0:d.find((h,i)=>i===(D==null?void 0:D.id)))==null?void 0:g.value,D});let u="",f=(T=(b=(C=k.cloneDeep(o))==null?void 0:C.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:b.contents)==null?void 0:T.find((D,g)=>{var h,i,y;return(D==null?void 0:D.label)===Xe.value||(g==null?void 0:g.toString())===((y=(i=(h=Xe.value)==null?void 0:h.split("a"))==null?void 0:i[1])==null?void 0:y.toString())});if((S=(U=(B=k.cloneDeep(o))==null?void 0:B.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:U.contents)==null||S.forEach(D=>{var g,h,i,y,P;u===""&&((i=(h=(g=D==null?void 0:D.optionUrl)==null?void 0:g.groupSelect)==null?void 0:h[1])!=null&&i.includes("["))&&(u=(P=(y=D==null?void 0:D.optionUrl)==null?void 0:y.groupSelect)==null?void 0:P[1])}),(V=f==null?void 0:f.optionUrl)!=null&&V.menuSelect){let D=await Rl(f),g;if(D==null||D.forEach(h=>{var i,y,P,E,H,I,X,J,G,_;u===((y=(i=f==null?void 0:f.optionUrl)==null?void 0:i.groupSelect)==null?void 0:y[1])&&((H=(E=(P=f==null?void 0:f.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1])!=null&&H.includes("["))&&((_=k.cloneDeep(h))==null?void 0:_[(G=(J=(X=(I=f==null?void 0:f.optionUrl)==null?void 0:I.groupSelect)==null?void 0:X[1])==null?void 0:J.replaceAll("[",""))==null?void 0:G.replaceAll("]","")])===(f==null?void 0:f.value)&&(g=h)}),g){let h=k.cloneDeep(s);h=h==null?void 0:h.map(y=>{var P,E,H,I,X,J,G,_,j,R,ee;return(g!=null&&g[y==null?void 0:y.label]||g!=null&&g[(I=(H=(E=(P=y==null?void 0:y.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1])==null?void 0:H.replaceAll("[",""))==null?void 0:I.replaceAll("]","")])&&((G=(J=(X=y==null?void 0:y.optionUrl)==null?void 0:X.groupSelect)==null?void 0:J[1])!=null&&G.includes("["))&&(y.value=(g==null?void 0:g[y==null?void 0:y.label])||(g==null?void 0:g[(ee=(R=(j=(_=y==null?void 0:y.optionUrl)==null?void 0:_.groupSelect)==null?void 0:j[1])==null?void 0:R.replaceAll("[",""))==null?void 0:ee.replaceAll("]","")])),y}),Y.value=(A=k.cloneDeep(Y.value))==null?void 0:A.map(y=>{if((y==null?void 0:y.id)===(l==null?void 0:l.id)){const P={};return h==null||h.forEach(E=>{P[E.name]=E.value}),P.id=y==null?void 0:y.id,P}return y});let i=k.cloneDeep(h);i=i==null?void 0:i.map(y=>{var P,E,H,I;return(E=(P=y==null?void 0:y.optionUrl)==null?void 0:P.menuSelect)!=null&&E.some(X=>X==null?void 0:X.includes)&&(y.optionUrl.menuSelect=(I=(H=y==null?void 0:y.optionUrl)==null?void 0:H.menuSelect)==null?void 0:I.map(X=>{var J,G,_,j;if(X!=null&&X.includes("[")){let R=(G=(J=X==null?void 0:X.replaceAll("[","").replaceAll("]",""))==null?void 0:J.split(":"))==null?void 0:G[1];X=(j=(_=k.cloneDeep(h))==null?void 0:_.find(ee=>(ee==null?void 0:ee.label)===R))==null?void 0:j.value}return X})),y}),Y.value=(O=k.cloneDeep(Y.value))==null?void 0:O.map(y=>{if((y==null?void 0:y.id)===(l==null?void 0:l.id)){const P={};return i==null||i.forEach(E=>{P[E.name]=E.value}),P.id=y==null?void 0:y.id,P}return y})}}},nr=async e=>{var m,t,C,b,T,B,U,S,V,A,O,D;if(!e)return;Te.value=e;const l=k.cloneDeep(c.itemData);let n=l==null?void 0:l.map(g=>{var h;return(g==null?void 0:g.key)==="header"&&((h=g.contents)==null||h.map((i,y)=>{var P,E,H,I,X,J,G,_,j,R,ee,z,p,F,N,he,ye,de,x;return i.type=i!=null&&i.type?i.type:(I=(H=(E=(P=i==null?void 0:i.key)==null?void 0:P.split("$"))==null?void 0:E[1])==null?void 0:H.split("("))!=null&&I[0]?(J=(X=re.FormType)==null?void 0:X.find(v=>{var oe,te,ce,De;return(v==null?void 0:v.key)===((De=(ce=(te=(oe=i==null?void 0:i.key)==null?void 0:oe.split("$"))==null?void 0:te[1])==null?void 0:ce.split("("))==null?void 0:De[0])}))==null?void 0:J.value:"Input",i.options=i!=null&&i.options?i.options:((j=(_=(G=i==null?void 0:i.key)==null?void 0:G.split("$"))==null?void 0:_[1])==null?void 0:j.length)>0?(p=(z=ql((ee=(R=i==null?void 0:i.key)==null?void 0:R.split("$"))==null?void 0:ee[1]))==null?void 0:z.split(","))==null?void 0:p.map(v=>({label:v,value:v})):[],(F=i==null?void 0:i.key)!=null&&F.includes("$")&&(i.key=(he=(N=i==null?void 0:i.key)==null?void 0:N.split("$"))==null?void 0:he[0]),i.value=(ye=Object.values(e))==null?void 0:ye[y],i.optionUrl=i!=null&&i.formMenuSelect&&((de=i==null?void 0:i.formMenuSelect)==null?void 0:de.length)>0?{groupSelect:(x=i==null?void 0:i.groupSelect)==null?void 0:x.split(/[::]/).map(v=>v.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=Fe.value,o=(t=(m=k.cloneDeep(n))==null?void 0:m.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:t.contents;if(r=r==null?void 0:r.map(g=>{var h;return g.value=(h=o==null?void 0:o.find((i,y)=>(i==null?void 0:i.prop)===(g==null?void 0:g.name)))==null?void 0:h.value,g}),!sl.value)return;let s="",d=(T=(b=(C=k.cloneDeep(n))==null?void 0:C.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:b.contents)==null?void 0:T.find((g,h)=>{var i,y,P;return(g==null?void 0:g.label)===Xe.value||(h==null?void 0:h.toString())===((P=(y=(i=Xe.value)==null?void 0:i.split("a"))==null?void 0:y[1])==null?void 0:P.toString())}),u=(B=d==null?void 0:d.optionUrl)==null?void 0:B.menuSelect,f=!0;if((V=(S=(U=k.cloneDeep(n))==null?void 0:U.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:S.contents)==null||V.forEach(g=>{var h,i,y,P,E,H;f&&((y=(i=(h=g==null?void 0:g.optionUrl)==null?void 0:h.groupSelect)==null?void 0:i[1])!=null&&y.includes("["))&&(s=(E=(P=g==null?void 0:g.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1],JSON.stringify(u)===JSON.stringify((H=g==null?void 0:g.optionUrl)==null?void 0:H.menuSelect)&&(f=!1))}),(A=d==null?void 0:d.optionUrl)!=null&&A.menuSelect&&sl.value){let g=await Rl(d),h;if((O=d==null?void 0:d.optionUrl)==null||O.menuSelect,g==null||g.forEach(i=>{var y,P,E,H,I,X,J,G,_,j;s===((P=(y=d==null?void 0:d.optionUrl)==null?void 0:y.groupSelect)==null?void 0:P[1])&&((I=(H=(E=d==null?void 0:d.optionUrl)==null?void 0:E.groupSelect)==null?void 0:H[1])!=null&&I.includes("["))&&((j=k.cloneDeep(i))==null?void 0:j[(_=(G=(J=(X=d==null?void 0:d.optionUrl)==null?void 0:X.groupSelect)==null?void 0:J[1])==null?void 0:G.replaceAll("[",""))==null?void 0:_.replaceAll("]","")])===(d==null?void 0:d.value)&&(h=i)}),h){let i=k.cloneDeep(r);i=i==null?void 0:i.map(E=>{var H,I,X,J,G,_,j,R,ee,z,p;return(h!=null&&h[E==null?void 0:E.label]||h!=null&&h[(J=(X=(I=(H=E==null?void 0:E.optionUrl)==null?void 0:H.groupSelect)==null?void 0:I[1])==null?void 0:X.replaceAll("[",""))==null?void 0:J.replaceAll("]","")])&&((j=(_=(G=E==null?void 0:E.optionUrl)==null?void 0:G.groupSelect)==null?void 0:_[1])!=null&&j.includes("["))&&(E.value=(h==null?void 0:h[E==null?void 0:E.label])||(h==null?void 0:h[(p=(z=(ee=(R=E==null?void 0:E.optionUrl)==null?void 0:R.groupSelect)==null?void 0:ee[1])==null?void 0:z.replaceAll("[",""))==null?void 0:p.replaceAll("]","")])),E}),Fe.value=k.cloneDeep(i);let y=k.cloneDeep(i);y=y==null?void 0:y.map(E=>{var H,I,X,J,G,_;return(I=(H=E==null?void 0:E.optionUrl)==null?void 0:H.menuSelect)!=null&&I.some(j=>j==null?void 0:j.includes("["))&&(E.optionUrl.oldMenuSelect=(J=(X=k.cloneDeep(E))==null?void 0:X.optionUrl)==null?void 0:J.menuSelect,E.optionUrl.menuSelect=(_=(G=E==null?void 0:E.optionUrl)==null?void 0:G.menuSelect)==null?void 0:_.map(j=>{var R,ee,z,p;if(j!=null&&j.includes("[")){let F=(ee=(R=j==null?void 0:j.replaceAll("[","").replaceAll("]",""))==null?void 0:R.split(":"))==null?void 0:ee[1];j=(p=(z=k.cloneDeep(i))==null?void 0:z.find(N=>(N==null?void 0:N.label)===F))==null?void 0:p.value}return j})),E}),Fe.value=y;let P={};(D=Fe.value)==null||D.forEach(E=>{P[E.prop]=E==null?void 0:E.value}),Te.value=P}}sl.value=!1},or=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",tr=e=>{var s,d;const l=(d=(s=_e.value)==null?void 0:s.find(u=>(u==null?void 0:u.label)===(e==null?void 0:e.label)))==null?void 0:d.multiple,n=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;Y.value.forEach(u=>{const f=u==null?void 0:u[n];l&&ca.isString(f)&&(u[n]=[f]),!l&&!ca.isString(f)&&(u[n]="")})},na=(e,l)=>{var n;return l==null||l.forEach(r=>{e[r==null?void 0:r.prop]=r==null?void 0:r.value}),e.children&&((n=e.children)==null?void 0:n.length)>0&&(e.children=e.children.map(r=>na(r,l))),e},Vl=e=>{var n,r,o,s,d,u;cl("");const l=(n=Fe.value)==null?void 0:n.reduce((f,m)=>(f[m.name]=m.value,f),{});if(((r=Object.keys(l))==null?void 0:r.length)>0){Te.value=l,Ke.value="",el.value=(o=Y.value)==null?void 0:o.length,ll.value=(s=Ge.value)==null?void 0:s.filter(m=>(m==null?void 0:m.label)!=="新增");const f=(u=(d=ae.value)==null?void 0:d.filter(m=>(m==null?void 0:m.label)!=="操作"))==null?void 0:u.map(m=>{var C,b,T;const t=(b=(C=_e.value)==null?void 0:C.find(B=>(B==null?void 0:B.label)===(m==null?void 0:m.label)))==null?void 0:b.multiple;return tr(m),{...m,contents:(m==null?void 0:m.options)??[],optionUrl:m!=null&&m.formMenuSelect&&((T=m==null?void 0:m.formMenuSelect)==null?void 0:T.length)>0?{groupSelect:m==null?void 0:m.groupSelect,menuSelect:m==null?void 0:m.formMenuSelect,selectRelateType:"",type:m==null?void 0:m.formType,multiple:t}:null}});K.value=f==null?void 0:f.map(m=>na(m,[{prop:"type",value:"edit"},{prop:"columnType",value:or(m==null?void 0:m.formType)||(m==null?void 0:m.columnType)}])),e==="createClick"&&dl(!1)}},al={START:"开始时间",END:"结束时间",HOURS:"工时"},sr=(e,l)=>Number(zl.dayjs(l).diff(zl.dayjs(e),"day",!0).toFixed(1)),oa=e=>{var s;const l=c.itemData,n=(s=l==null?void 0:l.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:s.contents,r=new Map;return n==null||n.forEach((d,u)=>{const{label:f}=d;r.set(f,u)}),!r.has(al.START)||!r.has(al.END)||!r.has(al.HOURS)?e:e==null?void 0:e.map(d=>{const u=d==null?void 0:d[al.START],f=d==null?void 0:d[al.END],m=sr(u,f);return u&&f&&(d[al.HOURS]=`${m}天`),d})},ta=(e,l,n=0)=>{if(n>((l==null?void 0:l.length)??""))return e;const r=l==null?void 0:l[n],o=new Map;for(const d of e){const u=d[r];o.has(u)||o.set(u,[]),o.get(u)&&o.get(u).push(d)}const s=[];for(const[d,u]of o){const[f,...m]=u,t={...f};n+1===((l==null?void 0:l.length)??"")?t.children=u==null?void 0:u.map(C=>(C.level=k.cloneDeep(n)+1,C)).filter((C,b)=>b!==0):m.length>0&&(t.children=ta(m,l,n+1)),t.level=n,s.push(t)}return s},sa=(e,l,n)=>{var o;if(!(l!=null&&l.contents)||((o=l==null?void 0:l.contents)==null?void 0:o.length)===0)return e;let r=[];return r=ta(e,l==null?void 0:l.contents,0),r},ia=(e,l)=>{var b,T,B,U,S,V,A,O,D,g,h,i,y,P,E,H,I,X,J,G,_,j,R,ee,z;const n=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="header");e==null||e.filter(p=>(p==null?void 0:p.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="childTree")[0];let o=l;const s=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="page"),d=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="rowButton"),u=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="extraButton"),f=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableContents"),m=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableIndex");_e.value=(T=(b=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableToForm"))==null?void 0:b[0])==null?void 0:T.contents,Wl.value=(s==null?void 0:s.contents)??!0;let t=[];He.value===""?t=n==null?void 0:n[0]:t=(n==null?void 0:n.find(p=>(p==null?void 0:p.selectLabel)==="("+He.value+")"))??(n==null?void 0:n.find(p=>!(p!=null&&p.selectLabel)));let C=[];if(He.value===""?C=m==null?void 0:m[0]:C=(m==null?void 0:m.find(p=>(p==null?void 0:p.selectLabel)==="("+He.value+")"))??(m==null?void 0:m.find(p=>!(p!=null&&p.selectLabel))),((B=t==null?void 0:t.contents)==null?void 0:B.length)>0){let p=[];if(t!=null&&t.contents.some(x=>Array.isArray(x)&&(x==null?void 0:x.find(v=>v.children))))Ve.value===""?p=(S=(U=re.getGradeColumns(t==null?void 0:t.contents))==null?void 0:U[0])==null?void 0:S.filter(x=>!Array.isArray(x)):(Ve.value.split("-"),p=(V=re.getGradeColumns(t==null?void 0:t.contents))==null?void 0:V[0]);else{let x=t!=null&&t.contents.some(v=>Array.isArray(v))?(A=t==null?void 0:t.contents)==null?void 0:A[0]:t==null?void 0:t.contents;x==null||x.forEach((v,oe)=>{var De,Be,pl,fl;let te="";(Be=(De=ne.value)==null?void 0:De.split("/"))==null||Be.forEach(je=>{var gl,hl,yl;if(je!==""){let rl=(yl=(hl=(gl=je==null?void 0:je.split(W+"updateLoading"))==null?void 0:gl[0])==null?void 0:hl.split(W+"loading"))==null?void 0:yl[0];te=te===""?te+rl:te+"/"+rl}}),te=te+W+(v==null?void 0:v.directiveLabel);const ce=(pl=_e.value)==null?void 0:pl.find(je=>(je==null?void 0:je.prop)===(v==null?void 0:v.prop));p.push({label:(v==null?void 0:v.label)??"",prop:(v==null?void 0:v.label)==="操作"?"operate":(v==null?void 0:v.prop)??"a"+oe,width:v!=null&&v.width?parseInt(v.width):"",fixed:(v==null?void 0:v.fixed)??void 0,sortable:(v==null?void 0:v.sortable)??!1,filterable:(v==null?void 0:v.filterable)??!1,operable:(v==null?void 0:v.operable)??!1,showSummary:(v==null?void 0:v.showSummary)??!1,align:(v==null?void 0:v.align)??"left",showOverflowTooltip:(v==null?void 0:v.showOverflowTooltip)??!0,isNotDrag:(v==null?void 0:v.isNotDrag)??!1,isEditCol:(v==null?void 0:v.isEditCol)??!1,isOperate:(v==null?void 0:v.isOperate)??!1,id:(v==null?void 0:v.id)??oe,type:(v==null?void 0:v.label)==="操作"?"operate":void 0,formType:(v==null?void 0:v.formType)??(v!=null&&v.groupSelect?"Select":""),isTableColHidden:v==null?void 0:v.isTableColHidden,isFormColHidden:v==null?void 0:v.isFormColHidden,disabled:v==null?void 0:v.disabled,options:(v==null?void 0:v.options)??[],value:(v==null?void 0:v.value)??"",formMenuSelect:(v==null?void 0:v.formMenuSelect)??[],isRoute:(v==null?void 0:v.isRoute)??!1,groupSelect:v!=null&&v.groupSelect?(fl=v==null?void 0:v.groupSelect)==null?void 0:fl.replaceAll('"',"").split(":"):[],isMainKey:(v==null?void 0:v.isMainKey)||(v==null?void 0:v.directiveLabel)&&!o[te],columnType:(ce==null?void 0:ce.type)||(v==null?void 0:v.columnType)||"TEXTAREA",directiveLabel:v==null?void 0:v.directiveLabel,isExistChild:!!(v!=null&&v.directiveLabel&&o[te]),childPath:te})})}K.value=re.getNewColumnChild(p),Ne.value=re.getNewColumnChild(p),Q.value=(O=K.value)==null?void 0:O.map(x=>x==null?void 0:x.label),ze.value=(D=K.value)==null?void 0:D.every(x=>x==null?void 0:x.filterable),ke.value=(g=K.value)==null?void 0:g.every(x=>x==null?void 0:x.operable),Ae.value=(h=K.value)==null?void 0:h.every(x=>x==null?void 0:x.sortable);let F=(y=(i=re.getAllLeafNodes(K.value))==null?void 0:i.filter(x=>(x==null?void 0:x.type)!=="operate"))==null?void 0:y.map((x,v)=>({prop:(x==null?void 0:x.prop)??"a"+v,column:x.label}));we.value=F;let N=[];He.value===""?N=f==null?void 0:f[0]:N=(f==null?void 0:f.find(x=>(x==null?void 0:x.selectLabel)==="("+He.value+")"))??(f==null?void 0:f.find(x=>!(x!=null&&x.selectLabel)));let he=Array.isArray((P=N==null?void 0:N.contents)==null?void 0:P[0])&&((E=N==null?void 0:N.contents)!=null&&E[0].every(x=>Array.isArray(x)))?(H=N==null?void 0:N.contents)==null?void 0:H[0]:N==null?void 0:N.contents;C!=null&&C.contents&&((I=C==null?void 0:C.contents)==null?void 0:I.length)!==0&&(he=(X=k.cloneDeep(he))==null?void 0:X.map((x,v)=>{if(!Array.isArray(x)){let oe={};for(let te in x)te!=="id"&&te!=="index"&&(oe[te]=x[te]);x=Object.values(oe)}return x}));const ye=!!((J=K.value)!=null&&J.find(x=>x.prop==="index"));he=fa(he,C==null?void 0:C.contents,ye);const de=[];he==null||he.forEach((x,v)=>{var te;let oe={};if(Array.isArray(x)){let ce=[];x==null||x.filter(De=>!(De!=null&&De.id)).forEach((De,Be)=>{var pl,fl,je,gl,hl,yl;if((pl=F==null?void 0:F[Be])!=null&&pl.prop&&!Array.isArray(De)){let rl={};rl[F[Be].column]=De,se!=null&&se.value&&((fl=se==null?void 0:se.value)==null?void 0:fl.length)>0&&((je=se==null?void 0:se.value)!=null&&je.find(Me=>JSON.stringify(Me==null?void 0:Me[0])===JSON.stringify(rl)))&&(ce=(gl=se==null?void 0:se.value)==null?void 0:gl.find(Me=>JSON.stringify(Me==null?void 0:Me[0])===JSON.stringify(rl))),ce&&ce.length>0?oe[F[Be].prop]=ce!=null&&ce.find(Me=>{var vl;return((vl=Object.keys(Me))==null?void 0:vl[0])===F[Be].column})?(hl=ce==null?void 0:ce.find(Me=>{var vl;return((vl=Object.keys(Me))==null?void 0:vl[0])===F[Be].column}))==null?void 0:hl[F[Be].column]:De:oe[F[Be].prop]=De}else Array.isArray(De)&&((yl=F[Be])!=null&&yl.prop?oe[F[Be].prop]=De:oe.children=Jl(De,F))})}else oe=x;Array.isArray(x)&&x.some(ce=>ce==null?void 0:ce.id)?de.push(Object.assign(oe,{id:(te=x==null?void 0:x.find(ce=>ce.id))==null?void 0:te.id})):oe.id?de.push(oe):de.push(Object.assign(oe,{id:v.toString()}))}),Y.value=sa(de,r,K.value),kl.value=de,(G=kl.value)==null||G.forEach(x=>{var v;(v=Sl.value)==null||v.set(x.id,x)})}else K.value=[],ae.value=[],Y.value=[],kl.value=[],Sl.value=new Map;((_=d==null?void 0:d.contents)==null?void 0:_.length)>0?We.value=d==null?void 0:d.contents:We.value=[],((j=u==null?void 0:u.contents)==null?void 0:j.length)>0?(ll.value=u==null?void 0:u.contents,Ge.value=u==null?void 0:u.contents):(ll.value=[],Ge.value=[]),el.value=((R=Y==null?void 0:Y.value)==null?void 0:R.length)??0,oa(Y.value),Cl.value=Y.value,Qe.value&&(K.value=(z=(ee=ae.value)==null?void 0:ee.filter(p=>(p==null?void 0:p.label)!=="操作"))==null?void 0:z.map(p=>{var F;return{...p,type:"edit",optionUrl:p!=null&&p.formMenuSelect&&((F=p==null?void 0:p.formMenuSelect)==null?void 0:F.length)>0?{groupSelect:p==null?void 0:p.groupSelect,menuSelect:p==null?void 0:p.formMenuSelect,selectRelateType:"",type:p==null?void 0:p.formType}:null}}),Vl())};a.watch(()=>[c.itemData,He.value,ma.value,Ve.value,se==null?void 0:se.value],async()=>{var e,l,n,r,o,s;if((e=c==null?void 0:c.itemData)!=null&&e.find(d=>(d==null?void 0:d.key)==="columnPath")&&!((l=ol.value)!=null&&l.find(d=>{var u,f;return(d==null?void 0:d.key)===((f=(u=c==null?void 0:c.itemData)==null?void 0:u.find(m=>(m==null?void 0:m.key)==="columnPath"))==null?void 0:f.contents)}))){let d=ol.value,u={key:(r=(n=c==null?void 0:c.itemData)==null?void 0:n.find(f=>(f==null?void 0:f.key)==="columnPath"))==null?void 0:r.contents,value:(s=(o=c==null?void 0:c.itemData)==null?void 0:o.find(f=>(f==null?void 0:f.key)==="columnUsingPath"))==null?void 0:s.contents};d!=null&&d.find(f=>(f==null?void 0:f.key)===(u==null?void 0:u.key))?d=d==null?void 0:d.map(f=>((f==null?void 0:f.key)===(u==null?void 0:u.key)&&(f.value=u.value),f)):d.push(u),ue.setTableViewContents(d)}ia(c.itemData,c.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>c==null?void 0:c.operatingForm,e=>{e!=null&&e.form&&(cl(e==null?void 0:e.form),Oe.value=e==null?void 0:e.dialogTitle,Tl.value=!0,$e.value=!0)},{immediate:!0,deep:!0});const ua=()=>{Qe.value=!Qe.value},ir=()=>{xl.value=!xl.value};a.watch(()=>Qe.value,e=>{e?(Vl("viewChange"),ue.setCacheUpdatingData(null)):(ll.value=Ge.value,K.value=Ne.value,nl.value&&(ue.setTableLoading(c==null?void 0:c.index),$("change",nl.value)))},{immediate:!0}),a.watch(()=>{var e;return(e=Hl.value)==null?void 0:e.length},e=>{e===0&&(me.currentPage=1)}),a.ref(!1);const ur=(e,l)=>{var n;Vl("createClick"),l===me.pageSize&&(me.currentPage=Math.ceil(((n=Y.value)==null?void 0:n.length)/me.pageSize))},cr=(e,l,n)=>{var r;ra(n,e,l),Te.value=k.cloneDeep(e),Ke.value=e==null?void 0:e.id,el.value=(r=Y.value)==null?void 0:r.length,Oe.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",dl(!1)},Ce=e=>{var f,m,t,C,b,T,B,U,S,V;const{row:l,column:n,item:r,slotData:o}=e;let s=l!=null&&l[n==null?void 0:n.prop]||(l==null?void 0:l[n==null?void 0:n.prop])===0?((m=(f=l==null?void 0:l[n==null?void 0:n.prop])==null?void 0:f[0])==null?void 0:m.contents)??((l==null?void 0:l[n==null?void 0:n.prop])===0?"0":l==null?void 0:l[n==null?void 0:n.prop]):((C=(t=l==null?void 0:l[r==null?void 0:r.prop])==null?void 0:t[0])==null?void 0:C.contents)??(l==null?void 0:l[r==null?void 0:r.prop])??((T=(b=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:b[0])==null?void 0:T.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((S=(U=l==null?void 0:l[(B=r==null?void 0:r.child)==null?void 0:B.prop])==null?void 0:U[0])==null?void 0:S.contents)??(l==null?void 0:l[(V=r==null?void 0:r.child)==null?void 0:V.prop]),u=Array.isArray(s)&&!(s!=null&&s.every(A=>typeof A=="string"||typeof A=="number"))?"查看":s;return u=Array.isArray(u)?u.join(","):u,u},dr=e=>{var m,t,C,b,T,B,U,S,V,A;const{row:l,column:n,item:r,slotData:o}=e;let s=l!=null&&l[n==null?void 0:n.prop]?((t=(m=l==null?void 0:l[n==null?void 0:n.prop])==null?void 0:m[0])==null?void 0:t.contents)??(l==null?void 0:l[n==null?void 0:n.prop]):((b=(C=l==null?void 0:l[r==null?void 0:r.prop])==null?void 0:C[0])==null?void 0:b.contents)??(l==null?void 0:l[r==null?void 0:r.prop])??((B=(T=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:T[0])==null?void 0:B.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((V=(S=l==null?void 0:l[(U=r==null?void 0:r.child)==null?void 0:U.prop])==null?void 0:S[0])==null?void 0:V.contents)??(l==null?void 0:l[(A=r==null?void 0:r.child)==null?void 0:A.prop]);const u=Array.isArray(s)&&!(s!=null&&s.every(O=>typeof O=="string"||typeof O=="number")),f=Array.isArray(s)&&(s==null?void 0:s.find(O=>O==null?void 0:O.url));return u&&f},pr=(e,l)=>e.find(n=>Object.values(n).some(r=>r===l));return a.watch(()=>Pe.value,async e=>{if(e){ge.setContentLoading(!0),await a.nextTick();const l=pr(Y.value,e==null?void 0:e.data);if(!l)return ge.setContentLoading(!1);await Yl(e==null?void 0:e.data,null,l,{data:e==null?void 0:e.data,isMainKey:!0}),ge.setContentLoading(!1)}},{deep:!0,immediate:!0}),a.watch(()=>c==null?void 0:c.cacheNewData,e=>{var l;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(c==null?void 0:c.index)&&(Y.value=(l=Y.value)==null?void 0:l.map(n=>{var r;return(n==null?void 0:n.id)===((r=e==null?void 0:e.data)==null?void 0:r.id)?{...n,id:e==null?void 0:e.resId}:n})))},{immediate:!0,deep:!0}),(e,l)=>{var m,t,C;const n=a.resolveComponent("svg-icon"),r=a.resolveComponent("el-popover"),o=a.resolveComponent("el-switch"),s=a.resolveComponent("el-checkbox"),d=a.resolveComponent("el-checkbox-group"),u=a.resolveComponent("el-button"),f=a.resolveComponent("LookComponent");return a.openBlock(),a.createElementBlock("div",jr,[Gl.value?(a.openBlock(),a.createBlock(Je.ssTable,{id:"excel-table",pageObj:me,summaryInfo:qe,columns:K.value,defaultSort:ve,isCardViewport:xl.value,checkedColumns:Q.value,key:jl.value+JSON.stringify(K.value),tableData:Hl.value,isEditViewport:Qe.value,isShowPagination:Wl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:M.allowSelect,onDbClickRow:qa,extraButton:ll.value,rowButton:We.value,cacheExtraButtons:Ge.value,isClearSelection:((m=Le.value)==null?void 0:m.length)===0,onDoCurrentChange:Ea,onDoSizeChange:xa,onContentClick:Yl,onRowClick:Ra,onSelectChange:wa,onCellChange:cr,onChange:ra,onPreview:Ql,onSubmitEditingTable:Oa,onHandleColEditChange:Na,onHandleColTypeChange:Ua,onClickButton:Nl},a.createSlots({headerButton:a.withCtx(b=>{var T,B;return[M.showHeader?(a.openBlock(),a.createBlock(Tr,{key:0,lockingPage:a.unref(ml)===a.unref(ne),filterValues:Xl.value,selectNums:(T=Le.value)==null?void 0:T.length,dataNums:(B=Y.value)==null?void 0:B.length,compName:M.compName,isDevMode:M.isDevMode,buttons:b.buttons,onButtonClick:l[0]||(l[0]=U=>Nl(U,"",{})),columns:K.value,onFilter:za,onGetImportData:_a,level:M.level},null,8,["lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var b,T;return[((b=Y.value)==null?void 0:b.length)>0&&M.allowOperate?(a.openBlock(),a.createElementBlock("div",Kr,[(T=We.value)!=null&&T.some(B=>(B==null?void 0:B.label)==="编辑")&&!xl.value&&a.unref(ml)!==a.unref(ne)?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:ua},[a.createVNode(n,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0),a.createElementVNode("span",{title:"卡片视图",onClick:ir},[a.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:b,index:T})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:B=>ur(b,T)},[a.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,$r)]),operateCol:a.withCtx(()=>[a.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:rr},{reference:a.withCtx(()=>[a.createElementVNode("span",Fr,[a.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",Vr,[l[11]||(l[11]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(o,{"model-value":Ae.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:l[2]||(l[2]=b=>Pl(b,"sortable"))},null,8,["model-value"]),a.createVNode(o,{"model-value":ze.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:l[3]||(l[3]=b=>Pl(b,"filterable"))},null,8,["model-value"]),a.createVNode(o,{"model-value":ke.value,"active-text":"编辑所有表头","inactive-text":"",onChange:l[4]||(l[4]=b=>Pl(b,"operable"))},null,8,["model-value"]),l[12]||(l[12]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(d,{modelValue:Q.value,"onUpdate:modelValue":l[5]||(l[5]=b=>Q.value=b),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:w},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(il.value,b=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:b.label},[a.createVNode(s,{value:b.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:b.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(b.label),9,zr)]),_:2},1032,["value"]),a.createVNode(r,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(n,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var T;return[a.createElementVNode("div",qr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((T=Object.keys(b))==null?void 0:T.filter(B=>{var U;return(U=le.value)==null?void 0:U.find(S=>(S==null?void 0:S.value)===B)}),B=>{var U,S;return a.openBlock(),a.createElementBlock("div",{key:B},[a.createVNode(o,{"model-value":b==null?void 0:b[B],"active-text":(S=(U=le.value)==null?void 0:U.find(V=>(V==null?void 0:V.value)===B))==null?void 0:S.label,onChange:V=>ja(V,B,b)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",Jr,[a.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(b=>{var T,B,U,S,V,A,O,D,g,h,i,y,P,E,H,I,X,J;return[dr(b)?(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",Rr,a.toDisplayString(Ce(b)),1)]),default:a.withCtx(()=>{var G;return[a.createElementVNode("div",Wr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b==null?void 0:b.row[(G=b==null?void 0:b.column)==null?void 0:G.prop],_=>(a.openBlock(),a.createElementBlock("div",Gr,[a.createElementVNode("div",{class:"prop-url",title:Bl(_),onClick:j=>Ka(_)},a.toDisplayString(Bl(_)),9,Hr),a.createElementVNode("div",{class:"prop-download",onClick:j=>$a(_)}," 下载 ",8,Qr)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock("div",{key:1,style:a.normalizeStyle({color:!Array.isArray(Ce(b))&&((B=(T=Ce(b))==null?void 0:T.toString())!=null&&B.includes(".txt")||(S=(U=Ce(b))==null?void 0:U.toString())!=null&&S.includes(".cpt")||(A=(V=Ce(b))==null?void 0:V.toString())!=null&&A.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ce(b))&&((D=(O=Ce(b))==null?void 0:O.toString())!=null&&D.includes(".txt")||(h=(g=Ce(b))==null?void 0:g.toString())!=null&&h.includes(".cpt")||(y=(i=Ce(b))==null?void 0:i.toString())!=null&&y.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ce(b))&&((E=(P=Ce(b))==null?void 0:P.toString())!=null&&E.includes(".txt")||(I=(H=Ce(b))==null?void 0:H.toString())!=null&&I.includes(".cpt")||(J=(X=Ce(b))==null?void 0:X.toString())!=null&&J.includes(".cyd"))?"pointer":"",marginLeft:(b==null?void 0:b.colIndex)===0?`${((b==null?void 0:b.level)??0)*20}px`:0}),onClick:G=>Ca(Ce(b))},a.toDisplayString(Ce(b)===0?"0":Ce(b)),13,Xr))]}),_:2},[((t=We.value)==null?void 0:t.length)>0&&a.unref(ml)!==a.unref(ne)?{name:"actions",fn:a.withCtx(({item:b})=>[a.createVNode(r,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(n,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:a.withCtx(()=>[a.createElementVNode("div",Mr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Fa(We.value,b),(T,B)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:B,onClick:U=>Nl(T==null?void 0:T.label,b,{extra:T})},[a.createElementVNode("div",{style:a.normalizeStyle({color:T==null?void 0:T.textColor}),class:"extra-button-label"},a.toDisplayString(T==null?void 0:T.label),5)],8,Pr))),128))])]),_:2},1024)]),key:"0"}:void 0,((C=Y.value)==null?void 0:C.length)>0?{name:"batchButton",fn:a.withCtx(b=>[a.createVNode(Er,{lockingPage:a.unref(ml)===a.unref(ne),buttons:b.buttons,selectTableItems:Le.value,onButtonClick:l[1]||(l[1]=T=>Nl(T,"",{}))},null,8,["lockingPage","buttons","selectTableItems"])]),key:"1"}:void 0]),1032,["pageObj","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):a.createCommentVNode("",!0),a.createVNode(Ul.ssDialog,{title:Oe.value,visible:$e.value,width:Sa.value,onBeforeDestroy:Ma,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",Yr,[a.createVNode(Je.ssForm,{rowContents:Fe.value,isEnableWrap:!1,showOperator:!1,onChange:nr,onClickTrigger:Pa,isEdit:wl.value,onBlurChange:La},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[Tl.value?(a.openBlock(),a.createElementBlock("div",Zr,[a.createVNode(u,{onClick:l[6]||(l[6]=b=>$e.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>l[13]||(l[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(u,{class:"ok-button",onClick:l[7]||(l[7]=b=>dl(!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(Ul.ssDialog,{title:Oe.value,visible:Dl.value,width:Ll.value,onBeforeDestroy:l[9]||(l[9]=b=>Dl.value=!1)},{default:a.withCtx(()=>[a.createVNode(Nr)]),footer:a.withCtx(()=>[a.createElementVNode("div",Ir,[a.createVNode(u,{onClick:l[8]||(l[8]=b=>Dl.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>l[15]||(l[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(u,{class:"ok-button",onClick:Wa,id:"themeButton"},{default:a.withCtx(()=>l[16]||(l[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["title","visible","width"]),Ue.value?(a.openBlock(),a.createBlock(Je.ssFilePreview,{key:1,fileDataList:q.value,onDestroy:Ja},null,8,["fileDataList"])):a.createCommentVNode("",!0),be.value?(a.openBlock(),a.createBlock(Ul.ssDialog,{key:2,visible:be.value,onBeforeDestroy:lr,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(bl.ThreeViewerHost,{"file-urls":tl.value,isThreeScene:xe.value,isSelfWindow:!0,threeData:Ze.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(Ul.ssDialog,{visible:e.componentVisible,onBeforeDestroy:l[10]||(l[10]=b=>e.componentVisible=!1),width:Ll.value,style:{height:"70vh"}},{default:a.withCtx(()=>[a.createVNode(f,{dialogItem:Al.value},null,8,["dialogItem"])]),_:1},8,["visible","width"])])}}},ln=Ol._export_sfc(en,[["__scopeId","data-v-666b2bd5"]]);exports.formGetOptions=ql;exports.getSelectRow=Rl;exports.ssTable=ln;exports.useFormComp=ya;exports.useFormToTableComp=da;exports.useUnit=pa;
|
|
1
|
+
"use strict";const a=require("vue"),k=require("./index-BOJUyAaV.cjs"),zl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BSOYWm_U.cjs"),Je=require("./index-D6mwkqWY.cjs"),bl=require("./threeViewerHost-CRqcYbJE.cjs"),re=require("./index.vue_vue_type_style_index_1_lang-N-_9ZJEf.cjs"),Ye=require("./index.vue_vue_type_style_index_1_lang-H_pReDxj.cjs"),Ol=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");require("./three-viewport-gizmo-BV37JzRa.cjs");const Ul=require("./index-8yRiF_z8.cjs");require("./index-B7hLDNQ6.cjs");const ca=require("./isString-CELwppr9.cjs"),ql=M=>M.match(/\((.*)\)/)[1],fr={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(M){const Z=M,Q=a.ref(null),L=a.ref(!1),w=a.ref(null);return a.watch(()=>Z==null?void 0:Z.isVisible,()=>{L.value=Z==null?void 0:Z.isVisible},{deep:!0,immediate:!0}),a.watch(()=>w.value,()=>{a.nextTick(()=>{var c,le;(le=(c=Q.value)==null?void 0:c.updatePopper)==null||le.call(c)})},{deep:!0,immediate:!0}),(c,le)=>{const fe=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(fe,{visible:L.value,title:Z==null?void 0:Z.title,placement:Z==null?void 0:Z.placement,width:Z==null?void 0:Z.width,ref_key:"popOverRef",ref:Q},{reference:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"reference",{ref_key:"referenceRef",ref:w})])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},gr={class:"extra-button-content"},hr={class:"table-operator-wrap"},yr={class:"extra-button-filter"},vr={class:"form-content-value"},br={key:0,class:"extra-header"},mr={class:"drop-menu",style:{width:"120px"}},kr={key:0},Sr={key:1},Dr={__name:"header",props:{lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(M,{emit:Z}){const Q=Z,L=M,w=a.ref(""),c=a.ref(!1),le=a.ref([]),fe=a.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Ee=$=>{const K=$.raw;if(!K)return;const ve=new FileReader;ve.onload=ae=>{try{const be=new Uint8Array(ae.target.result),xe=Ye.readSync(be,{type:"array"}),Ze=xe.SheetNames[0],Ne=xe.Sheets[Ze],q=Ye.utils.decode_range(Ne["!ref"]).e.c+1,ge=new Array(q).fill(""),pe=[];for(const Se in Ne){if(Se[0]==="!")continue;const{r:Pe,c:Ie}=Ye.utils.decode_cell(Se);let ue=Ne[Se].v;if(Ne[Se].t==="n"&&ue>0&&ue<1e6&&(ue=new Date((ue-25569)*86400*1e3).toISOString().split("T")[0]),(ue==null||ue==="")&&(ue=""),Pe===0)ge[Ie]=ue;else{if(!pe[Pe-1]){pe[Pe-1]={};for(let se=0;se<q;se++)pe[Pe-1][`col_${se}`]=""}pe[Pe-1][`col_${Ie}`]=ue}}for(let Se=0;Se<q;Se++)ge[Se]===void 0&&(ge[Se]="");const ne=pe==null?void 0:pe[0];if(!(ne!=null&&ne.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");Q("getImportData",ge,pe)}catch(be){throw k.ElMessage.error(be.message),new Error(be.message)}},ve.readAsArrayBuffer(K)},W=$=>{var ve;const K=(ve=le.value)==null?void 0:ve.reduce((ae,be,xe)=>(xe===0?ae[be.label]=$:ae[be.label]=be==null?void 0:be.value,ae),{});Q("filter",K,$,!0)},Ae=$=>{Q("buttonClick",$)},ze=$=>{var K,ve;le.value=(ve=(K=re.getColumnChild(k.cloneDeep($)))==null?void 0:K.filter(ae=>(ae==null?void 0:ae.label)!==""&&(ae==null?void 0:ae.label)!=="操作"))==null?void 0:ve.map(ae=>({label:(ae==null?void 0:ae.label)??"",value:"",name:(ae==null?void 0:ae.label)??"",isFormColHidden:ae==null?void 0:ae.isTableColHidden,width:2}))},ke=a.ref(!1),qe=$=>{var K;if(($==null?void 0:$.buttonName)==="确认"&&(Q("filter",$==null?void 0:$.content),ke.value=($==null?void 0:$.content)&&Object.values($==null?void 0:$.content).length>0),($==null?void 0:$.buttonName)==="清空"){const ve=k.cloneDeep($==null?void 0:$.content);for(const ae in ve)ve[ae]="";le.value=(K=le.value)==null?void 0:K.map(ae=>({...ae,value:""})),Q("filter",ve),ke.value=!1}c.value=!1},me=()=>{var K,ve;le.value=(K=le.value)==null?void 0:K.map(ae=>({...ae,value:""}));const $=(ve=le.value)==null?void 0:ve.reduce((ae,be)=>(ae[be.label]=be.value,ae),{});Q("filter",$)};return a.onMounted(()=>{ze(L.columns)}),a.watch(()=>L.columns,()=>{ze(L.columns)},{deep:!0,immediate:!0}),($,K)=>{var Ne,Ue;const ve=a.resolveComponent("el-icon"),ae=a.resolveComponent("svg-icon"),be=a.resolveComponent("el-input"),xe=a.resolveComponent("el-button"),Ze=a.resolveComponent("el-upload");return a.openBlock(),a.createElementBlock("div",gr,[a.createElementVNode("div",{class:a.normalizeClass(M.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(L==null?void 0:L.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:(L==null?void 0:L.level)>1?"0px":"8px",fontWeight:600-((L==null?void 0:L.level)-1)*100>=400?600-((L==null?void 0:L.level)-1)*100:400,fontSize:17-(L==null?void 0:L.level)>=14?17-(L==null?void 0:L.level)+"px":"14px"})},a.toDisplayString(M.compName),7),a.createElementVNode("div",hr,[a.createElementVNode("div",yr,[a.createVNode(fr,{title:"",width:800,placement:"bottom-start",isVisible:c.value},{reference:a.withCtx(()=>{var q,ge,pe,ne;return[a.createVNode(be,{modelValue:w.value,"onUpdate:modelValue":K[1]||(K[1]=Se=>w.value=Se),style:{"min-width":"80px"},placeholder:ke.value?(pe=(ge=(q=M.filterValues)==null?void 0:q.filter(Se=>Se))==null?void 0:ge.slice(0,3))==null?void 0:pe.join("/"):"搜索","prefix-icon":a.unref(k.search_default),clearable:"",onInput:W,disabled:((ne=le.value)==null?void 0:ne.length)===0},{suffix:a.withCtx(()=>{var Se,Pe;return[!w.value&&((Pe=(Se=M.filterValues)==null?void 0:Se.filter(Ie=>Ie))!=null&&Pe.join("/"))?(a.openBlock(),a.createBlock(ve,{key:0,style:{cursor:"pointer"},onClick:me},{default:a.withCtx(()=>[a.createVNode(a.unref(k.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:K[0]||(K[0]=Se=>c.value=!c.value)},[a.createVNode(ae,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",vr,[(a.openBlock(),a.createBlock(Je.ssForm,{rowContents:le.value,buttonValue:fe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:fe.value,isStartJustify:!1,onOnButtonClick:qe},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),M.buttons&&((Ne=M.buttons)==null?void 0:Ne.length)>0?(a.openBlock(),a.createElementBlock("div",br,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ue=M.buttons)==null?void 0:Ue.filter(q=>M.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,ge)=>(a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:ge},[(q==null?void 0:q.type)==="upload"?(a.openBlock(),a.createBlock(Ze,{key:0,class:"upload-button-wrap","on-change":Ee,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!M.lockingPage},{default:a.withCtx(()=>[a.createVNode(xe,{disabled:!!M.lockingPage,style:a.normalizeStyle({background:(q==null?void 0:q.background)??"var(--ssbutton-theme-bg)",color:(q==null?void 0:q.color)??"var(--ssbutton-theme-color)"})},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(q==null?void 0:q.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(Je._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(xe,{key:0,disabled:!!M.lockingPage,style:a.normalizeStyle({background:(q==null?void 0:q.background)??"var(--ssbutton-theme-bg)",color:(q==null?void 0:q.color)??"var(--ssbutton-theme-color)"})},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(q==null?void 0:q.label),1)]),_:2},1032,["disabled","style"])):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",mr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(q==null?void 0:q.contents,pe=>(a.openBlock(),a.createBlock(xe,{key:pe==null?void 0:pe.label,disabled:!!M.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:ne=>Ae(pe==null?void 0:pe.label)},{default:a.withCtx(()=>{var ne,Se;return[a.createTextVNode(a.toDisplayString(pe==null?void 0:pe.label),1),(ne=pe==null?void 0:pe.label)!=null&&ne.includes("选中")?(a.openBlock(),a.createElementBlock("span",kr,"("+a.toDisplayString(M.selectNums)+")",1)):a.createCommentVNode("",!0),(Se=pe==null?void 0:pe.label)!=null&&Se.includes("全部")?(a.openBlock(),a.createElementBlock("span",Sr,"("+a.toDisplayString(M.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),q!=null&&q.type?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(xe,{key:2,id:"themeButton",disabled:!!M.lockingPage,style:a.normalizeStyle({background:(q==null?void 0:q.background)??"var(--ssbutton-theme-bg)",color:(q==null?void 0:q.color)??"var(--ssbutton-theme-color)"}),onClick:pe=>Ae(q==null?void 0:q.label)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(q==null?void 0:q.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):a.createCommentVNode("",!0)])])}}},Tr=Ol._export_sfc(Dr,[["__scopeId","data-v-0f9ba5cc"]]),Cr=a.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(M,{emit:Z}){const Q=M,L=Z,w=le=>{L("buttonClick",le)},c=le=>{var fe;return le!=null&&le.includes("删除")?((fe=Q.selectTableItems)==null?void 0:fe.length)>0?"warning-active-type":"warning-type":"default-type"};return(le,fe)=>{const Ee=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(M.buttons,W=>(a.openBlock(),a.createBlock(Ee,{key:W==null?void 0:W.label,disabled:!!M.lockingPage,class:a.normalizeClass(c(W==null?void 0:W.label)),onClick:Ae=>w(W==null?void 0:W.label)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(W==null?void 0:W.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Er=Ol._export_sfc(Cr,[["__scopeId","data-v-70b12973"]]),da=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(M){this.selectArray=M},setSelectString(M){this.selectString=M}}}),xr={class:"calculator-content"},Ar={class:"calculator-child"},_r={class:"calculator-child"},Br=a.defineComponent({__name:"calculator",setup(M){const Z=a.ref(),Q=a.ref();return a.onMounted(()=>{Z.value=[{type:"Upload",label:"输入",name:"input"}],Q.value=[{type:"Upload",label:"输出",name:"output"}]}),(L,w)=>(a.openBlock(),a.createElementBlock("div",xr,[a.createElementVNode("div",Ar,[a.createVNode(Je.ssForm,{rowContents:Z.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",_r,[a.createVNode(Je.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Nr=Ol._export_sfc(Br,[["__scopeId","data-v-73db0fe7"]]),pa=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(M){this.selectIndex=M},setSelectMenu(M){this.selectMenu=M},setSelectTitle(M){this.selectTitle=M}}}),Jl=(M,Z)=>{let Q=M,L=Z;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((w,c)=>{if(Array.isArray(w)){let le={};return w=w==null?void 0:w.forEach((fe,Ee)=>{var W;(W=L==null?void 0:L[Ee])!=null&&W.prop?le[L[Ee].prop]=fe:Array.isArray(fe)&&(le.children=Jl(fe,L))}),Object.assign(le,{id:c})}else return w})),Q},fa=(M,Z,Q)=>{let L=M,w=Z;return L=L==null?void 0:L.map((c,le)=>{var fe,Ee;return!Array.isArray(c)||!((fe=w==null?void 0:w[le])!=null&&fe.label)&&!Q||(c.unshift(((Ee=w==null?void 0:w[le])==null?void 0:Ee.label)??""),c.some(W=>Array.isArray(W))&&(c=c==null?void 0:c.map(W=>{var Ae;return Array.isArray(W)&&(W=fa(W,(Ae=w==null?void 0:w[le])==null?void 0:Ae.children,Q)),W}))),c}),L},Ur=(M,Z,Q)=>{if(Z==="")return M==null?void 0:M.filter(L=>(L==null?void 0:L.id)!==Q);{const L=Z.split("-");return Or(M,L,Q)}},Or=(M,Z,Q)=>{let L=M,w=Z;return(w==null?void 0:w.length)===0?L=L==null?void 0:L.filter(c=>c.id!==Q):L=L==null?void 0:L.map(c=>(c.id.toString()===(w==null?void 0:w[0])&&(w==null||w.shift(),c=ga(c,w,Q)),c)),L},ga=(M,Z,Q)=>{var c,le;let L=M,w=Z;return(w==null?void 0:w.length)===0?L.children=(c=L.children)==null?void 0:c.filter(fe=>fe.id!==Q):L.children=(le=L.children)==null?void 0:le.map(fe=>(fe.id.toString()===(w==null?void 0:w[0])&&(w==null||w.shift(),fe=ga(fe,w,Q)),fe)),L},wr=(M,Z,Q)=>{if(Z==="")return Q;{const L=Z.split("-");return Lr(M,L,Q)}},Lr=(M,Z,Q)=>{let L=M,w=Z;return(w==null?void 0:w.length)===0?L=Q:L=L==null?void 0:L.map(c=>(c.id.toString()===(w==null?void 0:w[0])&&(w==null||w.shift(),c=ha(c,w,Q)),c)),L},ha=(M,Z,Q)=>{var c;let L=M,w=Z;return(w==null?void 0:w.length)===0?L.children=Q:L.children=(c=L.children)==null?void 0:c.map(le=>(le.id.toString()===(w==null?void 0:w[0])&&(w==null||w.shift(),le=ha(le,w,Q)),le)),L},ya=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(M){this.objUrl=M},setBlobUrls(M){this.blobUrls=M}}}),Rl=async M=>{var c,le,fe,Ee,W,Ae,ze;let Z=(le=(c=k.cloneDeep(M))==null?void 0:c.optionUrl)==null?void 0:le.menuSelect,Q=[];Z==null||Z.forEach(ke=>{});let L="";const w=await re.menuToParent(Z);if(w==null||w.forEach(ke=>{var qe,me,$,K;(ke==null?void 0:ke.name)===(((K=($=(me=(qe=k.cloneDeep(M))==null?void 0:qe.optionUrl)==null?void 0:me.groupSelect)==null?void 0:$[0])==null?void 0:K.replaceAll("'",""))??"")&&(L=ke==null?void 0:ke.id)}),L!==""){const ke=(fe=w==null?void 0:w.find($=>{var K,ve,ae,be;return($==null?void 0:$.name)===(((ve=(K=M==null?void 0:M.groupSelect)==null?void 0:K.split(":"))==null?void 0:ve[0])||((be=(ae=M==null?void 0:M.optionUrl)==null?void 0:ae.groupSelect)==null?void 0:be[0]))}))==null?void 0:fe.compData;let qe=(W=(Ee=ke==null?void 0:ke.find($=>($==null?void 0:$.key)==="header"))==null?void 0:Ee.contents)==null?void 0:W.map($=>$==null?void 0:$.label),me=(ze=(Ae=ke==null?void 0:ke.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:Ae.contents)==null?void 0:ze.map($=>($=$==null?void 0:$.filter(K=>!(K!=null&&K.id)),$));me==null||me.forEach($=>{Q.push(re.getValueToObjectValue($,qe))})}return Q},jr={class:"table-content"},Mr={class:"menu-config-wrap"},Pr=["onClick"],Kr={key:0,class:"viewport-wrap"},$r=["onClick"],Fr={title:"选择显示列信息"},Vr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},zr=["title"],qr={class:"col-operate-wrap"},Jr={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Rr={class:"pop-view"},Wr={class:"pop-wrapper"},Gr={class:"file-list-pop"},Hr=["title","onClick"],Qr=["onClick"],Xr=["onClick"],Yr={class:"form-content"},Zr={key:0,class:"dialog-footer"},Ir={class:"dialog-footer"},en={__name:"index",props:{level:{type:Number,default:1},compName:{type:String,default:"",required:!1},operatingForm:{type:Object,default:()=>{}},cacheNewData:{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(M,{emit:Z}){const Q=a.ref([]),L=ya(k.pinia),w=a.ref(null),c=M,le=a.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),fe=re.useOriginalState(k.pinia),{originalPath:Ee}=k.storeToRefs(fe),W=Ee.value,Ae=a.ref(!1),ze=a.ref(!1),ke=a.ref(!1),qe=a.reactive({column:{},status:!1,text:"合计"}),me=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),$=Z,K=a.ref([]),ve=a.reactive({prop:"",order:null}),ae=a.ref([]),be=a.ref(!1),xe=a.ref(!1),Ze=a.ref(null);bl.useThreeSystem();const Ne=a.ref([]),Ue=a.ref(!1),q=a.ref(),ge=re.useMenuState(),{importLoading:pe,activeMenuPath:ne,contentLoading:Se,linkMenuInfo:Pe}=k.storeToRefs(ge),Ie=re.useTableComp(k.pinia),ue=re.useModelComp(k.pinia),{extraContents:se,cacheUpdatingData:nl,tableViewContents:ol,tableLoading:an,pageMapState:Re,lockingPage:ml}=k.storeToRefs(ue),Y=a.ref([]),kl=a.ref([]),Sl=a.ref(new Map);a.ref(!1);const Ke=a.ref("");a.ref();const wl=a.ref(!0),el=a.ref(0),Wl=a.ref(!0),Oe=a.ref(""),$e=a.ref(!1),va=a.ref({label:"查看三维模型"}),Dl=a.ref(!1),Ll=a.ref(),_e=a.ref([]),We=a.ref([]),Tl=a.ref(!1),tl=a.ref([]),ll=a.ref([]),Ge=a.ref([]),Fe=a.ref([]),we=a.ref(),Te=a.ref(),ba=da(k.pinia),Cl=a.ref(),jl=a.ref(0),El=pa(k.pinia),{selectIndex:ma,selectMenu:Ve,selectTitle:Ml}=k.storeToRefs(El),{selectString:He}=k.storeToRefs(ba),ka=k.useLoginState(k.pinia),{loginUserInfo:ie}=k.storeToRefs(ka),Sa=a.ref(720),Qe=a.ref(!1),xl=a.ref(!1),Le=a.ref([]),Xe=a.ref(),sl=a.ref(!0),Gl=a.ref(!0),Al=a.ref([]),Da=a.inject("contentRef");a.provide("contentRef",Da),a.watch(()=>{var e;return(e=Y.value)==null?void 0:e.length},e=>{me.total=e}),a.watch(()=>ol.value,async()=>{var s,d,u,f,m,t,C,b,T,B,U,S,V,A,O,D,g,h;if(((s=ol.value)==null?void 0:s.length)===0||!((d=c==null?void 0:c.itemData)!=null&&d.find(i=>(i==null?void 0:i.key)==="columnPath"))||!((u=c==null?void 0:c.itemData)!=null&&u.find(i=>(i==null?void 0:i.key)==="pageColumn")))return;let e=(T=(b=(C=(t=(m=(f=c==null?void 0:c.itemData)==null?void 0:f.find(i=>(i==null?void 0:i.key)==="pageColumn"))==null?void 0:m.contents)==null?void 0:t.split("["))==null?void 0:C[1])==null?void 0:b.split("]"))==null?void 0:T[0],l=((V=(S=(U=(B=c==null?void 0:c.itemData)==null?void 0:B.find(i=>(i==null?void 0:i.key)==="pageColumn"))==null?void 0:U.contents)==null?void 0:S.split("["))==null?void 0:V[0])+((O=(A=ol.value)==null?void 0:A.find(i=>(i==null?void 0:i.key)===e))==null?void 0:O.value),n=((g=(D=c==null?void 0:c.itemData)==null?void 0:D.find(i=>(i==null?void 0:i.key)==="pageGroup"))==null?void 0:g.contents)??"",r=await re.getItemData(l,sessionStorage.getItem("systemKey"),""),o=(h=r==null?void 0:r.find(i=>(i==null?void 0:i.name)===(n===""?c==null?void 0:c.compName:n)))==null?void 0:h.compData;ia(o,c.allMapContents)},{deep:!0});const Ta=async(e,l)=>{var n,r,o,s,d;try{const u=await k.getInsofDataApi({id:(c==null?void 0:c.parentTableId)||(c==null?void 0:c.index)});let f;((n=u==null?void 0:u.data)==null?void 0:n.code)===200&&(f=((o=(r=u==null?void 0:u.data)==null?void 0:r.result)==null?void 0:o[0])||null);const m={type:"data",pageKey:c!=null&&c.parentTableId?(s=f==null?void 0:f.key)==null?void 0:s.pageKey:ne.value,tableId:(c==null?void 0:c.parentTableId)||(c==null?void 0:c.index),systemKey:sessionStorage.getItem("systemKey")},t=l==null?void 0:l.map(T=>{const B=Object.keys(T),U={};return B.forEach((S,V)=>{U[e[V]]=T[S]}),U}),C=t==null?void 0:t.map(T=>({key:m,value:{tableData:T}})),b=await k.batchAddInsofDataApi({dataList:C});((d=b==null?void 0:b.data)==null?void 0:d.code)===200?(ue.setRefreshCurStructure(!0),k.ElMessage.success("导入数据成功")):k.ElMessage.error("导入数据响应失败")}catch(u){throw k.ElMessage.error("导入数据处理失败"),new Error(u)}},Ca=async e=>{var l,n;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await k.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),o=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let s=URL.createObjectURL(o);q.value=[{name:(n=e==null?void 0:e.split("/"))==null?void 0:n[((l=e==null?void 0:e.split("/"))==null?void 0:l.length)-1],blobUrl:s}],Ue.value=!0}};a.onBeforeUnmount(()=>{Gl.value=!1;let e=jl.value;jl.value=e+1});const Hl=a.computed(()=>{var r,o;const e=(me.currentPage-1)*me.pageSize,l=e+me.pageSize,n=(r=K.value)==null?void 0:r.find(s=>{var d;return(s==null?void 0:s.sortable)&&((d=s==null?void 0:s.label)==null?void 0:d.includes("时间"))});return n&&(ve.order="descending",ve.prop=n==null?void 0:n.prop),(o=Y.value)==null?void 0:o.slice(e,l)}),Ea=e=>{me.currentPage=e},xa=e=>{var l;me.pageSize=e,e*me.currentPage>((l=Y.value)==null?void 0:l.length)&&(me.currentPage=1,k.ElMessage.warning("分页无效,返回第一页"))},Aa=(e,l)=>{var d,u;const n=(u=(d=K.value)==null?void 0:d.map(f=>f==null?void 0:f.prop))==null?void 0:u.filter(f=>f!=="operate");let r;const o=(e==null?void 0:e.length)===(n==null?void 0:n.length);if(e!=null&&e.includes("序号"))return k.ElMessage.error("导入的数据不需要包含序号列");if(r=o?e:e.slice(0,n==null?void 0:n.length),!(r==null?void 0:r.every(f=>n==null?void 0:n.find(m=>f===m))))return k.ElMessage.error("导入的数据表头不匹配");Ta(r,l)},_a=(e,l)=>{var n;ue.setRefreshCurStructure(!1),((n=K.value)==null?void 0:n.length)===0||Aa(e,l)},Ba=(e,l,n,r)=>{const o=[],s=[],d=m=>Object.keys(m).length;for(const m in e)if(e[m]!==void 0){const t=e[m],C=[];for(const[b,T]of Object.entries(t))C.push(T),s.length<d(t)&&s.push(b);o.push(C)}o.unshift(s);const u=Ye.utils.aoa_to_sheet(o),f=Ye.utils.book_new();Ye.utils.book_append_sheet(f,u,r),Ye.writeFileSync(f,`${l}.xlsx`),Le.value=[]},_l=async(e,l,n,r=!1,o)=>{var s,d,u,f,m,t,C,b;try{ue.setRefreshCurStructure(!1);const T=await k.getInsofDataApi({id:c==null?void 0:c.index});if(((s=T==null?void 0:T.data)==null?void 0:s.code)===200){let B=(m=(f=(u=(d=T==null?void 0:T.data)==null?void 0:d.result)==null?void 0:u[0])==null?void 0:f.value)==null?void 0:m.pageData;r?B={...B,compData:(C=B==null?void 0:B.compData)==null?void 0:C.map(S=>{var V;return(S==null?void 0:S.key)==="header"?{...S,contents:(V=S==null?void 0:S.contents)==null?void 0:V.map(A=>({...A,[e]:n}))}:S})}:B={...B,compData:(t=B==null?void 0:B.compData)==null?void 0:t.map(S=>{var V,A;return(S==null?void 0:S.key)==="header"?{...S,contents:(V=S==null?void 0:S.contents)==null?void 0:V.map(O=>(O==null?void 0:O.prop)===(l==null?void 0:l.prop)?{...O,[e]:n}:O)}:(S==null?void 0:S.key)==="tableToForm"&&o?{...S,contents:(A=S==null?void 0:S.contents)==null?void 0:A.map(O=>(O==null?void 0:O.prop)===(l==null?void 0:l.prop)?{...O,[o]:n}:O)}:S})};const U=await k.updateInsofDataApi({id:c==null?void 0:c.index,value:{pageData:B}});((b=U==null?void 0:U.data)==null?void 0:b.code)===200?(k.ElMessage.success("编辑成功"),ue.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(T){k.ElMessage.error(T)}},Na=async(e,l)=>{await _l("label",l,e)},Ua=async(e,l)=>{await _l("columnType",l,e,!1,"type")},Oa=()=>{nl.value?Qe.value=!1:ua()},wa=e=>{Le.value=e},La=(e,l)=>{Xe.value===l?sl.value=!1:sl.value=!0,Xe.value=l==null?void 0:l.changeProp},il=a.computed(()=>{var n,r,o;const e=(n=K.value)==null?void 0:n.some(s=>s==null?void 0:s.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(o=(r=K.value)==null?void 0:r.filter(s=>(s==null?void 0:s.label)!=="操作"))==null?void 0:o.map(s=>({...s,filterable:!!(s!=null&&s.filterable),showSummary:!!(s!=null&&s.showSummary),operable:!!(s!=null&&s.operable)}))}),ja=async(e,l,n)=>{const r=k.cloneDeep(K.value);await a.nextTick(),K.value=r==null?void 0:r.map(o=>(n==null?void 0:n.label)===(o==null?void 0:o.label)?{...o,[l]:e}:o),await _l(l,n,e)},Pl=async(e,l)=>{await _l(l,null,e,!0)},Ma=()=>{$e.value=!1},Pa=e=>{$("clickTrigger",e)},Ql=async e=>{var s,d,u,f,m,t,C,b,T,B,U,S,V,A,O;const l=e==null?void 0:e.row,n=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix;if((s=l==null?void 0:l.toString())!=null&&s.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(l.includes(",")){k.ElMessage.error("当前版本仅允许单个urdf预览!");return}tl.value=[l],xe.value=!0,Ze.value={data:k.cloneDeep(n)},be.value=!0;return}let o=[];if((d=l==null?void 0:l.toString())!=null&&d.includes(".stl")||(u=l==null?void 0:l.toString())!=null&&u.includes(".STL")||(f=l==null?void 0:l.toString())!=null&&f.includes(".obj")||(m=l==null?void 0:l.toString())!=null&&m.includes(".mtl")){tl.value=(t=l==null?void 0:l.toString())==null?void 0:t.split(","),xe.value=!1,be.value=!0;return}if((C=l==null?void 0:l.toString())!=null&&C.includes(".stl")||(b=l==null?void 0:l.toString())!=null&&b.includes(".STL")||(T=l==null?void 0:l.toString())!=null&&T.includes(".obj")||(B=l==null?void 0:l.toString())!=null&&B.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let D,g=[],h={};if(Array.isArray(l)?D=l:D=l==null?void 0:l.split(","),D==null||D.forEach(i=>{i.includes(".mtl")?g.push(i):h.blob=h.blob?h.blob+","+i:i}),(g==null?void 0:g.length)>0&&(h.mtlBlobs=g),r&&(h.suffix=r),(S=(U=Object.values(h))==null?void 0:U[0])!=null&&S.includes("http:"))o.push(h);else{const i=new Blob([h.blob],{type:"application/octet-stream;charset=UTF-8"});let y=URL.createObjectURL(i),P="";(V=l==null?void 0:l.split("/"))==null||V.forEach((E,H)=>{var I;H===((I=l==null?void 0:l.split("/"))==null?void 0:I.length)-1&&(P=E)}),(A=h.blob)!=null&&A.includes(".stl")&&(P=(P==null?void 0:P.replaceAll(">",""))+".urdf"),q.value=[{name:P,blobUrl:y}],Ue.value=!0}}else{const D=await k.axios.get(l,{responseType:"blob",headers:{"Content-Type":"application/json"}}),g=new Blob([D.data],{type:"application/octet-stream;charset=UTF-8"});let h=URL.createObjectURL(g),i="";(O=l==null?void 0:l.split("/"))==null||O.forEach((y,P)=>{var E;P===((E=l==null?void 0:l.split("/"))==null?void 0:E.length)-1&&(i=y)}),q.value=[{name:i,blobUrl:h}],Ue.value=!0}(o==null?void 0:o.length)>0&&L.setBlobUrls(o)},Bl=e=>{var r,o,s,d;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const l=(d=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:d[((s=(o=e==null?void 0:e.url)==null?void 0:o.split("."))==null?void 0:s.length)-1];return(e==null?void 0:e.name)+"."+l},Ka=async e=>{let l=null,n=null,r=null;if(e!=null&&e.downloadUrl){const s=await Kl(),d=Je.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),u=await k.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:s,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{d.close()}),f=new Blob([u.data],{type:"application/octet-stream;charset=UTF-8"});l=URL.createObjectURL(f),n=e==null?void 0:e.name;const m=n==null?void 0:n.lastIndexOf(".");r=n==null?void 0:n.slice(m)}else{const s=await bl.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(s.data),n=Bl(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 s={row:`${l}`,suffix:r};Ql(s);return}const o={name:n,blobUrl:l};q.value=[o],Ue.value=!0},$a=async e=>{let l=null,n=null;if(e!=null&&e.downloadUrl){const s=await Kl(),d=await k.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:s,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),u=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});l=URL.createObjectURL(u),n=e==null?void 0:e.name}else{const s=await bl.downloadAvatarApi({url:e==null?void 0:e.url});l=URL.createObjectURL(s.data),n=Bl(e)}const r={name:n,blobUrl:l},o=document.createElement("a");o.href=r.blobUrl,o.download=r.name,o.style.display="none",document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o)},100)},Fa=(e,l)=>{if(Object.values(l).length!==0)return Object.values(l).find(n=>{var r,o,s;return((r=n==null?void 0:n.toString())==null?void 0:r.includes(".txt"))||((o=n==null?void 0:n.toString())==null?void 0:o.includes(".cpt"))||((s=n==null?void 0:n.toString())==null?void 0:s.includes(".obj"))})?[...e,va.value]:e},Va=(e,l={})=>[...e==null?void 0:e.values()].filter(n=>Object.keys(l).every(r=>{var d;const o=n[r],s=(d=l[r])==null?void 0:d.toLowerCase();return s&&o&&typeof o=="string"?o.toLowerCase().includes(s):!0})),Xl=a.ref([]),za=async(e,l,n=!1)=>{var r;if(e){if(ue.setTableLoading(!0),Xl.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(o=>!o)))return Y.value=kl.value;if(n){Y.value=[...Sl.value.values()].filter(o=>Object.values(o).some(s=>typeof s=="string"?s==null?void 0:s.toLowerCase().includes(l==null?void 0:l.toLowerCase()):!1));return}Y.value=Va(Sl.value,e),ue.setTableLoading(!1)}},qa=async e=>{var d,u,f,m,t,C,b,T,B,U,S,V,A,O,D;const l=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((d=ie.value)==null?void 0:d.account)||((u=ie.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((f=ie.value)==null?void 0:f.account)||((m=ie.value)==null?void 0:m.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(C=(t=l==null?void 0:l.data)==null?void 0:t.result)==null?void 0:C.map(g=>g==null?void 0:g.id);const o=(T=(b=n==null?void 0:n.data)==null?void 0:b.result)==null?void 0:T.map(g=>g==null?void 0:g.id);r=[...k.cloneDeep(r),...o],(r==null?void 0:r.length)>0&&(r!=null&&r.every(g=>g!==null&&g))&&await k.batchDeleteInsofDataApi({ids:r});let s=await re.getItemData(ne.value,sessionStorage.getItem("systemKey"),e.id);if(s=s==null?void 0:s.filter(g=>g.comp!=="methodButton"),s&&s.length>0){const g=!Array.isArray(Ml.value)&&((B=Ml.value)==null?void 0:B.key)!=="main"?[]:Ml.value;g.push({key:Ve.value===""?(U=e==null?void 0:e.id)==null?void 0:U.toString():Ve.value+"-"+((S=e==null?void 0:e.id)==null?void 0:S.toString()),value:e[(V=Object.keys(e))==null?void 0:V.filter(h=>h!=="index"&&h!=="id")[0]]}),El.setSelectMenu(Ve.value===""?(A=e==null?void 0:e.id)==null?void 0:A.toString():Ve.value+"-"+((O=e==null?void 0:e.id)==null?void 0:O.toString())),El.setSelectTitle(g),El.setSelectIndex((D=e==null?void 0:e.id)==null?void 0:D.toString()),$("pageChange",s)}},Yl=async(e,l,n,r)=>{var s,d,u,f,m,t,C,b,T,B,U,S,V,A,O,D,g,h,i,y,P,E,H,I,X;if((r==null?void 0:r.isExistChild)===!0){let J=(d=(s=K.value)==null?void 0:s.find(z=>(z==null?void 0:z.isMainKey)===!0))==null?void 0:d.prop,G=(u=r==null?void 0:r.rowContent)==null?void 0:u[J],_=(m=(f=r==null?void 0:r.columnType)==null?void 0:f.childPath)==null?void 0:m.split(W),j=[];_==null||_.forEach((z,p)=>{(_==null?void 0:_.length)-1===p&&j.push(G),j.push(z)}),j=j.join(W);let R=await re.getItemData(j,sessionStorage.getItem("systemKey"),""),ee=await re.getItemData((t=r==null?void 0:r.columnType)==null?void 0:t.childPath,sessionStorage.getItem("systemKey"),"");if(!R||(R==null?void 0:R.length)===0){let z=[];ee==null||ee.forEach(F=>{var ye,de,x,v;let N={type:"structure",pageKey:j,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(ye=ie.value)==null?void 0:ye.id,parentPageKey:"",createUserLayer:((de=ie.value)==null?void 0:de.dept)||((x=ie.value)==null?void 0:x.部门名称)},he={pageData:{comp:F==null?void 0:F.comp,compData:(v=F==null?void 0:F.compData)==null?void 0:v.filter(oe=>(oe==null?void 0:oe.key)!=="tableContents"),name:F==null?void 0:F.name,isShow:F==null?void 0:F.isShow}};z.push({key:N,value:he})}),(z==null?void 0:z.length)>0&&await k.batchAddInsofDataApi({dataList:z});let p=await re.getItemData(j,sessionStorage.getItem("systemKey"),"");Al.value=p}else Al.value=R;$("routeUrl",Al.value,{isEdit:!0,routerUrl:j});return}if((r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(J=>(J==null?void 0:J.url)&&(J==null?void 0:J.name)))){let J=k.cloneDeep(e);J=await((C=k.cloneDeep(J))==null?void 0:C.map(async _=>{var ee,z,p,F;const j=await bl.downloadAvatarApi({url:_==null?void 0:_.url});let R=URL.createObjectURL(j.data);return{name:(_==null?void 0:_.name)+"."+((F=(ee=_==null?void 0:_.url)==null?void 0:ee.split("."))==null?void 0:F[((p=(z=_==null?void 0:_.url)==null?void 0:z.split("."))==null?void 0:p.length)-1]),blobUrl:R}}));let G=await Promise.all(J);q.value=G,Ue.value=!0}const o=k.cloneDeep(K.value);if((r==null?void 0:r.isMainKey)===!0&&(o==null?void 0:o.length)>0){(b=o==null?void 0:o[0])==null||b.prop;let J=k.cloneDeep(ne).value+W+(r==null?void 0:r.data),G=k.cloneDeep(ne).value,_=(B=(T=Re.value[J])==null?void 0:T.filter(z=>{var p,F;return((p=z==null?void 0:z.key)==null?void 0:p.type)==="structure"&&((F=z==null?void 0:z.key)==null?void 0:F.parentTable)===""}))==null?void 0:B.map(z=>{var p;return(p=z==null?void 0:z.value)==null?void 0:p.pageData}),j={};(U=K.value)==null||U.forEach(z=>{(z==null?void 0:z.label)!=="操作"&&(j[z.label]=n[z.prop]??n[z.label])});let R=(V=(S=c==null?void 0:c.itemData)==null?void 0:S.find(z=>(z==null?void 0:z.key)==="mainRouters"))==null?void 0:V.contents,ee;if((R==null?void 0:R.length)>0){let z=J==null?void 0:J.split(W)[((A=J==null?void 0:J.split(W))==null?void 0:A.length)-1],p=R==null?void 0:R.find(F=>(F==null?void 0:F.key)===z);ee=(p==null?void 0:p.routerContent)+W+(p==null?void 0:p.key)}if((_==null?void 0:_.length)>0)await re.getItemData(J+W+`updateLoading${((O=ie.value)==null?void 0:O.account)||((D=ie.value)==null?void 0:D.账号)}`,sessionStorage.getItem("systemKey"),"")||await re.loadingConstruct(J,J+W+`updateLoading${((g=ie.value)==null?void 0:g.account)||((h=ie.value)==null?void 0:h.账号)}`,j,ee),ue.setRouteToChildPath(G),ge.setActiveMenuPath(J+W+`updateLoading${((i=ie.value)==null?void 0:i.account)||((y=ie.value)==null?void 0:y.账号)}`);else{(P=o==null?void 0:o[0])==null||P.prop;let z=k.cloneDeep(ne).value+W+(r==null?void 0:r.data),p=k.cloneDeep(ne).value;await re.getItemData(p+W,sessionStorage.getItem("systemKey"),""),await re.loadingConstruct(p+W,z,j),await re.loadingConstruct(z,z+W+`updateLoading${((E=ie.value)==null?void 0:E.account)||((H=ie.value)==null?void 0:H.账号)}`,j,ee),ue.setRouteToChildPath(p),ge.setActiveMenuPath(z+W+`updateLoading${((I=ie.value)==null?void 0:I.account)||((X=ie.value)==null?void 0:X.账号)}`)}}},Ja=()=>{Ue.value=!1},Ra=e=>{$("rowClick",e)};a.watch(()=>c.changedContent,()=>{var n,r;if(!c.changedContent)return;let e=(n=Y.value)==null?void 0:n.map(o=>{var s;return o.id===((s=c.changedContent)==null?void 0:s.id)&&(o={...c.changedContent,id:c.changedContent.newId?c.changedContent.newId:c.changedContent.id},delete o.newId),o});const l=(r=c.itemData)==null?void 0:r.map(o=>((o==null?void 0:o.key)==="tableContents"&&(o.contents=e),o));Y.value=e,$("contentChange",{contents:l,index:c.index}),$("change",{content:e,index:c==null?void 0:c.index,buttonName:"",id:c==null?void 0:c.index})},{deep:!0,immediate:!0});const Wa=()=>{},Ga=async()=>{const e=ne.value,l=sessionStorage.getItem("systemKey"),n=await re.getItemData(e,l,""),r=n==null?void 0:n.find(u=>(u==null?void 0:u.name)==="方法明细"),o=(r==null?void 0:r.compData)||[],s=o==null?void 0:o.find(u=>(u==null?void 0:u.key)==="formContent");return s==null?void 0:s.contents},Kl=async()=>`Bearer ${k.Local.get("access-token")}`,Ha=async(e,{token:l,inputData:n}={})=>await k.axios.post(e,n,{headers:{Authorization:l}}).catch(o=>(ge.setImportLoading(!1),Promise.reject(o))),Qa=e=>{var r;let l={};const n=[];return l.form={},(r=k.cloneDeep(e))==null||r.forEach((o,s)=>{var d,u,f,m,t,C,b,T,B,U,S,V,A,O;if((o==null?void 0:o.comp)==="Table"){(u=(d=o==null?void 0:o.compData)==null?void 0:d.find(i=>(i==null?void 0:i.key)==="header"))==null||u.contents;let D=(t=(m=(f=o==null?void 0:o.compData)==null?void 0:f.find(i=>(i==null?void 0:i.key)==="tableContents"))==null?void 0:m.contents)==null?void 0:t.map(i=>i.slice(1));(U=(B=(T=(b=(C=o==null?void 0:o.compData)==null?void 0:C.find(i=>(i==null?void 0:i.key)==="header"))==null?void 0:b.contents)==null?void 0:T[0])==null?void 0:B[0])==null||U.label;let g=(V=(S=o==null?void 0:o.compData)==null?void 0:S.find(i=>(i==null?void 0:i.key)==="header"))==null?void 0:V.contents,h=[];D==null||D.forEach(i=>{let y=[];i==null||i.forEach((P,E)=>{var I;let H={};((I=g[E])==null?void 0:I.label)!=="操作"&&(H[g[E].label]=P,y.push(H))}),h.push(y)}),l[o.name]=h}else{const D=(O=(A=o.compData)==null?void 0:A.find(g=>(g==null?void 0:g.key)==="formContent"))==null?void 0:O.contents;D==null||D.forEach(g=>{var h,i;if(g.prop!==""){let y=g==null?void 0:g.value;Array.isArray(y)?y=((h=y==null?void 0:y[0])==null?void 0:h.oldUrl)||"http://222.92.178.198:62001/"+((i=y==null?void 0:y[0])==null?void 0:i.url):y=y.toString(),g={key:(g==null?void 0:g.prop)??(g==null?void 0:g.label),value:y},n.push(g)}})}}),l.form=re.getFormContents(n),l},Xa=async(e,l,n)=>{var P,E,H,I,X,J,G,_,j,R,ee,z;ge.setImportLoading(!0);const r=await Ga().catch(p=>(ge.setImportLoading(!1),Promise.reject(p))),o=r==null?void 0:r.find(p=>(p==null?void 0:p.key)==="算法体"),s=o==null?void 0:o.value;if(!s){console.log("未搜索到isMain, 缺少算法执行接口"),ge.setImportLoading(!1);return}const d=K.value||[],u=d.find(p=>(p==null?void 0:p.prop)==="输入"),f=u==null?void 0:u.prop;let m=l==null?void 0:l[f];const t=await Kl().catch(p=>(ge.setImportLoading(!1),Promise.reject(p)));let C=!1,b="";(P=K.value)==null||P.forEach(p=>{(p==null?void 0:p.prop)===f&&(C=!!(p!=null&&p.childPath),b=p==null?void 0:p.childPath)});let T="",B="";if(C){let p=(H=(E=K.value)==null?void 0:E.find(ye=>(ye==null?void 0:ye.isMainKey)===!0))==null?void 0:H.prop;B=l==null?void 0:l[p];let F=b==null?void 0:b.split(W),N=[];F==null||F.forEach((ye,de)=>{(F==null?void 0:F.length)-1===de&&N.push(B),N.push(ye)}),N=N.join(W),T=N;let he=await re.getItemData(N,sessionStorage.getItem("systemKey"),"");m=Qa(he)}const U=await Ha(s,{token:t,inputData:m}).catch(p=>(ge.setImportLoading(!1),Promise.reject(p))),S=(I=U==null?void 0:U.data)==null?void 0:I.data,V=r==null?void 0:r.find(p=>(p==null?void 0:p.prop)==="算法名称");V==null||V.value;const A=d.find(p=>(p==null?void 0:p.prop)==="输出"),O=A==null?void 0:A.directiveLabel;T=T==null?void 0:T.replaceAll(u==null?void 0:u.directiveLabel,O);const D=(X=k.cloneDeep(T))==null?void 0:X.replaceAll(W+B,"");let g=await re.getItemData(T,sessionStorage.getItem("systemKey"),""),h=await re.getItemData(D,sessionStorage.getItem("systemKey"),"");if(g){let p=[],F=[];g==null||g.forEach(N=>{var he,ye;if((N==null?void 0:N.comp)==="Table")(he=N==null?void 0:N.compData)==null||he.forEach(de=>{var x;(de==null?void 0:de.key)==="tableContents"&&((x=de==null?void 0:de.contents)==null||x.forEach(v=>{var oe,te;(oe=v==null?void 0:v[0])!=null&&oe.id&&p.push((te=v==null?void 0:v[0])==null?void 0:te.id)}))});else if((N==null?void 0:N.comp)==="Form"){N.compData=(ye=N==null?void 0:N.compData)==null?void 0:ye.map(x=>{var v;return(x==null?void 0:x.key)==="formContent"&&(x.contents=(v=x==null?void 0:x.contents)==null?void 0:v.map(oe=>{var te,ce;return(te=S==null?void 0:S.form)!=null&&te[oe.prop]&&(oe.value=(ce=S==null?void 0:S.form)==null?void 0:ce[oe.prop]),oe})),x});let de={pageData:{comp:N==null?void 0:N.comp,name:N==null?void 0:N.name,isShow:N==null?void 0:N.isShow,compData:N==null?void 0:N.compData}};F.push({id:N==null?void 0:N.id,value:de})}}),(F==null?void 0:F.length)>0&&await k.batchUpdateInsofDataApi({dataList:F}),p=[...new Set(p)],(p==null?void 0:p.length)>0&&await k.batchDeleteInsofDataApi({ids:p})}else{let p=[];if(S!=null&&S.table){let F={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:T,parentTable:"",createUserId:(J=ie.value)==null?void 0:J.id,createUserOrg:((G=ie.value)==null?void 0:G.dept)||((_=ie.value)==null?void 0:_.部门名称)};h==null||h.forEach(N=>{let ye={pageData:{comp:N==null?void 0:N.comp,name:N==null?void 0:N.name,isShow:N==null?void 0:N.isShow,compData:N==null?void 0:N.compData}};p.push({key:F,value:ye})})}if(S!=null&&S.form){let F={type:"structure",pageKey:T,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(j=ie.value)==null?void 0:j.id,parentPageKey:"",createUserLayer:((R=ie.value)==null?void 0:R.dept)||((ee=ie.value)==null?void 0:ee.部门名称)};h==null||h.forEach(N=>{var x;let he=(x=N==null?void 0:N.compData)==null?void 0:x.map(v=>{var oe;return(v==null?void 0:v.key)==="formContent"&&(v.contents=(oe=v.contents)==null?void 0:oe.map(te=>{var ce,De;return(ce=S==null?void 0:S.form)!=null&&ce[te.prop]&&(te.value=(De=S==null?void 0:S.form)==null?void 0:De[te.prop]),te})),v}),de={pageData:{comp:N==null?void 0:N.comp,name:N==null?void 0:N.name,isShow:N==null?void 0:N.isShow,compData:he}};p.push({key:F,value:de})})}(p==null?void 0:p.length)>0&&await k.batchAddInsofDataApi({dataList:p})}let i=await re.getItemData(T,sessionStorage.getItem("systemKey"),""),y=[];S!=null&&S.table&&((z=S==null?void 0:S.table)==null||z.forEach(p=>{var he,ye,de,x;let F={type:"data",pageKey:T,tableId:(he=i==null?void 0:i[0])==null?void 0:he.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ye=ie.value)==null?void 0:ye.id,createUserOrg:((de=ie.value)==null?void 0:de.dept)||((x=ie.value)==null?void 0:x.部门名称)},N={tableData:p};y.push({key:F,value:N})})),(y==null?void 0:y.length)>0&&await k.batchAddInsofDataApi({dataList:y}),dl(!0),ge.setImportLoading(!1)},Zl=(e,l)=>(e=e==null?void 0:e.map(n=>{var r,o;return n!=null&&n.children&&((r=n.children)!=null&&r.find(s=>s.id===(l==null?void 0:l.id))?n.children=(o=n.children)==null?void 0:o.filter(s=>(s==null?void 0:s.id)!==(l==null?void 0:l.id)):n.children=Zl(n.children,l)),n}),e),Nl=async(e,l,n)=>{var r,o,s,d,u,f,m,t,C,b,T,B,U,S,V;if(Ke.value="",Tl.value=!0,wl.value=!0,$("onButtonClick",e,l),e==="删除")re.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,O;(A=Y.value)!=null&&A.find(D=>(D==null?void 0:D.id)===(l==null?void 0:l.id))?Y.value=(O=k.cloneDeep(Y.value))==null?void 0:O.filter(D=>(D==null?void 0:D.id)!==(l==null?void 0:l.id)):Y.value=Zl(k.cloneDeep(Y.value),l),Ur(Cl.value,Ve.value,l==null?void 0:l.id),ue.setTableLoading(c==null?void 0:c.index),$("change",{content:Y.value,singleContent:l,index:c==null?void 0:c.index,type:"delete",buttonName:e,column:K.value})});else if(e==="批量删除"){if(((r=Le.value)==null?void 0:r.length)===0)return k.ElMessage.warning("请先勾选操作的数据");re.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var O,D;const A=(O=Le.value)==null?void 0:O.map(g=>g.id);Y.value=(D=k.cloneDeep(Y.value))==null?void 0:D.filter(g=>!(A!=null&&A.includes(g.id))),ue.setTableLoading(c==null?void 0:c.index),$("change",{content:Y.value,singleContent:null,selectItems:Le.value,index:c==null?void 0:c.index,type:"batchDelete",buttonName:e,column:K.value})})}else if(e==="复制新增"){Oe.value="新增";const A=k.cloneDeep(l),O=(o=K.value)==null?void 0:o.find(h=>h==null?void 0:h.isMainKey),D=O||((s=K.value)==null?void 0:s[0]),g=(d=Ge.value)==null?void 0:d.find(h=>(h==null?void 0:h.label)==="新建");await ea(!0,g,{data:A,firstCol:D})}else if(e==="新增")Oe.value="新增",cl(""),$e.value=!0;else if(e==="编辑")Oe.value="编辑",cl(l),$e.value=!0;else if(e==="查看")Oe.value="查看",cl(l),Tl.value=!1,wl.value=!1,$e.value=!0;else if(e==="查看三维模型"){const A={};for(let D in l)D!=="id"&&(A[D]=l[D]);let O=(u=Object.values(A))==null?void 0:u[1];Ie.setTableShowThree(O)}else if(((f=n==null?void 0:n.extra)==null?void 0:f.type)==="modelExample")Oe.value=e,Dl.value=!0;else if(e==="新建"){let A=Re.value,O=[];for(let y in A)y!=null&&y.includes(`loading${((m=ie.value)==null?void 0:m.account)||((t=ie.value)==null?void 0:t.账号)}`)&&(O=[...O,...y]);let D=[];for(let y in A)y!=null&&y.includes(`updateLoading${((C=ie.value)==null?void 0:C.account)||((b=ie.value)==null?void 0:b.账号)}`)&&(D=[...D,...y]);let g=O==null?void 0:O.map(y=>y==null?void 0:y.id);const h=D==null?void 0:D.map(y=>y==null?void 0:y.id);g=[...k.cloneDeep(g),...h],(g==null?void 0:g.length)>0&&(g!=null&&g.every(y=>y!==null&&y))&&await k.batchDeleteInsofDataApi({ids:g});const i=(T=Ge.value)==null?void 0:T.find(y=>(y==null?void 0:y.label)==="新建");await ea(!1,i)}else if(e==="修改模板"){let A=k.cloneDeep(ne).value;ue.setRouteToChildPath(A),ge.setActiveMenuPath(A+W)}else if(e==="执行")Xa(e,l);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((B=Le.value)==null?void 0:B.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((U=Y.value)==null?void 0:U.length)===0)return k.ElMessage.warning("暂无数据导出");const A=(V=(S=K.value)==null?void 0:S.map(D=>D==null?void 0:D.label))==null?void 0:V.filter(D=>D!=="操作"),O=e==="导出全部"?k.cloneDeep(Y.value):k.cloneDeep(Le.value);O==null||O.forEach(D=>{D==null||delete D.id}),Ba(O,c==null?void 0:c.compName,A,c==null?void 0:c.compName)}},Ya=async e=>{var n,r,o,s,d,u;const l=await k.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((n=l==null?void 0:l.data)==null?void 0:n.code)===200)return Array.isArray((r=l==null?void 0:l.data)==null?void 0:r.result)&&((s=(o=l==null?void 0:l.data)==null?void 0:o.result)==null?void 0:s.length)>0?(u=(d=l==null?void 0:l.data)==null?void 0:d.result)==null?void 0:u.map(f=>{var m;return{id:f==null?void 0:f.id,...(m=f==null?void 0:f.value)==null?void 0:m.pageData}}):[]},Za=async(e,l)=>{var n,r,o,s,d,u,f,m,t,C,b,T,B,U,S,V,A,O,D,g;try{let h,i;const y=(n=Re.value[ne.value+W])==null?void 0:n.filter(_=>{var j;return((j=_==null?void 0:_.key)==null?void 0:j.type)==="structureMethod"}),P=(r=Re.value[ne.value+W])==null?void 0:r.filter(_=>{var j;return((j=_==null?void 0:_.key)==null?void 0:j.type)==="structure"}),E=y==null?void 0:y.find(_=>{var j,R;return((R=(j=_==null?void 0:_.value)==null?void 0:j.pageData)==null?void 0:R.method)==="保存"});if(!E)return;const H=(u=(d=Re.value[(s=(o=E==null?void 0:E.value)==null?void 0:o.pageData)==null?void 0:s.path])==null?void 0:d.filter(_=>{var j;return((j=_==null?void 0:_.key)==null?void 0:j.type)==="data"}))==null?void 0:u.find(_=>{var j,R,ee,z;return((R=(j=_==null?void 0:_.value)==null?void 0:j.tableData)==null?void 0:R.算法名称)===((z=(ee=E==null?void 0:E.value)==null?void 0:ee.pageData)==null?void 0:z.method)});if(!H)return;const I={buttonName:(m=(f=E==null?void 0:E.value)==null?void 0:f.pageData)==null?void 0:m.method,api:(C=(t=H==null?void 0:H.value)==null?void 0:t.tableData)==null?void 0:C.算法体,content:P==null?void 0:P.map(_=>{var j;return(j=_==null?void 0:_.value)==null?void 0:j.pageData}),extraContent:[],extraValues:(T=(b=E==null?void 0:E.value)==null?void 0:b.pageData)==null?void 0:T.data,methodName:(U=(B=E==null?void 0:E.value)==null?void 0:B.pageData)==null?void 0:U.path};if(!e)return;const X={...e,compData:(S=e==null?void 0:e.compData)==null?void 0:S.map(_=>{var j;return(_==null?void 0:_.key)==="formContent"?{..._,contents:(j=_==null?void 0:_.contents)==null?void 0:j.map(R=>(R==null?void 0:R.prop)===l?{...R,value:""}:R)}:_})},J={key:{pageKey:ne.value+W,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:X}},G=await k.axios.post(I.api,J,{headers:{"Content-Type":"application/json"}});return((V=G==null?void 0:G.data)==null?void 0:V.code)===200&&(h=(O=(A=G==null?void 0:G.data)==null?void 0:A.result)==null?void 0:O.latestReportCode,i=(g=(D=G==null?void 0:G.data)==null?void 0:D.result)==null?void 0:g.status),{newMainKeyValue:h,newStatus:i}}catch(h){throw k.ElMessage.error(h),new Error(h)}},Il=(e,l,n,r)=>{var o;$("contentChange",{contents:(o=e==null?void 0:e.compData)==null?void 0:o.map(s=>{var d;return(s==null?void 0:s.key)==="formContent"?{...s,contents:(d=s==null?void 0:s.contents)==null?void 0:d.map(u=>(u==null?void 0:u.key)===l?{...u,value:n}:ul.value&&(u==null?void 0:u.prop)===ul.prop?{...u,value:ul.value}:u)}:s}),index:e==null?void 0:e.id},r)},ul=a.reactive({prop:"状态",value:""}),Ia=a.ref(["系统自动生成信息","审批意见"]),er=async(e,l,n)=>{var f,m;let r=e==null?void 0:e[l==null?void 0:l.prop],o=1,s,d;const u=k.cloneDeep(ne).value+W+r;if(u){ul.value="",s=(f=Re.value[u])==null?void 0:f.filter(b=>{var T;return((T=b==null?void 0:b.key)==null?void 0:T.type)==="structure"});const t=s==null?void 0:s.find(b=>{var T,B,U;return((U=(B=(T=b==null?void 0:b.value)==null?void 0:T.pageData)==null?void 0:B.comp)==null?void 0:U.toUpperCase())==="FORM"});d={...(m=t==null?void 0:t.value)==null?void 0:m.pageData,id:t==null?void 0:t.id};const C=await Za(d,l==null?void 0:l.prop);if(ul.value=C==null?void 0:C.newStatus,C!=null&&C.newMainKeyValue)return C==null?void 0:C.newMainKeyValue}if(Y.value.some(t=>(t==null?void 0:t[l==null?void 0:l.prop])===r)){const t=r;for(;Y.value.some(C=>(C==null?void 0:C[l==null?void 0:l.prop])===`${t}(${o})`);)o++;r=`${t}(${o})`}return r},ea=async(e,l,n)=>{var d,u,f,m,t,C,b,T;let r,o;const s=await er(n==null?void 0:n.data,n==null?void 0:n.firstCol);if(e?(r=k.cloneDeep(ne).value+W+((m=n==null?void 0:n.data)==null?void 0:m[(f=n==null?void 0:n.firstCol)==null?void 0:f.prop]),o=k.cloneDeep(ne).value+W+s):(r=k.cloneDeep(ne).value+W,o=k.cloneDeep(r)+`loading${((d=ie.value)==null?void 0:d.account)||((u=ie.value)==null?void 0:u.账号)}`),l){const B=(C=(t=Re.value[o])==null?void 0:t.filter(U=>{var S;return((S=U==null?void 0:U.key)==null?void 0:S.parentTable)===""}))==null?void 0:C.map(U=>{var S;return{id:U==null?void 0:U.id,...(S=U==null?void 0:U.value)==null?void 0:S.pageData}});if((B==null?void 0:B.length)>0)if(e){const U=B==null?void 0:B.find(S=>{var V;return((V=S==null?void 0:S.comp)==null?void 0:V.toUpperCase())==="FORM"});U&&Il(U,(b=n==null?void 0:n.firstCol)==null?void 0:b.label,s,ne.value)}else ue.setRouteToChildPath(k.cloneDeep(ne).value),ge.setActiveMenuPath(o);else if(await re.loadingConstruct(r,o,null,null,e?Ia.value:null),e){const U=await Ya(o);if((U==null?void 0:U.length)>0){const S=U==null?void 0:U.find(V=>{var A;return((A=V==null?void 0:V.comp)==null?void 0:A.toUpperCase())==="FORM"});S&&Il(S,(T=n==null?void 0:n.firstCol)==null?void 0:T.label,s,ne.value)}}else ue.setRouteToChildPath(k.cloneDeep(ne).value),ge.setActiveMenuPath(o)}else e?(Ke.value="",Te.value=n==null?void 0:n.data,dl(!0,n==null?void 0:n.firstCol,s)):(ue.setRouteToChildPath(k.cloneDeep(ne).value),ge.setActiveMenuPath(o))},lr=()=>{be.value=!1,tl.value=[],xe.value=!1},cl=e=>{var o,s,d,u,f,m;const l=[];let n=[];for(let t in e)Array.isArray(e==null?void 0:e[t])&&n.push(t);ae.value=k.cloneDeep(K.value),(s=re.getColumnChild((o=k.cloneDeep(K.value))==null?void 0:o.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||s.forEach((t,C)=>{var b;n.find(T=>T===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((b=t==null?void 0:t.formType)==null?void 0:b.toUpperCase())==="SELECT"?l.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",name:(t==null?void 0:t.prop)??"t"+C,prop:t==null?void 0:t.prop,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??C,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled,optionUrl:{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.formMenuSelect,type:"Select",selectRelateType:t==null?void 0:t.selectRelateType}}):l.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",prop:t==null?void 0:t.prop,name:(t==null?void 0:t.prop)??"t"+C,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??C,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled}))}),e===""||!e||(Ke.value=(e==null?void 0:e.id)??"");let r=re.getColumnChild((d=k.cloneDeep(K.value))==null?void 0:d.filter(t=>(t==null?void 0:t.label)!=="操作"));_e.value&&((u=_e.value)==null?void 0:u.length)>0&&(_e.value=(f=k.cloneDeep(_e).value)==null?void 0:f.map(t=>{var b;let C=(t==null?void 0:t.prop)||((b=r==null?void 0:r.find(T=>(T==null?void 0:T.label)===(t==null?void 0:t.label)))==null?void 0:b.prop);return C&&(t.value=e[C]),t})),Fe.value=_e.value&&((m=_e.value)==null?void 0:m.length)>0?re.getTableFormToForm(_e.value):l},ar=()=>{var l;const e=(l=w.value)==null?void 0:l.$el;e&&zl.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:n=>{var d;const{oldIndex:r,newIndex:o}=n;if(r===o)return;const s=il.value.splice(r,1)[0];il.value.splice(o,0,s),K.value=(d=K.value)==null?void 0:d.slice().sort((u,f)=>{if(u.label==="操作")return 1;if(f.label==="操作")return-1;const m=il.value.findIndex(C=>C.label===u.label),t=il.value.findIndex(C=>C.label===f.label);return m-t})}})};a.onMounted(()=>{Ll.value=window.innerWidth-240*2});const rr=()=>{a.nextTick(()=>{ar()})},$l=(e,l)=>{var r;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let n;return e.children=(r=e.children)==null?void 0:r.map(o=>{var s,d;if((o==null?void 0:o.id)===Ke.value){let u={};for(let f in o){let m=(s=l==null?void 0:l.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:s.label;m?u[f]=(d=Te.value)==null?void 0:d[m]:u[f]=o[f]}o=Object.assign(u,Te.value),n=o}else{let u=$l(o,l);o=u==null?void 0:u.contents,n=u==null?void 0:u.currentSelectContents}return o}),{contents:e,currentSelectContents:n}},la=(e,l)=>{let n,r;return e!=null&&e.find(o=>(o==null?void 0:o.id)===Ke.value)?n=e==null?void 0:e.map(o=>{var s,d;if((o==null?void 0:o.id)===Ke.value){let u={};for(let f in o){let m=(s=l==null?void 0:l.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:s.label;m?u[f]=(d=Te.value)==null?void 0:d[m]:u[f]=o[f]}o=Object.assign(u,Te.value),r=o}return o}):n=e==null?void 0:e.map(o=>{var s,d,u,f;if((o==null?void 0:o.id)===Ke.value){let m={};for(let t in o){let C=(s=l==null?void 0:l.find(b=>(b==null?void 0:b.prop)===t))==null?void 0:s.label;C?m[t]=(d=Te.value)==null?void 0:d[C]:m[t]=o[t]}o=Object.assign(m,Te.value),r=o}else o=(u=$l(o,l))==null?void 0:u.contents,r=(f=$l(o,l))==null?void 0:f.currentSelectContents;return o}),{newContents:n,currentSelectContents:r}},aa=(e,l,n)=>{var r,o;return e[l==null?void 0:l.prop]=n,typeof e.id=="number"&&(e.id=(r=e.id)==null?void 0:r.toString()),e.children&&((o=e.children)==null?void 0:o.length)>0&&(e.children=e.children.map(aa)),e},Fl=e=>{var n;const l=[];return l.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((n=e.children)==null||n.forEach(r=>{l.push(...Fl(r))})),(l==null?void 0:l.length)>0?l==null?void 0:l.map(r=>{const o={...r};return delete o.children,o}):[]},dl=(e=!0,l,n)=>{var m,t,C,b,T,B,U,S,V;let r=re.getColumnChild((m=k.cloneDeep(K.value))==null?void 0:m.filter(A=>(A==null?void 0:A.label)!=="操作")),o,s=k.cloneDeep(Y.value);if(!Te.value){$e.value=!1;return}if(Ke.value===""){el.value++;let A;l&&n?A={id:el.value.toString(),[l==null?void 0:l.prop]:n,children:Te.value.children}:A={id:el.value.toString()},A!=null&&A.children&&(A={...A,children:(t=A.children)==null?void 0:t.map(O=>aa(O,l,n))}),s.push(Object.assign(Te.value,A)),o=Object.assign(Te.value,A)}else s=(C=la(s,r))==null?void 0:C.newContents,o=(b=la(s,r))==null?void 0:b.currentSelectContents;const d=(T=c.itemData)==null?void 0:T.filter(A=>(A==null?void 0:A.key)==="childTree")[0];if(((B=d==null?void 0:d.contents)==null?void 0:B.length)>0){Oe.value="编辑";const A=[];s==null||s.forEach((O,D)=>{var h;let g={};if(Array.isArray(O)){let i=[];O==null||O.filter(y=>!(y!=null&&y.id)).forEach((y,P)=>{var E,H,I,X,J,G,_;if((H=(E=we.value)==null?void 0:E[P])!=null&&H.prop&&!Array.isArray(y)){let j={};j[we.value[P].column]=y,se!=null&&se.value&&((I=se==null?void 0:se.value)==null?void 0:I.length)>0&&((X=se==null?void 0:se.value)!=null&&X.find(R=>JSON.stringify(R==null?void 0:R[0])===JSON.stringify(j)))&&(i=(J=se==null?void 0:se.value)==null?void 0:J.find(R=>JSON.stringify(R==null?void 0:R[0])===JSON.stringify(j))),i&&i.length>0?g[we.value[P].prop]=i!=null&&i.find(R=>{var ee;return((ee=Object.keys(R))==null?void 0:ee[0])===we.value[P].column})?(G=i==null?void 0:i.find(R=>{var ee;return((ee=Object.keys(R))==null?void 0:ee[0])===we.value[P].column}))==null?void 0:G[we.value[P].column]:y:g[we.value[P].prop]=y}else Array.isArray(y)&&((_=we.value[P])!=null&&_.prop?g[we.value[P].prop]=y:g.children=Jl(y,we.value))})}else g=O;Array.isArray(O)&&O.some(i=>i==null?void 0:i.id)?A.push(Object.assign(g,{id:(h=O==null?void 0:O.find(i=>i.id))==null?void 0:h.id})):g.id?A.push(g):A.push(Object.assign(g,{id:D.toString()}))}),Y.value=sa(A,d,K.value)}else Y.value=s;oa(Y.value),Cl.value=Y.value;const u=wr(Cl.value,Ve.value,s);let f=[];if(nl.value?(f=(U=k.cloneDeep(nl).value.singleContent)==null?void 0:U.filter(A=>(A==null?void 0:A.id)!==(o==null?void 0:o.id)),f.push(o)):f=[o],Qe.value){const A={content:u,singleContent:((S=d==null?void 0:d.contents)==null?void 0:S.length)>0?f==null?void 0:f.flatMap(Fl):f,index:c==null?void 0:c.index,buttonName:"编辑",column:K.value,parentTableId:c==null?void 0:c.parentTableId};ue.setCacheUpdatingData(A)}if(e){const A={content:u,singleContent:((V=d==null?void 0:d.contents)==null?void 0:V.length)>0?Fl(o):o,index:c==null?void 0:c.index,buttonName:Oe.value,column:K.value,parentTableId:c==null?void 0:c.parentTableId};ue.setTableLoading(c==null?void 0:c.index),$e.value=!1,Te.value=void 0,$("change",A)}};a.onUnmounted(()=>{K.value=[],Y.value=[],ae.value=[],Ne.value=[],_e.value=[],We.value=[],tl.value=[],ll.value=[],Fe.value=[],Le.value=[],w.value=null});const ra=async(e,l,n)=>{var m,t,C,b,T,B,U,S,V,A,O;Xe.value=n==null?void 0:n.prop;const r=k.cloneDeep(c.itemData),o=r==null?void 0:r.map(D=>{var g;return(D==null?void 0:D.key)==="header"&&((g=D.contents)==null||g.map((h,i)=>{var y,P,E,H,I,X,J,G,_,j,R,ee,z,p,F,N,he,ye,de;return h.type=h!=null&&h.type?h.type:(H=(E=(P=(y=h==null?void 0:h.key)==null?void 0:y.split("$"))==null?void 0:P[1])==null?void 0:E.split("("))!=null&&H[0]?(X=(I=re.FormType)==null?void 0:I.find(x=>{var v,oe,te,ce;return(x==null?void 0:x.key)===((ce=(te=(oe=(v=h==null?void 0:h.key)==null?void 0:v.split("$"))==null?void 0:oe[1])==null?void 0:te.split("("))==null?void 0:ce[0])}))==null?void 0:X.value:"Input",h.options=h!=null&&h.options?h.options:((_=(G=(J=h==null?void 0:h.key)==null?void 0:J.split("$"))==null?void 0:G[1])==null?void 0:_.length)>0?(z=(ee=ql((R=(j=h==null?void 0:h.key)==null?void 0:j.split("$"))==null?void 0:R[1]))==null?void 0:ee.split(","))==null?void 0:z.map(x=>({label:x,value:x})):[],(p=h==null?void 0:h.key)!=null&&p.includes("$")&&(h.key=(N=(F=h==null?void 0:h.key)==null?void 0:F.split("$"))==null?void 0:N[0]),h.value=(he=Object.values(l))==null?void 0:he[i],h.optionUrl=h!=null&&h.formMenuSelect&&((ye=h==null?void 0:h.formMenuSelect)==null?void 0:ye.length)>0?{groupSelect:(de=h==null?void 0:h.groupSelect)==null?void 0:de.split(/[::]/).map(x=>x.trim()),menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":"")}:null,h})),D});let s=k.cloneDeep(Fe.value),d=(t=(m=k.cloneDeep(o))==null?void 0:m.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:t.contents;s=s==null?void 0:s.map(D=>{var g;return D.value=(g=d==null?void 0:d.find((h,i)=>i===(D==null?void 0:D.id)))==null?void 0:g.value,D});let u="",f=(T=(b=(C=k.cloneDeep(o))==null?void 0:C.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:b.contents)==null?void 0:T.find((D,g)=>{var h,i,y;return(D==null?void 0:D.label)===Xe.value||(g==null?void 0:g.toString())===((y=(i=(h=Xe.value)==null?void 0:h.split("a"))==null?void 0:i[1])==null?void 0:y.toString())});if((S=(U=(B=k.cloneDeep(o))==null?void 0:B.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:U.contents)==null||S.forEach(D=>{var g,h,i,y,P;u===""&&((i=(h=(g=D==null?void 0:D.optionUrl)==null?void 0:g.groupSelect)==null?void 0:h[1])!=null&&i.includes("["))&&(u=(P=(y=D==null?void 0:D.optionUrl)==null?void 0:y.groupSelect)==null?void 0:P[1])}),(V=f==null?void 0:f.optionUrl)!=null&&V.menuSelect){let D=await Rl(f),g;if(D==null||D.forEach(h=>{var i,y,P,E,H,I,X,J,G,_;u===((y=(i=f==null?void 0:f.optionUrl)==null?void 0:i.groupSelect)==null?void 0:y[1])&&((H=(E=(P=f==null?void 0:f.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1])!=null&&H.includes("["))&&((_=k.cloneDeep(h))==null?void 0:_[(G=(J=(X=(I=f==null?void 0:f.optionUrl)==null?void 0:I.groupSelect)==null?void 0:X[1])==null?void 0:J.replaceAll("[",""))==null?void 0:G.replaceAll("]","")])===(f==null?void 0:f.value)&&(g=h)}),g){let h=k.cloneDeep(s);h=h==null?void 0:h.map(y=>{var P,E,H,I,X,J,G,_,j,R,ee;return(g!=null&&g[y==null?void 0:y.label]||g!=null&&g[(I=(H=(E=(P=y==null?void 0:y.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1])==null?void 0:H.replaceAll("[",""))==null?void 0:I.replaceAll("]","")])&&((G=(J=(X=y==null?void 0:y.optionUrl)==null?void 0:X.groupSelect)==null?void 0:J[1])!=null&&G.includes("["))&&(y.value=(g==null?void 0:g[y==null?void 0:y.label])||(g==null?void 0:g[(ee=(R=(j=(_=y==null?void 0:y.optionUrl)==null?void 0:_.groupSelect)==null?void 0:j[1])==null?void 0:R.replaceAll("[",""))==null?void 0:ee.replaceAll("]","")])),y}),Y.value=(A=k.cloneDeep(Y.value))==null?void 0:A.map(y=>{if((y==null?void 0:y.id)===(l==null?void 0:l.id)){const P={};return h==null||h.forEach(E=>{P[E.name]=E.value}),P.id=y==null?void 0:y.id,P}return y});let i=k.cloneDeep(h);i=i==null?void 0:i.map(y=>{var P,E,H,I;return(E=(P=y==null?void 0:y.optionUrl)==null?void 0:P.menuSelect)!=null&&E.some(X=>X==null?void 0:X.includes)&&(y.optionUrl.menuSelect=(I=(H=y==null?void 0:y.optionUrl)==null?void 0:H.menuSelect)==null?void 0:I.map(X=>{var J,G,_,j;if(X!=null&&X.includes("[")){let R=(G=(J=X==null?void 0:X.replaceAll("[","").replaceAll("]",""))==null?void 0:J.split(":"))==null?void 0:G[1];X=(j=(_=k.cloneDeep(h))==null?void 0:_.find(ee=>(ee==null?void 0:ee.label)===R))==null?void 0:j.value}return X})),y}),Y.value=(O=k.cloneDeep(Y.value))==null?void 0:O.map(y=>{if((y==null?void 0:y.id)===(l==null?void 0:l.id)){const P={};return i==null||i.forEach(E=>{P[E.name]=E.value}),P.id=y==null?void 0:y.id,P}return y})}}},nr=async e=>{var m,t,C,b,T,B,U,S,V,A,O,D;if(!e)return;Te.value=e;const l=k.cloneDeep(c.itemData);let n=l==null?void 0:l.map(g=>{var h;return(g==null?void 0:g.key)==="header"&&((h=g.contents)==null||h.map((i,y)=>{var P,E,H,I,X,J,G,_,j,R,ee,z,p,F,N,he,ye,de,x;return i.type=i!=null&&i.type?i.type:(I=(H=(E=(P=i==null?void 0:i.key)==null?void 0:P.split("$"))==null?void 0:E[1])==null?void 0:H.split("("))!=null&&I[0]?(J=(X=re.FormType)==null?void 0:X.find(v=>{var oe,te,ce,De;return(v==null?void 0:v.key)===((De=(ce=(te=(oe=i==null?void 0:i.key)==null?void 0:oe.split("$"))==null?void 0:te[1])==null?void 0:ce.split("("))==null?void 0:De[0])}))==null?void 0:J.value:"Input",i.options=i!=null&&i.options?i.options:((j=(_=(G=i==null?void 0:i.key)==null?void 0:G.split("$"))==null?void 0:_[1])==null?void 0:j.length)>0?(p=(z=ql((ee=(R=i==null?void 0:i.key)==null?void 0:R.split("$"))==null?void 0:ee[1]))==null?void 0:z.split(","))==null?void 0:p.map(v=>({label:v,value:v})):[],(F=i==null?void 0:i.key)!=null&&F.includes("$")&&(i.key=(he=(N=i==null?void 0:i.key)==null?void 0:N.split("$"))==null?void 0:he[0]),i.value=(ye=Object.values(e))==null?void 0:ye[y],i.optionUrl=i!=null&&i.formMenuSelect&&((de=i==null?void 0:i.formMenuSelect)==null?void 0:de.length)>0?{groupSelect:(x=i==null?void 0:i.groupSelect)==null?void 0:x.split(/[::]/).map(v=>v.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=Fe.value,o=(t=(m=k.cloneDeep(n))==null?void 0:m.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:t.contents;if(r=r==null?void 0:r.map(g=>{var h;return g.value=(h=o==null?void 0:o.find((i,y)=>(i==null?void 0:i.prop)===(g==null?void 0:g.name)))==null?void 0:h.value,g}),!sl.value)return;let s="",d=(T=(b=(C=k.cloneDeep(n))==null?void 0:C.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:b.contents)==null?void 0:T.find((g,h)=>{var i,y,P;return(g==null?void 0:g.label)===Xe.value||(h==null?void 0:h.toString())===((P=(y=(i=Xe.value)==null?void 0:i.split("a"))==null?void 0:y[1])==null?void 0:P.toString())}),u=(B=d==null?void 0:d.optionUrl)==null?void 0:B.menuSelect,f=!0;if((V=(S=(U=k.cloneDeep(n))==null?void 0:U.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:S.contents)==null||V.forEach(g=>{var h,i,y,P,E,H;f&&((y=(i=(h=g==null?void 0:g.optionUrl)==null?void 0:h.groupSelect)==null?void 0:i[1])!=null&&y.includes("["))&&(s=(E=(P=g==null?void 0:g.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1],JSON.stringify(u)===JSON.stringify((H=g==null?void 0:g.optionUrl)==null?void 0:H.menuSelect)&&(f=!1))}),(A=d==null?void 0:d.optionUrl)!=null&&A.menuSelect&&sl.value){let g=await Rl(d),h;if((O=d==null?void 0:d.optionUrl)==null||O.menuSelect,g==null||g.forEach(i=>{var y,P,E,H,I,X,J,G,_,j;s===((P=(y=d==null?void 0:d.optionUrl)==null?void 0:y.groupSelect)==null?void 0:P[1])&&((I=(H=(E=d==null?void 0:d.optionUrl)==null?void 0:E.groupSelect)==null?void 0:H[1])!=null&&I.includes("["))&&((j=k.cloneDeep(i))==null?void 0:j[(_=(G=(J=(X=d==null?void 0:d.optionUrl)==null?void 0:X.groupSelect)==null?void 0:J[1])==null?void 0:G.replaceAll("[",""))==null?void 0:_.replaceAll("]","")])===(d==null?void 0:d.value)&&(h=i)}),h){let i=k.cloneDeep(r);i=i==null?void 0:i.map(E=>{var H,I,X,J,G,_,j,R,ee,z,p;return(h!=null&&h[E==null?void 0:E.label]||h!=null&&h[(J=(X=(I=(H=E==null?void 0:E.optionUrl)==null?void 0:H.groupSelect)==null?void 0:I[1])==null?void 0:X.replaceAll("[",""))==null?void 0:J.replaceAll("]","")])&&((j=(_=(G=E==null?void 0:E.optionUrl)==null?void 0:G.groupSelect)==null?void 0:_[1])!=null&&j.includes("["))&&(E.value=(h==null?void 0:h[E==null?void 0:E.label])||(h==null?void 0:h[(p=(z=(ee=(R=E==null?void 0:E.optionUrl)==null?void 0:R.groupSelect)==null?void 0:ee[1])==null?void 0:z.replaceAll("[",""))==null?void 0:p.replaceAll("]","")])),E}),Fe.value=k.cloneDeep(i);let y=k.cloneDeep(i);y=y==null?void 0:y.map(E=>{var H,I,X,J,G,_;return(I=(H=E==null?void 0:E.optionUrl)==null?void 0:H.menuSelect)!=null&&I.some(j=>j==null?void 0:j.includes("["))&&(E.optionUrl.oldMenuSelect=(J=(X=k.cloneDeep(E))==null?void 0:X.optionUrl)==null?void 0:J.menuSelect,E.optionUrl.menuSelect=(_=(G=E==null?void 0:E.optionUrl)==null?void 0:G.menuSelect)==null?void 0:_.map(j=>{var R,ee,z,p;if(j!=null&&j.includes("[")){let F=(ee=(R=j==null?void 0:j.replaceAll("[","").replaceAll("]",""))==null?void 0:R.split(":"))==null?void 0:ee[1];j=(p=(z=k.cloneDeep(i))==null?void 0:z.find(N=>(N==null?void 0:N.label)===F))==null?void 0:p.value}return j})),E}),Fe.value=y;let P={};(D=Fe.value)==null||D.forEach(E=>{P[E.prop]=E==null?void 0:E.value}),Te.value=P}}sl.value=!1},or=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",tr=e=>{var s,d;const l=(d=(s=_e.value)==null?void 0:s.find(u=>(u==null?void 0:u.label)===(e==null?void 0:e.label)))==null?void 0:d.multiple,n=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;Y.value.forEach(u=>{const f=u==null?void 0:u[n];l&&ca.isString(f)&&(u[n]=[f]),!l&&!ca.isString(f)&&(u[n]="")})},na=(e,l)=>{var n;return l==null||l.forEach(r=>{e[r==null?void 0:r.prop]=r==null?void 0:r.value}),e.children&&((n=e.children)==null?void 0:n.length)>0&&(e.children=e.children.map(r=>na(r,l))),e},Vl=e=>{var n,r,o,s,d,u;cl("");const l=(n=Fe.value)==null?void 0:n.reduce((f,m)=>(f[m.name]=m.value,f),{});if(((r=Object.keys(l))==null?void 0:r.length)>0){Te.value=l,Ke.value="",el.value=(o=Y.value)==null?void 0:o.length,ll.value=(s=Ge.value)==null?void 0:s.filter(m=>(m==null?void 0:m.label)!=="新增");const f=(u=(d=ae.value)==null?void 0:d.filter(m=>(m==null?void 0:m.label)!=="操作"))==null?void 0:u.map(m=>{var C,b,T;const t=(b=(C=_e.value)==null?void 0:C.find(B=>(B==null?void 0:B.label)===(m==null?void 0:m.label)))==null?void 0:b.multiple;return tr(m),{...m,contents:(m==null?void 0:m.options)??[],optionUrl:m!=null&&m.formMenuSelect&&((T=m==null?void 0:m.formMenuSelect)==null?void 0:T.length)>0?{groupSelect:m==null?void 0:m.groupSelect,menuSelect:m==null?void 0:m.formMenuSelect,selectRelateType:"",type:m==null?void 0:m.formType,multiple:t}:null}});K.value=f==null?void 0:f.map(m=>na(m,[{prop:"type",value:"edit"},{prop:"columnType",value:or(m==null?void 0:m.formType)||(m==null?void 0:m.columnType)}])),e==="createClick"&&dl(!1)}},al={START:"开始时间",END:"结束时间",HOURS:"工时"},sr=(e,l)=>Number(zl.dayjs(l).diff(zl.dayjs(e),"day",!0).toFixed(1)),oa=e=>{var s;const l=c.itemData,n=(s=l==null?void 0:l.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:s.contents,r=new Map;return n==null||n.forEach((d,u)=>{const{label:f}=d;r.set(f,u)}),!r.has(al.START)||!r.has(al.END)||!r.has(al.HOURS)?e:e==null?void 0:e.map(d=>{const u=d==null?void 0:d[al.START],f=d==null?void 0:d[al.END],m=sr(u,f);return u&&f&&(d[al.HOURS]=`${m}天`),d})},ta=(e,l,n=0)=>{if(n>((l==null?void 0:l.length)??""))return e;const r=l==null?void 0:l[n],o=new Map;for(const d of e){const u=d[r];o.has(u)||o.set(u,[]),o.get(u)&&o.get(u).push(d)}const s=[];for(const[d,u]of o){const[f,...m]=u,t={...f};n+1===((l==null?void 0:l.length)??"")?t.children=u==null?void 0:u.map(C=>(C.level=k.cloneDeep(n)+1,C)).filter((C,b)=>b!==0):m.length>0&&(t.children=ta(m,l,n+1)),t.level=n,s.push(t)}return s},sa=(e,l,n)=>{var o;if(!(l!=null&&l.contents)||((o=l==null?void 0:l.contents)==null?void 0:o.length)===0)return e;let r=[];return r=ta(e,l==null?void 0:l.contents,0),r},ia=(e,l)=>{var b,T,B,U,S,V,A,O,D,g,h,i,y,P,E,H,I,X,J,G,_,j,R,ee,z;const n=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="header");e==null||e.filter(p=>(p==null?void 0:p.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="childTree")[0];let o=l;const s=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="page"),d=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="rowButton"),u=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="extraButton"),f=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableContents"),m=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableIndex");_e.value=(T=(b=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableToForm"))==null?void 0:b[0])==null?void 0:T.contents,Wl.value=(s==null?void 0:s.contents)??!0;let t=[];He.value===""?t=n==null?void 0:n[0]:t=(n==null?void 0:n.find(p=>(p==null?void 0:p.selectLabel)==="("+He.value+")"))??(n==null?void 0:n.find(p=>!(p!=null&&p.selectLabel)));let C=[];if(He.value===""?C=m==null?void 0:m[0]:C=(m==null?void 0:m.find(p=>(p==null?void 0:p.selectLabel)==="("+He.value+")"))??(m==null?void 0:m.find(p=>!(p!=null&&p.selectLabel))),((B=t==null?void 0:t.contents)==null?void 0:B.length)>0){let p=[];if(t!=null&&t.contents.some(x=>Array.isArray(x)&&(x==null?void 0:x.find(v=>v.children))))Ve.value===""?p=(S=(U=re.getGradeColumns(t==null?void 0:t.contents))==null?void 0:U[0])==null?void 0:S.filter(x=>!Array.isArray(x)):(Ve.value.split("-"),p=(V=re.getGradeColumns(t==null?void 0:t.contents))==null?void 0:V[0]);else{let x=t!=null&&t.contents.some(v=>Array.isArray(v))?(A=t==null?void 0:t.contents)==null?void 0:A[0]:t==null?void 0:t.contents;x==null||x.forEach((v,oe)=>{var De,Be,pl,fl;let te="";(Be=(De=ne.value)==null?void 0:De.split("/"))==null||Be.forEach(je=>{var gl,hl,yl;if(je!==""){let rl=(yl=(hl=(gl=je==null?void 0:je.split(W+"updateLoading"))==null?void 0:gl[0])==null?void 0:hl.split(W+"loading"))==null?void 0:yl[0];te=te===""?te+rl:te+"/"+rl}}),te=te+W+(v==null?void 0:v.directiveLabel);const ce=(pl=_e.value)==null?void 0:pl.find(je=>(je==null?void 0:je.prop)===(v==null?void 0:v.prop));p.push({label:(v==null?void 0:v.label)??"",prop:(v==null?void 0:v.label)==="操作"?"operate":(v==null?void 0:v.prop)??"a"+oe,width:v!=null&&v.width?parseInt(v.width):"",fixed:(v==null?void 0:v.fixed)??void 0,sortable:(v==null?void 0:v.sortable)??!1,filterable:(v==null?void 0:v.filterable)??!1,operable:(v==null?void 0:v.operable)??!1,showSummary:(v==null?void 0:v.showSummary)??!1,align:(v==null?void 0:v.align)??"left",showOverflowTooltip:(v==null?void 0:v.showOverflowTooltip)??!0,isNotDrag:(v==null?void 0:v.isNotDrag)??!1,isEditCol:(v==null?void 0:v.isEditCol)??!1,isOperate:(v==null?void 0:v.isOperate)??!1,id:(v==null?void 0:v.id)??oe,type:(v==null?void 0:v.label)==="操作"?"operate":void 0,formType:(v==null?void 0:v.formType)??(v!=null&&v.groupSelect?"Select":""),isTableColHidden:v==null?void 0:v.isTableColHidden,isFormColHidden:v==null?void 0:v.isFormColHidden,disabled:v==null?void 0:v.disabled,options:(v==null?void 0:v.options)??[],value:(v==null?void 0:v.value)??"",formMenuSelect:(v==null?void 0:v.formMenuSelect)??[],isRoute:(v==null?void 0:v.isRoute)??!1,groupSelect:v!=null&&v.groupSelect?(fl=v==null?void 0:v.groupSelect)==null?void 0:fl.replaceAll('"',"").split(":"):[],isMainKey:(v==null?void 0:v.isMainKey)||(v==null?void 0:v.directiveLabel)&&!o[te],columnType:(ce==null?void 0:ce.type)||(v==null?void 0:v.columnType)||"TEXTAREA",directiveLabel:v==null?void 0:v.directiveLabel,isExistChild:!!(v!=null&&v.directiveLabel&&o[te]),childPath:te})})}K.value=re.getNewColumnChild(p),Ne.value=re.getNewColumnChild(p),Q.value=(O=K.value)==null?void 0:O.map(x=>x==null?void 0:x.label),ze.value=(D=K.value)==null?void 0:D.every(x=>x==null?void 0:x.filterable),ke.value=(g=K.value)==null?void 0:g.every(x=>x==null?void 0:x.operable),Ae.value=(h=K.value)==null?void 0:h.every(x=>x==null?void 0:x.sortable);let F=(y=(i=re.getAllLeafNodes(K.value))==null?void 0:i.filter(x=>(x==null?void 0:x.type)!=="operate"))==null?void 0:y.map((x,v)=>({prop:(x==null?void 0:x.prop)??"a"+v,column:x.label}));we.value=F;let N=[];He.value===""?N=f==null?void 0:f[0]:N=(f==null?void 0:f.find(x=>(x==null?void 0:x.selectLabel)==="("+He.value+")"))??(f==null?void 0:f.find(x=>!(x!=null&&x.selectLabel)));let he=Array.isArray((P=N==null?void 0:N.contents)==null?void 0:P[0])&&((E=N==null?void 0:N.contents)!=null&&E[0].every(x=>Array.isArray(x)))?(H=N==null?void 0:N.contents)==null?void 0:H[0]:N==null?void 0:N.contents;C!=null&&C.contents&&((I=C==null?void 0:C.contents)==null?void 0:I.length)!==0&&(he=(X=k.cloneDeep(he))==null?void 0:X.map((x,v)=>{if(!Array.isArray(x)){let oe={};for(let te in x)te!=="id"&&te!=="index"&&(oe[te]=x[te]);x=Object.values(oe)}return x}));const ye=!!((J=K.value)!=null&&J.find(x=>x.prop==="index"));he=fa(he,C==null?void 0:C.contents,ye);const de=[];he==null||he.forEach((x,v)=>{var te;let oe={};if(Array.isArray(x)){let ce=[];x==null||x.filter(De=>!(De!=null&&De.id)).forEach((De,Be)=>{var pl,fl,je,gl,hl,yl;if((pl=F==null?void 0:F[Be])!=null&&pl.prop&&!Array.isArray(De)){let rl={};rl[F[Be].column]=De,se!=null&&se.value&&((fl=se==null?void 0:se.value)==null?void 0:fl.length)>0&&((je=se==null?void 0:se.value)!=null&&je.find(Me=>JSON.stringify(Me==null?void 0:Me[0])===JSON.stringify(rl)))&&(ce=(gl=se==null?void 0:se.value)==null?void 0:gl.find(Me=>JSON.stringify(Me==null?void 0:Me[0])===JSON.stringify(rl))),ce&&ce.length>0?oe[F[Be].prop]=ce!=null&&ce.find(Me=>{var vl;return((vl=Object.keys(Me))==null?void 0:vl[0])===F[Be].column})?(hl=ce==null?void 0:ce.find(Me=>{var vl;return((vl=Object.keys(Me))==null?void 0:vl[0])===F[Be].column}))==null?void 0:hl[F[Be].column]:De:oe[F[Be].prop]=De}else Array.isArray(De)&&((yl=F[Be])!=null&&yl.prop?oe[F[Be].prop]=De:oe.children=Jl(De,F))})}else oe=x;Array.isArray(x)&&x.some(ce=>ce==null?void 0:ce.id)?de.push(Object.assign(oe,{id:(te=x==null?void 0:x.find(ce=>ce.id))==null?void 0:te.id})):oe.id?de.push(oe):de.push(Object.assign(oe,{id:v.toString()}))}),Y.value=sa(de,r,K.value),kl.value=de,(G=kl.value)==null||G.forEach(x=>{var v;(v=Sl.value)==null||v.set(x.id,x)})}else K.value=[],ae.value=[],Y.value=[],kl.value=[],Sl.value=new Map;((_=d==null?void 0:d.contents)==null?void 0:_.length)>0?We.value=d==null?void 0:d.contents:We.value=[],((j=u==null?void 0:u.contents)==null?void 0:j.length)>0?(ll.value=u==null?void 0:u.contents,Ge.value=u==null?void 0:u.contents):(ll.value=[],Ge.value=[]),el.value=((R=Y==null?void 0:Y.value)==null?void 0:R.length)??0,oa(Y.value),Cl.value=Y.value,Qe.value&&(K.value=(z=(ee=ae.value)==null?void 0:ee.filter(p=>(p==null?void 0:p.label)!=="操作"))==null?void 0:z.map(p=>{var F;return{...p,type:"edit",optionUrl:p!=null&&p.formMenuSelect&&((F=p==null?void 0:p.formMenuSelect)==null?void 0:F.length)>0?{groupSelect:p==null?void 0:p.groupSelect,menuSelect:p==null?void 0:p.formMenuSelect,selectRelateType:"",type:p==null?void 0:p.formType}:null}}),Vl())};a.watch(()=>[c.itemData,He.value,ma.value,Ve.value,se==null?void 0:se.value],async()=>{var e,l,n,r,o,s;if((e=c==null?void 0:c.itemData)!=null&&e.find(d=>(d==null?void 0:d.key)==="columnPath")&&!((l=ol.value)!=null&&l.find(d=>{var u,f;return(d==null?void 0:d.key)===((f=(u=c==null?void 0:c.itemData)==null?void 0:u.find(m=>(m==null?void 0:m.key)==="columnPath"))==null?void 0:f.contents)}))){let d=ol.value,u={key:(r=(n=c==null?void 0:c.itemData)==null?void 0:n.find(f=>(f==null?void 0:f.key)==="columnPath"))==null?void 0:r.contents,value:(s=(o=c==null?void 0:c.itemData)==null?void 0:o.find(f=>(f==null?void 0:f.key)==="columnUsingPath"))==null?void 0:s.contents};d!=null&&d.find(f=>(f==null?void 0:f.key)===(u==null?void 0:u.key))?d=d==null?void 0:d.map(f=>((f==null?void 0:f.key)===(u==null?void 0:u.key)&&(f.value=u.value),f)):d.push(u),ue.setTableViewContents(d)}ia(c.itemData,c.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>c==null?void 0:c.operatingForm,e=>{e!=null&&e.form&&(cl(e==null?void 0:e.form),Oe.value=e==null?void 0:e.dialogTitle,Tl.value=!0,$e.value=!0)},{immediate:!0,deep:!0});const ua=()=>{Qe.value=!Qe.value},ir=()=>{xl.value=!xl.value};a.watch(()=>Qe.value,e=>{e?(Vl("viewChange"),ue.setCacheUpdatingData(null)):(ll.value=Ge.value,K.value=Ne.value,nl.value&&(ue.setTableLoading(c==null?void 0:c.index),$("change",nl.value)))},{immediate:!0}),a.watch(()=>{var e;return(e=Hl.value)==null?void 0:e.length},e=>{e===0&&(me.currentPage=1)}),a.ref(!1);const ur=(e,l)=>{var n;Vl("createClick"),l===me.pageSize&&(me.currentPage=Math.ceil(((n=Y.value)==null?void 0:n.length)/me.pageSize))},cr=(e,l,n)=>{var r;ra(n,e,l),Te.value=k.cloneDeep(e),Ke.value=e==null?void 0:e.id,el.value=(r=Y.value)==null?void 0:r.length,Oe.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",dl(!1)},Ce=e=>{var f,m,t,C,b,T,B,U,S,V;const{row:l,column:n,item:r,slotData:o}=e;let s=l!=null&&l[n==null?void 0:n.prop]||(l==null?void 0:l[n==null?void 0:n.prop])===0?((m=(f=l==null?void 0:l[n==null?void 0:n.prop])==null?void 0:f[0])==null?void 0:m.contents)??((l==null?void 0:l[n==null?void 0:n.prop])===0?"0":l==null?void 0:l[n==null?void 0:n.prop]):((C=(t=l==null?void 0:l[r==null?void 0:r.prop])==null?void 0:t[0])==null?void 0:C.contents)??(l==null?void 0:l[r==null?void 0:r.prop])??((T=(b=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:b[0])==null?void 0:T.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((S=(U=l==null?void 0:l[(B=r==null?void 0:r.child)==null?void 0:B.prop])==null?void 0:U[0])==null?void 0:S.contents)??(l==null?void 0:l[(V=r==null?void 0:r.child)==null?void 0:V.prop]),u=Array.isArray(s)&&!(s!=null&&s.every(A=>typeof A=="string"||typeof A=="number"))?"查看":s;return u=Array.isArray(u)?u.join(","):u,u},dr=e=>{var m,t,C,b,T,B,U,S,V,A;const{row:l,column:n,item:r,slotData:o}=e;let s=l!=null&&l[n==null?void 0:n.prop]?((t=(m=l==null?void 0:l[n==null?void 0:n.prop])==null?void 0:m[0])==null?void 0:t.contents)??(l==null?void 0:l[n==null?void 0:n.prop]):((b=(C=l==null?void 0:l[r==null?void 0:r.prop])==null?void 0:C[0])==null?void 0:b.contents)??(l==null?void 0:l[r==null?void 0:r.prop])??((B=(T=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:T[0])==null?void 0:B.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((V=(S=l==null?void 0:l[(U=r==null?void 0:r.child)==null?void 0:U.prop])==null?void 0:S[0])==null?void 0:V.contents)??(l==null?void 0:l[(A=r==null?void 0:r.child)==null?void 0:A.prop]);const u=Array.isArray(s)&&!(s!=null&&s.every(O=>typeof O=="string"||typeof O=="number")),f=Array.isArray(s)&&(s==null?void 0:s.find(O=>O==null?void 0:O.url));return u&&f},pr=(e,l)=>e.find(n=>Object.values(n).some(r=>r===l));return a.watch(()=>Pe.value,async e=>{if(e){ge.setContentLoading(!0),await a.nextTick();const l=pr(Y.value,e==null?void 0:e.data);if(!l)return ge.setContentLoading(!1);await Yl(e==null?void 0:e.data,null,l,{data:e==null?void 0:e.data,isMainKey:!0}),ge.setContentLoading(!1)}},{deep:!0,immediate:!0}),a.watch(()=>c==null?void 0:c.cacheNewData,e=>{var l;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(c==null?void 0:c.index)&&(Y.value=(l=Y.value)==null?void 0:l.map(n=>{var r;return(n==null?void 0:n.id)===((r=e==null?void 0:e.data)==null?void 0:r.id)?{...n,id:e==null?void 0:e.resId}:n})))},{immediate:!0,deep:!0}),(e,l)=>{var m,t,C;const n=a.resolveComponent("svg-icon"),r=a.resolveComponent("el-popover"),o=a.resolveComponent("el-switch"),s=a.resolveComponent("el-checkbox"),d=a.resolveComponent("el-checkbox-group"),u=a.resolveComponent("el-button"),f=a.resolveComponent("LookComponent");return a.openBlock(),a.createElementBlock("div",jr,[Gl.value?(a.openBlock(),a.createBlock(Je.ssTable,{id:"excel-table",pageObj:me,summaryInfo:qe,columns:K.value,defaultSort:ve,isCardViewport:xl.value,checkedColumns:Q.value,key:jl.value+JSON.stringify(K.value),tableData:Hl.value,isEditViewport:Qe.value,isShowPagination:Wl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:M.allowSelect,onDbClickRow:qa,extraButton:ll.value,rowButton:We.value,cacheExtraButtons:Ge.value,isClearSelection:((m=Le.value)==null?void 0:m.length)===0,onDoCurrentChange:Ea,onDoSizeChange:xa,onContentClick:Yl,onRowClick:Ra,onSelectChange:wa,onCellChange:cr,onChange:ra,onPreview:Ql,onSubmitEditingTable:Oa,onHandleColEditChange:Na,onHandleColTypeChange:Ua,onClickButton:Nl},a.createSlots({headerButton:a.withCtx(b=>{var T,B;return[M.showHeader?(a.openBlock(),a.createBlock(Tr,{key:0,lockingPage:a.unref(ml)===a.unref(ne),filterValues:Xl.value,selectNums:(T=Le.value)==null?void 0:T.length,dataNums:(B=Y.value)==null?void 0:B.length,compName:M.compName,isDevMode:M.isDevMode,buttons:b.buttons,onButtonClick:l[0]||(l[0]=U=>Nl(U,"",{})),columns:K.value,onFilter:za,onGetImportData:_a,level:M.level},null,8,["lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var b,T;return[((b=Y.value)==null?void 0:b.length)>0&&M.allowOperate?(a.openBlock(),a.createElementBlock("div",Kr,[(T=We.value)!=null&&T.some(B=>(B==null?void 0:B.label)==="编辑")&&!xl.value&&a.unref(ml)!==a.unref(ne)?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:ua},[a.createVNode(n,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0),a.createElementVNode("span",{title:"卡片视图",onClick:ir},[a.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:b,index:T})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:B=>ur(b,T)},[a.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,$r)]),operateCol:a.withCtx(()=>[a.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:rr},{reference:a.withCtx(()=>[a.createElementVNode("span",Fr,[a.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",Vr,[l[11]||(l[11]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(o,{"model-value":Ae.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:l[2]||(l[2]=b=>Pl(b,"sortable"))},null,8,["model-value"]),a.createVNode(o,{"model-value":ze.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:l[3]||(l[3]=b=>Pl(b,"filterable"))},null,8,["model-value"]),a.createVNode(o,{"model-value":ke.value,"active-text":"编辑所有表头","inactive-text":"",onChange:l[4]||(l[4]=b=>Pl(b,"operable"))},null,8,["model-value"]),l[12]||(l[12]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(d,{modelValue:Q.value,"onUpdate:modelValue":l[5]||(l[5]=b=>Q.value=b),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:w},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(il.value,b=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:b.label},[a.createVNode(s,{value:b.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:b.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(b.label),9,zr)]),_:2},1032,["value"]),a.createVNode(r,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(n,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var T;return[a.createElementVNode("div",qr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((T=Object.keys(b))==null?void 0:T.filter(B=>{var U;return(U=le.value)==null?void 0:U.find(S=>(S==null?void 0:S.value)===B)}),B=>{var U,S;return a.openBlock(),a.createElementBlock("div",{key:B},[a.createVNode(o,{"model-value":b==null?void 0:b[B],"active-text":(S=(U=le.value)==null?void 0:U.find(V=>(V==null?void 0:V.value)===B))==null?void 0:S.label,onChange:V=>ja(V,B,b)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",Jr,[a.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(b=>{var T,B,U,S,V,A,O,D,g,h,i,y,P,E,H,I,X,J;return[dr(b)?(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",Rr,a.toDisplayString(Ce(b)),1)]),default:a.withCtx(()=>{var G;return[a.createElementVNode("div",Wr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b==null?void 0:b.row[(G=b==null?void 0:b.column)==null?void 0:G.prop],_=>(a.openBlock(),a.createElementBlock("div",Gr,[a.createElementVNode("div",{class:"prop-url",title:Bl(_),onClick:j=>Ka(_)},a.toDisplayString(Bl(_)),9,Hr),a.createElementVNode("div",{class:"prop-download",onClick:j=>$a(_)}," 下载 ",8,Qr)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock("div",{key:1,style:a.normalizeStyle({color:!Array.isArray(Ce(b))&&((B=(T=Ce(b))==null?void 0:T.toString())!=null&&B.includes(".txt")||(S=(U=Ce(b))==null?void 0:U.toString())!=null&&S.includes(".cpt")||(A=(V=Ce(b))==null?void 0:V.toString())!=null&&A.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ce(b))&&((D=(O=Ce(b))==null?void 0:O.toString())!=null&&D.includes(".txt")||(h=(g=Ce(b))==null?void 0:g.toString())!=null&&h.includes(".cpt")||(y=(i=Ce(b))==null?void 0:i.toString())!=null&&y.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ce(b))&&((E=(P=Ce(b))==null?void 0:P.toString())!=null&&E.includes(".txt")||(I=(H=Ce(b))==null?void 0:H.toString())!=null&&I.includes(".cpt")||(J=(X=Ce(b))==null?void 0:X.toString())!=null&&J.includes(".cyd"))?"pointer":"",marginLeft:(b==null?void 0:b.colIndex)===0?`${((b==null?void 0:b.level)??0)*20}px`:0}),onClick:G=>Ca(Ce(b))},a.toDisplayString(Ce(b)===0?"0":Ce(b)),13,Xr))]}),_:2},[((t=We.value)==null?void 0:t.length)>0&&a.unref(ml)!==a.unref(ne)?{name:"actions",fn:a.withCtx(({item:b})=>[a.createVNode(r,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(n,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:a.withCtx(()=>[a.createElementVNode("div",Mr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Fa(We.value,b),(T,B)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:B,onClick:U=>Nl(T==null?void 0:T.label,b,{extra:T})},[a.createElementVNode("div",{style:a.normalizeStyle({color:T==null?void 0:T.textColor}),class:"extra-button-label"},a.toDisplayString(T==null?void 0:T.label),5)],8,Pr))),128))])]),_:2},1024)]),key:"0"}:void 0,((C=Y.value)==null?void 0:C.length)>0?{name:"batchButton",fn:a.withCtx(b=>[a.createVNode(Er,{lockingPage:a.unref(ml)===a.unref(ne),buttons:b.buttons,selectTableItems:Le.value,onButtonClick:l[1]||(l[1]=T=>Nl(T,"",{}))},null,8,["lockingPage","buttons","selectTableItems"])]),key:"1"}:void 0]),1032,["pageObj","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):a.createCommentVNode("",!0),a.createVNode(Ul.ssDialog,{title:Oe.value,visible:$e.value,width:Sa.value,onBeforeDestroy:Ma,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",Yr,[a.createVNode(Je.ssForm,{rowContents:Fe.value,isEnableWrap:!1,showOperator:!1,onChange:nr,onClickTrigger:Pa,isEdit:wl.value,onBlurChange:La},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[Tl.value?(a.openBlock(),a.createElementBlock("div",Zr,[a.createVNode(u,{onClick:l[6]||(l[6]=b=>$e.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>l[13]||(l[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(u,{class:"ok-button",onClick:l[7]||(l[7]=b=>dl(!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(Ul.ssDialog,{title:Oe.value,visible:Dl.value,width:Ll.value,onBeforeDestroy:l[9]||(l[9]=b=>Dl.value=!1)},{default:a.withCtx(()=>[a.createVNode(Nr)]),footer:a.withCtx(()=>[a.createElementVNode("div",Ir,[a.createVNode(u,{onClick:l[8]||(l[8]=b=>Dl.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>l[15]||(l[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(u,{class:"ok-button",onClick:Wa,id:"themeButton"},{default:a.withCtx(()=>l[16]||(l[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["title","visible","width"]),Ue.value?(a.openBlock(),a.createBlock(Je.ssFilePreview,{key:1,fileDataList:q.value,onDestroy:Ja},null,8,["fileDataList"])):a.createCommentVNode("",!0),be.value?(a.openBlock(),a.createBlock(Ul.ssDialog,{key:2,visible:be.value,onBeforeDestroy:lr,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(bl.ThreeViewerHost,{"file-urls":tl.value,isThreeScene:xe.value,isSelfWindow:!0,threeData:Ze.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(Ul.ssDialog,{visible:e.componentVisible,onBeforeDestroy:l[10]||(l[10]=b=>e.componentVisible=!1),width:Ll.value,style:{height:"70vh"}},{default:a.withCtx(()=>[a.createVNode(f,{dialogItem:Al.value},null,8,["dialogItem"])]),_:1},8,["visible","width"])])}}},ln=Ol._export_sfc(en,[["__scopeId","data-v-61e73981"]]);exports.formGetOptions=ql;exports.getSelectRow=Rl;exports.ssTable=ln;exports.useFormComp=ya;exports.useFormToTableComp=da;exports.useUnit=pa;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),I=require("./index-
|
|
1
|
+
"use strict";const e=require("vue"),I=require("./index-DVmoPvzr.cjs"),k=require("./threeViewerHost-CRqcYbJE.cjs"),C=require("./index-BOJUyAaV.cjs"),x=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=require("./index-D6mwkqWY.cjs"),S=require("./index-BpPyaNFa.cjs"),V={class:"avatar-model-wrap"},N={key:0},E=e.defineComponent({__name:"index",props:{disabled:{type:Boolean,default:!1},avatarUrl:{type:String,default:""},size:{type:[String,Number],default:"large"},userInfo:{type:Object,default:{}}},emits:["submitImage","deleteImage"],setup(s,{emit:w}){const u=s,i=w,m=e.computed(()=>"http://222.92.178.198:62001"),d=e.ref(""),h=e.ref(""),b=e.ref();e.watch(()=>{var o;return(o=u.userInfo)==null?void 0:o.头像},o=>{h.value=m.value+"/"+o},{immediate:!0});const _=async()=>{if(!(u!=null&&u.disabled))try{const o=await k.downloadAvatarApi({url:d.value});if(o.status!==200)throw new Error(`HTTP error! status: ${o.status}`);const f=new Blob([o.data],{type:o.headers["content-type"]});b.value=f}catch(o){throw new Error(o)}},B=async o=>{var f,g,t,n,c;try{const r=await k.uploadFile(o);((f=r==null?void 0:r.data)==null?void 0:f.code)===200&&(h.value=m.value+"/"+((t=(g=r.data)==null?void 0:g.result)==null?void 0:t.url),d.value=(c=(n=r.data)==null?void 0:n.result)==null?void 0:c.url,i("submitImage",d.value))}catch(r){C.ElMessage.error(r)}},y=async()=>{try{if(!h.value)return}catch(o){C.ElMessage.error(o)}};return(o,f)=>{var g,t;return e.openBlock(),e.createElementBlock("div",V,[e.createVNode(I.ssAvatar,{avatarUrl:h.value,avatarBlob:b.value,size:s.size,onClickAvatar:_,onSubmitImage:B,onDeleteImage:y},{avatarDefault:e.withCtx(()=>{var n,c,r,l;return[e.createTextVNode(e.toDisplayString(((c=(n=s.userInfo)==null?void 0:n.account)==null?void 0:c.charAt(0))||((l=(r=s.userInfo)==null?void 0:r.姓名)==null?void 0:l.charAt(0))||""),1)]}),_:1},8,["avatarUrl","avatarBlob","size"]),s.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",N,e.toDisplayString(((g=s.userInfo)==null?void 0:g.account)||((t=s.userInfo)==null?void 0:t.账号)||"未知"),1))])}}}),T=x._export_sfc(E,[["__scopeId","data-v-882723d5"]]),U=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["clickSignButton","clickSubmitSign","beforeDestroy"],setup(s,{emit:w}){const u=s,i=e.ref({}),m=e.ref([]),d=w,h=t=>{i.value.dialogShow=(t==null?void 0:t.label)==="电子签名",d("clickSignButton",t)},b=()=>{i.value.dialogShow=!1,d("beforeDestroy")},_=e.computed(()=>"http://222.92.178.198:62001"),B=t=>{var a;const n=t.split(","),c=(a=n==null?void 0:n[0])==null?void 0:a.match(/:(.*?);/)[1],r=atob(n[1]);let l=r.length;const v=new Uint8Array(l);for(;l--;)v[l]=r.charCodeAt(l);return new Blob([v],{type:c})},y=async t=>{var n,c,r;try{const l=await k.uploadFile(t);((n=l==null?void 0:l.data)==null?void 0:n.code)===200&&d("clickSubmitSign",(r=(c=l.data)==null?void 0:c.result)==null?void 0:r.url)}catch(l){C.ElMessage.error(l)}},o=e.ref(""),f=t=>{o.value=t,i.value.dialogShow=!1;const n=new FormData,c=B(t);n.append("file",c,"image.png"),y(n)},g=t=>{const n=new FormData;n.append("file",t==null?void 0:t.file),y(n)};return e.watch(()=>u==null?void 0:u.itemData,t=>{var c,r,l,v;o.value="",(c=i.value)!=null&&c.dialogShow&&(i.value.dialogShow=!1);const n=(r=t==null?void 0:t.find(a=>(a==null?void 0:a.key)==="signConfig"))==null?void 0:r.contents;n&&Object.keys(n).forEach(a=>{(n[a]===void 0||n[a]===null||n[a]==="")&&delete n[a]}),i.value=(l=t==null?void 0:t.find(a=>(a==null?void 0:a.key)==="signConfig"))==null?void 0:l.contents,m.value=(v=t==null?void 0:t.find(a=>(a==null?void 0:a.key)==="signTypeList"))==null?void 0:v.contents},{immediate:!0}),(t,n)=>{const c=e.resolveComponent("el-empty"),r=e.resolveComponent("el-image"),l=e.resolveComponent("el-button"),v=e.resolveComponent("el-upload");return e.openBlock(),e.createBlock(A.Signature,{signPadInfo:i.value,onBeforeDestroy:b,onClickSubmitSign:f},{signatureRender:e.withCtx(()=>{var a,p;return[e.createElementVNode("div",{class:"signature-render",style:e.normalizeStyle({width:`${(a=i.value)==null?void 0:a.signPadWidth}%`})},[e.createVNode(r,{src:o.value?o.value:_.value+"/"+((p=s.userInfo)==null?void 0:p.签名),fit:"contain"},{error:e.withCtx(()=>[e.createVNode(c,{"image-size":60,description:" "},{image:e.withCtx(()=>[e.createVNode(S.SvgIcon,{name:"emptyImg"})]),_:1})]),_:1},8,["src"])],4)]}),signatureTypes:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,a=>{var p;return e.openBlock(),e.createElementBlock("div",{key:a.label,class:"signature-button"},[(p=a.label)!=null&&p.includes("上传")?(e.openBlock(),e.createBlock(v,{key:0,ref_for:!0,ref:"uploadRef","http-request":g,"show-file-list":!1},{trigger:e.withCtx(()=>[e.createVNode(l,{disabled:a.disabled,id:"themeButton"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),icon:e.withCtx(()=>[e.createVNode(S.SvgIcon,{name:a.icon??""},null,8,["name"])]),_:2},1032,["disabled"])]),_:2},1536)):(e.openBlock(),e.createBlock(l,{key:1,id:"themeButton",disabled:a.disabled,onClick:$=>h(a)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),icon:e.withCtx(()=>[e.createVNode(S.SvgIcon,{name:a.icon??""},null,8,["name"])]),_:2},1032,["disabled","onClick"]))])}),128))]),_:1},8,["signPadInfo"])}}}),q=x._export_sfc(U,[["__scopeId","data-v-ce5a2314"]]);exports.ssAvatar=T;exports.ssSignature=q;
|
|
@@ -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-BOJUyAaV.cjs"),f=require("./index.vue_vue_type_style_index_1_lang-N-_9ZJEf.cjs"),C=require("./index-CePZE-QA.cjs"),r=require("./index-tttYIzsn.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,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as y, ref as C, onMounted as _, createElementBlock as c, openBlock as g, createVNode as v } from "vue";
|
|
2
|
-
import { p as h, s as k, c as m, g as x } from "./index-
|
|
3
|
-
import { u as M } from "./index.vue_vue_type_style_index_1_lang-
|
|
4
|
-
import { s as D } from "./index-
|
|
5
|
-
import { a as T, d as S, f as w } from "./index-
|
|
2
|
+
import { p as h, s as k, c as m, g as x } from "./index-DV_ZZQBO.js";
|
|
3
|
+
import { u as M } from "./index.vue_vue_type_style_index_1_lang-D5Hjs-g0.js";
|
|
4
|
+
import { s as D } from "./index-BEoEUXZe.js";
|
|
5
|
+
import { a as T, d as S, f as w } from "./index-CTkF2kl_.js";
|
|
6
6
|
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const N = { class: "menu-content" }, E = /* @__PURE__ */ y({
|
|
8
8
|
__name: "index",
|