ss-component-new 1.2.201 → 1.2.203
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/{MTLLoader-DeVVTn9U.cjs → MTLLoader-D3VZoLLS.cjs} +1 -1
- package/dist/{MTLLoader-EGw2WpGn.js → MTLLoader-TA3dmzZt.js} +1 -1
- package/dist/{OrbitControls-DsREqTNw.js → OrbitControls-C815PrCV.js} +1 -1
- package/dist/{OrbitControls-DUDihpSn.cjs → OrbitControls-Ci2b4u6R.cjs} +1 -1
- package/dist/{URDFLoader-DR_ZnSlg.js → URDFLoader-DocP_xFH.js} +2 -2
- package/dist/{URDFLoader-CNnR_d-M.cjs → URDFLoader-DwmU7yPi.cjs} +1 -1
- package/dist/{animationData-B0xfieMG.js → animationData-4XK3Jqi3.js} +2 -2
- package/dist/{animationData-BmO7uT95.cjs → animationData-C0bExM4v.cjs} +1 -1
- package/dist/{array-DtzBMDtX.js → array-Bay2i0Vw.js} +3 -3
- package/dist/{array-C-4Fn6kn.cjs → array-DcJnHcIw.cjs} +1 -1
- package/dist/{iconfont-hcY1c1Ph.js → iconfont-Dh6ZgvbG.js} +2 -2
- package/dist/{iconfont-BU-e8plC.cjs → iconfont-xItVQaLt.cjs} +1 -1
- package/dist/{index-VnVlZEmb.js → index-3oQGURYh.js} +1 -1
- package/dist/{index-MtfLKQp3.cjs → index-4QXJrOdG.cjs} +1 -1
- package/dist/{index-DufZVmKf.js → index-7MBVUN82.js} +9 -8
- package/dist/{index-D_07hjnO.cjs → index-8b1bMvyU.cjs} +1 -1
- package/dist/{index-BvOJGx4t.js → index-B023nZUc.js} +2 -2
- package/dist/{index-Cz4gIM1f.cjs → index-B1hS-6sw.cjs} +1 -1
- package/dist/{index-BFDTTNzf.cjs → index-B7zrUMM1.cjs} +1 -1
- package/dist/{index-i6xf9v_E.cjs → index-B8b3cy8_.cjs} +1 -1
- package/dist/{index-DywCAE3u.cjs → index-BMS51kH2.cjs} +1 -1
- package/dist/{index-C1JRzzYq.js → index-BT7JWOBF.js} +5 -5
- package/dist/{index-DKyiUFoj.js → index-BbkGyry0.js} +20 -20
- package/dist/{index-BuAS_9Ow.cjs → index-Bkb2GkmP.cjs} +1 -1
- package/dist/{index-m_LW0QsX.js → index-Bn4zkMqS.js} +2 -2
- package/dist/{index-ELxg57Gi.js → index-C-36_m2K.js} +6 -6
- package/dist/{index-Dr6wRpUQ.js → index-C9-Bv2Zb.js} +6 -6
- package/dist/{index-P6FeXt6g.js → index-CFnIAxFU.js} +1 -1
- package/dist/{index-DoL-xCP9.cjs → index-CJffhWqF.cjs} +1 -1
- package/dist/{index-DtFLuXja.cjs → index-CLqCXsqK.cjs} +1 -1
- package/dist/{index-BAaCpfqG.js → index-CO41nOz7.js} +2 -2
- package/dist/{index--na8gJFk.cjs → index-CRcKY_YM.cjs} +1 -1
- package/dist/{index-DQsD0m6q.js → index-CT-1q_Sb.js} +1 -1
- package/dist/{index-DDJnuYAl.cjs → index-CWEMkvT7.cjs} +1 -1
- package/dist/{index-By--71sB.cjs → index-CXC0u8pm.cjs} +1 -1
- package/dist/{index-BnrtLGSt.cjs → index-CcNuHoZS.cjs} +1 -1
- package/dist/{index-DW33UCCH.js → index-CrdoyRiw.js} +3 -3
- package/dist/{index-DW1RCzWC.cjs → index-D-uo7H2E.cjs} +1 -1
- package/dist/{index-CQOLlnCU.js → index-D6xI9Kd6.js} +3 -3
- package/dist/{index-CXsoc0ts.js → index-D742GPVS.js} +4 -4
- package/dist/{index-BCn8LcAH.cjs → index-DEsVL4KZ.cjs} +1 -1
- package/dist/{index-CB-3bIU7.cjs → index-DJXRfRzs.cjs} +1 -1
- package/dist/{index-DVuG6QBw.cjs → index-DMw45ES8.cjs} +1 -1
- package/dist/{index-CS7eiT5k.js → index-DMzOhZbZ.js} +12 -12
- package/dist/{index-BP07Gnjo.cjs → index-DOItJqcJ.cjs} +11 -11
- package/dist/{index-D3BeZsw9.cjs → index-DPp_aToA.cjs} +1 -1
- package/dist/{index-BFzjLkhB.cjs → index-DQf7cgx-.cjs} +10 -10
- package/dist/{index-DvgKkg8E.js → index-DU0JrdBR.js} +3 -3
- package/dist/{index-DbkmELIs.cjs → index-DZ1Wyte2.cjs} +1 -1
- package/dist/{index-mjz9Da8Y.cjs → index-DaRuwvRP.cjs} +1 -1
- package/dist/{index-C8JWH8zu.cjs → index-DbowKiAq.cjs} +1 -1
- package/dist/{index-BA2liwLn.js → index-DcYofWK7.js} +8 -7
- package/dist/{index-BdG8TrO6.js → index-DfFq9kkn.js} +2 -2
- package/dist/index-Dh1Z6bSQ.js +3363 -0
- package/dist/{index-DmKjHcw7.cjs → index-DhWtwiaT.cjs} +1 -1
- package/dist/{index-HFvfNokw.js → index-DiOjuAfy.js} +1 -1
- package/dist/{index-DN9fWZ39.js → index-Djp_1ESm.js} +3 -3
- package/dist/{index-DRjU_LhS.js → index-Dq9Tho6E.js} +3 -3
- package/dist/{index-BKNTCrry.js → index-Dr8-9e0m.js} +2 -2
- package/dist/{index-B7pEfxW6.cjs → index-DtfNydzd.cjs} +1 -1
- package/dist/{index-CGNh6A1u.js → index-DwUgAowW.js} +4 -4
- package/dist/index-EQPgkvyO.cjs +1 -0
- package/dist/{index-K6PeHL12.cjs → index-KaxOq1_-.cjs} +1 -1
- package/dist/{index-CwHRaxk9.js → index-NrH8XMyp.js} +2 -2
- package/dist/{index-BEDAWaV5.js → index-Q26ePpGH.js} +11 -11
- package/dist/{index-svyWq6yw.js → index-V6yWPooR.js} +2 -2
- package/dist/{index-C71lL2Zl.js → index-XfyUE2Ye.js} +4 -4
- package/dist/{index-DHtKscY6.js → index-gruT7omp.js} +1 -1
- package/dist/{index-B3Nii_wb.js → index-r48vNrKN.js} +2 -2
- package/dist/{index-D04LOBS0.cjs → index-rJGUHHaV.cjs} +1 -1
- package/dist/{index-CeTyBScG.cjs → index-t7aSHS0b.cjs} +1 -1
- package/dist/{index-G1p03SY5.cjs → index-z78zgQsK.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-3T-DoEef.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-6ezarDrj.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Db2wtXl-.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BLiySnpy.js} +9 -9
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DzxsDmSo.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BksZanFP.js} +1463 -1468
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bft_35IC.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CFvLAWOF.cjs} +53 -53
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-YDD6WZNQ.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-BeUv9K8x.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Bg3P8eER.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-CFKRRr_1.js} +7 -7
- package/dist/{index.vue_vue_type_style_index_1_lang-BwYhIkBS.js → index.vue_vue_type_style_index_1_lang-BQ-xcdZE.js} +442 -348
- package/dist/{index.vue_vue_type_style_index_1_lang-B6P8tuhB.cjs → index.vue_vue_type_style_index_1_lang-NcjcaVKL.cjs} +3 -3
- package/dist/{isString-5Nawl-Uc.js → isString-D70CzuJZ.js} +1 -1
- package/dist/{isString-DKZ1g7Pn.cjs → isString-Do5yyRUw.cjs} +1 -1
- package/dist/{main-CXonSl7o.js → main-COMs08L4.js} +5 -5
- package/dist/{main-CfdiYgA1.cjs → main-FdfIB2P3.cjs} +1 -1
- 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/{threeModel-CcZ_mIob.cjs → threeModel-C4BkWbN4.cjs} +1 -1
- package/dist/{threeModel-CTtZuUDg.js → threeModel-CDSx1QuT.js} +5 -5
- package/dist/{threePreview-DUyJ3mb_.cjs → threePreview-DRzGADyo.cjs} +1 -1
- package/dist/{threePreview-D-RkLYC8.js → threePreview-_2AlT5J2.js} +4 -4
- package/dist/{threeSceneView-Cr5UX8FG.js → threeSceneView--CpvjFpw.js} +11 -11
- package/dist/{threeSceneView-BFqSAGP1.cjs → threeSceneView-CnhYrdhr.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-N80YwIx-.cjs → threeSceneViewForCPMPIP-DyGCnSF-.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CTvL-EyL.js → threeSceneViewForCPMPIP-ZyMF4jrD.js} +8 -8
- package/dist/{threeTrackPathView-Cp83uYdc.js → threeTrackPathView-CmTrznLl.js} +5 -5
- package/dist/{threeTrackPathView-C3tSwHTX.cjs → threeTrackPathView-kBS_0ueE.cjs} +1 -1
- package/dist/{threeViewerHost--jBITe3r.cjs → threeViewerHost-Ba1q0606.cjs} +1 -1
- package/dist/{threeViewerHost-DSYrQH3r.js → threeViewerHost-DK006r5Z.js} +4 -4
- package/dist/{urdfTree-B73vL4dE.cjs → urdfTree-YjjVDhU5.cjs} +1 -1
- package/dist/{urdfTree-CiLrHpgG.js → urdfTree-zl9i5h2k.js} +1 -1
- package/dist/{workpieceTreePanel-CUiwX5FV.js → workpieceTreePanel-BI64gjVU.js} +4 -4
- package/dist/{workpieceTreePanel-sYKZQx-o.cjs → workpieceTreePanel-DSdFl_0i.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-CleiTW2d.cjs +0 -1
- package/dist/index-DGcizPdx.js +0 -3112
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
package/dist/index-CleiTW2d.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const l=require("vue"),T=require("./index-BP07Gnjo.cjs"),pe=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bft_35IC.cjs"),ml=require("./index-BFzjLkhB.cjs"),Ga=require("./threeViewerHost--jBITe3r.cjs"),ta=require("./index-By--71sB.cjs");require("./index.vue_vue_type_style_index_1_lang-B6P8tuhB.cjs");const ha=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ea=require("./index-DbkmELIs.cjs");require("./index-K6PeHL12.cjs");const Ia=require("./isString-DKZ1g7Pn.cjs"),Ta=R=>R.match(/\((.*)\)/)[1],Ha={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(R){const ce=R,ae=l.ref(null),F=l.ref(!1),K=l.ref(null);return l.watch(()=>ce==null?void 0:ce.isVisible,()=>{F.value=ce==null?void 0:ce.isVisible},{deep:!0,immediate:!0}),l.watch(()=>K.value,()=>{l.nextTick(()=>{var u,de;(de=(u=ae.value)==null?void 0:u.updatePopper)==null||de.call(u)})},{deep:!0,immediate:!0}),(u,de)=>{const Se=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(Se,{visible:F.value,title:ce==null?void 0:ce.title,placement:ce==null?void 0:ce.placement,width:ce==null?void 0:ce.width,ref_key:"popOverRef",ref:ae},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(u.$slots,"reference",{ref_key:"referenceRef",ref:K})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(u.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},io={key:0,class:"extra-button-content"},uo={class:"table-operator-wrap"},so={key:0,class:"extra-button-filter"},co={class:"form-content-value"},po={key:1,class:"extra-header"},to={class:"drop-menu",style:{width:"120px"}},fo={key:0},ho={key:1},yo={key:1,class:"extra-button-content tabs-button-wrapper"},vo={class:"table-operator-wrap"},go={class:"extra-button-filter"},bo={class:"form-content-value"},ko={key:0,class:"extra-header"},mo={class:"drop-menu",style:{width:"120px"}},So={key:0},xo={key:1},Do={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(R,{emit:ce}){const ae=ce,F=R,K=l.ref(""),u=l.ref(!1),de=l.ref([]),Se=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Me=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],xe=ve=>{const Ne=ve.raw;if(!Ne)return;const $e=new FileReader;$e.onload=te=>{try{const we=new Uint8Array(te.target.result),Xe=pe.readSync(we,{type:"array"}),Pe=Xe.SheetNames[0],re=Xe.Sheets[Pe],Ye=pe.utils.decode_range(re["!ref"]).e.c+1,X=new Array(Ye).fill(""),m=[];for(const Q in re){if(Q[0]==="!")continue;const{r:ye,c:Ae}=pe.utils.decode_cell(Q);let Ze=re[Q].v;if(re[Q].t==="n"&&Ze>0&&Ze<1e6&&(Ze=new Date((Ze-25569)*86400*1e3).toISOString().split("T")[0]),(Ze==null||Ze==="")&&(Ze=""),ye===0)X[Ae]=Ze;else{if(!m[ye-1]){m[ye-1]={};for(let hl=0;hl<Ye;hl++)m[ye-1][`col_${hl}`]=""}m[ye-1][`col_${Ae}`]=Ze}}for(let Q=0;Q<Ye;Q++)X[Q]===void 0&&(X[Q]="");const je=m==null?void 0:m[0];if(!(je!=null&&je.hasOwnProperty("col_0")))return T.ElMessage.error("导入的数据列不匹配,请检查是否错位");ae("getImportData",X,m)}catch(we){throw T.ElMessage.error(we.message),new Error(we.message)}},$e.readAsArrayBuffer(Ne)},ul=ve=>{var $e;const Ne=($e=de.value)==null?void 0:$e.reduce((te,we,Xe)=>(Xe===0?te[we.label]=ve:te[we.label]=we==null?void 0:we.value,te),{});ae("filter",Ne,ve,!0)},Sl=ve=>{ae("buttonClick",ve)},Nl=ve=>{var Ne,$e;de.value=($e=(Ne=pe.getColumnChild(T.cloneDeep(ve)))==null?void 0:Ne.filter(te=>(te==null?void 0:te.label)!==""&&(te==null?void 0:te.label)!=="操作"))==null?void 0:$e.map(te=>({label:(te==null?void 0:te.label)??"",value:"",name:(te==null?void 0:te.label)??"",isFormColHidden:te==null?void 0:te.isTableColHidden,width:2}))},xl=l.ref(!1),Bl=ve=>{var Ne;if((ve==null?void 0:ve.buttonName)==="确认"&&(ae("filter",ve==null?void 0:ve.content),xl.value=(ve==null?void 0:ve.content)&&Object.values(ve==null?void 0:ve.content).length>0),(ve==null?void 0:ve.buttonName)==="清空"){const $e=T.cloneDeep(ve==null?void 0:ve.content);for(const te in $e)$e[te]="";de.value=(Ne=de.value)==null?void 0:Ne.map(te=>({...te,value:""})),ae("filter",$e),xl.value=!1}u.value=!1},Qe=()=>{var Ne,$e;de.value=(Ne=de.value)==null?void 0:Ne.map(te=>({...te,value:""}));const ve=($e=de.value)==null?void 0:$e.reduce((te,we)=>(te[we.label]=we.value,te),{});ae("filter",ve)};return l.onMounted(()=>{Nl(F.columns)}),l.watch(()=>F.columns,()=>{Nl(F.columns)},{deep:!0,immediate:!0}),(ve,Ne)=>{var re,Y,Ye,X;const $e=l.resolveComponent("el-icon"),te=l.resolveComponent("svg-icon"),we=l.resolveComponent("el-input"),Xe=l.resolveComponent("el-button"),Pe=l.resolveComponent("el-upload");return R.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",io,[l.createElementVNode("div",{class:l.normalizeClass(R.compName?"table-name-wrap":""),style:l.normalizeStyle({background:(F==null?void 0:F.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((F==null?void 0:F.level)-1)*12+"px",fontWeight:600-((F==null?void 0:F.level)-1)*100>=400?600-((F==null?void 0:F.level)-1)*100:400,fontSize:17-(F==null?void 0:F.level)>=14?17-(F==null?void 0:F.level)+"px":"14px"})},l.toDisplayString(R.compName),7),l.createElementVNode("div",uo,[F!=null&&F.filterShow?(l.openBlock(),l.createElementBlock("div",so,[l.createVNode(Ha,{title:"",width:800,placement:"bottom-start",isVisible:u.value},{reference:l.withCtx(()=>{var m,je,Q,ye;return[l.createVNode(we,{modelValue:K.value,"onUpdate:modelValue":Ne[1]||(Ne[1]=Ae=>K.value=Ae),style:{"min-width":"80px"},placeholder:xl.value?(Q=(je=(m=R.filterValues)==null?void 0:m.filter(Ae=>Ae))==null?void 0:je.slice(0,3))==null?void 0:Q.join("/"):"搜索","prefix-icon":l.unref(T.search_default),clearable:"",onInput:ul,disabled:((ye=de.value)==null?void 0:ye.length)===0},{suffix:l.withCtx(()=>{var Ae,Ze;return[!K.value&&((Ze=(Ae=R.filterValues)==null?void 0:Ae.filter(hl=>hl))!=null&&Ze.join("/"))?(l.openBlock(),l.createBlock($e,{key:0,style:{cursor:"pointer"},onClick:Qe},{default:l.withCtx(()=>[l.createVNode(l.unref(T.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:Ne[0]||(Ne[0]=Ae=>u.value=!u.value)},[l.createVNode(te,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",co,[(l.openBlock(),l.createBlock(ml.ssForm,{rowContents:de.value,buttonValue:Se.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:Se.value,isStartJustify:!1,onOnButtonClick:Bl},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])])):l.createCommentVNode("",!0),R.buttons&&((re=R.buttons)==null?void 0:re.length)>0?(l.openBlock(),l.createElementBlock("div",po,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((Y=R.buttons)==null?void 0:Y.filter(m=>R.isDevMode||(m==null?void 0:m.label)!=="修改模板"),(m,je)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:je},[(m==null?void 0:m.type)==="upload"?(l.openBlock(),l.createBlock(Pe,{key:0,class:"upload-button-wrap","on-change":xe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!R.lockingPage},{default:l.withCtx(()=>[l.createVNode(Xe,{disabled:!!R.lockingPage,style:l.normalizeStyle({background:(m==null?void 0:m.background)??"var(--ssbutton-theme-bg)",color:(m==null?void 0:m.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(m==null?void 0:m.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(m==null?void 0:m.type)==="popover"?(l.openBlock(),l.createBlock(ml._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(m==null?void 0:m.type)==="popover"?(l.openBlock(),l.createBlock(Xe,{key:0,disabled:!!R.lockingPage,style:l.normalizeStyle({background:(m==null?void 0:m.background)??"var(--ssbutton-theme-bg)",color:(m==null?void 0:m.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(m==null?void 0:m.label),1)]),_:2},1032,["disabled","style"])):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",to,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m==null?void 0:m.contents,Q=>(l.openBlock(),l.createBlock(Xe,{key:Q==null?void 0:Q.label,disabled:!!R.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:ye=>Sl(Q==null?void 0:Q.label)},{default:l.withCtx(()=>{var ye,Ae;return[l.createTextVNode(l.toDisplayString(Q==null?void 0:Q.label),1),(ye=Q==null?void 0:Q.label)!=null&&ye.includes("选中")?(l.openBlock(),l.createElementBlock("span",fo,"("+l.toDisplayString(R.selectNums)+")",1)):l.createCommentVNode("",!0),(Ae=Q==null?void 0:Q.label)!=null&&Ae.includes("全部")?(l.openBlock(),l.createElementBlock("span",ho,"("+l.toDisplayString(R.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),m!=null&&m.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Xe,{key:2,id:"themeButton",disabled:!!R.lockingPage,style:l.normalizeStyle({background:(m==null?void 0:m.background)??"var(--ssbutton-theme-bg)",color:(m==null?void 0:m.color)??"var(--ssbutton-theme-color)"}),onClick:Q=>Sl(m==null?void 0:m.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(m==null?void 0:m.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])])):(l.openBlock(),l.createElementBlock("div",yo,[l.createElementVNode("div",vo,[l.createElementVNode("div",go,[l.createVNode(Ha,{title:"",width:800,placement:"bottom-start",isVisible:u.value},{reference:l.withCtx(()=>{var m,je,Q,ye;return[l.createVNode(we,{modelValue:K.value,"onUpdate:modelValue":Ne[3]||(Ne[3]=Ae=>K.value=Ae),style:{"min-width":"80px"},placeholder:xl.value?(Q=(je=(m=R.filterValues)==null?void 0:m.filter(Ae=>Ae))==null?void 0:je.slice(0,3))==null?void 0:Q.join("/"):"搜索","prefix-icon":l.unref(T.search_default),clearable:"",onInput:ul,disabled:((ye=de.value)==null?void 0:ye.length)===0},{suffix:l.withCtx(()=>{var Ae,Ze;return[!K.value&&((Ze=(Ae=R.filterValues)==null?void 0:Ae.filter(hl=>hl))!=null&&Ze.join("/"))?(l.openBlock(),l.createBlock($e,{key:0,style:{cursor:"pointer"},onClick:Qe},{default:l.withCtx(()=>[l.createVNode(l.unref(T.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:Ne[2]||(Ne[2]=Ae=>u.value=!u.value)},[l.createVNode(te,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",bo,[(l.openBlock(),l.createBlock(ml.ssForm,{rowContents:de.value,buttonValue:Se.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:Se.value,isStartJustify:!1,onOnButtonClick:Bl},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),R.buttons&&((Ye=R.buttons)==null?void 0:Ye.length)>0?(l.openBlock(),l.createElementBlock("div",ko,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((X=R.buttons)==null?void 0:X.filter(m=>R.isDevMode||(m==null?void 0:m.label)!=="修改模板"),(m,je)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:je},[(m==null?void 0:m.type)==="upload"?(l.openBlock(),l.createBlock(Pe,{key:0,class:"upload-button-wrap","on-change":xe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(Xe,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var Q;return[l.createVNode(te,{name:(Q=Me==null?void 0:Me.find(ye=>(ye==null?void 0:ye.label)===(m==null?void 0:m.label)))==null?void 0:Q.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(m==null?void 0:m.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(m==null?void 0:m.type)==="popover"?(l.openBlock(),l.createBlock(ml._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(m==null?void 0:m.type)==="popover"?(l.openBlock(),l.createBlock(Xe,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var Q;return[l.createVNode(te,{name:(Q=Me==null?void 0:Me.find(ye=>(ye==null?void 0:ye.label)===(m==null?void 0:m.label)))==null?void 0:Q.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(m==null?void 0:m.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",mo,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m==null?void 0:m.contents,Q=>(l.openBlock(),l.createBlock(Xe,{key:Q==null?void 0:Q.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:ye=>Sl(Q==null?void 0:Q.label)},{default:l.withCtx(()=>{var ye,Ae;return[l.createTextVNode(l.toDisplayString(Q==null?void 0:Q.label),1),(ye=Q==null?void 0:Q.label)!=null&&ye.includes("选中")?(l.openBlock(),l.createElementBlock("span",So,"("+l.toDisplayString(R.selectNums)+")",1)):l.createCommentVNode("",!0),(Ae=Q==null?void 0:Q.label)!=null&&Ae.includes("全部")?(l.openBlock(),l.createElementBlock("span",xo,"("+l.toDisplayString(R.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),m!=null&&m.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Xe,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(m==null?void 0:m.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:Q=>Sl(m==null?void 0:m.label)},{icon:l.withCtx(()=>{var Q;return[l.createVNode(te,{name:(Q=Me==null?void 0:Me.find(ye=>(ye==null?void 0:ye.label)===(m==null?void 0:m.label)))==null?void 0:Q.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(m==null?void 0:m.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},To=ha._export_sfc(Do,[["__scopeId","data-v-2218a50d"]]),Ao=l.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(R,{emit:ce}){const ae=R,F=ce,K=de=>{F("buttonClick",de)},u=de=>{var Se;return de!=null&&de.includes("删除")?((Se=ae.selectTableItems)==null?void 0:Se.length)>0?"warning-active-type":"warning-type":"default-type"};return(de,Se)=>{const Me=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(R.buttons,xe=>(l.openBlock(),l.createBlock(Me,{key:xe==null?void 0:xe.label,disabled:!!R.lockingPage,class:l.normalizeClass(u(xe==null?void 0:xe.label)),onClick:ul=>K(xe==null?void 0:xe.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(xe==null?void 0:xe.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Co=ha._export_sfc(Ao,[["__scopeId","data-v-70b12973"]]),Va=T.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(R){this.selectArray=R},setSelectString(R){this.selectString=R}}}),Eo={class:"calculator-content"},No={class:"calculator-child"},Bo={class:"calculator-child"},_o=l.defineComponent({__name:"calculator",setup(R){const ce=l.ref(),ae=l.ref();return l.onMounted(()=>{ce.value=[{type:"Upload",label:"输入",name:"input"}],ae.value=[{type:"Upload",label:"输出",name:"output"}]}),(F,K)=>(l.openBlock(),l.createElementBlock("div",Eo,[l.createElementVNode("div",No,[l.createVNode(ml.ssForm,{rowContents:ce.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Bo,[l.createVNode(ml.ssForm,{rowContents:ae.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Oo=ha._export_sfc(_o,[["__scopeId","data-v-73db0fe7"]]),Aa=(R,ce)=>{let ae=R,F=ce;return Array.isArray(ae)&&(ae=ae==null?void 0:ae.map((K,u)=>{if(Array.isArray(K)){let de={};return K=K==null?void 0:K.forEach((Se,Me)=>{var xe;(xe=F==null?void 0:F[Me])!=null&&xe.prop?de[F[Me].prop]=Se:Array.isArray(Se)&&(de.children=Aa(Se,F))}),Object.assign(de,{id:u})}else return K})),ae},Qa=(R,ce,ae)=>{let F=R,K=ce;return F=F==null?void 0:F.map((u,de)=>{var Se,Me;return!Array.isArray(u)||!((Se=K==null?void 0:K[de])!=null&&Se.label)&&!ae||(u.unshift(((Me=K==null?void 0:K[de])==null?void 0:Me.label)??""),u.some(xe=>Array.isArray(xe))&&(u=u==null?void 0:u.map(xe=>{var ul;return Array.isArray(xe)&&(xe=Qa(xe,(ul=K==null?void 0:K[de])==null?void 0:ul.children,ae)),xe}))),u}),F},Uo=(R,ce,ae)=>{if(ce==="")return R==null?void 0:R.filter(F=>(F==null?void 0:F.id)!==ae);{const F=ce.split("-");return wo(R,F,ae)}},wo=(R,ce,ae)=>{let F=R,K=ce;return(K==null?void 0:K.length)===0?F=F==null?void 0:F.filter(u=>u.id!==ae):F=F==null?void 0:F.map(u=>(u.id.toString()===(K==null?void 0:K[0])&&(K==null||K.shift(),u=Xa(u,K,ae)),u)),F},Xa=(R,ce,ae)=>{var u,de;let F=R,K=ce;return(K==null?void 0:K.length)===0?F.children=(u=F.children)==null?void 0:u.filter(Se=>Se.id!==ae):F.children=(de=F.children)==null?void 0:de.map(Se=>(Se.id.toString()===(K==null?void 0:K[0])&&(K==null||K.shift(),Se=Xa(Se,K,ae)),Se)),F},jo=(R,ce,ae)=>{if(ce==="")return ae;{const F=ce.split("-");return Lo(R,F,ae)}},Lo=(R,ce,ae)=>{let F=R,K=ce;return(K==null?void 0:K.length)===0?F=ae:F=F==null?void 0:F.map(u=>(u.id.toString()===(K==null?void 0:K[0])&&(K==null||K.shift(),u=Ya(u,K,ae)),u)),F},Ya=(R,ce,ae)=>{var u;let F=R,K=ce;return(K==null?void 0:K.length)===0?F.children=ae:F.children=(u=F.children)==null?void 0:u.map(de=>(de.id.toString()===(K==null?void 0:K[0])&&(K==null||K.shift(),de=Ya(de,K,ae)),de)),F},Za=T.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(R){this.objUrl=R},setBlobUrls(R){this.blobUrls=R}}}),fa=async(R,ce)=>{var de,Se,Me,xe,ul,Sl,Nl,xl,Bl,Qe,ve,Ne,$e,te,we,Xe,Pe;let ae=(Se=(de=T.cloneDeep(R))==null?void 0:de.optionUrl)==null?void 0:Se.menuSelect,F=[];ae==null||ae.forEach(re=>{});let K="",u=await pe.menuToParent(ae);if(u==null||u.forEach(re=>{var Y,Ye,X,m;(re==null?void 0:re.name)===(((m=(X=(Ye=(Y=T.cloneDeep(R))==null?void 0:Y.optionUrl)==null?void 0:Ye.groupSelect)==null?void 0:X[0])==null?void 0:m.replaceAll("'",""))??"")&&(K=re==null?void 0:re.id)}),ce){K=ce;const re=await T.getInsofDataApi({id:K}),Y=(Sl=(ul=(xe=(Me=re==null?void 0:re.data)==null?void 0:Me.result)==null?void 0:xe[0])==null?void 0:ul.key)==null?void 0:Sl.pageKey;u=await pe.getItemData(Y,sessionStorage.getItem("systemKey"),"")}if(K!==""){let re;ce?re=(Nl=u==null?void 0:u.find(X=>(X==null?void 0:X.id)===ce))==null?void 0:Nl.compData:re=(xl=u==null?void 0:u.find(X=>{var m,je,Q,ye;return(X==null?void 0:X.name)===(((je=(m=R==null?void 0:R.groupSelect)==null?void 0:m.split(":"))==null?void 0:je[0])||((ye=(Q=R==null?void 0:R.optionUrl)==null?void 0:Q.groupSelect)==null?void 0:ye[0]))}))==null?void 0:xl.compData;let Y=(Qe=(Bl=re==null?void 0:re.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Bl.contents)==null?void 0:Qe.map(X=>X==null?void 0:X.label);(Ne=(ve=re==null?void 0:re.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:ve.contents)!=null&&Ne.every(X=>Array.isArray(X))&&(Y=(we=pe.getColumnChild((te=($e=re==null?void 0:re.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:$e.contents)==null?void 0:te[0]))==null?void 0:we.map(X=>X==null?void 0:X.prop));let Ye=(Pe=(Xe=re==null?void 0:re.find(X=>(X==null?void 0:X.key)==="tableContents"))==null?void 0:Xe.contents)==null?void 0:Pe.map(X=>{if(Array.isArray(X))X=X==null?void 0:X.filter(m=>!(m!=null&&m.id));else{let m={};for(let je in X)je!=="id"&&(m[je]=X==null?void 0:X[je]);X=m}return X});Ye==null||Ye.forEach(X=>{Array.isArray(X)?F.push(pe.getValueToObjectValue(X,Y)):F.push(X)})}return F},Mo={class:"table-content"},Po={class:"menu-config-wrap"},$o=["onClick"],Fo={key:0,class:"viewport-wrap"},Ko=["onClick"],zo={title:"选择显示列信息"},qo={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Jo=["title"],Ro={class:"col-operate-wrap"},Wo={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Go={class:"pop-view"},Io={class:"pop-wrapper"},Ho={class:"file-list-pop"},Vo=["title","onClick"],Qo=["onClick"],Xo=["onClick"],Yo={class:"form-content"},Zo={key:0,class:"dialog-footer"},en={class:"dialog-footer"},ln={class:"form-content"},an={__name:"index",props:{pageLayout:{type:String,default:"vertical"},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!1},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(R,{emit:ce}){var Wa;const ae=l.ref([]),F=Za(T.pinia),K=l.ref(null),u=R,de=l.ref(u==null?void 0:u.allowSelect),Se=l.ref((Wa=u==null?void 0:u.config)==null?void 0:Wa.showIndex),Me=l.ref(),xe=l.ref(!0),ul=l.ref(!1),Sl=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),Nl=pe.useOriginalState(T.pinia);let xl="$R";const{originalPath:Bl}=T.storeToRefs(Nl),Qe=Bl.value,ve=l.ref(!1),Ne=l.ref(!1),$e=l.ref(!1),te=l.ref(!0),we=l.ref([]),Xe=l.reactive({column:{},status:!1,text:"合计"}),Pe=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),re=ce,Y=l.ref([]),Ye=l.ref([]),X=l.reactive({prop:"",order:null}),m=l.ref([]),je=l.ref(!1),Q=l.ref(!1),ye=l.ref(null),{isUseBackdrop:Ae,initTrackFileType:Ze,getFileExtension:hl,setData:ya,getFileInfo:Ca,getFilesInfo:er}=Ga.useThreeSystem(),va=l.ref([]),_l=l.ref(!1),Ll=l.ref(),Ve=ta.useMenuState(),{importLoading:on,activeMenuPath:Be,contentLoading:nn,linkMenuInfo:lr}=T.storeToRefs(Ve),ar=pe.useTableComp(T.pinia),Je=ta.useModelComp(T.pinia),{extraContents:Oe,cacheUpdatingData:zl,tableViewContents:ql,tableLoading:un,pageMapState:Ml,lockingPage:la}=T.storeToRefs(Je),oe=l.ref([]),aa=l.ref([]),ra=l.ref(new Map);l.ref(!1);const Dl=l.ref("");l.ref();const oa=l.ref(!0),Pl=l.ref(0),Ea=l.ref(!0),sl=l.ref(""),Tl=l.ref(!1),rr=l.ref({label:"查看三维模型"}),na=l.ref(!1),ga=l.ref(),fl=l.ref([]),Cl=l.ref([]),ia=l.ref(!1),Jl=l.ref([]),Ol=l.ref([]),El=l.ref([]),ge=l.ref([]),yl=l.ref(),rl=l.ref(),or=Va(T.pinia),ua=l.ref(),ba=l.ref(0),nr=pe.useUnit(T.pinia),{selectIndex:ir,selectMenu:Rl,selectTitle:sn}=T.storeToRefs(nr),{selectString:Ul}=T.storeToRefs(or),ur=T.useLoginState(T.pinia),{loginUserInfo:$l}=T.storeToRefs(ur),sr=l.ref(720),vl=l.ref(!1),sa=l.ref(!1),gl=l.ref([]),bl=l.ref(),Wl=l.ref(!0),Na=l.ref(!0),wl=l.ref([]),cr=l.inject("contentRef");l.provide("contentRef",cr),l.watch(()=>{var e;return(e=oe.value)==null?void 0:e.length},e=>{Pe.total=e}),l.watch(()=>ql.value,async()=>{var s,d,i,p,g,E,S,A,h,O,w,B,L,J,z,x,N,b;if(((s=ql.value)==null?void 0:s.length)===0||!((d=u==null?void 0:u.itemData)!=null&&d.find(C=>(C==null?void 0:C.key)==="columnPath"))||!((i=u==null?void 0:u.itemData)!=null&&i.find(C=>(C==null?void 0:C.key)==="pageColumn")))return;let e=(h=(A=(S=(E=(g=(p=u==null?void 0:u.itemData)==null?void 0:p.find(C=>(C==null?void 0:C.key)==="pageColumn"))==null?void 0:g.contents)==null?void 0:E.split("["))==null?void 0:S[1])==null?void 0:A.split("]"))==null?void 0:h[0],a=((L=(B=(w=(O=u==null?void 0:u.itemData)==null?void 0:O.find(C=>(C==null?void 0:C.key)==="pageColumn"))==null?void 0:w.contents)==null?void 0:B.split("["))==null?void 0:L[0])+((z=(J=ql.value)==null?void 0:J.find(C=>(C==null?void 0:C.key)===e))==null?void 0:z.value),o=((N=(x=u==null?void 0:u.itemData)==null?void 0:x.find(C=>(C==null?void 0:C.key)==="pageGroup"))==null?void 0:N.contents)??"",r=await pe.getItemData(a,sessionStorage.getItem("systemKey"),""),n=(b=r==null?void 0:r.find(C=>(C==null?void 0:C.name)===(o===""?u==null?void 0:u.compName:o)))==null?void 0:b.compData;Ja(n,u.allMapContents)},{deep:!0});const dr=async(e,a)=>{var o,r,n,s,d;try{const i=await T.getInsofDataApi({id:(u==null?void 0:u.parentTableId)||(u==null?void 0:u.index)});let p;((o=i==null?void 0:i.data)==null?void 0:o.code)===200&&(p=((n=(r=i==null?void 0:i.data)==null?void 0:r.result)==null?void 0:n[0])||null);const g={type:"data",pageKey:u!=null&&u.parentTableId?(s=p==null?void 0:p.key)==null?void 0:s.pageKey:Be.value,tableId:(u==null?void 0:u.parentTableId)||(u==null?void 0:u.index),systemKey:sessionStorage.getItem("systemKey")},E=a==null?void 0:a.map(h=>{const O=Object.keys(h),w={};return O.forEach((B,L)=>{w[e[L]]=h[B]}),w}),S=E==null?void 0:E.map(h=>({key:g,value:{tableData:h}})),A=await T.batchAddInsofDataApi({dataList:S});((d=A==null?void 0:A.data)==null?void 0:d.code)===200?(Je.setRefreshCurStructure(!0),T.ElMessage.success("导入数据成功")):T.ElMessage.error("导入数据响应失败")}catch(i){throw T.ElMessage.error("导入数据处理失败"),new Error(i)}},pr=async e=>{var s,d,i,p,g,E,S;let a=Ye.value;a!=null&&a.find(A=>(e==null?void 0:e.key)===(A==null?void 0:A.key))&&(a=a==null?void 0:a.filter(A=>(e==null?void 0:e.key)!==(A==null?void 0:A.key))),a.push({key:e==null?void 0:e.key,value:[(d=e==null?void 0:e.value)==null?void 0:d[((s=e==null?void 0:e.value)==null?void 0:s.length)-1]]});let o=ge.value;o=o==null?void 0:o.map(A=>{var h,O;return(A==null?void 0:A.type)==="Select"&&(e==null?void 0:e.key)===(A==null?void 0:A.prop)&&Array.isArray(A.value)&&(h=A.value)!=null&&h.every(w=>typeof w=="string")&&(A.selectValue=(O=a==null?void 0:a.find(w=>(w==null?void 0:w.key)===(A==null?void 0:A.prop)))==null?void 0:O.value),A});let r=(p=(i=o==null?void 0:o.find(A=>(A==null?void 0:A.prop)===(e==null?void 0:e.key)))==null?void 0:i.optionUrl)==null?void 0:p.menuId,n=o==null?void 0:o.find(A=>(A==null?void 0:A.prop)===(e==null?void 0:e.key));if(r){let A=await fa(n==null?void 0:n.optionUrl,r),h,O=we.value,w=(S=(E=(g=ge.value)==null?void 0:g.find(B=>{var L;return(L=n==null?void 0:n.optionUrl)==null?void 0:L.menuId}))==null?void 0:E.selectValue)==null?void 0:S[0];if(A==null||A.forEach(B=>{var L,J,z,x,N,b,C,y,V,M;if(r){let H=(J=(L=ge.value)==null?void 0:L.find(_=>{var ne,$;return((ne=n==null?void 0:n.optionUrl)==null?void 0:ne.menuId)===(($=_==null?void 0:_.optionUrl)==null?void 0:$.menuId)}))==null?void 0:J.prop,c=(x=(z=o==null?void 0:o.find(_=>(_==null?void 0:_.prop)===H))==null?void 0:z.selectValue)==null?void 0:x[0];H!=null&&H.includes("·")&&(H=(N=H==null?void 0:H.split("·"))==null?void 0:N[0],c=(V=(y=(C=e==null?void 0:e.value)==null?void 0:C[((b=e==null?void 0:e.value)==null?void 0:b.length)-1])==null?void 0:y.split(" "))==null?void 0:V[0]),O!=null&&O.find(_=>(_==null?void 0:_.value)===w)?h=(M=O==null?void 0:O.find(_=>(_==null?void 0:_.value)===w))==null?void 0:M.objectValue:B[H]===c&&(h=B)}}),h){let B=o;B=B==null?void 0:B.map(L=>{var J,z,x,N,b,C;return r&&(h!=null&&h[L==null?void 0:L.prop])&&sl.value==="新增"&&(L==null?void 0:L.prop)!==(n==null?void 0:n.prop)?L.value=(h==null?void 0:h[L==null?void 0:L.prop])||(h==null?void 0:h[(N=(x=(z=(J=L==null?void 0:L.optionUrl)==null?void 0:J.groupSelect)==null?void 0:z[1])==null?void 0:x.replaceAll("[",""))==null?void 0:N.replaceAll("]","")]):L.value=(C=(b=ge.value)==null?void 0:b.find(y=>(y==null?void 0:y.prop)===(L==null?void 0:L.prop)))==null?void 0:C.value,L}),ge.value=B}}Ye.value=a},tr=async e=>{var a,o,r,n,s;if((a=e==null?void 0:e.toString())!=null&&a.includes(".txt")||(o=e==null?void 0:e.toString())!=null&&o.includes(".cpt")||(r=e==null?void 0:e.toString())!=null&&r.includes(".cyd")){const d=await T.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),i=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});let p=URL.createObjectURL(i);Ll.value=[{name:(s=e==null?void 0:e.split("/"))==null?void 0:s[((n=e==null?void 0:e.split("/"))==null?void 0:n.length)-1],blobUrl:p}],_l.value=!0}};l.onBeforeUnmount(()=>{Na.value=!1;let e=ba.value;ba.value=e+1});const Ba=l.computed(()=>{var r,n;const e=(Pe.currentPage-1)*Pe.pageSize,a=e+Pe.pageSize,o=(r=Y.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 o&&(X.order="descending",X.prop=o==null?void 0:o.prop),re("getSliceContLength",Pe),(n=oe.value)==null?void 0:n.slice(e,a)}),fr=e=>{Pe.currentPage=e,re("getSliceContLength",Pe)},hr=e=>{var a;Pe.pageSize=e,e*Pe.currentPage>((a=oe.value)==null?void 0:a.length)&&(Pe.currentPage=1,Pe.pageSize=10,T.ElMessage.warning("分页无效,返回第一页")),re("getSliceContLength",Pe)},yr=(e,a)=>{var d,i;const o=(i=(d=Y.value)==null?void 0:d.map(p=>p==null?void 0:p.prop))==null?void 0:i.filter(p=>p!=="operate");let r;const n=(e==null?void 0:e.length)===(o==null?void 0:o.length);if(e!=null&&e.includes("序号"))return T.ElMessage.error("导入的数据不需要包含序号列");if(r=n?e:e.slice(0,o==null?void 0:o.length),!(r==null?void 0:r.every(p=>o==null?void 0:o.find(g=>p===g))))return T.ElMessage.error("导入的数据表头不匹配");dr(r,a)},vr=(e,a)=>{var o;Je.setRefreshCurStructure(!1),((o=Y.value)==null?void 0:o.length)===0||yr(e,a)},gr=(e,a,o,r)=>{const n=[],s=[],d=g=>Object.keys(g).length;for(const g in e)if(e[g]!==void 0){const E=e[g],S=[];for(const[A,h]of Object.entries(E))S.push(h),s.length<d(E)&&s.push(A);n.push(S)}n.unshift(s);const i=pe.utils.aoa_to_sheet(n),p=pe.utils.book_new();pe.utils.book_append_sheet(p,i,r),pe.writeFileSync(p,`${a}.xlsx`),gl.value=[]},ca=async(e,a,o,r=!1,n)=>{var s,d,i,p,g,E,S,A;try{Je.setRefreshCurStructure(!1);const h=await T.getInsofDataApi({id:u==null?void 0:u.index});if(((s=h==null?void 0:h.data)==null?void 0:s.code)===200){let O=(g=(p=(i=(d=h==null?void 0:h.data)==null?void 0:d.result)==null?void 0:i[0])==null?void 0:p.value)==null?void 0:g.pageData;r?O={...O,compData:(S=O==null?void 0:O.compData)==null?void 0:S.map(B=>{var L;return(B==null?void 0:B.key)==="header"?{...B,contents:(L=B==null?void 0:B.contents)==null?void 0:L.map(J=>({...J,[e]:o}))}:B})}:O={...O,compData:(E=O==null?void 0:O.compData)==null?void 0:E.map(B=>{var L,J;return(B==null?void 0:B.key)==="header"?{...B,contents:(L=B==null?void 0:B.contents)==null?void 0:L.map(z=>(z==null?void 0:z.prop)===(a==null?void 0:a.prop)?{...z,[e]:o}:z)}:(B==null?void 0:B.key)==="tableToForm"&&n?{...B,contents:(J=B==null?void 0:B.contents)==null?void 0:J.map(z=>(z==null?void 0:z.prop)===(a==null?void 0:a.prop)?{...z,[n]:o}:z)}:B})};const w=await T.updateInsofDataApi({id:u==null?void 0:u.index,value:{pageData:O}});((A=w==null?void 0:w.data)==null?void 0:A.code)===200?(T.ElMessage.success("编辑成功"),Je.setRefreshCurStructure(!0)):T.ElMessage.error("编辑响应失败")}}catch(h){T.ElMessage.error(h)}},br=async(e,a)=>{await ca("label",a,e)},kr=async(e,a)=>{await ca("columnType",a,e,!1,"type")},mr=()=>{zl.value?vl.value=!1:Ra()},Sr=e=>{gl.value=e},xr=(e,a)=>{bl.value===a?Wl.value=!1:Wl.value=!0,bl.value=a==null?void 0:a.changeProp},Dr=e=>{if(!e)return;const{item:a,value:o}=e,r=ge.value.find(n=>n.prop==a.prop);r&&r.contents.push({label:o,value:o})},Gl=l.computed(()=>{var o,r,n;const e=(o=Y.value)==null?void 0:o.some(s=>s==null?void 0:s.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(n=(r=Y.value)==null?void 0:r.filter(s=>(s==null?void 0:s.label)!=="操作"))==null?void 0:n.map(s=>({...s,filterable:!!(s!=null&&s.filterable),showSummary:!!(s!=null&&s.showSummary),operable:!!(s!=null&&s.operable)}))}),Tr=async(e,a,o)=>{const r=T.cloneDeep(Y.value);await l.nextTick(),Y.value=r==null?void 0:r.map(n=>(o==null?void 0:o.label)===(n==null?void 0:n.label)?{...n,[a]:e}:n),await ca(a,o,e)},ka=async(e,a)=>{await ca(a,null,e,!0)},Ar=()=>{Tl.value=!1},Cr=e=>{re("clickTrigger",e)},_a=async e=>{var s,d,i,p,g,E,S,A,h,O,w,B,L,J,z;const a=e==null?void 0:e.row,o=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix;if((s=a==null?void 0:a.toString())!=null&&s.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(a.includes(",")){T.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(Ae(a)){const N={files:[Ca(a)],data:{}};ya(N);return}Jl.value=[{url:a,extension:hl(a)}],Q.value=!0,ye.value={data:T.cloneDeep(o)},je.value=!0;return}let n=[];if((d=a==null?void 0:a.toString())!=null&&d.includes(".stl")||(i=a==null?void 0:a.toString())!=null&&i.includes(".STL")||(p=a==null?void 0:a.toString())!=null&&p.includes(".obj")||(g=a==null?void 0:a.toString())!=null&&g.includes(".mtl")){const x=(E=a==null?void 0:a.toString())==null?void 0:E.split(","),N=er(x),b=N==null?void 0:N[0];if(Ae(b==null?void 0:b.extension)){ya({files:N,data:{}});return}Jl.value=N,Q.value=!1,je.value=!0;return}if((S=a==null?void 0:a.toString())!=null&&S.includes(".stl")||(A=a==null?void 0:a.toString())!=null&&A.includes(".STL")||(h=a==null?void 0:a.toString())!=null&&h.includes(".obj")||(O=a==null?void 0:a.toString())!=null&&O.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let x,N=[],b={};if(Array.isArray(a)?x=a:x=a==null?void 0:a.split(","),x==null||x.forEach(C=>{C.includes(".mtl")?N.push(C):b.blob=b.blob?b.blob+","+C:C}),(N==null?void 0:N.length)>0&&(b.mtlBlobs=N),r&&(b.suffix=r),(B=(w=Object.values(b))==null?void 0:w[0])!=null&&B.includes("http:"))n.push(b);else{const C=new Blob([b.blob],{type:"application/octet-stream;charset=UTF-8"});let y=URL.createObjectURL(C),V="";(L=a==null?void 0:a.split("/"))==null||L.forEach((M,H)=>{var c;H===((c=a==null?void 0:a.split("/"))==null?void 0:c.length)-1&&(V=M)}),(J=b.blob)!=null&&J.includes(".stl")&&(V=(V==null?void 0:V.replaceAll(">",""))+".urdf"),Ll.value=[{name:V,blobUrl:y}],_l.value=!0}}else{const x=await T.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),N=new Blob([x.data],{type:"application/octet-stream;charset=UTF-8"});let b=URL.createObjectURL(N),C="";if((z=a==null?void 0:a.split("/"))==null||z.forEach((y,V)=>{var M;V===((M=a==null?void 0:a.split("/"))==null?void 0:M.length)-1&&(C=y)}),Ae(C)){const y=Ze(C),V=Ca(a);ya({files:[V],data:{trackFileType:y}});return}Ll.value=[{name:C,blobUrl:b}],_l.value=!0}(n==null?void 0:n.length)>0&&F.setBlobUrls(n)},da=e=>{var r,n,s,d;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(d=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:d[((s=(n=e==null?void 0:e.url)==null?void 0:n.split("."))==null?void 0:s.length)-1];return(e==null?void 0:e.name)+"."+a},Er=async e=>{let a=null,o=null;if(e!=null&&e.downloadUrl){const n=await ma(),s=ml.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),d=await T.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:n,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{s.close()}),i=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(i),o=e==null?void 0:e.name}else{const n=await pe.downloadAvatarApi({url:e==null?void 0:e.url});!e.url.toUpperCase().includes(".OBJ")&&!e.url.toUpperCase().includes(".STL")&&!e.url.toUpperCase().includes(".MTL")&&!e.url.toUpperCase().includes(".URDF")?(a=URL.createObjectURL(n.data),o=da(e)):a=e==null?void 0:e.url}if(Ae(a)){const n={row:`${a}`,suffix:hl(o)};_a(n);return}const r={name:o,blobUrl:a};Ll.value=[r],_l.value=!0},Nr=async e=>{let a=null,o=null;if(e!=null&&e.downloadUrl){const s=await ma(),d=await T.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"}}),i=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(i),o=e==null?void 0:e.name}else{const s=await pe.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(s.data),o=da(e)}const r={name:o,blobUrl:a},n=document.createElement("a");n.href=r.blobUrl,n.download=r.name,n.style.display="none",document.body.appendChild(n),n.click(),setTimeout(()=>{document.body.removeChild(n)},100)},Br=(e,a)=>{var o;if(Object.values(a).length!==0)return Object.values(a).find(r=>{var n,s,d;return((n=r==null?void 0:r.toString())==null?void 0:n.includes(".txt"))||((s=r==null?void 0:r.toString())==null?void 0:s.includes(".cpt"))||((d=r==null?void 0:r.toString())==null?void 0:d.includes(".obj"))})?[...e,rr.value]:(o=u==null?void 0:u.config)!=null&&o.allowMove?[...e,{label:"迁移"}]:e},_r=(e,a={})=>[...e==null?void 0:e.values()].filter(o=>Object.keys(a).every(r=>{var d;const n=o[r],s=(d=a[r])==null?void 0:d.toLowerCase();return s&&n&&typeof n=="string"?n.toLowerCase().includes(s):!0})),Or=()=>{ul.value=!0},Oa=l.ref([]),Ur=async(e,a,o=!1)=>{var r;if(e){if(Je.setTableLoading(!0),Oa.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(n=>!n)))return oe.value=aa.value;if(o){oe.value=[...ra.value.values()].filter(n=>Object.values(n).some(s=>typeof s=="string"?s==null?void 0:s.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}oe.value=_r(ra.value,e),Je.setTableLoading(!1)}},wr=async e=>{},Ua=async(e,a,o,r)=>{var n,s,d,i,p,g,E,S,A,h,O,w,B,L,J,z,x,N,b,C;if(re("clickMainKey",o),(r==null?void 0:r.isExistChild)===!0){let y=(n=r==null?void 0:r.columnType)==null?void 0:n.prop,V=r==null?void 0:r.data;if(wl.value=await pe.getItemData(Be.value,sessionStorage.getItem("systemKey"),""),!wl.value){let H=(i=(d=(s=Be.value)==null?void 0:s.split("/"))==null?void 0:d.filter((c,_)=>{var ne,$;return _!==(($=(ne=Be.value)==null?void 0:ne.split("/"))==null?void 0:$.length)-1}))==null?void 0:i.join("/");wl.value=await pe.getItemData(H,sessionStorage.getItem("systemKey"),"")}let M=(p=wl.value)==null?void 0:p.filter(H=>(H==null?void 0:H.name)===y);wl.value=M==null?void 0:M.map(H=>{var c;return H.compData=(c=H.compData)==null?void 0:c.map(_=>{var ne,$;return(_==null?void 0:_.key)==="tableContents"&&(ne=_==null?void 0:_.contents)!=null&&ne.every(k=>k==null?void 0:k.find(j=>j==null?void 0:j.id))&&(_.contents=($=_==null?void 0:_.contents)==null?void 0:$.filter(k=>(k==null?void 0:k[1])===V)),_}),H}),re("routeUrl",wl.value,{isEdit:!0,routerUrl:Be.value});return}if((r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(y=>(y==null?void 0:y.url)&&(y==null?void 0:y.name)))){let y=T.cloneDeep(e);y=await((g=T.cloneDeep(y))==null?void 0:g.map(async M=>{var _,ne,$,k;const H=await pe.downloadAvatarApi({url:M==null?void 0:M.url});let c=URL.createObjectURL(H.data);return{name:(M==null?void 0:M.name)+"."+((k=(_=M==null?void 0:M.url)==null?void 0:_.split("."))==null?void 0:k[(($=(ne=M==null?void 0:M.url)==null?void 0:ne.split("."))==null?void 0:$.length)-1]),blobUrl:c}}));let V=await Promise.all(y);Ll.value=V,_l.value=!0}if(T.cloneDeep(Y.value),(r==null?void 0:r.isMainKey)===!0){Ve.setActiveMenuPath(void 0),Je.setRouteToChildPath(void 0),Je.setFixMenuStatus(!0);let y=(S=(E=u.itemData)==null?void 0:E.find(M=>(M==null?void 0:M.key)==="contentTableId"))==null?void 0:S.contents,V=(h=(A=u.itemData)==null?void 0:A.find(M=>(M==null?void 0:M.key)==="relatedFilter"))==null?void 0:h.index;if(V!==0){let M=(w=(O=Y.value)==null?void 0:O[V])==null?void 0:w.prop;if((o==null?void 0:o[M])===(r==null?void 0:r.data)){let H=await T.getInsofDataApi({id:y}),c=(z=(J=(L=(B=H==null?void 0:H.data)==null?void 0:B.result)==null?void 0:L[0])==null?void 0:J.key)==null?void 0:z.pageKey;Ve.setActiveMenuPath(c+"/"+(r==null?void 0:r.data))}else{let H=await T.getInsofDataApi({key:{pageKey:T.cloneDeep(Be).value+"/"+(r==null?void 0:r.data),systemKey:sessionStorage.getItem("systemKey")}});((N=(x=H==null?void 0:H.data)==null?void 0:x.result)==null?void 0:N.length)>0&&Ve.setActiveMenuPath(T.cloneDeep(Be).value+"/"+(r==null?void 0:r.data))}}else{let M=await T.getInsofDataApi({key:{pageKey:T.cloneDeep(Be).value+"/"+(r==null?void 0:r.data),systemKey:sessionStorage.getItem("systemKey")}});((C=(b=M==null?void 0:M.data)==null?void 0:b.result)==null?void 0:C.length)>0&&Ve.setActiveMenuPath(T.cloneDeep(Be).value+"/"+(r==null?void 0:r.data))}}},jr=()=>{_l.value=!1},Lr=e=>{re("rowClick",e)};l.watch(()=>u.changedContent,()=>{var o,r;if(!u.changedContent)return;let e=(o=oe.value)==null?void 0:o.map(n=>{var s;return n.id===((s=u.changedContent)==null?void 0:s.id)&&(n={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete n.newId),n});const a=(r=u.itemData)==null?void 0:r.map(n=>((n==null?void 0:n.key)==="tableContents"&&(n.contents=e),n));oe.value=e,re("contentChange",{contents:a,index:u.index}),re("change",{content:e,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const Mr=()=>{},Pr=async()=>{const e=Be.value,a=sessionStorage.getItem("systemKey"),o=await pe.getItemData(e,a,""),r=(o==null?void 0:o.find(i=>(i==null?void 0:i.name)==="方法明细"))||(o==null?void 0:o[0]),n=(r==null?void 0:r.compData)||[],s=n==null?void 0:n.find(i=>{const p=i==null?void 0:i.key;return p==="formContent"||p==="tableContents"});return s==null?void 0:s.contents},ma=async()=>`Bearer ${T.Local.get("access-token")}`,$r=async(e,{token:a,inputData:o}={})=>await T.axios.post(e,o,{headers:{Authorization:a}}).catch(n=>(Ve.setImportLoading(!1),Promise.reject(n))),Fr=e=>{var r;let a={};const o=[];return a.form={},(r=T.cloneDeep(e))==null||r.forEach((n,s)=>{var d,i,p,g,E,S,A,h,O,w,B,L,J,z;if((n==null?void 0:n.comp)==="Table"){(i=(d=n==null?void 0:n.compData)==null?void 0:d.find(C=>(C==null?void 0:C.key)==="header"))==null||i.contents;let x=(E=(g=(p=n==null?void 0:n.compData)==null?void 0:p.find(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:g.contents)==null?void 0:E.map(C=>C.slice(1));(w=(O=(h=(A=(S=n==null?void 0:n.compData)==null?void 0:S.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:A.contents)==null?void 0:h[0])==null?void 0:O[0])==null||w.label;let N=(L=(B=n==null?void 0:n.compData)==null?void 0:B.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:L.contents,b=[];x==null||x.forEach(C=>{let y=[];C==null||C.forEach((V,M)=>{var c;let H={};((c=N[M])==null?void 0:c.label)!=="操作"&&(H[N[M].label]=V,y.push(H))}),b.push(y)}),a[n.name]=b}else{const x=(z=(J=n.compData)==null?void 0:J.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:z.contents;x==null||x.forEach(N=>{var b,C;if(N.prop!==""){let y=N==null?void 0:N.value;Array.isArray(y)?y=((b=y==null?void 0:y[0])==null?void 0:b.oldUrl)||"http://222.92.178.198:62001/"+((C=y==null?void 0:y[0])==null?void 0:C.url):y=y.toString(),N={key:(N==null?void 0:N.prop)??(N==null?void 0:N.label),value:y},o.push(N)}})}}),a.form=pe.getFormContents(o),a},Kr=e=>{const a=[],o=r=>{r&&typeof r=="object"&&!Array.isArray(r)?Object.values(r).forEach(o):a.push(r)};return o(e),a},zr=async(e,a,o)=>{var N,b,C,y,V,M,H,c,_,ne,$;Ve.setImportLoading(!0),Je.setFreshContent(!1);let r=await Pr().catch(k=>(Ve.setImportLoading(!1),Promise.reject(k)));r=r==null?void 0:r.filter(k=>{var j;return((j=k==null?void 0:k.find(Z=>Z==null?void 0:Z.id))==null?void 0:j.id)===(a==null?void 0:a.id)});let n=pe.getEqualChild([(N=Y.value)==null?void 0:N.filter(k=>(k==null?void 0:k.label)!=="操作")]);const s=(C=(b=pe.tableToForm(r,n))==null?void 0:b[0])==null?void 0:C.find(k=>{const j=k==null?void 0:k.key;return j==="Interface"||j==="方法体"}),d=s==null?void 0:s.value;if(!d){console.log("未搜索到isMain, 缺少算法执行接口"),Ve.setImportLoading(!1);return}const i=Y.value?pe.getEqualChild([Y.value]):[],p=i.find(k=>{const j=k==null?void 0:k.prop;return j==="Input1"||j==="输入数据.输入1"||j==="样本输入数据"}),g=p==null?void 0:p.prop;let E=a==null?void 0:a[g];const S=await ma().catch(k=>(Ve.setImportLoading(!1),Promise.reject(k)));let A=!0,h="";(y=Y.value)==null||y.forEach(k=>{(k==null?void 0:k.prop)===g&&(A=!!(k!=null&&k.childPath),h=k==null?void 0:k.childPath)});let O="";if(A){let k=(M=(V=Y.value)==null?void 0:V.find(he=>(he==null?void 0:he.isMainKey)===!0))==null?void 0:M.prop;O=a==null?void 0:a[k];let j=h==null?void 0:h.split(Qe),Z=[];j==null||j.forEach((he,me)=>{(j==null?void 0:j.length)-1===me&&Z.push(O),Z.push(he)}),Z=Z==null?void 0:Z[0];let le=await pe.getItemData(Z,sessionStorage.getItem("systemKey"),""),ee=le==null?void 0:le.filter(he=>(he==null?void 0:he.name)===g);ee=ee==null?void 0:ee.map(he=>{var me;return he.compData=(me=he==null?void 0:he.compData)==null?void 0:me.map(I=>{var ie;return(I==null?void 0:I.key)==="tableContents"&&(I.contents=(ie=I==null?void 0:I.contents)==null?void 0:ie.filter(Ue=>(Ue==null?void 0:Ue[1])===(a==null?void 0:a[g]))),I}),he}),(!ee||(ee==null?void 0:ee.length)===0)&&(ee=le,ee=ee==null?void 0:ee.map(he=>{var me;return he.compData=(me=he==null?void 0:he.compData)==null?void 0:me.map(I=>{var ie;return(I==null?void 0:I.key)==="tableContents"&&(I.contents=(ie=I==null?void 0:I.contents)==null?void 0:ie.filter(Ue=>{var v,P;return(Ue==null?void 0:Ue[1])===(a==null?void 0:a[(P=(v=Y==null?void 0:Y.value)==null?void 0:v[0])==null?void 0:P.prop])})),I}),he})),E=Fr(ee)}const w=await $r(d,{token:S,inputData:E}).catch(k=>(Ve.setImportLoading(!1),Promise.reject(k))),B=(H=w==null?void 0:w.data)==null?void 0:H.data,L=i.find(k=>(k==null?void 0:k.prop)==="Output1"),J=L==null?void 0:L.prop;let z=[],x=[];if(B&&((c=Object.values(B))==null?void 0:c.length)>0){let k=[];const j=new FormData,Z=(_=Kr(B))==null?void 0:_.map(async ee=>{var he,me;if(!Array.isArray(ee)&&(ee!=null&&ee.includes("http"))){let I=await T.axios.get(ee,{responseType:"blob"}),ie=(me=ee==null?void 0:ee.split("/"))==null?void 0:me[((he=ee==null?void 0:ee.split("/"))==null?void 0:he.length)-1];j.append("files",I.data,ie)}else k.push(ee)});if(await Promise.all(Z),!pe.isFormDataEmpty(j)){let ee=await pe.uploadAmountApi(j),he=($=(ne=ee==null?void 0:ee.data)==null?void 0:ne.result)==null?void 0:$.map(me=>{var I,ie,Ue,v,P,U;return{name:(U=(P=(v=(I=me==null?void 0:me.url)==null?void 0:I.split("/"))==null?void 0:v[((Ue=(ie=me==null?void 0:me.url)==null?void 0:ie.split("/"))==null?void 0:Ue.length)-1])==null?void 0:P.split("."))==null?void 0:U[0],url:me==null?void 0:me.url}});k=[...k,...he]}let le={};for(let ee in a)ee!=="id"&&(le[ee]=a[ee]);le[J]=k,x.push({id:a==null?void 0:a.id,value:{tableData:le}})}(x==null?void 0:x.length)>0&&await T.batchUpdateInsofDataApi({dataList:x}),(z==null?void 0:z.length)>0&&await T.batchAddInsofDataApi({dataList:z}),Vl(!0),Ve.setImportLoading(!1),Je.setFreshContent(!0)},wa=(e,a)=>(e=e==null?void 0:e.map(o=>{var r,n;return o!=null&&o.children&&((r=o.children)!=null&&r.find(s=>s.id===(a==null?void 0:a.id))?o.children=(n=o.children)==null?void 0:n.filter(s=>(s==null?void 0:s.id)!==(a==null?void 0:a.id)):o.children=wa(o.children,a)),o}),e),Re=l.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:u==null?void 0:u.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(e,a,o)=>{a===(u==null?void 0:u.index)?o(new Error("选择源不能和目标源一致")):o()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),qr=()=>{Re.show=!1},Jr=e=>{var a,o;if((e==null?void 0:e.buttonName)==="取消")return Re.show=!1;Re.to=e==null?void 0:e.content,!(!(u!=null&&u.index)||!((a=Re.to)!=null&&a.groupName))&&(u==null?void 0:u.index)!==((o=Re.to)==null?void 0:o.groupName)&&(re("change",{buttonName:"迁移",value:{from:Re.from,to:Re.to,data:Re.selectRow}}),Re.show=!1)},pa=async(e,a,o)=>{var r,n,s,d,i,p,g,E,S,A,h,O,w,B,L;if(Dl.value="",ia.value=!0,oa.value=!0,re("onButtonClick",e,a),we.value=[],e==="删除")ta.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var J,z;(J=oe.value)!=null&&J.find(x=>(x==null?void 0:x.id)===(a==null?void 0:a.id))?oe.value=(z=T.cloneDeep(oe.value))==null?void 0:z.filter(x=>(x==null?void 0:x.id)!==(a==null?void 0:a.id)):oe.value=wa(T.cloneDeep(oe.value),a),Uo(ua.value,Rl.value,a==null?void 0:a.id),Je.setTableLoading(u==null?void 0:u.index),re("change",{content:oe.value,singleContent:a,index:u==null?void 0:u.index,type:"delete",buttonName:e,column:Y.value})});else if(e==="批量删除"){if(((r=gl.value)==null?void 0:r.length)===0)return T.ElMessage.warning("请先勾选操作的数据");ta.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var z,x;const J=(z=gl.value)==null?void 0:z.map(N=>N.id);oe.value=(x=T.cloneDeep(oe.value))==null?void 0:x.filter(N=>!(J!=null&&J.includes(N.id))),Je.setTableLoading(u==null?void 0:u.index),re("change",{content:oe.value,singleContent:null,selectItems:gl.value,index:u==null?void 0:u.index,type:"batchDelete",buttonName:e,column:Y.value})})}else if(e==="复制新增"){sl.value="新增";const J=T.cloneDeep(a),z=(n=Y.value)==null?void 0:n.find(b=>b==null?void 0:b.isMainKey),x=z||((s=Y.value)==null?void 0:s[0]),N=(d=El.value)==null?void 0:d.find(b=>(b==null?void 0:b.label)==="新建");await La(!0,N,{data:J,firstCol:x})}else if(e==="新增")sl.value="新增",Hl(""),Tl.value=!0;else if(e==="编辑")sl.value="编辑",Hl(a),Tl.value=!0;else if(e==="查看")sl.value="查看",Hl(a),ia.value=!1,oa.value=!1,Tl.value=!0;else if(e==="查看三维模型"){const J={};for(let x in a)x!=="id"&&(J[x]=a[x]);let z=(i=Object.values(J))==null?void 0:i[1];ar.setTableShowThree(z)}else if(((p=o==null?void 0:o.extra)==null?void 0:p.type)==="modelExample")sl.value=e,na.value=!0;else if(e==="新建"){let J=Ml.value,z=[];for(let y in J)y!=null&&y.includes(`loading${((g=$l.value)==null?void 0:g.account)||((E=$l.value)==null?void 0:E.账号)}`)&&(z=[...z,...y]);let x=[];for(let y in J)y!=null&&y.includes(`updateLoading${((S=$l.value)==null?void 0:S.account)||((A=$l.value)==null?void 0:A.账号)}`)&&(x=[...x,...y]);let N=z==null?void 0:z.map(y=>y==null?void 0:y.id);const b=x==null?void 0:x.map(y=>y==null?void 0:y.id);N=[...T.cloneDeep(N),...b],(N==null?void 0:N.length)>0&&(N!=null&&N.every(y=>y!==null&&y))&&await T.batchDeleteInsofDataApi({ids:N});const C=(h=El.value)==null?void 0:h.find(y=>(y==null?void 0:y.label)==="新建");await La(!1,C)}else if(e==="修改模板"){let J=T.cloneDeep(Be).value;Je.setRouteToChildPath(J),Ve.setActiveMenuPath(J+Qe)}else if(e==="执行")zr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((O=gl.value)==null?void 0:O.length)===0)return T.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((w=oe.value)==null?void 0:w.length)===0)return T.ElMessage.warning("暂无数据导出");const J=(L=(B=Y.value)==null?void 0:B.map(x=>x==null?void 0:x.label))==null?void 0:L.filter(x=>x!=="操作"),z=e==="导出全部"?T.cloneDeep(oe.value):T.cloneDeep(gl.value);z==null||z.forEach(x=>{x==null||delete x.id}),gr(z,u==null?void 0:u.compName,J,u==null?void 0:u.compName)}else e==="迁移"&&(Re.selectRow=a,Re.show=!0)},Rr=async e=>{var o,r,n,s,d,i;const a=await T.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((o=a==null?void 0:a.data)==null?void 0:o.code)===200)return Array.isArray((r=a==null?void 0:a.data)==null?void 0:r.result)&&((s=(n=a==null?void 0:a.data)==null?void 0:n.result)==null?void 0:s.length)>0?(i=(d=a==null?void 0:a.data)==null?void 0:d.result)==null?void 0:i.map(p=>{var g;return{id:p==null?void 0:p.id,...(g=p==null?void 0:p.value)==null?void 0:g.pageData}}):[]},Wr=async(e,a)=>{var o,r,n,s,d,i,p,g,E,S,A,h,O,w,B,L,J,z,x,N;try{let b,C;const y=(o=Ml.value[Be.value+Qe])==null?void 0:o.filter(k=>{var j;return((j=k==null?void 0:k.key)==null?void 0:j.type)==="structureMethod"}),V=(r=Ml.value[Be.value+Qe])==null?void 0:r.filter(k=>{var j;return((j=k==null?void 0:k.key)==null?void 0:j.type)==="structure"}),M=y==null?void 0:y.find(k=>{var j,Z;return((Z=(j=k==null?void 0:k.value)==null?void 0:j.pageData)==null?void 0:Z.method)==="保存"});if(!M)return;const H=(i=(d=Ml.value[(s=(n=M==null?void 0:M.value)==null?void 0:n.pageData)==null?void 0:s.path])==null?void 0:d.filter(k=>{var j;return((j=k==null?void 0:k.key)==null?void 0:j.type)==="data"}))==null?void 0:i.find(k=>{var j,Z,le,ee;return((Z=(j=k==null?void 0:k.value)==null?void 0:j.tableData)==null?void 0:Z.算法名称)===((ee=(le=M==null?void 0:M.value)==null?void 0:le.pageData)==null?void 0:ee.method)});if(!H)return;const c={buttonName:(g=(p=M==null?void 0:M.value)==null?void 0:p.pageData)==null?void 0:g.method,api:(S=(E=H==null?void 0:H.value)==null?void 0:E.tableData)==null?void 0:S.算法体,content:V==null?void 0:V.map(k=>{var j;return(j=k==null?void 0:k.value)==null?void 0:j.pageData}),extraContent:[],extraValues:(h=(A=M==null?void 0:M.value)==null?void 0:A.pageData)==null?void 0:h.data,methodName:(w=(O=M==null?void 0:M.value)==null?void 0:O.pageData)==null?void 0:w.path};if(!e)return;const _={...e,compData:(B=e==null?void 0:e.compData)==null?void 0:B.map(k=>{var j;return(k==null?void 0:k.key)==="formContent"?{...k,contents:(j=k==null?void 0:k.contents)==null?void 0:j.map(Z=>(Z==null?void 0:Z.prop)===a?{...Z,value:""}:Z)}:k})},ne={key:{pageKey:Be.value+Qe,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:_}},$=await T.axios.post(c.api,ne,{headers:{"Content-Type":"application/json"}});return((L=$==null?void 0:$.data)==null?void 0:L.code)===200&&(b=(z=(J=$==null?void 0:$.data)==null?void 0:J.result)==null?void 0:z.latestReportCode,C=(N=(x=$==null?void 0:$.data)==null?void 0:x.result)==null?void 0:N.status),{newMainKeyValue:b,newStatus:C}}catch(b){throw T.ElMessage.error(b),new Error(b)}},ja=(e,a,o,r)=>{var n;re("contentChange",{contents:(n=e==null?void 0:e.compData)==null?void 0:n.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(i=>(i==null?void 0:i.key)===a?{...i,value:o}:Il.value&&(i==null?void 0:i.prop)===Il.prop?{...i,value:Il.value}:i)}:s}),index:e==null?void 0:e.id},r)},Il=l.reactive({prop:"状态",value:""}),Gr=l.ref(["系统自动生成信息","审批意见"]),Ir=async(e,a,o)=>{var p,g;let r=e==null?void 0:e[a==null?void 0:a.prop],n=1,s,d;const i=T.cloneDeep(Be).value+Qe+r;if(i){Il.value="",s=(p=Ml.value[i])==null?void 0:p.filter(A=>{var h;return((h=A==null?void 0:A.key)==null?void 0:h.type)==="structure"});const E=s==null?void 0:s.find(A=>{var h,O,w;return((w=(O=(h=A==null?void 0:A.value)==null?void 0:h.pageData)==null?void 0:O.comp)==null?void 0:w.toUpperCase())==="FORM"});d={...(g=E==null?void 0:E.value)==null?void 0:g.pageData,id:E==null?void 0:E.id};const S=await Wr(d,a==null?void 0:a.prop);if(Il.value=S==null?void 0:S.newStatus,S!=null&&S.newMainKeyValue)return S==null?void 0:S.newMainKeyValue}if(oe.value.some(E=>(E==null?void 0:E[a==null?void 0:a.prop])===r)){const E=r;for(;oe.value.some(S=>(S==null?void 0:S[a==null?void 0:a.prop])===`${E}(${n})`);)n++;r=`${E}(${n})`}return r},La=async(e,a,o)=>{var d,i,p,g,E,S,A,h;let r,n;const s=await Ir(o==null?void 0:o.data,o==null?void 0:o.firstCol);if(e?(r=T.cloneDeep(Be).value+Qe+((g=o==null?void 0:o.data)==null?void 0:g[(p=o==null?void 0:o.firstCol)==null?void 0:p.prop]),n=T.cloneDeep(Be).value+Qe+s):(r=T.cloneDeep(Be).value+Qe,n=T.cloneDeep(r)+`loading${((d=$l.value)==null?void 0:d.account)||((i=$l.value)==null?void 0:i.账号)}`),a){const O=(S=(E=Ml.value[n])==null?void 0:E.filter(w=>{var B;return((B=w==null?void 0:w.key)==null?void 0:B.parentTable)===""}))==null?void 0:S.map(w=>{var B;return{id:w==null?void 0:w.id,...(B=w==null?void 0:w.value)==null?void 0:B.pageData}});if((O==null?void 0:O.length)>0)if(e){const w=O==null?void 0:O.find(B=>{var L;return((L=B==null?void 0:B.comp)==null?void 0:L.toUpperCase())==="FORM"});w&&ja(w,(A=o==null?void 0:o.firstCol)==null?void 0:A.label,s,Be.value)}else Je.setRouteToChildPath(T.cloneDeep(Be).value),Ve.setActiveMenuPath(n);else if(await pe.loadingConstruct(r,n,null,null,e?Gr.value:null),e){const w=await Rr(n);if((w==null?void 0:w.length)>0){const B=w==null?void 0:w.find(L=>{var J;return((J=L==null?void 0:L.comp)==null?void 0:J.toUpperCase())==="FORM"});B&&ja(B,(h=o==null?void 0:o.firstCol)==null?void 0:h.label,s,Be.value)}}else Je.setRouteToChildPath(T.cloneDeep(Be).value),Ve.setActiveMenuPath(n)}else e?(Dl.value="",rl.value=o==null?void 0:o.data,Vl(!0,o==null?void 0:o.firstCol,s)):(Je.setRouteToChildPath(T.cloneDeep(Be).value),Ve.setActiveMenuPath(n))},Hr=()=>{je.value=!1,Jl.value=[],Q.value=!1},Hl=e=>{var d,i,p,g,E,S,A,h,O,w,B,L,J,z,x,N,b,C,y,V,M,H;const a=[];let o=[];for(let c in e)Array.isArray(e==null?void 0:e[c])&&o.push(c);m.value=T.cloneDeep(Y.value),(i=pe.getColumnChild((d=T.cloneDeep(Y.value))==null?void 0:d.filter(c=>(c==null?void 0:c.label)!=="操作")))==null||i.forEach((c,_)=>{var ne;o.find($=>$===(c==null?void 0:c.prop))||(c!=null&&c.formType&&((ne=c==null?void 0:c.formType)==null?void 0:ne.toUpperCase())==="SELECT"||c!=null&&c.menuId?a.push({label:(c==null?void 0:c.label)||(c==null?void 0:c.prop)||"",name:(c==null?void 0:c.prop)??"t"+_,prop:c==null?void 0:c.prop,type:"Select",value:(e==null?void 0:e[c==null?void 0:c.prop])??(c==null?void 0:c.value)??"",id:(c==null?void 0:c.id)??_,contents:(c==null?void 0:c.options)??[],width:1,isFormColHidden:c==null?void 0:c.isFormColHidden,relatedValueId:c==null?void 0:c.relatedValueId,disabled:c==null?void 0:c.disabled,optionUrl:{groupSelect:c==null?void 0:c.groupSelect,menuSelect:c==null?void 0:c.formMenuSelect,type:"Select",selectRelateType:c==null?void 0:c.selectRelateType,allSelectionContents:(c==null?void 0:c.allSelectionContents)??[],selectFilter:c==null?void 0:c.selectFilter,menuId:c==null?void 0:c.menuId,filterContent:c==null?void 0:c.filterContent}}):a.push({label:(c==null?void 0:c.label)||(c==null?void 0:c.prop)||"",prop:c==null?void 0:c.prop,name:(c==null?void 0:c.prop)??"t"+_,type:!(c!=null&&c.formType)||(c==null?void 0:c.formType)===""?"Input":c==null?void 0:c.formType,value:(e==null?void 0:e[c==null?void 0:c.prop])??(c==null?void 0:c.value)??"",id:(c==null?void 0:c.id)??_,contents:(c==null?void 0:c.options)??[],width:1,isFormColHidden:c==null?void 0:c.isFormColHidden,disabled:c==null?void 0:c.disabled,relatedValueId:c==null?void 0:c.relatedValueId}))}),e===""||!e||(Dl.value=(e==null?void 0:e.id)??"");let r=pe.getColumnChild((p=T.cloneDeep(Y.value))==null?void 0:p.filter(c=>(c==null?void 0:c.label)!=="操作"));fl.value&&((g=fl.value)==null?void 0:g.length)>0&&(fl.value=(E=T.cloneDeep(fl).value)==null?void 0:E.map(c=>{var ne;let _=(c==null?void 0:c.prop)||((ne=r==null?void 0:r.find($=>($==null?void 0:$.label)===(c==null?void 0:c.label)))==null?void 0:ne.prop);return _&&(c.value=e[_]),c})),ge.value=fl.value&&((S=fl.value)==null?void 0:S.length)>0?pe.getTableFormToForm(fl.value):a;let n=[],s=(A=u.itemData)==null?void 0:A.filter(c=>(c==null?void 0:c.key)==="filterAllType");if((s==null?void 0:s.length)>0&&(n=(s==null?void 0:s.map(_=>_==null?void 0:_.value)).flat()),(n==null?void 0:n.length)>0){let c=(O=n==null?void 0:n.filter($=>{var k;return(k=$==null?void 0:$.content)==null?void 0:k.includes("@Type")}))==null?void 0:O[((h=n==null?void 0:n.filter($=>{var k;return(k=$==null?void 0:$.content)==null?void 0:k.includes("@Type")}))==null?void 0:h.length)-1];if(c!=null&&c.content){let $=(L=(B=(w=c==null?void 0:c.content)==null?void 0:w.replace(":",xl))==null?void 0:B.split(xl))==null?void 0:L[1];if(((J=$==null?void 0:$.trim())==null?void 0:J.toUpperCase())==="MANUAL"){let k=(C=(b=(z=u.itemData)==null?void 0:z.filter(j=>(j==null?void 0:j.key)==="contentTableId"))==null?void 0:b[((N=(x=u.itemData)==null?void 0:x.filter(j=>(j==null?void 0:j.key)==="contentTableId"))==null?void 0:N.length)-1])==null?void 0:C.contents;ge.value=(y=ge.value)==null?void 0:y.map((j,Z)=>{var le,ee;return(le=j==null?void 0:j.optionUrl)!=null&&le.menuId&&(j.type="Select",(ee=j==null?void 0:j.optionUrl)!=null&&ee.menuId&&(j.optionUrl.menuId=j.optionUrl.menuId??k,j.optionUrl.menuFilter=n,sl.value==="新增"&&(j.optionUrl.multiple=!0,j.optionUrl.multipleLimit=5))),j})}}let _=(V=ge.value)==null?void 0:V.filter($=>{var k,j;return((k=$==null?void 0:$.optionUrl)==null?void 0:k.menuId)&&((j=$==null?void 0:$.optionUrl)==null?void 0:j.menuId)!==""}),ne;if(_==null||_.forEach($=>{var j,Z;if(ne!==void 0)return;let k=(j=$==null?void 0:$.optionUrl)==null?void 0:j.menuId;((Z=_==null?void 0:_.filter(le=>{var ee;return((ee=le==null?void 0:le.optionUrl)==null?void 0:ee.menuId)===k}))==null?void 0:Z.length)>1&&(ne=k)}),_=_==null?void 0:_.filter($=>{var k;return((k=$==null?void 0:$.optionUrl)==null?void 0:k.menuId)===ne}),(_==null?void 0:_.length)>1){let $=_==null?void 0:_.map(le=>le==null?void 0:le.prop),k=_==null?void 0:_.map(le=>le==null?void 0:le.label),j=_==null?void 0:_.map(le=>le==null?void 0:le.value),Z=(M=T.cloneDeep(_))==null?void 0:M[0];Z.label=k==null?void 0:k.join("·"),Z.value=j==null?void 0:j.join(" "),Z.value.trim()===""&&(Z.value=""),Z.prop=$==null?void 0:$.join("·"),Z.usingType="parent",ge.value.unshift(Z),ge.value=(H=ge.value)==null?void 0:H.map(le=>($!=null&&$.find(ee=>ee===(le==null?void 0:le.prop))&&(le.isFormColHidden=!0),le))}}},Vr=()=>{var a;const e=(a=K.value)==null?void 0:a.$el;e&&pe.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:o=>{var d;const{oldIndex:r,newIndex:n}=o;if(r===n)return;const s=Gl.value.splice(r,1)[0];Gl.value.splice(n,0,s),Y.value=(d=Y.value)==null?void 0:d.slice().sort((i,p)=>{if(i.label==="操作")return 1;if(p.label==="操作")return-1;const g=Gl.value.findIndex(S=>S.label===i.label),E=Gl.value.findIndex(S=>S.label===p.label);return g-E})}})};l.onMounted(()=>{ga.value=window.innerWidth-240*2});const Qr=()=>{l.nextTick(()=>{Vr()})},Sa=(e,a)=>{var r;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let o;return e.children=(r=e.children)==null?void 0:r.map(n=>{var s,d;if((n==null?void 0:n.id)===Dl.value){let i={};for(let p in n){let g=(s=a==null?void 0:a.find(E=>(E==null?void 0:E.prop)===p))==null?void 0:s.label;g?i[p]=(d=rl.value)==null?void 0:d[g]:i[p]=n[p]}n=Object.assign(i,rl.value),o=n}else{let i=Sa(n,a);n=i==null?void 0:i.contents,o=i==null?void 0:i.currentSelectContents}return n}),{contents:e,currentSelectContents:o}},Ma=(e,a)=>{let o,r;return e!=null&&e.find(n=>(n==null?void 0:n.id)===Dl.value)?o=e==null?void 0:e.map(n=>{var s,d;if((n==null?void 0:n.id)===Dl.value){let i={};for(let p in n){let g=(s=a==null?void 0:a.find(E=>(E==null?void 0:E.prop)===p))==null?void 0:s.label;g?i[p]=(d=rl.value)==null?void 0:d[g]:i[p]=n[p]}n=Object.assign(i,rl.value),r=n}return n}):o=e==null?void 0:e.map(n=>{var s,d,i,p;if((n==null?void 0:n.id)===Dl.value){let g={};for(let E in n){let S=(s=a==null?void 0:a.find(A=>(A==null?void 0:A.prop)===E))==null?void 0:s.label;S?g[E]=(d=rl.value)==null?void 0:d[S]:g[E]=n[E]}n=Object.assign(g,rl.value),r=n}else n=(i=Sa(n,a))==null?void 0:i.contents,r=(p=Sa(n,a))==null?void 0:p.currentSelectContents;return n}),{newContents:o,currentSelectContents:r}},Pa=(e,a,o)=>{var r,n;return e[a==null?void 0:a.prop]=o,typeof e.id=="number"&&(e.id=(r=e.id)==null?void 0:r.toString()),e.children&&((n=e.children)==null?void 0:n.length)>0&&(e.children=e.children.map(Pa)),e},xa=e=>{var o;const a=[];return a.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((o=e.children)==null||o.forEach(r=>{a.push(...xa(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const n={...r};return delete n.children,n}):[]},Vl=(e=!0,a,o)=>{var g,E,S,A,h,O,w,B,L,J,z,x,N,b,C,y,V,M,H,c,_,ne,$,k,j,Z,le,ee,he,me;let r=pe.getColumnChild((g=T.cloneDeep(Y.value))==null?void 0:g.filter(I=>(I==null?void 0:I.label)!=="操作")),n,s=T.cloneDeep(oe.value);if(!rl.value){Tl.value=!1;return}if(Dl.value===""){Pl.value++;let I;a&&o?I={id:Pl.value.toString(),[a==null?void 0:a.prop]:o,children:rl.value.children}:I={id:Pl.value.toString()},I!=null&&I.children&&(I={...I,children:(E=I.children)==null?void 0:E.map(ie=>Pa(ie,a,o))}),s.push(Object.assign(rl.value,I)),n=Object.assign(rl.value,I)}else s=(S=Ma(s,r))==null?void 0:S.newContents,n=(A=Ma(s,r))==null?void 0:A.currentSelectContents;const d=(h=u.itemData)==null?void 0:h.filter(I=>(I==null?void 0:I.key)==="childTree")[0];if(((O=d==null?void 0:d.contents)==null?void 0:O.length)>0){sl.value="编辑";const I=[];s==null||s.forEach((ie,Ue)=>{var P;let v={};if(Array.isArray(ie)){let U=[];ie==null||ie.filter(fe=>!(fe!=null&&fe.id)).forEach((fe,be)=>{var q,ue,Le,D,_e,Ie,He;if((ue=(q=yl.value)==null?void 0:q[be])!=null&&ue.prop&&!Array.isArray(fe)){let We={};We[yl.value[be].column]=fe,Oe!=null&&Oe.value&&((Le=Oe==null?void 0:Oe.value)==null?void 0:Le.length)>0&&((D=Oe==null?void 0:Oe.value)!=null&&D.find(Ce=>JSON.stringify(Ce==null?void 0:Ce[0])===JSON.stringify(We)))&&(U=(_e=Oe==null?void 0:Oe.value)==null?void 0:_e.find(Ce=>JSON.stringify(Ce==null?void 0:Ce[0])===JSON.stringify(We))),U&&U.length>0?v[yl.value[be].prop]=U!=null&&U.find(Ce=>{var ze;return((ze=Object.keys(Ce))==null?void 0:ze[0])===yl.value[be].column})?(Ie=U==null?void 0:U.find(Ce=>{var ze;return((ze=Object.keys(Ce))==null?void 0:ze[0])===yl.value[be].column}))==null?void 0:Ie[yl.value[be].column]:fe:v[yl.value[be].prop]=fe}else Array.isArray(fe)&&((He=yl.value[be])!=null&&He.prop?v[yl.value[be].prop]=fe:v.children=Aa(fe,yl.value))})}else v=ie;Array.isArray(ie)&&ie.some(U=>U==null?void 0:U.id)?I.push(Object.assign(v,{id:(P=ie==null?void 0:ie.find(U=>U.id))==null?void 0:P.id})):v.id?I.push(v):I.push(Object.assign(v,{id:Ue.toString()}))}),oe.value=qa(I,d,Y.value)}Ka(oe.value),ua.value=oe.value;const i=jo(ua.value,Rl.value,s);let p=[];if(zl.value?(p=(w=T.cloneDeep(zl).value.singleContent)==null?void 0:w.filter(I=>(I==null?void 0:I.id)!==(n==null?void 0:n.id)),p.push(n)):p=[n],vl.value){const I={content:i,singleContent:((B=d==null?void 0:d.contents)==null?void 0:B.length)>0?p==null?void 0:p.flatMap(xa):p,index:u==null?void 0:u.index,buttonName:"编辑",column:Y.value,parentTableId:u==null?void 0:u.parentTableId};Je.setCacheUpdatingData(I)}if(e){let I=(x=(z=(J=(L=u.itemData)==null?void 0:L.find(v=>(v==null?void 0:v.key)==="filterAllType"))==null?void 0:J.value)==null?void 0:z.find(v=>(v==null?void 0:v.value)==="onConditionContents"))==null?void 0:x.content,ie=(N=u.itemData)==null?void 0:N.filter(v=>(v==null?void 0:v.key)==="filterAllType");ie=Array.from(new Map(ie.filter(Boolean).map((v,P)=>[v.value,{...v,_idx:P}])).values()).sort((v,P)=>v._idx-P._idx).map(({_idx:v,...P})=>P),ie=(b=ie==null?void 0:ie[(ie==null?void 0:ie.length)-1])==null?void 0:b.value;const Ue={content:i,singleContent:((C=d==null?void 0:d.contents)==null?void 0:C.length)>0?xa(n):n,index:u==null?void 0:u.index,buttonName:sl.value,column:Y.value,parentTableId:u==null?void 0:u.parentTableId,filter:I,allFilter:ie,pathIndex:(V=(y=u.itemData)==null?void 0:y.find(v=>(v==null?void 0:v.key)==="relatedFilter"))==null?void 0:V.index,rowContents:ge.value,addArrayValues:we.value};Je.setTableLoading(u==null?void 0:u.index),Tl.value=!1,rl.value=void 0,re("change",Ue)}if((c=(H=(M=ge.value)==null?void 0:M[0])==null?void 0:H.optionUrl)!=null&&c.menuId){Tl.value=!1;let I=(_=u.itemData)==null?void 0:_.filter(ie=>(ie==null?void 0:ie.key)==="filterAllType");if((I==null?void 0:I.length)>0){let ie=I==null?void 0:I.map(P=>P==null?void 0:P.value),Ue=(k=($=(ne=ie.flat().find(P=>{var U;return(U=P==null?void 0:P.content)==null?void 0:U.includes("@Num")}))==null?void 0:ne.content)==null?void 0:$.split(":"))==null?void 0:k[1];((le=(Z=(j=ie.flat().find(P=>{var U;return(U=P==null?void 0:P.content)==null?void 0:U.includes("@Type:")}))==null?void 0:j.content)==null?void 0:Z.split(":"))==null?void 0:le[1])!=="Manual"&&(Ue=parseInt(Ue),oe.value=(me=oe.value)==null?void 0:me.slice(((ee=oe.value)==null?void 0:ee.length)-Ue,(he=oe.value)==null?void 0:he.length))}}};l.onUnmounted(()=>{Y.value=[],oe.value=[],m.value=[],va.value=[],fl.value=[],Cl.value=[],Jl.value=[],Ol.value=[],ge.value=[],gl.value=[],K.value=null});const $a=async(e,a,o)=>{var g,E,S,A,h,O,w,B,L,J,z;bl.value=o==null?void 0:o.prop;const r=T.cloneDeep(u.itemData),n=r==null?void 0:r.map(x=>{var N;return(x==null?void 0:x.key)==="header"&&((N=x.contents)==null||N.map((b,C)=>{var y,V,M,H,c,_,ne,$,k,j,Z,le,ee,he,me,I,ie,Ue,v;return b.type=b!=null&&b.type?b.type:(H=(M=(V=(y=b==null?void 0:b.key)==null?void 0:y.split("$"))==null?void 0:V[1])==null?void 0:M.split("("))!=null&&H[0]?(_=(c=pe.FormType)==null?void 0:c.find(P=>{var U,fe,be,q;return(P==null?void 0:P.key)===((q=(be=(fe=(U=b==null?void 0:b.key)==null?void 0:U.split("$"))==null?void 0:fe[1])==null?void 0:be.split("("))==null?void 0:q[0])}))==null?void 0:_.value:"Input",b.options=b!=null&&b.options?b.options:((k=($=(ne=b==null?void 0:b.key)==null?void 0:ne.split("$"))==null?void 0:$[1])==null?void 0:k.length)>0?(ee=(le=Ta((Z=(j=b==null?void 0:b.key)==null?void 0:j.split("$"))==null?void 0:Z[1]))==null?void 0:le.split(","))==null?void 0:ee.map(P=>({label:P,value:P})):[],(he=b==null?void 0:b.key)!=null&&he.includes("$")&&(b.key=(I=(me=b==null?void 0:b.key)==null?void 0:me.split("$"))==null?void 0:I[0]),b.value=(ie=Object.values(a))==null?void 0:ie[C],b.optionUrl=b!=null&&b.formMenuSelect&&((Ue=b==null?void 0:b.formMenuSelect)==null?void 0:Ue.length)>0?{groupSelect:(v=b==null?void 0:b.groupSelect)==null?void 0:v.split(/[::]/).map(P=>P.trim()),menuSelect:b==null?void 0:b.formMenuSelect,selectRelateType:"",type:(b==null?void 0:b.formType)??(b!=null&&b.groupSelect?"Select":"")}:null,b})),x});let s=T.cloneDeep(ge.value),d=(E=(g=T.cloneDeep(n))==null?void 0:g.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:E.contents;s=s==null?void 0:s.map(x=>{var N;return x.value=(N=d==null?void 0:d.find((b,C)=>C===(x==null?void 0:x.id)))==null?void 0:N.value,x});let i="",p=(h=(A=(S=T.cloneDeep(n))==null?void 0:S.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:A.contents)==null?void 0:h.find((x,N)=>{var b,C,y;return(x==null?void 0:x.label)===bl.value||(N==null?void 0:N.toString())===((y=(C=(b=bl.value)==null?void 0:b.split("a"))==null?void 0:C[1])==null?void 0:y.toString())});if((B=(w=(O=T.cloneDeep(n))==null?void 0:O.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:w.contents)==null||B.forEach(x=>{var N,b,C,y,V;i===""&&((C=(b=(N=x==null?void 0:x.optionUrl)==null?void 0:N.groupSelect)==null?void 0:b[1])!=null&&C.includes("["))&&(i=(V=(y=x==null?void 0:x.optionUrl)==null?void 0:y.groupSelect)==null?void 0:V[1])}),(L=p==null?void 0:p.optionUrl)!=null&&L.menuSelect){let x=await fa(p),N;if(x==null||x.forEach(b=>{var C,y,V,M,H,c,_,ne,$,k;i===((y=(C=p==null?void 0:p.optionUrl)==null?void 0:C.groupSelect)==null?void 0:y[1])&&((H=(M=(V=p==null?void 0:p.optionUrl)==null?void 0:V.groupSelect)==null?void 0:M[1])!=null&&H.includes("["))&&((k=T.cloneDeep(b))==null?void 0:k[($=(ne=(_=(c=p==null?void 0:p.optionUrl)==null?void 0:c.groupSelect)==null?void 0:_[1])==null?void 0:ne.replaceAll("[",""))==null?void 0:$.replaceAll("]","")])===(p==null?void 0:p.value)&&(N=b)}),N){let b=T.cloneDeep(s);b=b==null?void 0:b.map(y=>{var V,M,H,c,_,ne,$,k,j,Z,le;return(N!=null&&N[y==null?void 0:y.label]||N!=null&&N[(c=(H=(M=(V=y==null?void 0:y.optionUrl)==null?void 0:V.groupSelect)==null?void 0:M[1])==null?void 0:H.replaceAll("[",""))==null?void 0:c.replaceAll("]","")])&&(($=(ne=(_=y==null?void 0:y.optionUrl)==null?void 0:_.groupSelect)==null?void 0:ne[1])!=null&&$.includes("["))&&(y.value=(N==null?void 0:N[y==null?void 0:y.label])||(N==null?void 0:N[(le=(Z=(j=(k=y==null?void 0:y.optionUrl)==null?void 0:k.groupSelect)==null?void 0:j[1])==null?void 0:Z.replaceAll("[",""))==null?void 0:le.replaceAll("]","")])),y}),oe.value=(J=T.cloneDeep(oe.value))==null?void 0:J.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const V={};return b==null||b.forEach(M=>{V[M.name]=M.value}),V.id=y==null?void 0:y.id,V}return y});let C=T.cloneDeep(b);C=C==null?void 0:C.map(y=>{var V,M,H,c;return(M=(V=y==null?void 0:y.optionUrl)==null?void 0:V.menuSelect)!=null&&M.some(_=>_==null?void 0:_.includes)&&(y.optionUrl.menuSelect=(c=(H=y==null?void 0:y.optionUrl)==null?void 0:H.menuSelect)==null?void 0:c.map(_=>{var ne,$,k,j;if(_!=null&&_.includes("[")){let Z=($=(ne=_==null?void 0:_.replaceAll("[","").replaceAll("]",""))==null?void 0:ne.split(":"))==null?void 0:$[1];_=(j=(k=T.cloneDeep(b))==null?void 0:k.find(le=>(le==null?void 0:le.label)===Z))==null?void 0:j.value}return _})),y}),oe.value=(z=T.cloneDeep(oe.value))==null?void 0:z.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const V={};return C==null||C.forEach(M=>{V[M.name]=M.value}),V.id=y==null?void 0:y.id,V}return y})}}},Xr=async e=>{var h,O,w,B,L,J,z,x,N,b,C,y,V,M,H,c,_,ne,$,k,j,Z,le,ee,he,me,I,ie,Ue;if(!e)return;rl.value=e;const a=T.cloneDeep(u.itemData);let o=a==null?void 0:a.map(v=>{var P;return(v==null?void 0:v.key)==="header"&&(v.contents=(P=v.contents)==null?void 0:P.map((U,fe)=>{var be,q,ue,Le,D,_e,Ie,He,We,Ce,ze,ll,al,el,ke,De,nl,cl,dl,t,G,Ee,il,Al;return U.type=U!=null&&U.type?U.type:(Le=(ue=(q=(be=U==null?void 0:U.key)==null?void 0:be.split("$"))==null?void 0:q[1])==null?void 0:ue.split("("))!=null&&Le[0]?(_e=(D=pe.FormType)==null?void 0:D.find(Fe=>{var W,f,se,Ke;return(Fe==null?void 0:Fe.key)===((Ke=(se=(f=(W=U==null?void 0:U.key)==null?void 0:W.split("$"))==null?void 0:f[1])==null?void 0:se.split("("))==null?void 0:Ke[0])}))==null?void 0:_e.value:"Input",U.options=U!=null&&U.options?U.options:((We=(He=(Ie=U==null?void 0:U.key)==null?void 0:Ie.split("$"))==null?void 0:He[1])==null?void 0:We.length)>0?(al=(ll=Ta((ze=(Ce=U==null?void 0:U.key)==null?void 0:Ce.split("$"))==null?void 0:ze[1]))==null?void 0:ll.split(","))==null?void 0:al.map(Fe=>({label:Fe,value:Fe})):[],(el=U==null?void 0:U.key)!=null&&el.includes("$")&&(U.key=(De=(ke=U==null?void 0:U.key)==null?void 0:ke.split("$"))==null?void 0:De[0]),((dl=(cl=(nl=ge.value)==null?void 0:nl.find(Fe=>(Fe==null?void 0:Fe.prop)===(U==null?void 0:U.prop)))==null?void 0:cl.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((t=Object.values(e))==null?void 0:t[fe])?U.value=[(G=Object.values(e))==null?void 0:G[fe]]:U.value=(Ee=Object.values(e))==null?void 0:Ee[fe],U.optionUrl=U!=null&&U.formMenuSelect&&((il=U==null?void 0:U.formMenuSelect)==null?void 0:il.length)>0?{groupSelect:(Al=U==null?void 0:U.groupSelect)==null?void 0:Al.split(/[::]/).map(Fe=>Fe.trim()),menuSelect:U==null?void 0:U.formMenuSelect,selectRelateType:"",type:(U==null?void 0:U.formType)??(U!=null&&U.groupSelect?"Select":"")}:null,U})),v}),r=ge.value,n=(O=(h=T.cloneDeep(o))==null?void 0:h.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:O.contents;if(n=n==null?void 0:n.filter(v=>(v==null?void 0:v.label)!=="操作"),n.push({label:"操作",type:"operate"}),r=r==null?void 0:r.map(v=>{var P;return v.value=v.value??((P=n==null?void 0:n.find((U,fe)=>(U==null?void 0:U.prop)===(v==null?void 0:v.name)))==null?void 0:P.value),v}),!Wl.value)return;let s="",d=T.cloneDeep(bl.value);(w=bl.value)!=null&&w.includes("·")&&(bl.value=(L=(B=bl.value)==null?void 0:B.split("·"))==null?void 0:L[0]);let i=(x=(z=(J=T.cloneDeep(o))==null?void 0:J.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:z.contents)==null?void 0:x.find((v,P)=>{var U,fe,be;return(v==null?void 0:v.prop)===bl.value||(P==null?void 0:P.toString())===((be=(fe=(U=bl.value)==null?void 0:U.split("a"))==null?void 0:fe[1])==null?void 0:be.toString())}),p=(N=i==null?void 0:i.optionUrl)==null?void 0:N.menuSelect,g=!0;(y=(C=(b=T.cloneDeep(o))==null?void 0:b.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:C.contents)==null||y.forEach(v=>{var P,U,fe,be,q,ue;g&&((fe=(U=(P=v==null?void 0:v.optionUrl)==null?void 0:P.groupSelect)==null?void 0:U[1])!=null&&fe.includes("["))&&(s=(q=(be=v==null?void 0:v.optionUrl)==null?void 0:be.groupSelect)==null?void 0:q[1],JSON.stringify(p)===JSON.stringify((ue=v==null?void 0:v.optionUrl)==null?void 0:ue.menuSelect)&&(g=!1))});let E=T.cloneDeep(r),S=Ye.value;S!=null&&S.find(v=>(i==null?void 0:i.prop)===(v==null?void 0:v.key))&&(S=S==null?void 0:S.filter(v=>(i==null?void 0:i.prop)!==(v==null?void 0:v.key))),S!=null&&S.find(v=>d===(v==null?void 0:v.key))&&(S=S==null?void 0:S.filter(v=>d!==(v==null?void 0:v.key))),E=E==null?void 0:E.map(v=>{var P,U,fe,be,q,ue,Le,D;return(v==null?void 0:v.type)==="Select"&&(((U=(P=v==null?void 0:v.optionUrl)==null?void 0:P.allSelectionContents)==null?void 0:U.length)>0&&(v.optionUrl.contactValue=e),((i==null?void 0:i.prop)===(v==null?void 0:v.prop)||d===(v==null?void 0:v.prop))&&(Array.isArray(i.value)&&((fe=i.value)==null?void 0:fe.length)>0&&((be=i.value)!=null&&be.every(_e=>typeof _e=="string"))?(S.push({key:v==null?void 0:v.prop,value:[(ue=i.value)==null?void 0:ue[((q=i.value)==null?void 0:q.length)-1]]}),v.selectValue=(Le=S==null?void 0:S.find(_e=>(_e==null?void 0:_e.key)===(v==null?void 0:v.prop)))==null?void 0:Le.value):Array.isArray(i.value)&&((D=i.value)==null?void 0:D.length)===0&&(S=[],v.selectValue=[],e[v==null?void 0:v.prop]=""))),v.value=e==null?void 0:e[v==null?void 0:v.prop],v}),Ye.value=S,ge.value=T.cloneDeep(E);let A=(i==null?void 0:i.menuId)??((H=(M=(V=ge.value)==null?void 0:V.find(v=>{var P;return(P=v==null?void 0:v.optionUrl)==null?void 0:P.menuId}))==null?void 0:M.optionUrl)==null?void 0:H.menuId);if((c=i==null?void 0:i.optionUrl)!=null&&c.menuSelect&&Wl.value||A){let v=await fa(i,A),P;if(v==null||v.forEach(q=>{var ue,Le,D,_e,Ie,He,We,Ce,ze,ll,al,el,ke,De,nl,cl,dl,t,G,Ee,il,Al,Fe,W,f;if(!A&&s===((Le=(ue=i==null?void 0:i.optionUrl)==null?void 0:ue.groupSelect)==null?void 0:Le[1])&&((Ie=(_e=(D=i==null?void 0:i.optionUrl)==null?void 0:D.groupSelect)==null?void 0:_e[1])!=null&&Ie.includes("["))&&((ll=T.cloneDeep(q))==null?void 0:ll[(ze=(Ce=(We=(He=i==null?void 0:i.optionUrl)==null?void 0:He.groupSelect)==null?void 0:We[1])==null?void 0:Ce.replaceAll("[",""))==null?void 0:ze.replaceAll("]","")])===(i==null?void 0:i.value)&&(P=q),A){let se=(el=(al=ge.value)==null?void 0:al.find(Te=>{var qe;return(i==null?void 0:i.menuId)===((qe=Te==null?void 0:Te.optionUrl)==null?void 0:qe.menuId)}))==null?void 0:el.prop,Ke=e[se];if(se!=null&&se.includes("·"))if(!Array.isArray(e[se]))Ke=(De=(ke=e[se])==null?void 0:ke.split(" "))==null?void 0:De[0],se=(nl=se==null?void 0:se.split("·"))==null?void 0:nl[0];else{se=(cl=se==null?void 0:se.split("·"))==null?void 0:cl[0];let Te=(t=(dl=E==null?void 0:E.find(qe=>(qe==null?void 0:qe.prop)===se))==null?void 0:dl.selectValue)==null?void 0:t[0];Ke=(G=Te==null?void 0:Te.split(" "))==null?void 0:G[0]}let Ge=(il=(Ee=E==null?void 0:E.find(Te=>(Te==null?void 0:Te.prop)===se))==null?void 0:Ee.selectValue)==null?void 0:il[0];if(q[se]===(Array.isArray(Ke)?Ge:Ke)&&(i==null?void 0:i.directiveLabel)==="#isMain"){if(d!=null&&d.includes("·")){let Te=d==null?void 0:d.split("·"),qe=(f=(W=(Fe=Array.isArray(e==null?void 0:e[d])?(Al=e==null?void 0:e[d])==null?void 0:Al[0]:e==null?void 0:e[d])==null?void 0:Fe.split(" "))==null?void 0:W.filter(pl=>pl&&pl!==""))==null?void 0:f.map(pl=>pl==null?void 0:pl.trim());Te==null||Te.forEach((pl,jl)=>{q[pl]=qe==null?void 0:qe[jl]})}P=q}}}),ul.value&&(i==null?void 0:i.directiveLabel)==="#isMain"&&(we.value=[]),!P){if(ul.value&&(i==null?void 0:i.directiveLabel)==="#isMain")if(d!=null&&d.includes("·")){let q=e,ue=($=(ne=(_=e==null?void 0:e[d])==null?void 0:_.split(" "))==null?void 0:ne.filter(D=>D&&D!==""))==null?void 0:$.map(D=>D==null?void 0:D.trim());(k=d==null?void 0:d.split("·"))==null||k.forEach((D,_e)=>{q[D]=ue[_e]});let Le=(j=ge.value)==null?void 0:j.find(D=>(D==null?void 0:D.prop)===d);q[Le.prop]=[Le.value],P=q}else{let q=(Z=ge.value)==null?void 0:Z.find(ue=>(ue==null?void 0:ue.prop)===(i==null?void 0:i.prop));e[q.prop]=[q.value],P=e}else if((i==null?void 0:i.directiveLabel)==="#isMain"){let q={};(le=ge.value)==null||le.forEach(ue=>{var Le,D;(ue==null?void 0:ue.prop)===d?q[ue.prop]=(Le=ue==null?void 0:ue.selectValue)!=null&&Le[0]?[(D=ue==null?void 0:ue.selectValue)==null?void 0:D[0]]:"":q[ue.prop]=""}),P=q}}if(P){let q=T.cloneDeep(r);q=q==null?void 0:q.map(D=>{var _e,Ie,He,We,Ce,ze,ll,al,el,ke,De,nl,cl,dl,t,G,Ee,il,Al,Fe,W,f;return(P!=null&&P[D==null?void 0:D.prop]||P!=null&&P[(We=(He=(Ie=(_e=D==null?void 0:D.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:Ie[1])==null?void 0:He.replaceAll("[",""))==null?void 0:We.replaceAll("]","")])&&((ll=(ze=(Ce=D==null?void 0:D.optionUrl)==null?void 0:Ce.groupSelect)==null?void 0:ze[1])!=null&&ll.includes("["))&&(D!=null&&D.relatedValueId)&&(D.value=(P==null?void 0:P[D==null?void 0:D.prop])||(P==null?void 0:P[(De=(ke=(el=(al=D==null?void 0:D.optionUrl)==null?void 0:al.groupSelect)==null?void 0:el[1])==null?void 0:ke.replaceAll("[",""))==null?void 0:De.replaceAll("]","")])),A&&(P!=null&&P[D==null?void 0:D.prop]||(P==null?void 0:P[D==null?void 0:D.prop])==="")&&(D!=null&&D.relatedValueId)&&sl.value==="新增"&&((D==null?void 0:D.prop)!==(i==null?void 0:i.prop)||d!=null&&d.includes((i==null?void 0:i.prop)+"·")||d!=null&&d.includes("·"+(D==null?void 0:D.prop)))?D.value=(P==null?void 0:P[D==null?void 0:D.prop])||(P==null?void 0:P[(t=(dl=(cl=(nl=D==null?void 0:D.optionUrl)==null?void 0:nl.groupSelect)==null?void 0:cl[1])==null?void 0:dl.replaceAll("[",""))==null?void 0:t.replaceAll("]","")]):d!=null&&d.includes("·"+(D==null?void 0:D.prop))?D.value=P==null?void 0:P[D==null?void 0:D.prop]:((G=D==null?void 0:D.optionUrl)==null?void 0:G.multiple)===!0&&!Array.isArray((il=(Ee=ge.value)==null?void 0:Ee.find(se=>(se==null?void 0:se.prop)===(D==null?void 0:D.prop)))==null?void 0:il.value)?D.value=[(Fe=(Al=ge.value)==null?void 0:Al.find(se=>(se==null?void 0:se.prop)===(D==null?void 0:D.prop)))==null?void 0:Fe.value]:D.value=(f=(W=ge.value)==null?void 0:W.find(se=>(se==null?void 0:se.prop)===(D==null?void 0:D.prop)))==null?void 0:f.value,D}),ge.value=T.cloneDeep(q);let ue=T.cloneDeep(q);ue=ue==null?void 0:ue.map(D=>{var _e,Ie,He,We,Ce,ze,ll,al,el;return(Ie=(_e=D==null?void 0:D.optionUrl)==null?void 0:_e.menuSelect)!=null&&Ie.some(ke=>ke==null?void 0:ke.includes("["))&&(D.optionUrl.oldMenuSelect=(We=(He=T.cloneDeep(D))==null?void 0:He.optionUrl)==null?void 0:We.menuSelect,D.optionUrl.menuSelect=(ze=(Ce=D==null?void 0:D.optionUrl)==null?void 0:Ce.menuSelect)==null?void 0:ze.map(ke=>{var De,nl,cl,dl;if(ke!=null&&ke.includes("[")){let t=(nl=(De=ke==null?void 0:ke.replaceAll("[","").replaceAll("]",""))==null?void 0:De.split(":"))==null?void 0:nl[1];ke=(dl=(cl=T.cloneDeep(q))==null?void 0:cl.find(G=>(G==null?void 0:G.label)===t))==null?void 0:dl.value}return ke})),((i==null?void 0:i.prop)===(D==null?void 0:D.prop)||d===(D==null?void 0:D.prop))&&Array.isArray(i.value)&&(ll=i.value)!=null&&ll.every(ke=>typeof ke=="string")&&(D.selectValue=((al=S==null?void 0:S.find(ke=>(ke==null?void 0:ke.key)===(D==null?void 0:D.prop)))==null?void 0:al.value)??((el=D.value)==null?void 0:el[0])),D}),ge.value=ue;let Le={};(ee=ge.value)==null||ee.forEach(D=>{Le[D.prop]=D==null?void 0:D.value}),rl.value=Le}let U=we.value,fe={};(he=ge.value)==null||he.forEach(q=>{var ue,Le,D,_e,Ie,He,We,Ce,ze,ll,al;if(((q==null?void 0:q.directiveLabel)==="#isMain"||(ue=q==null?void 0:q.optionUrl)!=null&&ue.menuId)&&Array.isArray(q==null?void 0:q.value)){if(fe[q.prop]=(D=q.value)==null?void 0:D[((Le=q.value)==null?void 0:Le.length)-1],(_e=q==null?void 0:q.prop)!=null&&_e.includes("·")){let el=(We=(He=(Ie=q==null?void 0:q.prop)==null?void 0:Ie.split("·"))==null?void 0:He.filter(De=>De&&De!==""))==null?void 0:We.map(De=>De==null?void 0:De.trim()),ke=(al=(ll=(ze=(Ce=q==null?void 0:q.selectValue)==null?void 0:Ce[0])==null?void 0:ze.split(" "))==null?void 0:ll.filter(De=>De&&De!==""))==null?void 0:al.map(De=>De==null?void 0:De.trim());el==null||el.forEach((De,nl)=>{fe[De]=ke==null?void 0:ke[nl]})}}else fe[q.prop]=(fe==null?void 0:fe[q==null?void 0:q.prop])??q.value});let be=(me=ge.value)==null?void 0:me.find(q=>{var ue;return(q==null?void 0:q.directiveLabel)==="#isMain"||((ue=q==null?void 0:q.optionUrl)==null?void 0:ue.menuId)});(i==null?void 0:i.directiveLabel)==="#isMain"?U.push({label:i==null?void 0:i.prop,value:(ie=i==null?void 0:i.value)==null?void 0:ie[((I=i==null?void 0:i.value)==null?void 0:I.length)-1],objectValue:fe}):((Ue=be==null?void 0:be.value)==null?void 0:Ue.length)>0&&(U=U==null?void 0:U.map(q=>{var ue;return(q==null?void 0:q.value)===((ue=be==null?void 0:be.selectValue)==null?void 0:ue[0])&&(q.objectValue=fe),q})),we.value=U}Wl.value=!1,ul.value=!1},Yr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",Zr=e=>{var s,d;const a=(d=(s=fl.value)==null?void 0:s.find(i=>(i==null?void 0:i.label)===(e==null?void 0:e.label)))==null?void 0:d.multiple,o=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;oe.value.forEach(i=>{const p=i==null?void 0:i[o];a&&Ia.isString(p)&&(i[o]=[p]),!a&&!Ia.isString(p)&&(i[o]="")})},Fa=(e,a)=>{var o;return a==null||a.forEach(r=>{e[r==null?void 0:r.prop]=r==null?void 0:r.value}),e.children&&((o=e.children)==null?void 0:o.length)>0&&(e.children=e.children.map(r=>Fa(r,a))),e},Da=e=>{var o,r,n,s,d,i;Hl("");const a=(o=ge.value)==null?void 0:o.reduce((p,g)=>(p[g.name]=g.value,p),{});if(((r=Object.keys(a))==null?void 0:r.length)>0){rl.value=a,Dl.value="",Pl.value=(n=oe.value)==null?void 0:n.length,Ol.value=(s=El.value)==null?void 0:s.filter(g=>(g==null?void 0:g.label)!=="新增");const p=(i=(d=m.value)==null?void 0:d.filter(g=>(g==null?void 0:g.label)!=="操作"))==null?void 0:i.map(g=>{var S,A,h;const E=(A=(S=fl.value)==null?void 0:S.find(O=>(O==null?void 0:O.label)===(g==null?void 0:g.label)))==null?void 0:A.multiple;return Zr(g),{...g,contents:(g==null?void 0:g.options)??[],optionUrl:g!=null&&g.formMenuSelect&&((h=g==null?void 0:g.formMenuSelect)==null?void 0:h.length)>0?{groupSelect:g==null?void 0:g.groupSelect,menuSelect:g==null?void 0:g.formMenuSelect,selectRelateType:"",type:g==null?void 0:g.formType,multiple:E}:null}});Y.value=p==null?void 0:p.map(g=>Fa(g,[{prop:"type",value:"edit"},{prop:"columnType",value:Yr(g==null?void 0:g.formType)||(g==null?void 0:g.columnType)}])),e==="createClick"&&Vl(!1)}},Fl={START:"开始时间",END:"结束时间",HOURS:"工时"},eo=(e,a)=>Number(pe.dayjs(a).diff(pe.dayjs(e),"day",!0).toFixed(1)),Ka=e=>{var s;const a=u.itemData,o=(s=a==null?void 0:a.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:s.contents,r=new Map;return o==null||o.forEach((d,i)=>{const{label:p}=d;r.set(p,i)}),!r.has(Fl.START)||!r.has(Fl.END)||!r.has(Fl.HOURS)?e:e==null?void 0:e.map(d=>{const i=d==null?void 0:d[Fl.START],p=d==null?void 0:d[Fl.END],g=eo(i,p);return i&&p&&(d[Fl.HOURS]=`${g}天`),d})},za=(e,a,o=0)=>{if(o>((a==null?void 0:a.length)??""))return e;const r=a==null?void 0:a[o],n=new Map;for(const d of e){const i=d[r];n.has(i)||n.set(i,[]),n.get(i)&&n.get(i).push(d)}const s=[];for(const[d,i]of n){const[p,...g]=i,E={...p};o+1===((a==null?void 0:a.length)??"")?E.children=i==null?void 0:i.map(S=>(S.level=T.cloneDeep(o)+1,S)).filter((S,A)=>A!==0):g.length>0&&(E.children=za(g,a,o+1)),E.level=o,s.push(E)}return s},qa=(e,a,o)=>{var n;if(!(a!=null&&a.contents)||((n=a==null?void 0:a.contents)==null?void 0:n.length)===0)return e;let r=[];return r=za(e,a==null?void 0:a.contents,0),r},Ja=(e,a)=>{var h,O,w,B,L,J,z,x,N,b,C,y,V,M,H,c,_,ne,$,k,j,Z,le,ee,he,me,I,ie,Ue,v,P,U,fe,be,q,ue,Le,D,_e,Ie,He,We,Ce,ze,ll,al,el,ke,De,nl,cl,dl;const o=e==null?void 0:e.filter(t=>(t==null?void 0:t.key)==="header");e==null||e.filter(t=>(t==null?void 0:t.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(t=>(t==null?void 0:t.key)==="childTree")[0];let n=!0;if((w=(O=(h=e==null?void 0:e.find(t=>(t==null?void 0:t.key)==="filterAllType"))==null?void 0:h.value)==null?void 0:O.find(t=>(t==null?void 0:t.value)==="onPamButtonContents"))!=null&&w.content){let t=(J=(L=(B=e==null?void 0:e.find(G=>(G==null?void 0:G.key)==="filterAllType"))==null?void 0:B.value)==null?void 0:L.find(G=>(G==null?void 0:G.value)==="onPamButtonContents"))==null?void 0:J.content;t=(z=t==null?void 0:t.split(":"))==null?void 0:z[1],t=(x=t.slice(1,(t==null?void 0:t.length)-1))==null?void 0:x.split(","),n=!!(t!=null&&t.find(G=>G==="操作"))}let s=a;const d=e==null?void 0:e.find(t=>(t==null?void 0:t.key)==="page"),i=e==null?void 0:e.find(t=>(t==null?void 0:t.key)==="rowButton"),p=e==null?void 0:e.find(t=>(t==null?void 0:t.key)==="extraButton"),g=e==null?void 0:e.filter(t=>(t==null?void 0:t.key)==="tableContents"),E=e==null?void 0:e.filter(t=>(t==null?void 0:t.key)==="tableIndex");fl.value=(b=(N=e==null?void 0:e.filter(t=>(t==null?void 0:t.key)==="tableToForm"))==null?void 0:N[0])==null?void 0:b.contents,Ea.value=(d==null?void 0:d.contents)??!0;let S=[];Ul.value===""?S=o==null?void 0:o[0]:S=(o==null?void 0:o.find(t=>(t==null?void 0:t.selectLabel)==="("+Ul.value+")"))??(o==null?void 0:o.find(t=>!(t!=null&&t.selectLabel)));let A=[];if(Ul.value===""?A=E==null?void 0:E[0]:A=(E==null?void 0:E.find(t=>(t==null?void 0:t.selectLabel)==="("+Ul.value+")"))??(E==null?void 0:E.find(t=>!(t!=null&&t.selectLabel))),((C=S==null?void 0:S.contents)==null?void 0:C.length)>0){let t=[];if(S!=null&&S.contents.some(W=>Array.isArray(W)&&(W==null?void 0:W.find(f=>f.children))))Rl.value===""?t=(V=(y=pe.getGradeColumns(S==null?void 0:S.contents,n))==null?void 0:y[0])==null?void 0:V.filter(W=>!Array.isArray(W)):(Rl.value.split("-"),t=(M=pe.getGradeColumns(S==null?void 0:S.contents,n))==null?void 0:M[0]);else{let W=S!=null&&S.contents.some(f=>Array.isArray(f))?(H=S==null?void 0:S.contents)==null?void 0:H[0]:S==null?void 0:S.contents;W==null||W.forEach((f,se)=>{var Te,qe,pl,jl,Ql;let Ke="";(qe=(Te=Be.value)==null?void 0:Te.split("/"))==null||qe.forEach(kl=>{var Xl,Yl,Kl;if(kl!==""){let tl=(Kl=(Yl=(Xl=kl==null?void 0:kl.split(Qe+"updateLoading"))==null?void 0:Xl[0])==null?void 0:Yl.split(Qe+"loading"))==null?void 0:Kl[0];Ke=Ke===""?Ke+tl:Ke+"/"+tl}}),Ke=Ke+Qe+(f==null?void 0:f.directiveLabel);const Ge=(pl=fl.value)==null?void 0:pl.find(kl=>(kl==null?void 0:kl.prop)===(f==null?void 0:f.prop));t.push({label:(f==null?void 0:f.label)==="操作"?n?"操作":"":(f==null?void 0:f.label)??"",prop:(f==null?void 0:f.label)==="操作"?"operate":(f==null?void 0:f.prop)??"a"+se,width:f!=null&&f.width?parseInt(f.width):"",fixed:(f==null?void 0:f.fixed)??void 0,sortable:(f==null?void 0:f.sortable)??!1,filterable:(f==null?void 0:f.filterable)??!1,operable:(f==null?void 0:f.operable)??!1,showSummary:(f==null?void 0:f.showSummary)??!1,align:(f==null?void 0:f.align)??"left",showOverflowTooltip:(f==null?void 0:f.showOverflowTooltip)??!0,isNotDrag:(f==null?void 0:f.isNotDrag)??!1,isEditCol:(f==null?void 0:f.isEditCol)??!1,isOperate:(f==null?void 0:f.isOperate)??!1,id:(f==null?void 0:f.id)??se,type:(f==null?void 0:f.label)==="操作"?"operate":void 0,formType:(f==null?void 0:f.formType)??(f!=null&&f.groupSelect?"Select":""),isTableColHidden:f==null?void 0:f.isTableColHidden,isFormColHidden:f==null?void 0:f.isFormColHidden,disabled:f==null?void 0:f.disabled,options:(f==null?void 0:f.options)??[],value:(f==null?void 0:f.value)??"",formMenuSelect:(f==null?void 0:f.formMenuSelect)??[],isRoute:(f==null?void 0:f.isRoute)??!1,groupSelect:f!=null&&f.groupSelect?(jl=f==null?void 0:f.groupSelect)==null?void 0:jl.replaceAll('"',"").split(":"):[],isMainKey:(f==null?void 0:f.isMainKey)||(f==null?void 0:f.directiveLabel)==="#isMain",columnType:(Ge==null?void 0:Ge.type)||(f==null?void 0:f.columnType)||"TEXTAREA",directiveLabel:f==null?void 0:f.directiveLabel,directiveColor:(f==null?void 0:f.directiveColor)??!1,isExistChild:!!(f!=null&&f.directiveLabel&&!(s!=null&&s[Ke])&&!((Ql=f==null?void 0:f.directiveLabel)!=null&&Ql.includes("@"))&&(f==null?void 0:f.directiveLabel)!=="#isMain"),childPath:(f==null?void 0:f.directiveLabel)!=="#isMain"?Ke:void 0,allSelectionContents:(f==null?void 0:f.allSelectionContents)??[],selectFilter:f==null?void 0:f.selectFilter,menuId:f==null?void 0:f.menuId,filterContent:f==null?void 0:f.filterContent,relatedValueId:f==null?void 0:f.relatedValueId})})}Y.value=pe.getNewColumnChild(t),va.value=pe.getNewColumnChild(t),ae.value=(c=Y.value)==null?void 0:c.map(W=>W==null?void 0:W.label),Ne.value=(_=Y.value)==null?void 0:_.every(W=>W==null?void 0:W.filterable),$e.value=(ne=Y.value)==null?void 0:ne.every(W=>W==null?void 0:W.operable),ve.value=($=Y.value)==null?void 0:$.every(W=>W==null?void 0:W.sortable);let G=(j=(k=pe.getAllLeafNodes(Y.value))==null?void 0:k.filter(W=>(W==null?void 0:W.type)!=="operate"))==null?void 0:j.map((W,f)=>({prop:(W==null?void 0:W.prop)??"a"+f,column:W.label}));yl.value=G;let Ee=[];Ul.value===""?Ee=g==null?void 0:g[0]:Ee=(g==null?void 0:g.find(W=>(W==null?void 0:W.selectLabel)==="("+Ul.value+")"))??(g==null?void 0:g.find(W=>!(W!=null&&W.selectLabel)));let il=Array.isArray((Z=Ee==null?void 0:Ee.contents)==null?void 0:Z[0])&&((le=Ee==null?void 0:Ee.contents)!=null&&le[0].every(W=>Array.isArray(W)))?(ee=Ee==null?void 0:Ee.contents)==null?void 0:ee[0]:Ee==null?void 0:Ee.contents;A!=null&&A.contents&&((he=A==null?void 0:A.contents)==null?void 0:he.length)!==0&&(il=(me=T.cloneDeep(il))==null?void 0:me.map((W,f)=>{if(!Array.isArray(W)){let se={};for(let Ke in W)Ke!=="id"&&Ke!=="index"&&(se[Ke]=W[Ke]);W=Object.values(se)}return W}));const Al=!!((I=Y.value)!=null&&I.find(W=>W.prop==="index"));il=Qa(il,A==null?void 0:A.contents,Al);const Fe=[];il==null||il.forEach((W,f)=>{var Ke;let se={};if(Array.isArray(W)){let Ge=[];W==null||W.filter(Te=>!(Te!=null&&Te.id)).forEach((Te,qe)=>{var pl,jl,Ql,kl,Xl,Yl;if((pl=G==null?void 0:G[qe])!=null&&pl.prop&&!Array.isArray(Te)){let Kl={};Kl[G[qe].column]=Te,Oe!=null&&Oe.value&&((jl=Oe==null?void 0:Oe.value)==null?void 0:jl.length)>0&&((Ql=Oe==null?void 0:Oe.value)!=null&&Ql.find(tl=>JSON.stringify(tl==null?void 0:tl[0])===JSON.stringify(Kl)))&&(Ge=(kl=Oe==null?void 0:Oe.value)==null?void 0:kl.find(tl=>JSON.stringify(tl==null?void 0:tl[0])===JSON.stringify(Kl))),Ge&&Ge.length>0?se[G[qe].prop]=Ge!=null&&Ge.find(tl=>{var Zl;return((Zl=Object.keys(tl))==null?void 0:Zl[0])===G[qe].column})?(Xl=Ge==null?void 0:Ge.find(tl=>{var Zl;return((Zl=Object.keys(tl))==null?void 0:Zl[0])===G[qe].column}))==null?void 0:Xl[G[qe].column]:Te:se[G[qe].prop]=Te}else Array.isArray(Te)&&((Yl=G[qe])!=null&&Yl.prop?se[G[qe].prop]=Te:se.children=Aa(Te,G))})}else se=W;Array.isArray(W)&&W.some(Ge=>Ge==null?void 0:Ge.id)?Fe.push(Object.assign(se,{id:(Ke=W==null?void 0:W.find(Ge=>Ge.id))==null?void 0:Ke.id})):se.id?Fe.push(se):Fe.push(Object.assign(se,{id:f.toString()}))}),oe.value=qa(Fe,r,Y.value),aa.value=Fe,(ie=aa.value)==null||ie.forEach(W=>{var f;(f=ra.value)==null||f.set(W.id,W)})}else Y.value=[],m.value=[],oe.value=[],aa.value=[],ra.value=new Map;if(((Ue=i==null?void 0:i.contents)==null?void 0:Ue.length)>0)if((U=(P=(v=e==null?void 0:e.find(t=>(t==null?void 0:t.key)==="filterAllType"))==null?void 0:v.value)==null?void 0:P.find(t=>(t==null?void 0:t.value)==="onRowButtonContents"))!=null&&U.content){let t=(q=(be=(fe=e==null?void 0:e.find(G=>(G==null?void 0:G.key)==="filterAllType"))==null?void 0:fe.value)==null?void 0:be.find(G=>(G==null?void 0:G.value)==="onButtonContents"))==null?void 0:q.content;t=(ue=t==null?void 0:t.split(":"))==null?void 0:ue[1],t=(Le=t.slice(1,(t==null?void 0:t.length)-1))==null?void 0:Le.split(","),Cl.value=(D=i==null?void 0:i.contents)==null?void 0:D.filter(G=>t==null?void 0:t.find(Ee=>Ee===(G==null?void 0:G.label)))}else Cl.value=i==null?void 0:i.contents;else Cl.value=[];if(((_e=p==null?void 0:p.contents)==null?void 0:_e.length)>0)if((We=(He=(Ie=e==null?void 0:e.find(t=>(t==null?void 0:t.key)==="filterAllType"))==null?void 0:Ie.value)==null?void 0:He.find(t=>(t==null?void 0:t.value)==="onButtonContents"))!=null&&We.content){let t=(ll=(ze=(Ce=e==null?void 0:e.find(G=>(G==null?void 0:G.key)==="filterAllType"))==null?void 0:Ce.value)==null?void 0:ze.find(G=>(G==null?void 0:G.value)==="onButtonContents"))==null?void 0:ll.content;t=(al=t==null?void 0:t.split(":"))==null?void 0:al[1],t=(el=t.slice(1,(t==null?void 0:t.length)-1))==null?void 0:el.split(","),Ol.value=(ke=p==null?void 0:p.contents)==null?void 0:ke.filter(G=>t==null?void 0:t.find(Ee=>Ee===(G==null?void 0:G.label))),El.value=(De=p==null?void 0:p.contents)==null?void 0:De.filter(G=>t==null?void 0:t.find(Ee=>Ee===(G==null?void 0:G.label))),xe.value=!!(t!=null&&t.find(G=>G==="搜索")),te.value=!!(t!=null&&t.find(G=>G==="块状显示"))}else Ol.value=p==null?void 0:p.contents,El.value=p==null?void 0:p.contents;else Ol.value=[],El.value=[];Pl.value=((nl=oe==null?void 0:oe.value)==null?void 0:nl.length)??0,Ka(oe.value),ua.value=oe.value,vl.value&&(Y.value=(dl=(cl=m.value)==null?void 0:cl.filter(t=>(t==null?void 0:t.label)!=="操作"))==null?void 0:dl.map(t=>{var G;return{...t,type:"edit",optionUrl:t!=null&&t.formMenuSelect&&((G=t==null?void 0:t.formMenuSelect)==null?void 0:G.length)>0?{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.formMenuSelect,selectRelateType:"",type:t==null?void 0:t.formType}:null}}),Da())};l.watch(()=>[u.itemData,Ul.value,ir.value,Rl.value,Oe==null?void 0:Oe.value],async()=>{var e,a,o,r,n,s;if((e=u==null?void 0:u.itemData)!=null&&e.find(d=>(d==null?void 0:d.key)==="columnPath")&&!((a=ql.value)!=null&&a.find(d=>{var i,p;return(d==null?void 0:d.key)===((p=(i=u==null?void 0:u.itemData)==null?void 0:i.find(g=>(g==null?void 0:g.key)==="columnPath"))==null?void 0:p.contents)}))){let d=ql.value,i={key:(r=(o=u==null?void 0:u.itemData)==null?void 0:o.find(p=>(p==null?void 0:p.key)==="columnPath"))==null?void 0:r.contents,value:(s=(n=u==null?void 0:u.itemData)==null?void 0:n.find(p=>(p==null?void 0:p.key)==="columnUsingPath"))==null?void 0:s.contents};d!=null&&d.find(p=>(p==null?void 0:p.key)===(i==null?void 0:i.key))?d=d==null?void 0:d.map(p=>((p==null?void 0:p.key)===(i==null?void 0:i.key)&&(p.value=i.value),p)):d.push(i),Je.setTableViewContents(d)}Ja(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>u==null?void 0:u.operatingForm,e=>{e!=null&&e.form&&(Hl(e==null?void 0:e.form),sl.value=e==null?void 0:e.dialogTitle,ia.value=!0,Tl.value=!0)},{immediate:!0,deep:!0});const Ra=()=>{var e;(e=Me.value)!=null&&e.includes("read")&&(vl.value=!vl.value)},lo=()=>{sa.value=!sa.value};l.watch(()=>{var e;return(e=u==null?void 0:u.config)==null?void 0:e.viewport},e=>{var a;Me.value=e,(e==null?void 0:e.length)===0?vl.value=!1:(e!=null&&e.includes("read")||(vl.value=!0),e!=null&&e.includes("edit")||(vl.value=!1)),Se.value=((a=u==null?void 0:u.config)==null?void 0:a.showIndex)||vl.value},{immediate:!0}),l.watch(()=>vl.value,e=>{var a;e?(Da("viewChange"),Je.setCacheUpdatingData(null)):(Ol.value=El.value,Y.value=va.value,zl.value&&(Je.setTableLoading(u==null?void 0:u.index),re("change",zl.value))),de.value=e,Se.value=e||((a=u==null?void 0:u.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=Ba.value)==null?void 0:e.length},e=>{e===0&&(Pe.currentPage=1)}),l.watch(()=>u==null?void 0:u.compNames,e=>{Re.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:e||[],width:1}]},{immediate:!0}),l.ref(!1);const ao=(e,a)=>{var o;Da("createClick"),a===Pe.pageSize&&(Pe.currentPage=Math.ceil(((o=oe.value)==null?void 0:o.length)/Pe.pageSize))},ro=(e,a,o)=>{var r;$a(o,e,a),rl.value=T.cloneDeep(e),Dl.value=e==null?void 0:e.id,Pl.value=(r=oe.value)==null?void 0:r.length,sl.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",Vl(!1)},ol=e=>{var p,g,E,S,A,h,O,w,B,L;const{row:a,column:o,item:r,slotData:n}=e;let s=a!=null&&a[o==null?void 0:o.prop]||(a==null?void 0:a[o==null?void 0:o.prop])===0?((g=(p=a==null?void 0:a[o==null?void 0:o.prop])==null?void 0:p[0])==null?void 0:g.contents)??((a==null?void 0:a[o==null?void 0:o.prop])===0?"0":a==null?void 0:a[o==null?void 0:o.prop]):((S=(E=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:E[0])==null?void 0:S.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((h=(A=n==null?void 0:n[r==null?void 0:r.prop])==null?void 0:A[0])==null?void 0:h.contents)??(n==null?void 0:n[r==null?void 0:r.prop])??((B=(w=a==null?void 0:a[(O=r==null?void 0:r.child)==null?void 0:O.prop])==null?void 0:w[0])==null?void 0:B.contents)??(a==null?void 0:a[(L=r==null?void 0:r.child)==null?void 0:L.prop]),i=Array.isArray(s)&&!(s!=null&&s.every(J=>typeof J=="string"||typeof J=="number"))?"查看":s;return i=Array.isArray(i)?i.join(","):i,i},oo=e=>{var g,E,S,A,h,O,w,B,L,J;const{row:a,column:o,item:r,slotData:n}=e;let s=a!=null&&a[o==null?void 0:o.prop]?((E=(g=a==null?void 0:a[o==null?void 0:o.prop])==null?void 0:g[0])==null?void 0:E.contents)??(a==null?void 0:a[o==null?void 0:o.prop]):((A=(S=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:S[0])==null?void 0:A.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((O=(h=n==null?void 0:n[r==null?void 0:r.prop])==null?void 0:h[0])==null?void 0:O.contents)??(n==null?void 0:n[r==null?void 0:r.prop])??((L=(B=a==null?void 0:a[(w=r==null?void 0:r.child)==null?void 0:w.prop])==null?void 0:B[0])==null?void 0:L.contents)??(a==null?void 0:a[(J=r==null?void 0:r.child)==null?void 0:J.prop]);const i=Array.isArray(s)&&!(s!=null&&s.every(z=>typeof z=="string"||typeof z=="number")),p=Array.isArray(s)&&(s==null?void 0:s.find(z=>z==null?void 0:z.url));return i&&p},no=(e,a)=>e.find(o=>Object.values(o).some(r=>r===a));return l.watch(()=>lr.value,async e=>{if(e){Ve.setContentLoading(!0),await l.nextTick();const a=no(oe.value,e==null?void 0:e.data);if(!a)return Ve.setContentLoading(!1);await Ua(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),Ve.setContentLoading(!1)}},{deep:!0,immediate:!0}),l.watch(()=>u==null?void 0:u.cacheNewData,e=>{var a;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(u==null?void 0:u.index)&&(oe.value=(a=oe.value)==null?void 0:a.map(o=>{var r;return(o==null?void 0:o.id)===((r=e==null?void 0:e.data)==null?void 0:r.id)?{...o,id:e==null?void 0:e.resId}:o})))},{immediate:!0,deep:!0}),(e,a)=>{var g,E,S,A;const o=l.resolveComponent("svg-icon"),r=l.resolveComponent("el-popover"),n=l.resolveComponent("el-switch"),s=l.resolveComponent("el-checkbox"),d=l.resolveComponent("el-checkbox-group"),i=l.resolveComponent("el-button"),p=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",Mo,[Na.value?(l.openBlock(),l.createBlock(ml.ssTable,{id:"excel-table",pageObj:Pe,showIndex:Se.value,isTree:(g=R.compItem)==null?void 0:g.isTree,summaryInfo:Xe,columns:Y.value,defaultSort:X,isCardViewport:sa.value,checkedColumns:ae.value,key:ba.value+JSON.stringify(Y.value),tableData:Ba.value,isEditViewport:vl.value,isShowPagination:Ea.value,isShowEdit:!1,isShowDelete:!1,allowSelect:de.value,onDbClickRow:wr,extraButton:Ol.value,rowButton:Cl.value,cacheExtraButtons:El.value,isClearSelection:((E=gl.value)==null?void 0:E.length)===0,onDoCurrentChange:fr,onDoSizeChange:hr,onContentClick:Ua,onRowClick:Lr,onSelectChange:Sr,onCellChange:ro,onChange:$a,onPreview:_a,onSubmitEditingTable:mr,onHandleColEditChange:br,onHandleColTypeChange:kr,onClickButton:pa},l.createSlots({headerButton:l.withCtx(h=>{var O,w;return[R.showHeader?(l.openBlock(),l.createBlock(To,{key:0,pageLayout:R.pageLayout,lockingPage:l.unref(la)===l.unref(Be),filterValues:Oa.value,selectNums:(O=gl.value)==null?void 0:O.length,dataNums:(w=oe.value)==null?void 0:w.length,compName:R.compName,isDevMode:R.isDevMode,buttons:h.buttons,onButtonClick:a[1]||(a[1]=B=>pa(B,"",{})),columns:Y.value,onFilter:Ur,onGetImportData:vr,level:R.level,filterShow:xe.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level","filterShow"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var h,O,w,B;return[((h=oe.value)==null?void 0:h.length)>0&&R.allowOperate&&te.value?(l.openBlock(),l.createElementBlock("div",Fo,[(O=Me.value)!=null&&O.includes("read")&&((w=Me.value)!=null&&w.includes("edit"))&&((B=Cl.value)!=null&&B.some(L=>(L==null?void 0:L.label)==="编辑"))&&!sa.value&&l.unref(la)!==l.unref(Be)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:Ra},[l.createVNode(o,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:lo},[l.createVNode(o,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:h,index:O})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:w=>ao(h,O)},[l.createVNode(o,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,Ko)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Qr},{reference:l.withCtx(()=>[l.createElementVNode("span",zo,[l.createVNode(o,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",qo,[a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(n,{"model-value":ve.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=h=>ka(h,"sortable"))},null,8,["model-value"]),l.createVNode(n,{"model-value":Ne.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[4]||(a[4]=h=>ka(h,"filterable"))},null,8,["model-value"]),l.createVNode(n,{"model-value":$e.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[5]||(a[5]=h=>ka(h,"operable"))},null,8,["model-value"]),a[13]||(a[13]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(d,{modelValue:ae.value,"onUpdate:modelValue":a[6]||(a[6]=h=>ae.value=h),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:K},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Gl.value,h=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:h.label},[l.createVNode(s,{value:h.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:h.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(h.label),9,Jo)]),_:2},1032,["value"]),l.createVNode(r,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:l.withCtx(()=>[l.createVNode(o,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:l.withCtx(()=>{var O;return[l.createElementVNode("div",Ro,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((O=Object.keys(h))==null?void 0:O.filter(w=>{var B;return(B=Sl.value)==null?void 0:B.find(L=>(L==null?void 0:L.value)===w)}),w=>{var B,L;return l.openBlock(),l.createElementBlock("div",{key:w},[l.createVNode(n,{"model-value":h==null?void 0:h[w],"active-text":(L=(B=Sl.value)==null?void 0:B.find(J=>(J==null?void 0:J.value)===w))==null?void 0:L.label,onChange:J=>Tr(J,w,h)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",Wo,[l.createVNode(o,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(h=>{var O,w,B,L,J,z,x,N,b,C,y,V,M,H,c,_,ne,$;return[oo(h)?(l.openBlock(),l.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:l.withCtx(()=>[l.createElementVNode("span",Go,l.toDisplayString(ol(h)),1)]),default:l.withCtx(()=>{var k,j;return[l.createElementVNode("div",Io,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((j=h==null?void 0:h.row)==null?void 0:j[(k=h==null?void 0:h.column)==null?void 0:k.prop],Z=>(l.openBlock(),l.createElementBlock("div",Ho,[l.createElementVNode("div",{class:"prop-url",title:da(Z),onClick:le=>Er(Z)},l.toDisplayString(da(Z)),9,Vo),l.createElementVNode("div",{class:"prop-download",onClick:le=>Nr(Z)}," 下载 ",8,Qo)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(ol(h))&&((w=(O=ol(h))==null?void 0:O.toString())!=null&&w.includes(".txt")||(L=(B=ol(h))==null?void 0:B.toString())!=null&&L.includes(".cpt")||(z=(J=ol(h))==null?void 0:J.toString())!=null&&z.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(ol(h))&&((N=(x=ol(h))==null?void 0:x.toString())!=null&&N.includes(".txt")||(C=(b=ol(h))==null?void 0:b.toString())!=null&&C.includes(".cpt")||(V=(y=ol(h))==null?void 0:y.toString())!=null&&V.includes(".cyd"))?"underline":"",cursor:!Array.isArray(ol(h))&&((H=(M=ol(h))==null?void 0:M.toString())!=null&&H.includes(".txt")||(_=(c=ol(h))==null?void 0:c.toString())!=null&&_.includes(".cpt")||($=(ne=ol(h))==null?void 0:ne.toString())!=null&&$.includes(".cyd"))?"pointer":"",marginLeft:(h==null?void 0:h.colIndex)===0?`${((h==null?void 0:h.level)??0)*20}px`:0}),onClick:k=>tr(ol(h))},l.toDisplayString(ol(h)===0?"0":ol(h)),13,Xo))]}),_:2},[((S=Cl.value)==null?void 0:S.length)>0&&l.unref(la)!==l.unref(Be)?{name:"actions",fn:l.withCtx(({item:h})=>[l.createVNode(r,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:l.withCtx(()=>[l.createVNode(o,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:a[0]||(a[0]=l.withModifiers(()=>{},["stop"]))})]),default:l.withCtx(()=>[l.createElementVNode("div",Po,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Br(Cl.value,h),(O,w)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:w,onClick:l.withModifiers(B=>pa(O==null?void 0:O.label,h,{extra:O}),["stop"])},[l.createElementVNode("div",{style:l.normalizeStyle({color:O==null?void 0:O.textColor}),class:"extra-button-label"},l.toDisplayString(O==null?void 0:O.label),5)],8,$o))),128))])]),_:2},1024)]),key:"0"}:void 0,((A=oe.value)==null?void 0:A.length)>0?{name:"batchButton",fn:l.withCtx(h=>[l.withDirectives(l.createVNode(Co,{lockingPage:l.unref(la)===l.unref(Be),buttons:h.buttons,selectTableItems:gl.value,onButtonClick:a[2]||(a[2]=O=>pa(O,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,de.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!de.value]])]),key:"1"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):l.createCommentVNode("",!0),l.createVNode(ea.ssDialog,{title:sl.value,visible:Tl.value,width:sr.value,onBeforeDestroy:Ar,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",Yo,[l.createVNode(ml.ssForm,{rowContents:ge.value,isEnableWrap:!1,showOperator:!1,onChange:Xr,onFixChangeValue:Or,onClickTrigger:Cr,isEdit:oa.value,onBlurChange:xr,onCreate:Dr,onTagChange:pr},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[ia.value?(l.openBlock(),l.createElementBlock("div",Zo,[l.createVNode(i,{onClick:a[7]||(a[7]=h=>Tl.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[14]||(a[14]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[14]}),l.createVNode(i,{class:"ok-button",onClick:a[8]||(a[8]=h=>Vl(!0)),id:"themeButton"},{default:l.withCtx(()=>a[15]||(a[15]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[15]})])):l.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),l.createVNode(ea.ssDialog,{title:sl.value,visible:na.value,width:ga.value,onBeforeDestroy:a[10]||(a[10]=h=>na.value=!1)},{default:l.withCtx(()=>[l.createVNode(Oo)]),footer:l.withCtx(()=>[l.createElementVNode("div",en,[l.createVNode(i,{onClick:a[9]||(a[9]=h=>na.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[16]||(a[16]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[16]}),l.createVNode(i,{class:"ok-button",onClick:Mr,id:"themeButton"},{default:l.withCtx(()=>a[17]||(a[17]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[17]})])]),_:1},8,["title","visible","width"]),_l.value?(l.openBlock(),l.createBlock(ml.ssFilePreview,{key:1,fileDataList:Ll.value,onDestroy:jr},null,8,["fileDataList"])):l.createCommentVNode("",!0),je.value?(l.openBlock(),l.createBlock(ea.ssDialog,{key:2,visible:je.value,onBeforeDestroy:Hr,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:l.withCtx(()=>[l.createVNode(Ga.ThreeViewerHost,{files:Jl.value,threeData:ye.value},null,8,["files","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(ea.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[11]||(a[11]=h=>e.componentVisible=!1),width:ga.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(p,{dialogItem:wl.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(ea.ssDialog,{title:Re.title,visible:Re.show,width:Re.width,onBeforeDestroy:qr},{default:l.withCtx(()=>[l.createElementVNode("div",ln,[l.createVNode(ml.ssForm,{rowContents:Re==null?void 0:Re.contents,formRules:Re==null?void 0:Re.formRules,showOperator:!1,buttonValue:Re.buttonValue,isEdit:oa.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:Jr},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},rn=ha._export_sfc(an,[["__scopeId","data-v-7e9ee1f3"]]);exports.formGetOptions=Ta;exports.getSelectRow=fa;exports.ssTable=rn;exports.useFormComp=Za;exports.useFormToTableComp=Va;
|