ss-component-new 1.2.175 → 1.2.176
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-CR-R4D3A.cjs → MTLLoader-45vFx6Ci.cjs} +1 -1
- package/dist/{MTLLoader-D05WSq-q.js → MTLLoader-DgByTNTq.js} +1 -1
- package/dist/{OrbitControls-DkAdlZPz.cjs → OrbitControls-CV-MrHG5.cjs} +1 -1
- package/dist/{OrbitControls-DGyaLqZV.js → OrbitControls-Cv9SGdpv.js} +1 -1
- package/dist/{URDFLoader-rXQKxYBd.js → URDFLoader-BY2oim56.js} +2 -2
- package/dist/{URDFLoader-x8vUKwPr.cjs → URDFLoader-DwCZd3DT.cjs} +1 -1
- package/dist/{animationData-CGKa2au1.js → animationData-B8-fvoQG.js} +1 -1
- package/dist/{animationData-DBwtb8zr.cjs → animationData-BKJUksL6.cjs} +1 -1
- package/dist/{array-DlS90r5w.js → array-DDU6IBRR.js} +1 -1
- package/dist/{array-Dw4Yc0on.cjs → array-iLq62gEW.cjs} +1 -1
- package/dist/{iconfont-DTy0GXFn.cjs → iconfont-B1otHnDa.cjs} +1 -1
- package/dist/{iconfont-Bh6I7yoc.js → iconfont-CbHnKyhA.js} +2 -2
- package/dist/{index-BpbXVqPH.js → index--EnWvfjl.js} +8 -8
- package/dist/{index-DUPTbPtM.cjs → index-1Dx828Pd.cjs} +1 -1
- package/dist/{index-BmIdmZp6.cjs → index-2T7wIHAe.cjs} +1 -1
- package/dist/{index-vUmI_aAz.cjs → index-B6EJeVdw.cjs} +1 -1
- package/dist/{index-Xz5odwQo.cjs → index-B8sq_vLt.cjs} +1 -1
- package/dist/{index-Bw3_5l5O.js → index-BCLmAS_S.js} +1 -1
- package/dist/{index-CpCjSu_n.js → index-BGy8QZn-.js} +1 -1
- package/dist/{index-BqpWqgSt.js → index-BHKVF-1G.js} +3 -3
- package/dist/{index-5MfOfDqd.cjs → index-BJ73Hg5A.cjs} +1 -1
- package/dist/{index-CruAXu_m.cjs → index-BW4bir8C.cjs} +1 -1
- package/dist/{index-C6NYcqQj.cjs → index-B_UBWpUs.cjs} +1 -1
- package/dist/{index-BKP1yyHm.cjs → index-Bb1ASXl0.cjs} +1 -1
- package/dist/{index-D5LAwrWR.cjs → index-Bc0ovJko.cjs} +1 -1
- package/dist/{index-Bgfn_1PY.cjs → index-BeqOPHw8.cjs} +1 -1
- package/dist/{index-Dy40DEnD.js → index-Bh6Cfkzz.js} +1 -1
- package/dist/{index-a4D2ISWg.js → index-BoKPQB2W.js} +2 -2
- package/dist/{index-BxkOJwR0.js → index-CHSOjR_9.js} +1 -1
- package/dist/{index-fveEMEQr.js → index-CJlqtSTk.js} +1 -1
- package/dist/{index-DBlrqy2z.js → index-CJxrfrKo.js} +1 -1
- package/dist/{index-CHIienMN.js → index-CLY3ClAw.js} +5 -5
- package/dist/{index-Cy0TW-Cc.js → index-CLcEWUQQ.js} +4 -4
- package/dist/{index-B-gaEXuH.cjs → index-CMdOKx6I.cjs} +1 -1
- package/dist/{index-CQfanE9k.cjs → index-CTTqwfEF.cjs} +1 -1
- package/dist/{index-D___JfrA.cjs → index-CXpkAw7j.cjs} +1 -1
- package/dist/{index-u22RYT6X.js → index-Cbz6asV0.js} +16 -16
- package/dist/{index-C9MdLFq4.cjs → index-ChkP8gF9.cjs} +1 -1
- package/dist/{index-BYrG8OBb.js → index-CxwoI7_o.js} +7 -7
- package/dist/{index-e-AcrHyq.cjs → index-CzxvgOoq.cjs} +1 -1
- package/dist/{index-tnXXGyGw.js → index-DBeShjqg.js} +1 -1
- package/dist/{index-D5Y_Pm_3.cjs → index-DR2LCnDS.cjs} +1 -1
- package/dist/{index-DKca7iRT.cjs → index-DUfSCM58.cjs} +1 -1
- package/dist/{index-Czs-ptVO.js → index-DYp9HoIy.js} +2 -2
- package/dist/{index-BQ4uZmL2.cjs → index-DaBJPfdj.cjs} +1 -1
- package/dist/{index-l9Pk1XBp.cjs → index-DbA1QvN6.cjs} +1 -1
- package/dist/{index-D2_BSB58.js → index-DdGM4pfX.js} +4 -4
- package/dist/{index-C6oRl7w0.js → index-DsBk8w3n.js} +4 -4
- package/dist/{index-ZsNhppF_.js → index-DspBnzO8.js} +1 -1
- package/dist/{index-DyNBPmUy.js → index-DuZuYtAR.js} +1 -1
- package/dist/{index-YWQNDnbh.js → index-DwS0e871.js} +1 -1
- package/dist/{index-A2vAi7vP.cjs → index-Ium3D9Xn.cjs} +1 -1
- package/dist/{index-CmNhcax9.cjs → index-JX0xIJJs.cjs} +1 -1
- package/dist/{index-DgY30UFg.cjs → index-ebb7fOBC.cjs} +1 -1
- package/dist/{index-XCNh-jZY.js → index-p7fh1xeg.js} +1 -1
- package/dist/{index-ruvk89Uz.js → index-zTfKUp5L.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Ct2nep0f.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-21n-WGUD.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-2AD5eQB1.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-GhCn4ra9.js} +7 -7
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B_P-I7Kf.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B7Adlltj.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DeWDRnK-.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DoTLasl4.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-9_ehDmOC.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Bz5MX8WX.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-BW1MPKr7.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-XNlqwY8T.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-46IdC_8L.js → index.vue_vue_type_style_index_1_lang-BObmb_2e.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_1_lang-CmFbshDy.cjs → index.vue_vue_type_style_index_1_lang-BgpaLloL.cjs} +1 -1
- package/dist/{main-DTcn4amP.js → main-CdSJrviV.js} +3 -3
- package/dist/{main-9L2fq1tN.cjs → main-TkudtmSP.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-DETrDZhQ.js → threeModel-CC7wm7qI.js} +4 -4
- package/dist/{threeModel-oOClIGBp.cjs → threeModel-CILtwOhV.cjs} +1 -1
- package/dist/{threePreview-BGQ5FlOC.cjs → threePreview-6K0uX_kn.cjs} +1 -1
- package/dist/{threePreview-B-2nMWcI.js → threePreview-B2c38aNi.js} +3 -3
- package/dist/{threeSceneView-DmtE3lwc.js → threeSceneView-DKe-yheh.js} +8 -8
- package/dist/{threeSceneView-CU32CHkR.cjs → threeSceneView-R3C2C5mu.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Cc9J6xz6.js → threeSceneViewForCPMPIP-B8KV3E55.js} +7 -7
- package/dist/{threeSceneViewForCPMPIP-CBw9wJUT.cjs → threeSceneViewForCPMPIP-D5GmzScE.cjs} +1 -1
- package/dist/{threeTrackPathView-DcR0RXPb.js → threeTrackPathView-AOVKXiLQ.js} +3 -3
- package/dist/{threeTrackPathView-Bmtfv7VK.cjs → threeTrackPathView-BYJQxkco.cjs} +1 -1
- package/dist/{threeViewerHost-C6gjvpcg.cjs → threeViewerHost-Birr5icJ.cjs} +1 -1
- package/dist/{threeViewerHost-DKsihx3G.js → threeViewerHost-D3nc548f.js} +2 -2
- package/dist/{urdfTree-D55cXXY_.js → urdfTree-BORFZd89.js} +1 -1
- package/dist/{urdfTree-CB9GhNL7.cjs → urdfTree-j7pQuwXM.cjs} +1 -1
- package/dist/{workpieceTreePanel-DfC-7RWt.cjs → workpieceTreePanel-C3Ah_exL.cjs} +1 -1
- package/dist/{workpieceTreePanel-BnLl9nv-.js → workpieceTreePanel-vnbkBGAm.js} +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-BJ73Hg5A.cjs"),_=require("./index-B8sq_vLt.cjs"),m=require("./index-CTTqwfEF.cjs"),h=require("./index-2T7wIHAe.cjs"),C=require("./index-C5woD5Cw.cjs"),d=require("./index-y1mE3_ai.cjs"),f=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),k={class:"menu-module"},v={class:"table-wrap","element-loading-text":"加载中..."},x={class:"module-dialog-default"},w=e.defineComponent({__name:"index",setup(D){const t=e.reactive({...p.State}),l=e.ref(null),a=C.useMenuState(d.pinia),{configMenu:n}=d.storeToRefs(a);return e.onMounted(()=>{var i;t.formatFormData(n.value),e.nextTick(()=>{var o,r;(r=l.value)==null||r.setCurrentKey((o=n.value)==null?void 0:o.path),a.setActiveMenuPath("/平台管理/菜单管理")}),n.value&&t.getInitialSubStructure((i=n.value)==null?void 0:i.path)}),(i,o)=>{const r=e.resolveComponent("el-tree"),c=e.resolveComponent("el-splitter-panel"),u=e.resolveComponent("el-splitter"),s=e.resolveComponent("el-button"),g=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",k,[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(c,{size:208,class:"tree-wrap",min:200},{default:e.withCtx(()=>[e.createVNode(r,{ref_key:"treeRef",ref:l,data:t.treeData,"expand-on-click-node":!1,"node-key":"path",props:{children:"children",label:"label",path:"path"},"highlight-current":"","default-expand-all":"","check-on-click-leaf":!1,"check-strictly":"",onNodeClick:t.clickNodeTrigger},null,8,["data","onNodeClick"])]),_:1}),e.createVNode(c,{min:500},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",v,[e.createVNode(_.ssTable,{itemData:t.menuPageData,changedContent:t.changedRow,operatingForm:t.operatingForm,onOnFormChange:t.changeTrigger,onChange:t.handleItemDataChange,onClickTrigger:t.clickTrigger,onOnButtonClick:t.clickRowButton},null,8,["itemData","changedContent","operatingForm","onOnFormChange","onChange","onClickTrigger","onOnButtonClick"])])),[[g,t.tableLoading]])]),_:1})]),_:1}),e.createVNode(m.ssDialog,{class:"module-dialog",title:t.dialogInfo.title,visible:t.dialogInfo.show,width:t.dialogInfo.width,onBeforeDestroy:t.beforeDialogDestroy},{default:e.withCtx(()=>[e.createElementVNode("div",x,[e.createVNode(h.ssForm,{rowContents:t.renderFormData,isEnableWrap:!1,isEdit:!0,onChange:t.changeTrigger,onClickTrigger:t.clickTrigger},null,8,["rowContents","onChange","onClickTrigger"])])]),footer:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(s,{onClick:t.beforeDialogDestroy,id:"themeBorderButton"},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("取消")])),_:1,__:[0]},8,["onClick"]),e.createVNode(s,{id:"themeButton",onClick:t.clickSubmitForm},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode(" 确认 ")])),_:1,__:[1]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])])}}}),b=f._export_sfc(w,[["__scopeId","data-v-74868a06"]]);exports.default=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("vue"),D=require("./index-y1mE3_ai.cjs"),te=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B_P-I7Kf.cjs"),ol=require("./index-BmIdmZp6.cjs"),qa=require("./threeViewerHost-C6gjvpcg.cjs"),ra=require("./index-C5woD5Cw.cjs");require("./index.vue_vue_type_style_index_1_lang-CmFbshDy.cjs");const na=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Jl=require("./index-CQfanE9k.cjs");require("./index-Xb_d3z-H.cjs");const Ra=require("./isString-MUYgjroV.cjs"),fa=F=>F.match(/\((.*)\)/)[1],Ja={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(F){const oe=F,ee=l.ref(null),O=l.ref(!1),M=l.ref(null);return l.watch(()=>oe==null?void 0:oe.isVisible,()=>{O.value=oe==null?void 0:oe.isVisible},{deep:!0,immediate:!0}),l.watch(()=>M.value,()=>{l.nextTick(()=>{var s,se;(se=(s=ee.value)==null?void 0:s.updatePopper)==null||se.call(s)})},{deep:!0,immediate:!0}),(s,se)=>{const ye=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(ye,{visible:O.value,title:oe==null?void 0:oe.title,placement:oe==null?void 0:oe.placement,width:oe==null?void 0:oe.width,ref_key:"popOverRef",ref:ee},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:M})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},ln={key:0,class:"extra-button-content"},an={class:"table-operator-wrap"},rn={key:0,class:"extra-button-filter"},nn={class:"form-content-value"},on={key:1,class:"extra-header"},sn={class:"drop-menu",style:{width:"120px"}},un={key:0},tn={key:1},cn={key:1,class:"extra-button-content tabs-button-wrapper"},dn={class:"table-operator-wrap"},pn={class:"extra-button-filter"},fn={class:"form-content-value"},hn={key:0,class:"extra-header"},gn={class:"drop-menu",style:{width:"120px"}},yn={key:0},vn={key:1},bn={__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(F,{emit:oe}){const ee=oe,O=F,M=l.ref(""),s=l.ref(!1),se=l.ref([]),ye=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Te=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],ve=he=>{const me=he.raw;if(!me)return;const Ae=new FileReader;Ae.onload=ce=>{try{const pe=new Uint8Array(ce.target.result),ge=te.readSync(pe,{type:"array"}),I=ge.SheetNames[0],de=ge.Sheets[I],Ue=te.utils.decode_range(de["!ref"]).e.c+1,J=new Array(Ue).fill(""),S=[];for(const G in de){if(G[0]==="!")continue;const{r:fe,c:Se}=te.utils.decode_cell(G);let Oe=de[G].v;if(de[G].t==="n"&&Oe>0&&Oe<1e6&&(Oe=new Date((Oe-25569)*86400*1e3).toISOString().split("T")[0]),(Oe==null||Oe==="")&&(Oe=""),fe===0)J[Se]=Oe;else{if(!S[fe-1]){S[fe-1]={};for(let il=0;il<Ue;il++)S[fe-1][`col_${il}`]=""}S[fe-1][`col_${Se}`]=Oe}}for(let G=0;G<Ue;G++)J[G]===void 0&&(J[G]="");const Ne=S==null?void 0:S[0];if(!(Ne!=null&&Ne.hasOwnProperty("col_0")))return D.ElMessage.error("导入的数据列不匹配,请检查是否错位");ee("getImportData",J,S)}catch(pe){throw D.ElMessage.error(pe.message),new Error(pe.message)}},Ae.readAsArrayBuffer(me)},Xe=he=>{var Ae;const me=(Ae=se.value)==null?void 0:Ae.reduce((ce,pe,ge)=>(ge===0?ce[pe.label]=he:ce[pe.label]=pe==null?void 0:pe.value,ce),{});ee("filter",me,he,!0)},cl=he=>{ee("buttonClick",he)},fl=he=>{var me,Ae;se.value=(Ae=(me=te.getColumnChild(D.cloneDeep(he)))==null?void 0:me.filter(ce=>(ce==null?void 0:ce.label)!==""&&(ce==null?void 0:ce.label)!=="操作"))==null?void 0:Ae.map(ce=>({label:(ce==null?void 0:ce.label)??"",value:"",name:(ce==null?void 0:ce.label)??"",isFormColHidden:ce==null?void 0:ce.isTableColHidden,width:2}))},dl=l.ref(!1),Le=he=>{var me;if((he==null?void 0:he.buttonName)==="确认"&&(ee("filter",he==null?void 0:he.content),dl.value=(he==null?void 0:he.content)&&Object.values(he==null?void 0:he.content).length>0),(he==null?void 0:he.buttonName)==="清空"){const Ae=D.cloneDeep(he==null?void 0:he.content);for(const ce in Ae)Ae[ce]="";se.value=(me=se.value)==null?void 0:me.map(ce=>({...ce,value:""})),ee("filter",Ae),dl.value=!1}s.value=!1},hl=()=>{var me,Ae;se.value=(me=se.value)==null?void 0:me.map(ce=>({...ce,value:""}));const he=(Ae=se.value)==null?void 0:Ae.reduce((ce,pe)=>(ce[pe.label]=pe.value,ce),{});ee("filter",he)};return l.onMounted(()=>{fl(O.columns)}),l.watch(()=>O.columns,()=>{fl(O.columns)},{deep:!0,immediate:!0}),(he,me)=>{var de,$e,Ue,J;const Ae=l.resolveComponent("el-icon"),ce=l.resolveComponent("svg-icon"),pe=l.resolveComponent("el-input"),ge=l.resolveComponent("el-button"),I=l.resolveComponent("el-upload");return F.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",ln,[l.createElementVNode("div",{class:l.normalizeClass(F.compName?"table-name-wrap":""),style:l.normalizeStyle({background:(O==null?void 0:O.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((O==null?void 0:O.level)-1)*12+"px",fontWeight:600-((O==null?void 0:O.level)-1)*100>=400?600-((O==null?void 0:O.level)-1)*100:400,fontSize:17-(O==null?void 0:O.level)>=14?17-(O==null?void 0:O.level)+"px":"14px"})},l.toDisplayString(F.compName),7),l.createElementVNode("div",an,[O!=null&&O.filterShow?(l.openBlock(),l.createElementBlock("div",rn,[l.createVNode(Ja,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var S,Ne,G,fe;return[l.createVNode(pe,{modelValue:M.value,"onUpdate:modelValue":me[1]||(me[1]=Se=>M.value=Se),style:{"min-width":"80px"},placeholder:dl.value?(G=(Ne=(S=F.filterValues)==null?void 0:S.filter(Se=>Se))==null?void 0:Ne.slice(0,3))==null?void 0:G.join("/"):"搜索","prefix-icon":l.unref(D.search_default),clearable:"",onInput:Xe,disabled:((fe=se.value)==null?void 0:fe.length)===0},{suffix:l.withCtx(()=>{var Se,Oe;return[!M.value&&((Oe=(Se=F.filterValues)==null?void 0:Se.filter(il=>il))!=null&&Oe.join("/"))?(l.openBlock(),l.createBlock(Ae,{key:0,style:{cursor:"pointer"},onClick:hl},{default:l.withCtx(()=>[l.createVNode(l.unref(D.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:me[0]||(me[0]=Se=>s.value=!s.value)},[l.createVNode(ce,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",nn,[(l.openBlock(),l.createBlock(ol.ssForm,{rowContents:se.value,buttonValue:ye.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ye.value,isStartJustify:!1,onOnButtonClick:Le},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])])):l.createCommentVNode("",!0),F.buttons&&((de=F.buttons)==null?void 0:de.length)>0?(l.openBlock(),l.createElementBlock("div",on,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(($e=F.buttons)==null?void 0:$e.filter(S=>F.isDevMode||(S==null?void 0:S.label)!=="修改模板"),(S,Ne)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:Ne},[(S==null?void 0:S.type)==="upload"?(l.openBlock(),l.createBlock(I,{key:0,class:"upload-button-wrap","on-change":ve,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!F.lockingPage},{default:l.withCtx(()=>[l.createVNode(ge,{disabled:!!F.lockingPage,style:l.normalizeStyle({background:(S==null?void 0:S.background)??"var(--ssbutton-theme-bg)",color:(S==null?void 0:S.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(S==null?void 0:S.type)==="popover"?(l.openBlock(),l.createBlock(ol._sfc_main$1,{key:1},{dropTitle:l.withCtx(()=>[(S==null?void 0:S.type)==="popover"?(l.openBlock(),l.createBlock(ge,{key:0,disabled:!!F.lockingPage,style:l.normalizeStyle({background:(S==null?void 0:S.background)??"var(--ssbutton-theme-bg)",color:(S==null?void 0:S.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1032,["disabled","style"])):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",sn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(S==null?void 0:S.contents,G=>(l.openBlock(),l.createBlock(ge,{key:G==null?void 0:G.label,disabled:!!F.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:fe=>cl(G==null?void 0:G.label)},{default:l.withCtx(()=>{var fe,Se;return[l.createTextVNode(l.toDisplayString(G==null?void 0:G.label),1),(fe=G==null?void 0:G.label)!=null&&fe.includes("选中")?(l.openBlock(),l.createElementBlock("span",un,"("+l.toDisplayString(F.selectNums)+")",1)):l.createCommentVNode("",!0),(Se=G==null?void 0:G.label)!=null&&Se.includes("全部")?(l.openBlock(),l.createElementBlock("span",tn,"("+l.toDisplayString(F.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),S!=null&&S.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(ge,{key:2,id:"themeButton",disabled:!!F.lockingPage,style:l.normalizeStyle({background:(S==null?void 0:S.background)??"var(--ssbutton-theme-bg)",color:(S==null?void 0:S.color)??"var(--ssbutton-theme-color)"}),onClick:G=>cl(S==null?void 0:S.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])])):(l.openBlock(),l.createElementBlock("div",cn,[l.createElementVNode("div",dn,[l.createElementVNode("div",pn,[l.createVNode(Ja,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var S,Ne,G,fe;return[l.createVNode(pe,{modelValue:M.value,"onUpdate:modelValue":me[3]||(me[3]=Se=>M.value=Se),style:{"min-width":"80px"},placeholder:dl.value?(G=(Ne=(S=F.filterValues)==null?void 0:S.filter(Se=>Se))==null?void 0:Ne.slice(0,3))==null?void 0:G.join("/"):"搜索","prefix-icon":l.unref(D.search_default),clearable:"",onInput:Xe,disabled:((fe=se.value)==null?void 0:fe.length)===0},{suffix:l.withCtx(()=>{var Se,Oe;return[!M.value&&((Oe=(Se=F.filterValues)==null?void 0:Se.filter(il=>il))!=null&&Oe.join("/"))?(l.openBlock(),l.createBlock(Ae,{key:0,style:{cursor:"pointer"},onClick:hl},{default:l.withCtx(()=>[l.createVNode(l.unref(D.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:me[2]||(me[2]=Se=>s.value=!s.value)},[l.createVNode(ce,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",fn,[(l.openBlock(),l.createBlock(ol.ssForm,{rowContents:se.value,buttonValue:ye.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ye.value,isStartJustify:!1,onOnButtonClick:Le},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),F.buttons&&((Ue=F.buttons)==null?void 0:Ue.length)>0?(l.openBlock(),l.createElementBlock("div",hn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((J=F.buttons)==null?void 0:J.filter(S=>F.isDevMode||(S==null?void 0:S.label)!=="修改模板"),(S,Ne)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:Ne},[(S==null?void 0:S.type)==="upload"?(l.openBlock(),l.createBlock(I,{key:0,class:"upload-button-wrap","on-change":ve,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(ge,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var G;return[l.createVNode(ce,{name:(G=Te==null?void 0:Te.find(fe=>(fe==null?void 0:fe.label)===(S==null?void 0:S.label)))==null?void 0:G.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(S==null?void 0:S.type)==="popover"?(l.openBlock(),l.createBlock(ol._sfc_main$1,{key:1},{dropTitle:l.withCtx(()=>[(S==null?void 0:S.type)==="popover"?(l.openBlock(),l.createBlock(ge,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var G;return[l.createVNode(ce,{name:(G=Te==null?void 0:Te.find(fe=>(fe==null?void 0:fe.label)===(S==null?void 0:S.label)))==null?void 0:G.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",gn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(S==null?void 0:S.contents,G=>(l.openBlock(),l.createBlock(ge,{key:G==null?void 0:G.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:fe=>cl(G==null?void 0:G.label)},{default:l.withCtx(()=>{var fe,Se;return[l.createTextVNode(l.toDisplayString(G==null?void 0:G.label),1),(fe=G==null?void 0:G.label)!=null&&fe.includes("选中")?(l.openBlock(),l.createElementBlock("span",yn,"("+l.toDisplayString(F.selectNums)+")",1)):l.createCommentVNode("",!0),(Se=G==null?void 0:G.label)!=null&&Se.includes("全部")?(l.openBlock(),l.createElementBlock("span",vn,"("+l.toDisplayString(F.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),S!=null&&S.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(ge,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(S==null?void 0:S.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:G=>cl(S==null?void 0:S.label)},{icon:l.withCtx(()=>{var G;return[l.createVNode(ce,{name:(G=Te==null?void 0:Te.find(fe=>(fe==null?void 0:fe.label)===(S==null?void 0:S.label)))==null?void 0:G.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},kn=na._export_sfc(bn,[["__scopeId","data-v-2218a50d"]]),mn=l.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(F,{emit:oe}){const ee=F,O=oe,M=se=>{O("buttonClick",se)},s=se=>{var ye;return se!=null&&se.includes("删除")?((ye=ee.selectTableItems)==null?void 0:ye.length)>0?"warning-active-type":"warning-type":"default-type"};return(se,ye)=>{const Te=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(F.buttons,ve=>(l.openBlock(),l.createBlock(Te,{key:ve==null?void 0:ve.label,disabled:!!F.lockingPage,class:l.normalizeClass(s(ve==null?void 0:ve.label)),onClick:Xe=>M(ve==null?void 0:ve.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(ve==null?void 0:ve.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Sn=na._export_sfc(mn,[["__scopeId","data-v-70b12973"]]),Wa=D.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(F){this.selectArray=F},setSelectString(F){this.selectString=F}}}),xn={class:"calculator-content"},Dn={class:"calculator-child"},Cn={class:"calculator-child"},Tn=l.defineComponent({__name:"calculator",setup(F){const oe=l.ref(),ee=l.ref();return l.onMounted(()=>{oe.value=[{type:"Upload",label:"输入",name:"input"}],ee.value=[{type:"Upload",label:"输出",name:"output"}]}),(O,M)=>(l.openBlock(),l.createElementBlock("div",xn,[l.createElementVNode("div",Dn,[l.createVNode(ol.ssForm,{rowContents:oe.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Cn,[l.createVNode(ol.ssForm,{rowContents:ee.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Nn=na._export_sfc(Tn,[["__scopeId","data-v-73db0fe7"]]),ha=(F,oe)=>{let ee=F,O=oe;return Array.isArray(ee)&&(ee=ee==null?void 0:ee.map((M,s)=>{if(Array.isArray(M)){let se={};return M=M==null?void 0:M.forEach((ye,Te)=>{var ve;(ve=O==null?void 0:O[Te])!=null&&ve.prop?se[O[Te].prop]=ye:Array.isArray(ye)&&(se.children=ha(ye,O))}),Object.assign(se,{id:s})}else return M})),ee},Ga=(F,oe,ee)=>{let O=F,M=oe;return O=O==null?void 0:O.map((s,se)=>{var ye,Te;return!Array.isArray(s)||!((ye=M==null?void 0:M[se])!=null&&ye.label)&&!ee||(s.unshift(((Te=M==null?void 0:M[se])==null?void 0:Te.label)??""),s.some(ve=>Array.isArray(ve))&&(s=s==null?void 0:s.map(ve=>{var Xe;return Array.isArray(ve)&&(ve=Ga(ve,(Xe=M==null?void 0:M[se])==null?void 0:Xe.children,ee)),ve}))),s}),O},An=(F,oe,ee)=>{if(oe==="")return F==null?void 0:F.filter(O=>(O==null?void 0:O.id)!==ee);{const O=oe.split("-");return En(F,O,ee)}},En=(F,oe,ee)=>{let O=F,M=oe;return(M==null?void 0:M.length)===0?O=O==null?void 0:O.filter(s=>s.id!==ee):O=O==null?void 0:O.map(s=>(s.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),s=Ha(s,M,ee)),s)),O},Ha=(F,oe,ee)=>{var s,se;let O=F,M=oe;return(M==null?void 0:M.length)===0?O.children=(s=O.children)==null?void 0:s.filter(ye=>ye.id!==ee):O.children=(se=O.children)==null?void 0:se.map(ye=>(ye.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),ye=Ha(ye,M,ee)),ye)),O},wn=(F,oe,ee)=>{if(oe==="")return ee;{const O=oe.split("-");return Bn(F,O,ee)}},Bn=(F,oe,ee)=>{let O=F,M=oe;return(M==null?void 0:M.length)===0?O=ee:O=O==null?void 0:O.map(s=>(s.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),s=Qa(s,M,ee)),s)),O},Qa=(F,oe,ee)=>{var s;let O=F,M=oe;return(M==null?void 0:M.length)===0?O.children=ee:O.children=(s=O.children)==null?void 0:s.map(se=>(se.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),se=Qa(se,M,ee)),se)),O},Xa=D.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(F){this.objUrl=F},setBlobUrls(F){this.blobUrls=F}}}),ga=async(F,oe)=>{var se,ye,Te,ve,Xe,cl,fl,dl,Le,hl,he,me,Ae,ce,pe,ge,I;let ee=(ye=(se=D.cloneDeep(F))==null?void 0:se.optionUrl)==null?void 0:ye.menuSelect,O=[];ee==null||ee.forEach(de=>{});let M="",s=await te.menuToParent(ee);if(s==null||s.forEach(de=>{var $e,Ue,J,S;(de==null?void 0:de.name)===(((S=(J=(Ue=($e=D.cloneDeep(F))==null?void 0:$e.optionUrl)==null?void 0:Ue.groupSelect)==null?void 0:J[0])==null?void 0:S.replaceAll("'",""))??"")&&(M=de==null?void 0:de.id)}),oe){M=oe;const de=await D.getInsofDataApi({id:M}),$e=(cl=(Xe=(ve=(Te=de==null?void 0:de.data)==null?void 0:Te.result)==null?void 0:ve[0])==null?void 0:Xe.key)==null?void 0:cl.pageKey;s=await te.getItemData($e,sessionStorage.getItem("systemKey"),"")}if(M!==""){let de;oe?de=(fl=s==null?void 0:s.find(J=>(J==null?void 0:J.id)===oe))==null?void 0:fl.compData:de=(dl=s==null?void 0:s.find(J=>{var S,Ne,G,fe;return(J==null?void 0:J.name)===(((Ne=(S=F==null?void 0:F.groupSelect)==null?void 0:S.split(":"))==null?void 0:Ne[0])||((fe=(G=F==null?void 0:F.optionUrl)==null?void 0:G.groupSelect)==null?void 0:fe[0]))}))==null?void 0:dl.compData;let $e=(hl=(Le=de==null?void 0:de.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:Le.contents)==null?void 0:hl.map(J=>J==null?void 0:J.label);(me=(he=de==null?void 0:de.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:he.contents)!=null&&me.every(J=>Array.isArray(J))&&($e=(pe=te.getColumnChild((ce=(Ae=de==null?void 0:de.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:Ae.contents)==null?void 0:ce[0]))==null?void 0:pe.map(J=>J==null?void 0:J.prop));let Ue=(I=(ge=de==null?void 0:de.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:ge.contents)==null?void 0:I.map(J=>{if(Array.isArray(J))J=J==null?void 0:J.filter(S=>!(S!=null&&S.id));else{let S={};for(let Ne in J)Ne!=="id"&&(S[Ne]=J==null?void 0:J[Ne]);J=S}return J});Ue==null||Ue.forEach(J=>{Array.isArray(J)?O.push(te.getValueToObjectValue(J,$e)):O.push(J)})}return O},_n={class:"table-content"},Un={class:"menu-config-wrap"},On=["onClick"],Mn={key:0,class:"viewport-wrap"},jn=["onClick"],Ln={title:"选择显示列信息"},Pn={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},$n=["title"],Fn={class:"col-operate-wrap"},Kn={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Vn={class:"pop-view"},zn={class:"pop-wrapper"},qn={class:"file-list-pop"},Rn=["title","onClick"],Jn=["onClick"],Wn=["onClick"],Gn={class:"form-content"},Hn={key:0,class:"dialog-footer"},Qn={class:"dialog-footer"},Xn={class:"form-content"},Yn={__name:"index",props:{pageLayout:{type:String,default:"vertical"},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!1},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(F,{emit:oe}){var Ma;const ee=l.ref([]),O=Xa(D.pinia),M=l.ref(null),s=F,se=l.ref(s==null?void 0:s.allowSelect),ye=l.ref((Ma=s==null?void 0:s.config)==null?void 0:Ma.showIndex),Te=l.ref(),ve=l.ref(!0),Xe=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),cl=te.useOriginalState(D.pinia);let fl="$R";const{originalPath:dl}=D.storeToRefs(cl),Le=dl.value,hl=l.ref(!1),he=l.ref(!1),me=l.ref(!1),Ae=l.ref(!0),ce=l.reactive({column:{},status:!1,text:"合计"}),pe=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),ge=oe,I=l.ref([]),de=l.reactive({prop:"",order:null}),$e=l.ref([]),Ue=l.ref(!1),J=l.ref(!1),S=l.ref(null),{isUseBackdrop:Ne,initTrackFileType:G,getFileExtension:fe,setData:Se,getFileInfo:Oe,getFilesInfo:il}=qa.useThreeSystem(),oa=l.ref([]),bl=l.ref(!1),Dl=l.ref(),Me=ra.useMenuState(),{importLoading:In,activeMenuPath:xe,contentLoading:eo,linkMenuInfo:Ya}=D.storeToRefs(Me),Za=te.useTableComp(D.pinia),Ee=ra.useModelComp(D.pinia),{extraContents:De,cacheUpdatingData:wl,tableViewContents:Bl,tableLoading:lo,pageMapState:Cl,lockingPage:Wl}=D.storeToRefs(Ee),le=l.ref([]),Gl=l.ref([]),Hl=l.ref(new Map);l.ref(!1);const sl=l.ref("");l.ref();const Ql=l.ref(!0),Tl=l.ref(0),ya=l.ref(!0),Qe=l.ref(""),ul=l.ref(!1),Ia=l.ref({label:"查看三维模型"}),Xl=l.ref(!1),ia=l.ref(),Ye=l.ref([]),gl=l.ref([]),Yl=l.ref(!1),_l=l.ref([]),kl=l.ref([]),yl=l.ref([]),we=l.ref([]),Ie=l.ref(),Ke=l.ref(),er=Wa(D.pinia),Zl=l.ref(),sa=l.ref(0),lr=te.useUnit(D.pinia),{selectIndex:ar,selectMenu:Ul,selectTitle:ao}=D.storeToRefs(lr),{selectString:ml}=D.storeToRefs(er),rr=D.useLoginState(D.pinia),{loginUserInfo:Nl}=D.storeToRefs(rr),nr=l.ref(720),el=l.ref(!1),Il=l.ref(!1),ll=l.ref([]),tl=l.ref(),Ol=l.ref(!0),va=l.ref(!0),Sl=l.ref([]),or=l.inject("contentRef");l.provide("contentRef",or),l.watch(()=>{var e;return(e=le.value)==null?void 0:e.length},e=>{pe.total=e}),l.watch(()=>Bl.value,async()=>{var u,c,d,t,g,w,E,L,v,_,U,B,z,V,K,x,A,k;if(((u=Bl.value)==null?void 0:u.length)===0||!((c=s==null?void 0:s.itemData)!=null&&c.find(C=>(C==null?void 0:C.key)==="columnPath"))||!((d=s==null?void 0:s.itemData)!=null&&d.find(C=>(C==null?void 0:C.key)==="pageColumn")))return;let e=(v=(L=(E=(w=(g=(t=s==null?void 0:s.itemData)==null?void 0:t.find(C=>(C==null?void 0:C.key)==="pageColumn"))==null?void 0:g.contents)==null?void 0:w.split("["))==null?void 0:E[1])==null?void 0:L.split("]"))==null?void 0:v[0],a=((z=(B=(U=(_=s==null?void 0:s.itemData)==null?void 0:_.find(C=>(C==null?void 0:C.key)==="pageColumn"))==null?void 0:U.contents)==null?void 0:B.split("["))==null?void 0:z[0])+((K=(V=Bl.value)==null?void 0:V.find(C=>(C==null?void 0:C.key)===e))==null?void 0:K.value),o=((A=(x=s==null?void 0:s.itemData)==null?void 0:x.find(C=>(C==null?void 0:C.key)==="pageGroup"))==null?void 0:A.contents)??"",r=await te.getItemData(a,sessionStorage.getItem("systemKey"),""),n=(k=r==null?void 0:r.find(C=>(C==null?void 0:C.name)===(o===""?s==null?void 0:s.compName:o)))==null?void 0:k.compData;Ua(n,s.allMapContents)},{deep:!0});const ir=async(e,a)=>{var o,r,n,u,c;try{const d=await D.getInsofDataApi({id:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index)});let t;((o=d==null?void 0:d.data)==null?void 0:o.code)===200&&(t=((n=(r=d==null?void 0:d.data)==null?void 0:r.result)==null?void 0:n[0])||null);const g={type:"data",pageKey:s!=null&&s.parentTableId?(u=t==null?void 0:t.key)==null?void 0:u.pageKey:xe.value,tableId:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index),systemKey:sessionStorage.getItem("systemKey")},w=a==null?void 0:a.map(v=>{const _=Object.keys(v),U={};return _.forEach((B,z)=>{U[e[z]]=v[B]}),U}),E=w==null?void 0:w.map(v=>({key:g,value:{tableData:v}})),L=await D.batchAddInsofDataApi({dataList:E});((c=L==null?void 0:L.data)==null?void 0:c.code)===200?(Ee.setRefreshCurStructure(!0),D.ElMessage.success("导入数据成功")):D.ElMessage.error("导入数据响应失败")}catch(d){throw D.ElMessage.error("导入数据处理失败"),new Error(d)}},sr=async e=>{var a,o,r,n,u;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 c=await D.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});let t=URL.createObjectURL(d);Dl.value=[{name:(u=e==null?void 0:e.split("/"))==null?void 0:u[((n=e==null?void 0:e.split("/"))==null?void 0:n.length)-1],blobUrl:t}],bl.value=!0}};l.onBeforeUnmount(()=>{va.value=!1;let e=sa.value;sa.value=e+1});const ba=l.computed(()=>{var r,n;const e=(pe.currentPage-1)*pe.pageSize,a=e+pe.pageSize,o=(r=I.value)==null?void 0:r.find(u=>{var c;return(u==null?void 0:u.sortable)&&((c=u==null?void 0:u.label)==null?void 0:c.includes("时间"))});return o&&(de.order="descending",de.prop=o==null?void 0:o.prop),ge("getSliceContLength",pe),(n=le.value)==null?void 0:n.slice(e,a)}),ur=e=>{pe.currentPage=e,ge("getSliceContLength",pe)},tr=e=>{var a;pe.pageSize=e,e*pe.currentPage>((a=le.value)==null?void 0:a.length)&&(pe.currentPage=1,pe.pageSize=10,D.ElMessage.warning("分页无效,返回第一页")),ge("getSliceContLength",pe)},cr=(e,a)=>{var c,d;const o=(d=(c=I.value)==null?void 0:c.map(t=>t==null?void 0:t.prop))==null?void 0:d.filter(t=>t!=="operate");let r;const n=(e==null?void 0:e.length)===(o==null?void 0:o.length);if(e!=null&&e.includes("序号"))return D.ElMessage.error("导入的数据不需要包含序号列");if(r=n?e:e.slice(0,o==null?void 0:o.length),!(r==null?void 0:r.every(t=>o==null?void 0:o.find(g=>t===g))))return D.ElMessage.error("导入的数据表头不匹配");ir(r,a)},dr=(e,a)=>{var o;Ee.setRefreshCurStructure(!1),((o=I.value)==null?void 0:o.length)===0||cr(e,a)},pr=(e,a,o,r)=>{const n=[],u=[],c=g=>Object.keys(g).length;for(const g in e)if(e[g]!==void 0){const w=e[g],E=[];for(const[L,v]of Object.entries(w))E.push(v),u.length<c(w)&&u.push(L);n.push(E)}n.unshift(u);const d=te.utils.aoa_to_sheet(n),t=te.utils.book_new();te.utils.book_append_sheet(t,d,r),te.writeFileSync(t,`${a}.xlsx`),ll.value=[]},ea=async(e,a,o,r=!1,n)=>{var u,c,d,t,g,w,E,L;try{Ee.setRefreshCurStructure(!1);const v=await D.getInsofDataApi({id:s==null?void 0:s.index});if(((u=v==null?void 0:v.data)==null?void 0:u.code)===200){let _=(g=(t=(d=(c=v==null?void 0:v.data)==null?void 0:c.result)==null?void 0:d[0])==null?void 0:t.value)==null?void 0:g.pageData;r?_={..._,compData:(E=_==null?void 0:_.compData)==null?void 0:E.map(B=>{var z;return(B==null?void 0:B.key)==="header"?{...B,contents:(z=B==null?void 0:B.contents)==null?void 0:z.map(V=>({...V,[e]:o}))}:B})}:_={..._,compData:(w=_==null?void 0:_.compData)==null?void 0:w.map(B=>{var z,V;return(B==null?void 0:B.key)==="header"?{...B,contents:(z=B==null?void 0:B.contents)==null?void 0:z.map(K=>(K==null?void 0:K.prop)===(a==null?void 0:a.prop)?{...K,[e]:o}:K)}:(B==null?void 0:B.key)==="tableToForm"&&n?{...B,contents:(V=B==null?void 0:B.contents)==null?void 0:V.map(K=>(K==null?void 0:K.prop)===(a==null?void 0:a.prop)?{...K,[n]:o}:K)}:B})};const U=await D.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:_}});((L=U==null?void 0:U.data)==null?void 0:L.code)===200?(D.ElMessage.success("编辑成功"),Ee.setRefreshCurStructure(!0)):D.ElMessage.error("编辑响应失败")}}catch(v){D.ElMessage.error(v)}},fr=async(e,a)=>{await ea("label",a,e)},hr=async(e,a)=>{await ea("columnType",a,e,!1,"type")},gr=()=>{wl.value?el.value=!1:Oa()},yr=e=>{ll.value=e},vr=(e,a)=>{tl.value===a?Ol.value=!1:Ol.value=!0,tl.value=a==null?void 0:a.changeProp},br=e=>{if(!e)return;const{item:a,value:o}=e,r=we.value.find(n=>n.prop==a.prop);r&&r.contents.push({label:o,value:o})},Ml=l.computed(()=>{var o,r,n;const e=(o=I.value)==null?void 0:o.some(u=>u==null?void 0:u.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(n=(r=I.value)==null?void 0:r.filter(u=>(u==null?void 0:u.label)!=="操作"))==null?void 0:n.map(u=>({...u,filterable:!!(u!=null&&u.filterable),showSummary:!!(u!=null&&u.showSummary),operable:!!(u!=null&&u.operable)}))}),kr=async(e,a,o)=>{const r=D.cloneDeep(I.value);await l.nextTick(),I.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 ea(a,o,e)},ua=async(e,a)=>{await ea(a,null,e,!0)},mr=()=>{ul.value=!1},Sr=e=>{ge("clickTrigger",e)},ka=async e=>{var u,c,d,t,g,w,E,L,v,_,U,B,z,V,K;const a=e==null?void 0:e.row,o=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix;if((u=a==null?void 0:a.toString())!=null&&u.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(a.includes(",")){D.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(Ne(a)){const A={files:[Oe(a)],data:{}};Se(A);return}_l.value=[{url:a,extension:fe(a)}],J.value=!0,S.value={data:D.cloneDeep(o)},Ue.value=!0;return}let n=[];if((c=a==null?void 0:a.toString())!=null&&c.includes(".stl")||(d=a==null?void 0:a.toString())!=null&&d.includes(".STL")||(t=a==null?void 0:a.toString())!=null&&t.includes(".obj")||(g=a==null?void 0:a.toString())!=null&&g.includes(".mtl")){const x=(w=a==null?void 0:a.toString())==null?void 0:w.split(","),A=il(x),k=A==null?void 0:A[0];if(Ne(k==null?void 0:k.extension)){Se({files:A,data:{}});return}_l.value=A,J.value=!1,Ue.value=!0;return}if((E=a==null?void 0:a.toString())!=null&&E.includes(".stl")||(L=a==null?void 0:a.toString())!=null&&L.includes(".STL")||(v=a==null?void 0:a.toString())!=null&&v.includes(".obj")||(_=a==null?void 0:a.toString())!=null&&_.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let x,A=[],k={};if(Array.isArray(a)?x=a:x=a==null?void 0:a.split(","),x==null||x.forEach(C=>{C.includes(".mtl")?A.push(C):k.blob=k.blob?k.blob+","+C:C}),(A==null?void 0:A.length)>0&&(k.mtlBlobs=A),r&&(k.suffix=r),(B=(U=Object.values(k))==null?void 0:U[0])!=null&&B.includes("http:"))n.push(k);else{const C=new Blob([k.blob],{type:"application/octet-stream;charset=UTF-8"});let y=URL.createObjectURL(C),W="";(z=a==null?void 0:a.split("/"))==null||z.forEach((i,P)=>{var q;P===((q=a==null?void 0:a.split("/"))==null?void 0:q.length)-1&&(W=i)}),(V=k.blob)!=null&&V.includes(".stl")&&(W=(W==null?void 0:W.replaceAll(">",""))+".urdf"),Dl.value=[{name:W,blobUrl:y}],bl.value=!0}}else{const x=await D.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),A=new Blob([x.data],{type:"application/octet-stream;charset=UTF-8"});let k=URL.createObjectURL(A),C="";if((K=a==null?void 0:a.split("/"))==null||K.forEach((y,W)=>{var i;W===((i=a==null?void 0:a.split("/"))==null?void 0:i.length)-1&&(C=y)}),Ne(C)){const y=G(C),W=Oe(a);Se({files:[W],data:{trackFileType:y}});return}Dl.value=[{name:C,blobUrl:k}],bl.value=!0}(n==null?void 0:n.length)>0&&O.setBlobUrls(n)},la=e=>{var r,n,u,c;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(c=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:c[((u=(n=e==null?void 0:e.url)==null?void 0:n.split("."))==null?void 0:u.length)-1];return(e==null?void 0:e.name)+"."+a},xr=async e=>{let a=null,o=null;if(e!=null&&e.downloadUrl){const n=await ta(),u=ol.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),c=await D.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(()=>{u.close()}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(d),o=e==null?void 0:e.name}else{const n=await te.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=la(e)):a=e==null?void 0:e.url}if(Ne(a)){const n={row:`${a}`,suffix:fe(o)};ka(n);return}const r={name:o,blobUrl:a};Dl.value=[r],bl.value=!0},Dr=async e=>{let a=null,o=null;if(e!=null&&e.downloadUrl){const u=await ta(),c=await D.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:u,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(d),o=e==null?void 0:e.name}else{const u=await te.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(u.data),o=la(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)},Cr=(e,a)=>{var o;if(Object.values(a).length!==0)return Object.values(a).find(r=>{var n,u,c;return((n=r==null?void 0:r.toString())==null?void 0:n.includes(".txt"))||((u=r==null?void 0:r.toString())==null?void 0:u.includes(".cpt"))||((c=r==null?void 0:r.toString())==null?void 0:c.includes(".obj"))})?[...e,Ia.value]:(o=s==null?void 0:s.config)!=null&&o.allowMove?[...e,{label:"迁移"}]:e},Tr=(e,a={})=>[...e==null?void 0:e.values()].filter(o=>Object.keys(a).every(r=>{var c;const n=o[r],u=(c=a[r])==null?void 0:c.toLowerCase();return u&&n&&typeof n=="string"?n.toLowerCase().includes(u):!0})),ma=l.ref([]),Nr=async(e,a,o=!1)=>{var r;if(e){if(Ee.setTableLoading(!0),ma.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(n=>!n)))return le.value=Gl.value;if(o){le.value=[...Hl.value.values()].filter(n=>Object.values(n).some(u=>typeof u=="string"?u==null?void 0:u.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}le.value=Tr(Hl.value,e),Ee.setTableLoading(!1)}},Ar=async e=>{},Sa=async(e,a,o,r)=>{var n,u,c,d,t,g,w,E,L,v,_,U,B,z,V,K,x,A,k,C;if(ge("clickMainKey",o),(r==null?void 0:r.isExistChild)===!0){let y=(n=r==null?void 0:r.columnType)==null?void 0:n.prop,W=r==null?void 0:r.data;if(Sl.value=await te.getItemData(xe.value,sessionStorage.getItem("systemKey"),""),!Sl.value){let P=(d=(c=(u=xe.value)==null?void 0:u.split("/"))==null?void 0:c.filter((q,b)=>{var N,m;return b!==((m=(N=xe.value)==null?void 0:N.split("/"))==null?void 0:m.length)-1}))==null?void 0:d.join("/");Sl.value=await te.getItemData(P,sessionStorage.getItem("systemKey"),"")}let i=(t=Sl.value)==null?void 0:t.filter(P=>(P==null?void 0:P.name)===y);Sl.value=i==null?void 0:i.map(P=>{var q;return P.compData=(q=P.compData)==null?void 0:q.map(b=>{var N,m;return(b==null?void 0:b.key)==="tableContents"&&(N=b==null?void 0:b.contents)!=null&&N.every(f=>f==null?void 0:f.find(j=>j==null?void 0:j.id))&&(b.contents=(m=b==null?void 0:b.contents)==null?void 0:m.filter(f=>(f==null?void 0:f[1])===W)),b}),P}),ge("routeUrl",Sl.value,{isEdit:!0,routerUrl:xe.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=D.cloneDeep(e);y=await((g=D.cloneDeep(y))==null?void 0:g.map(async i=>{var b,N,m,f;const P=await te.downloadAvatarApi({url:i==null?void 0:i.url});let q=URL.createObjectURL(P.data);return{name:(i==null?void 0:i.name)+"."+((f=(b=i==null?void 0:i.url)==null?void 0:b.split("."))==null?void 0:f[((m=(N=i==null?void 0:i.url)==null?void 0:N.split("."))==null?void 0:m.length)-1]),blobUrl:q}}));let W=await Promise.all(y);Dl.value=W,bl.value=!0}if(D.cloneDeep(I.value),(r==null?void 0:r.isMainKey)===!0){Me.setActiveMenuPath(void 0),Ee.setRouteToChildPath(void 0),Ee.setFixMenuStatus(!0);let y=(E=(w=s.itemData)==null?void 0:w.find(i=>(i==null?void 0:i.key)==="contentTableId"))==null?void 0:E.contents,W=(v=(L=s.itemData)==null?void 0:L.find(i=>(i==null?void 0:i.key)==="relatedFilter"))==null?void 0:v.index;if(W!==0){let i=(U=(_=I.value)==null?void 0:_[W])==null?void 0:U.prop;if((o==null?void 0:o[i])===(r==null?void 0:r.data)){let P=await D.getInsofDataApi({id:y}),q=(K=(V=(z=(B=P==null?void 0:P.data)==null?void 0:B.result)==null?void 0:z[0])==null?void 0:V.key)==null?void 0:K.pageKey;Me.setActiveMenuPath(q+"/"+(r==null?void 0:r.data))}else{let P=await D.getInsofDataApi({key:{pageKey:D.cloneDeep(xe).value+"/"+(r==null?void 0:r.data),systemKey:sessionStorage.getItem("systemKey")}});((A=(x=P==null?void 0:P.data)==null?void 0:x.result)==null?void 0:A.length)>0&&Me.setActiveMenuPath(D.cloneDeep(xe).value+"/"+(r==null?void 0:r.data))}}else{let i=await D.getInsofDataApi({key:{pageKey:D.cloneDeep(xe).value+"/"+(r==null?void 0:r.data),systemKey:sessionStorage.getItem("systemKey")}});((C=(k=i==null?void 0:i.data)==null?void 0:k.result)==null?void 0:C.length)>0&&Me.setActiveMenuPath(D.cloneDeep(xe).value+"/"+(r==null?void 0:r.data))}}},Er=()=>{bl.value=!1},wr=e=>{ge("rowClick",e)};l.watch(()=>s.changedContent,()=>{var o,r;if(!s.changedContent)return;let e=(o=le.value)==null?void 0:o.map(n=>{var u;return n.id===((u=s.changedContent)==null?void 0:u.id)&&(n={...s.changedContent,id:s.changedContent.newId?s.changedContent.newId:s.changedContent.id},delete n.newId),n});const a=(r=s.itemData)==null?void 0:r.map(n=>((n==null?void 0:n.key)==="tableContents"&&(n.contents=e),n));le.value=e,ge("contentChange",{contents:a,index:s.index}),ge("change",{content:e,index:s==null?void 0:s.index,buttonName:"",id:s==null?void 0:s.index})},{deep:!0,immediate:!0});const Br=()=>{},_r=async()=>{const e=xe.value,a=sessionStorage.getItem("systemKey"),o=await te.getItemData(e,a,""),r=(o==null?void 0:o.find(d=>(d==null?void 0:d.name)==="方法明细"))||(o==null?void 0:o[0]),n=(r==null?void 0:r.compData)||[],u=n==null?void 0:n.find(d=>{const t=d==null?void 0:d.key;return t==="formContent"||t==="tableContents"});return u==null?void 0:u.contents},ta=async()=>`Bearer ${D.Local.get("access-token")}`,Ur=async(e,{token:a,inputData:o}={})=>await D.axios.post(e,o,{headers:{Authorization:a}}).catch(n=>(Me.setImportLoading(!1),Promise.reject(n))),Or=e=>{var r;let a={};const o=[];return a.form={},(r=D.cloneDeep(e))==null||r.forEach((n,u)=>{var c,d,t,g,w,E,L,v,_,U,B,z,V,K;if((n==null?void 0:n.comp)==="Table"){(d=(c=n==null?void 0:n.compData)==null?void 0:c.find(C=>(C==null?void 0:C.key)==="header"))==null||d.contents;let x=(w=(g=(t=n==null?void 0:n.compData)==null?void 0:t.find(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:g.contents)==null?void 0:w.map(C=>C.slice(1));(U=(_=(v=(L=(E=n==null?void 0:n.compData)==null?void 0:E.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:L.contents)==null?void 0:v[0])==null?void 0:_[0])==null||U.label;let A=(z=(B=n==null?void 0:n.compData)==null?void 0:B.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:z.contents,k=[];x==null||x.forEach(C=>{let y=[];C==null||C.forEach((W,i)=>{var q;let P={};((q=A[i])==null?void 0:q.label)!=="操作"&&(P[A[i].label]=W,y.push(P))}),k.push(y)}),a[n.name]=k}else{const x=(K=(V=n.compData)==null?void 0:V.find(A=>(A==null?void 0:A.key)==="formContent"))==null?void 0:K.contents;x==null||x.forEach(A=>{var k,C;if(A.prop!==""){let y=A==null?void 0:A.value;Array.isArray(y)?y=((k=y==null?void 0:y[0])==null?void 0:k.oldUrl)||"http://222.92.178.198:62001/"+((C=y==null?void 0:y[0])==null?void 0:C.url):y=y.toString(),A={key:(A==null?void 0:A.prop)??(A==null?void 0:A.label),value:y},o.push(A)}})}}),a.form=te.getFormContents(o),a},Mr=e=>{const a=[],o=r=>{r&&typeof r=="object"&&!Array.isArray(r)?Object.values(r).forEach(o):a.push(r)};return o(e),a},jr=async(e,a,o)=>{var A,k,C,y,W,i,P,q,b,N,m;Me.setImportLoading(!0),Ee.setFreshContent(!1);let r=await _r().catch(f=>(Me.setImportLoading(!1),Promise.reject(f)));r=r==null?void 0:r.filter(f=>{var j;return((j=f==null?void 0:f.find(T=>T==null?void 0:T.id))==null?void 0:j.id)===(a==null?void 0:a.id)});let n=te.getEqualChild([(A=I.value)==null?void 0:A.filter(f=>(f==null?void 0:f.label)!=="操作")]);const u=(C=(k=te.tableToForm(r,n))==null?void 0:k[0])==null?void 0:C.find(f=>{const j=f==null?void 0:f.key;return j==="Interface"||j==="方法体"}),c=u==null?void 0:u.value;if(!c){console.log("未搜索到isMain, 缺少算法执行接口"),Me.setImportLoading(!1);return}const d=I.value?te.getEqualChild([I.value]):[],t=d.find(f=>{const j=f==null?void 0:f.prop;return j==="Input1"||j==="输入数据.输入1"||j==="样本输入数据"}),g=t==null?void 0:t.prop;let w=a==null?void 0:a[g];const E=await ta().catch(f=>(Me.setImportLoading(!1),Promise.reject(f)));let L=!0,v="";(y=I.value)==null||y.forEach(f=>{(f==null?void 0:f.prop)===g&&(L=!!(f!=null&&f.childPath),v=f==null?void 0:f.childPath)});let _="";if(L){let f=(i=(W=I.value)==null?void 0:W.find(re=>(re==null?void 0:re.isMainKey)===!0))==null?void 0:i.prop;_=a==null?void 0:a[f];let j=v==null?void 0:v.split(Le),T=[];j==null||j.forEach((re,ue)=>{(j==null?void 0:j.length)-1===ue&&T.push(_),T.push(re)}),T=T==null?void 0:T[0];let ie=await te.getItemData(T,sessionStorage.getItem("systemKey"),""),H=ie==null?void 0:ie.filter(re=>(re==null?void 0:re.name)===g);H=H==null?void 0:H.map(re=>{var ue;return re.compData=(ue=re==null?void 0:re.compData)==null?void 0:ue.map($=>{var Q;return($==null?void 0:$.key)==="tableContents"&&($.contents=(Q=$==null?void 0:$.contents)==null?void 0:Q.filter(ne=>(ne==null?void 0:ne[1])===(a==null?void 0:a[g]))),$}),re}),(!H||(H==null?void 0:H.length)===0)&&(H=ie,H=H==null?void 0:H.map(re=>{var ue;return re.compData=(ue=re==null?void 0:re.compData)==null?void 0:ue.map($=>{var Q;return($==null?void 0:$.key)==="tableContents"&&($.contents=(Q=$==null?void 0:$.contents)==null?void 0:Q.filter(ne=>{var Y,X;return(ne==null?void 0:ne[1])===(a==null?void 0:a[(X=(Y=I==null?void 0:I.value)==null?void 0:Y[0])==null?void 0:X.prop])})),$}),re})),w=Or(H)}const U=await Ur(c,{token:E,inputData:w}).catch(f=>(Me.setImportLoading(!1),Promise.reject(f))),B=(P=U==null?void 0:U.data)==null?void 0:P.data,z=d.find(f=>(f==null?void 0:f.prop)==="Output1"),V=z==null?void 0:z.prop;let K=[],x=[];if(B&&((q=Object.values(B))==null?void 0:q.length)>0){let f=[];const j=new FormData,T=(b=Mr(B))==null?void 0:b.map(async H=>{var re,ue;if(!Array.isArray(H)&&(H!=null&&H.includes("http"))){let $=await D.axios.get(H,{responseType:"blob"}),Q=(ue=H==null?void 0:H.split("/"))==null?void 0:ue[((re=H==null?void 0:H.split("/"))==null?void 0:re.length)-1];j.append("files",$.data,Q)}else f.push(H)});if(await Promise.all(T),!te.isFormDataEmpty(j)){let H=await te.uploadAmountApi(j),re=(m=(N=H==null?void 0:H.data)==null?void 0:N.result)==null?void 0:m.map(ue=>{var $,Q,ne,Y,X,ae;return{name:(ae=(X=(Y=($=ue==null?void 0:ue.url)==null?void 0:$.split("/"))==null?void 0:Y[((ne=(Q=ue==null?void 0:ue.url)==null?void 0:Q.split("/"))==null?void 0:ne.length)-1])==null?void 0:X.split("."))==null?void 0:ae[0],url:ue==null?void 0:ue.url}});f=[...f,...re]}let ie={};for(let H in a)H!=="id"&&(ie[H]=a[H]);ie[V]=f,x.push({id:a==null?void 0:a.id,value:{tableData:ie}})}(x==null?void 0:x.length)>0&&await D.batchUpdateInsofDataApi({dataList:x}),(K==null?void 0:K.length)>0&&await D.batchAddInsofDataApi({dataList:K}),Pl(!0),Me.setImportLoading(!1),Ee.setFreshContent(!0)},xa=(e,a)=>(e=e==null?void 0:e.map(o=>{var r,n;return o!=null&&o.children&&((r=o.children)!=null&&r.find(u=>u.id===(a==null?void 0:a.id))?o.children=(n=o.children)==null?void 0:n.filter(u=>(u==null?void 0:u.id)!==(a==null?void 0:a.id)):o.children=xa(o.children,a)),o}),e),Be=l.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:s==null?void 0:s.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(e,a,o)=>{a===(s==null?void 0:s.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)"}]}),Lr=()=>{Be.show=!1},Pr=e=>{var a,o;if((e==null?void 0:e.buttonName)==="取消")return Be.show=!1;Be.to=e==null?void 0:e.content,!(!(s!=null&&s.index)||!((a=Be.to)!=null&&a.groupName))&&(s==null?void 0:s.index)!==((o=Be.to)==null?void 0:o.groupName)&&(ge("change",{buttonName:"迁移",value:{from:Be.from,to:Be.to,data:Be.selectRow}}),Be.show=!1)},aa=async(e,a,o)=>{var r,n,u,c,d,t,g,w,E,L,v,_,U,B,z;if(sl.value="",Yl.value=!0,Ql.value=!0,ge("onButtonClick",e,a),e==="删除")ra.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,K;(V=le.value)!=null&&V.find(x=>(x==null?void 0:x.id)===(a==null?void 0:a.id))?le.value=(K=D.cloneDeep(le.value))==null?void 0:K.filter(x=>(x==null?void 0:x.id)!==(a==null?void 0:a.id)):le.value=xa(D.cloneDeep(le.value),a),An(Zl.value,Ul.value,a==null?void 0:a.id),Ee.setTableLoading(s==null?void 0:s.index),ge("change",{content:le.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:I.value})});else if(e==="批量删除"){if(((r=ll.value)==null?void 0:r.length)===0)return D.ElMessage.warning("请先勾选操作的数据");ra.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var K,x;const V=(K=ll.value)==null?void 0:K.map(A=>A.id);le.value=(x=D.cloneDeep(le.value))==null?void 0:x.filter(A=>!(V!=null&&V.includes(A.id))),Ee.setTableLoading(s==null?void 0:s.index),ge("change",{content:le.value,singleContent:null,selectItems:ll.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:I.value})})}else if(e==="复制新增"){Qe.value="新增";const V=D.cloneDeep(a),K=(n=I.value)==null?void 0:n.find(k=>k==null?void 0:k.isMainKey),x=K||((u=I.value)==null?void 0:u[0]),A=(c=yl.value)==null?void 0:c.find(k=>(k==null?void 0:k.label)==="新建");await Ca(!0,A,{data:V,firstCol:x})}else if(e==="新增")Qe.value="新增",Ll(""),ul.value=!0;else if(e==="编辑")Qe.value="编辑",Ll(a),ul.value=!0;else if(e==="查看")Qe.value="查看",Ll(a),Yl.value=!1,Ql.value=!1,ul.value=!0;else if(e==="查看三维模型"){const V={};for(let x in a)x!=="id"&&(V[x]=a[x]);let K=(d=Object.values(V))==null?void 0:d[1];Za.setTableShowThree(K)}else if(((t=o==null?void 0:o.extra)==null?void 0:t.type)==="modelExample")Qe.value=e,Xl.value=!0;else if(e==="新建"){let V=Cl.value,K=[];for(let y in V)y!=null&&y.includes(`loading${((g=Nl.value)==null?void 0:g.account)||((w=Nl.value)==null?void 0:w.账号)}`)&&(K=[...K,...y]);let x=[];for(let y in V)y!=null&&y.includes(`updateLoading${((E=Nl.value)==null?void 0:E.account)||((L=Nl.value)==null?void 0:L.账号)}`)&&(x=[...x,...y]);let A=K==null?void 0:K.map(y=>y==null?void 0:y.id);const k=x==null?void 0:x.map(y=>y==null?void 0:y.id);A=[...D.cloneDeep(A),...k],(A==null?void 0:A.length)>0&&(A!=null&&A.every(y=>y!==null&&y))&&await D.batchDeleteInsofDataApi({ids:A});const C=(v=yl.value)==null?void 0:v.find(y=>(y==null?void 0:y.label)==="新建");await Ca(!1,C)}else if(e==="修改模板"){let V=D.cloneDeep(xe).value;Ee.setRouteToChildPath(V),Me.setActiveMenuPath(V+Le)}else if(e==="执行")jr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((_=ll.value)==null?void 0:_.length)===0)return D.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((U=le.value)==null?void 0:U.length)===0)return D.ElMessage.warning("暂无数据导出");const V=(z=(B=I.value)==null?void 0:B.map(x=>x==null?void 0:x.label))==null?void 0:z.filter(x=>x!=="操作"),K=e==="导出全部"?D.cloneDeep(le.value):D.cloneDeep(ll.value);K==null||K.forEach(x=>{x==null||delete x.id}),pr(K,s==null?void 0:s.compName,V,s==null?void 0:s.compName)}else e==="迁移"&&(Be.selectRow=a,Be.show=!0)},$r=async e=>{var o,r,n,u,c,d;const a=await D.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)&&((u=(n=a==null?void 0:a.data)==null?void 0:n.result)==null?void 0:u.length)>0?(d=(c=a==null?void 0:a.data)==null?void 0:c.result)==null?void 0:d.map(t=>{var g;return{id:t==null?void 0:t.id,...(g=t==null?void 0:t.value)==null?void 0:g.pageData}}):[]},Fr=async(e,a)=>{var o,r,n,u,c,d,t,g,w,E,L,v,_,U,B,z,V,K,x,A;try{let k,C;const y=(o=Cl.value[xe.value+Le])==null?void 0:o.filter(f=>{var j;return((j=f==null?void 0:f.key)==null?void 0:j.type)==="structureMethod"}),W=(r=Cl.value[xe.value+Le])==null?void 0:r.filter(f=>{var j;return((j=f==null?void 0:f.key)==null?void 0:j.type)==="structure"}),i=y==null?void 0:y.find(f=>{var j,T;return((T=(j=f==null?void 0:f.value)==null?void 0:j.pageData)==null?void 0:T.method)==="保存"});if(!i)return;const P=(d=(c=Cl.value[(u=(n=i==null?void 0:i.value)==null?void 0:n.pageData)==null?void 0:u.path])==null?void 0:c.filter(f=>{var j;return((j=f==null?void 0:f.key)==null?void 0:j.type)==="data"}))==null?void 0:d.find(f=>{var j,T,ie,H;return((T=(j=f==null?void 0:f.value)==null?void 0:j.tableData)==null?void 0:T.算法名称)===((H=(ie=i==null?void 0:i.value)==null?void 0:ie.pageData)==null?void 0:H.method)});if(!P)return;const q={buttonName:(g=(t=i==null?void 0:i.value)==null?void 0:t.pageData)==null?void 0:g.method,api:(E=(w=P==null?void 0:P.value)==null?void 0:w.tableData)==null?void 0:E.算法体,content:W==null?void 0:W.map(f=>{var j;return(j=f==null?void 0:f.value)==null?void 0:j.pageData}),extraContent:[],extraValues:(v=(L=i==null?void 0:i.value)==null?void 0:L.pageData)==null?void 0:v.data,methodName:(U=(_=i==null?void 0:i.value)==null?void 0:_.pageData)==null?void 0:U.path};if(!e)return;const b={...e,compData:(B=e==null?void 0:e.compData)==null?void 0:B.map(f=>{var j;return(f==null?void 0:f.key)==="formContent"?{...f,contents:(j=f==null?void 0:f.contents)==null?void 0:j.map(T=>(T==null?void 0:T.prop)===a?{...T,value:""}:T)}:f})},N={key:{pageKey:xe.value+Le,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:b}},m=await D.axios.post(q.api,N,{headers:{"Content-Type":"application/json"}});return((z=m==null?void 0:m.data)==null?void 0:z.code)===200&&(k=(K=(V=m==null?void 0:m.data)==null?void 0:V.result)==null?void 0:K.latestReportCode,C=(A=(x=m==null?void 0:m.data)==null?void 0:x.result)==null?void 0:A.status),{newMainKeyValue:k,newStatus:C}}catch(k){throw D.ElMessage.error(k),new Error(k)}},Da=(e,a,o,r)=>{var n;ge("contentChange",{contents:(n=e==null?void 0:e.compData)==null?void 0:n.map(u=>{var c;return(u==null?void 0:u.key)==="formContent"?{...u,contents:(c=u==null?void 0:u.contents)==null?void 0:c.map(d=>(d==null?void 0:d.key)===a?{...d,value:o}:jl.value&&(d==null?void 0:d.prop)===jl.prop?{...d,value:jl.value}:d)}:u}),index:e==null?void 0:e.id},r)},jl=l.reactive({prop:"状态",value:""}),Kr=l.ref(["系统自动生成信息","审批意见"]),Vr=async(e,a,o)=>{var t,g;let r=e==null?void 0:e[a==null?void 0:a.prop],n=1,u,c;const d=D.cloneDeep(xe).value+Le+r;if(d){jl.value="",u=(t=Cl.value[d])==null?void 0:t.filter(L=>{var v;return((v=L==null?void 0:L.key)==null?void 0:v.type)==="structure"});const w=u==null?void 0:u.find(L=>{var v,_,U;return((U=(_=(v=L==null?void 0:L.value)==null?void 0:v.pageData)==null?void 0:_.comp)==null?void 0:U.toUpperCase())==="FORM"});c={...(g=w==null?void 0:w.value)==null?void 0:g.pageData,id:w==null?void 0:w.id};const E=await Fr(c,a==null?void 0:a.prop);if(jl.value=E==null?void 0:E.newStatus,E!=null&&E.newMainKeyValue)return E==null?void 0:E.newMainKeyValue}if(le.value.some(w=>(w==null?void 0:w[a==null?void 0:a.prop])===r)){const w=r;for(;le.value.some(E=>(E==null?void 0:E[a==null?void 0:a.prop])===`${w}(${n})`);)n++;r=`${w}(${n})`}return r},Ca=async(e,a,o)=>{var c,d,t,g,w,E,L,v;let r,n;const u=await Vr(o==null?void 0:o.data,o==null?void 0:o.firstCol);if(e?(r=D.cloneDeep(xe).value+Le+((g=o==null?void 0:o.data)==null?void 0:g[(t=o==null?void 0:o.firstCol)==null?void 0:t.prop]),n=D.cloneDeep(xe).value+Le+u):(r=D.cloneDeep(xe).value+Le,n=D.cloneDeep(r)+`loading${((c=Nl.value)==null?void 0:c.account)||((d=Nl.value)==null?void 0:d.账号)}`),a){const _=(E=(w=Cl.value[n])==null?void 0:w.filter(U=>{var B;return((B=U==null?void 0:U.key)==null?void 0:B.parentTable)===""}))==null?void 0:E.map(U=>{var B;return{id:U==null?void 0:U.id,...(B=U==null?void 0:U.value)==null?void 0:B.pageData}});if((_==null?void 0:_.length)>0)if(e){const U=_==null?void 0:_.find(B=>{var z;return((z=B==null?void 0:B.comp)==null?void 0:z.toUpperCase())==="FORM"});U&&Da(U,(L=o==null?void 0:o.firstCol)==null?void 0:L.label,u,xe.value)}else Ee.setRouteToChildPath(D.cloneDeep(xe).value),Me.setActiveMenuPath(n);else if(await te.loadingConstruct(r,n,null,null,e?Kr.value:null),e){const U=await $r(n);if((U==null?void 0:U.length)>0){const B=U==null?void 0:U.find(z=>{var V;return((V=z==null?void 0:z.comp)==null?void 0:V.toUpperCase())==="FORM"});B&&Da(B,(v=o==null?void 0:o.firstCol)==null?void 0:v.label,u,xe.value)}}else Ee.setRouteToChildPath(D.cloneDeep(xe).value),Me.setActiveMenuPath(n)}else e?(sl.value="",Ke.value=o==null?void 0:o.data,Pl(!0,o==null?void 0:o.firstCol,u)):(Ee.setRouteToChildPath(D.cloneDeep(xe).value),Me.setActiveMenuPath(n))},zr=()=>{Ue.value=!1,_l.value=[],J.value=!1},Ll=e=>{var c,d,t,g,w,E,L,v,_,U,B,z,V,K,x,A,k,C,y,W;const a=[];let o=[];for(let i in e)Array.isArray(e==null?void 0:e[i])&&o.push(i);$e.value=D.cloneDeep(I.value),(d=te.getColumnChild((c=D.cloneDeep(I.value))==null?void 0:c.filter(i=>(i==null?void 0:i.label)!=="操作")))==null||d.forEach((i,P)=>{var q;o.find(b=>b===(i==null?void 0:i.prop))||(i!=null&&i.formType&&((q=i==null?void 0:i.formType)==null?void 0:q.toUpperCase())==="SELECT"||i!=null&&i.menuId?a.push({label:(i==null?void 0:i.label)||(i==null?void 0:i.prop)||"",name:(i==null?void 0:i.prop)??"t"+P,prop:i==null?void 0:i.prop,type:"Select",value:(e==null?void 0:e[i==null?void 0:i.prop])??(i==null?void 0:i.value)??"",id:(i==null?void 0:i.id)??P,contents:(i==null?void 0:i.options)??[],width:1,isFormColHidden:i==null?void 0:i.isFormColHidden,relatedValueId:i==null?void 0:i.relatedValueId,disabled:i==null?void 0:i.disabled,optionUrl:{groupSelect:i==null?void 0:i.groupSelect,menuSelect:i==null?void 0:i.formMenuSelect,type:"Select",selectRelateType:i==null?void 0:i.selectRelateType,allSelectionContents:(i==null?void 0:i.allSelectionContents)??[],selectFilter:i==null?void 0:i.selectFilter,menuId:i==null?void 0:i.menuId,filterContent:i==null?void 0:i.filterContent}}):a.push({label:(i==null?void 0:i.label)||(i==null?void 0:i.prop)||"",prop:i==null?void 0:i.prop,name:(i==null?void 0:i.prop)??"t"+P,type:!(i!=null&&i.formType)||(i==null?void 0:i.formType)===""?"Input":i==null?void 0:i.formType,value:(e==null?void 0:e[i==null?void 0:i.prop])??(i==null?void 0:i.value)??"",id:(i==null?void 0:i.id)??P,contents:(i==null?void 0:i.options)??[],width:1,isFormColHidden:i==null?void 0:i.isFormColHidden,disabled:i==null?void 0:i.disabled,relatedValueId:i==null?void 0:i.relatedValueId}))}),e===""||!e||(sl.value=(e==null?void 0:e.id)??"");let r=te.getColumnChild((t=D.cloneDeep(I.value))==null?void 0:t.filter(i=>(i==null?void 0:i.label)!=="操作"));Ye.value&&((g=Ye.value)==null?void 0:g.length)>0&&(Ye.value=(w=D.cloneDeep(Ye).value)==null?void 0:w.map(i=>{var q;let P=(i==null?void 0:i.prop)||((q=r==null?void 0:r.find(b=>(b==null?void 0:b.label)===(i==null?void 0:i.label)))==null?void 0:q.prop);return P&&(i.value=e[P]),i})),we.value=Ye.value&&((E=Ye.value)==null?void 0:E.length)>0?te.getTableFormToForm(Ye.value):a;let n=[],u=(L=s.itemData)==null?void 0:L.filter(i=>(i==null?void 0:i.key)==="filterAllType");if((u==null?void 0:u.length)>0&&(n=(u==null?void 0:u.map(P=>P==null?void 0:P.value)).flat()),(n==null?void 0:n.length)>0){let i=n==null?void 0:n.find(q=>{var b;return(b=q==null?void 0:q.content)==null?void 0:b.includes("@Type")});if(i!=null&&i.content){let q=(U=(_=(v=i==null?void 0:i.content)==null?void 0:v.replace(":",fl))==null?void 0:_.split(fl))==null?void 0:U[1];if(((B=q==null?void 0:q.trim())==null?void 0:B.toUpperCase())==="MANUAL"){let b=(A=(x=(z=s.itemData)==null?void 0:z.filter(N=>(N==null?void 0:N.key)==="contentTableId"))==null?void 0:x[((K=(V=s.itemData)==null?void 0:V.filter(N=>(N==null?void 0:N.key)==="contentTableId"))==null?void 0:K.length)-1])==null?void 0:A.contents;we.value=(k=we.value)==null?void 0:k.map((N,m)=>{var f,j,T,ie,H,re,ue,$,Q,ne,Y;return(f=N==null?void 0:N.optionUrl)!=null&&f.menuId&&(N.type="Select",(j=N==null?void 0:N.optionUrl)!=null&&j.menuId?(N.optionUrl.menuId=b,N.optionUrl.menuFilter=n,Qe.value==="新增"&&(N.optionUrl.multiple=(H=(ie=(T=n==null?void 0:n.find(X=>{var ae;return(ae=X==null?void 0:X.content)==null?void 0:ae.includes("@Num")}))==null?void 0:T.content)==null?void 0:ie.split(":"))!=null&&H[1]&&parseInt(($=(ue=(re=n==null?void 0:n.find(X=>{var ae;return(ae=X==null?void 0:X.content)==null?void 0:ae.includes("@Num")}))==null?void 0:re.content)==null?void 0:ue.split(":"))==null?void 0:$[1])>1?!0:void 0,N.optionUrl.multipleLimit=(Y=(ne=(Q=n==null?void 0:n.find(X=>{var ae;return(ae=X==null?void 0:X.content)==null?void 0:ae.includes("@Num")}))==null?void 0:Q.content)==null?void 0:ne.split(":"))==null?void 0:Y[1])):N.optionUrl={menuId:b,menuFilter:n}),N})}}let P=(C=we.value)==null?void 0:C.filter(q=>{var b,N;return((b=q==null?void 0:q.optionUrl)==null?void 0:b.menuId)&&((N=q==null?void 0:q.optionUrl)==null?void 0:N.menuId)!==""});if((P==null?void 0:P.length)>1){let q=P==null?void 0:P.map(f=>f==null?void 0:f.prop),b=P==null?void 0:P.map(f=>f==null?void 0:f.label),N=P==null?void 0:P.map(f=>f==null?void 0:f.value),m=(y=D.cloneDeep(P))==null?void 0:y[0];m.label=b==null?void 0:b.join("·"),m.value=N==null?void 0:N.join(" "),m.value.trim()===""&&(m.value=""),m.prop=q==null?void 0:q.join("·"),m.usingType="parent",we.value.unshift(m),we.value=(W=we.value)==null?void 0:W.map(f=>(q!=null&&q.find(j=>j===(f==null?void 0:f.prop))&&(f.isFormColHidden=!0),f))}}},qr=()=>{var a;const e=(a=M.value)==null?void 0:a.$el;e&&te.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:o=>{var c;const{oldIndex:r,newIndex:n}=o;if(r===n)return;const u=Ml.value.splice(r,1)[0];Ml.value.splice(n,0,u),I.value=(c=I.value)==null?void 0:c.slice().sort((d,t)=>{if(d.label==="操作")return 1;if(t.label==="操作")return-1;const g=Ml.value.findIndex(E=>E.label===d.label),w=Ml.value.findIndex(E=>E.label===t.label);return g-w})}})};l.onMounted(()=>{ia.value=window.innerWidth-240*2});const Rr=()=>{l.nextTick(()=>{qr()})},ca=(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 u,c;if((n==null?void 0:n.id)===sl.value){let d={};for(let t in n){let g=(u=a==null?void 0:a.find(w=>(w==null?void 0:w.prop)===t))==null?void 0:u.label;g?d[t]=(c=Ke.value)==null?void 0:c[g]:d[t]=n[t]}n=Object.assign(d,Ke.value),o=n}else{let d=ca(n,a);n=d==null?void 0:d.contents,o=d==null?void 0:d.currentSelectContents}return n}),{contents:e,currentSelectContents:o}},Ta=(e,a)=>{let o,r;return e!=null&&e.find(n=>(n==null?void 0:n.id)===sl.value)?o=e==null?void 0:e.map(n=>{var u,c;if((n==null?void 0:n.id)===sl.value){let d={};for(let t in n){let g=(u=a==null?void 0:a.find(w=>(w==null?void 0:w.prop)===t))==null?void 0:u.label;g?d[t]=(c=Ke.value)==null?void 0:c[g]:d[t]=n[t]}n=Object.assign(d,Ke.value),r=n}return n}):o=e==null?void 0:e.map(n=>{var u,c,d,t;if((n==null?void 0:n.id)===sl.value){let g={};for(let w in n){let E=(u=a==null?void 0:a.find(L=>(L==null?void 0:L.prop)===w))==null?void 0:u.label;E?g[w]=(c=Ke.value)==null?void 0:c[E]:g[w]=n[w]}n=Object.assign(g,Ke.value),r=n}else n=(d=ca(n,a))==null?void 0:d.contents,r=(t=ca(n,a))==null?void 0:t.currentSelectContents;return n}),{newContents:o,currentSelectContents:r}},Na=(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(Na)),e},da=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(...da(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const n={...r};return delete n.children,n}):[]},Pl=(e=!0,a,o)=>{var g,w,E,L,v,_,U,B,z,V,K,x,A,k,C,y,W,i,P,q,b,N,m,f,j,T,ie,H,re,ue;let r=te.getColumnChild((g=D.cloneDeep(I.value))==null?void 0:g.filter($=>($==null?void 0:$.label)!=="操作")),n,u=D.cloneDeep(le.value);if(!Ke.value){ul.value=!1;return}if(sl.value===""){Tl.value++;let $;a&&o?$={id:Tl.value.toString(),[a==null?void 0:a.prop]:o,children:Ke.value.children}:$={id:Tl.value.toString()},$!=null&&$.children&&($={...$,children:(w=$.children)==null?void 0:w.map(Q=>Na(Q,a,o))}),u.push(Object.assign(Ke.value,$)),n=Object.assign(Ke.value,$)}else u=(E=Ta(u,r))==null?void 0:E.newContents,n=(L=Ta(u,r))==null?void 0:L.currentSelectContents;const c=(v=s.itemData)==null?void 0:v.filter($=>($==null?void 0:$.key)==="childTree")[0];if(((_=c==null?void 0:c.contents)==null?void 0:_.length)>0){Qe.value="编辑";const $=[];u==null||u.forEach((Q,ne)=>{var X;let Y={};if(Array.isArray(Q)){let ae=[];Q==null||Q.filter(be=>!(be!=null&&be.id)).forEach((be,Ce)=>{var ke,Je,qe,We,al,Pe,vl;if((Je=(ke=Ie.value)==null?void 0:ke[Ce])!=null&&Je.prop&&!Array.isArray(be)){let pl={};pl[Ie.value[Ce].column]=be,De!=null&&De.value&&((qe=De==null?void 0:De.value)==null?void 0:qe.length)>0&&((We=De==null?void 0:De.value)!=null&&We.find(Fe=>JSON.stringify(Fe==null?void 0:Fe[0])===JSON.stringify(pl)))&&(ae=(al=De==null?void 0:De.value)==null?void 0:al.find(Fe=>JSON.stringify(Fe==null?void 0:Fe[0])===JSON.stringify(pl))),ae&&ae.length>0?Y[Ie.value[Ce].prop]=ae!=null&&ae.find(Fe=>{var rl;return((rl=Object.keys(Fe))==null?void 0:rl[0])===Ie.value[Ce].column})?(Pe=ae==null?void 0:ae.find(Fe=>{var rl;return((rl=Object.keys(Fe))==null?void 0:rl[0])===Ie.value[Ce].column}))==null?void 0:Pe[Ie.value[Ce].column]:be:Y[Ie.value[Ce].prop]=be}else Array.isArray(be)&&((vl=Ie.value[Ce])!=null&&vl.prop?Y[Ie.value[Ce].prop]=be:Y.children=ha(be,Ie.value))})}else Y=Q;Array.isArray(Q)&&Q.some(ae=>ae==null?void 0:ae.id)?$.push(Object.assign(Y,{id:(X=Q==null?void 0:Q.find(ae=>ae.id))==null?void 0:X.id})):Y.id?$.push(Y):$.push(Object.assign(Y,{id:ne.toString()}))}),le.value=_a($,c,I.value)}wa(le.value),Zl.value=le.value;const d=wn(Zl.value,Ul.value,u);let t=[];if(wl.value?(t=(U=D.cloneDeep(wl).value.singleContent)==null?void 0:U.filter($=>($==null?void 0:$.id)!==(n==null?void 0:n.id)),t.push(n)):t=[n],el.value){const $={content:d,singleContent:((B=c==null?void 0:c.contents)==null?void 0:B.length)>0?t==null?void 0:t.flatMap(da):t,index:s==null?void 0:s.index,buttonName:"编辑",column:I.value,parentTableId:s==null?void 0:s.parentTableId};Ee.setCacheUpdatingData($)}if(e){let $=(x=(K=(V=(z=s.itemData)==null?void 0:z.find(Y=>(Y==null?void 0:Y.key)==="filterAllType"))==null?void 0:V.value)==null?void 0:K.find(Y=>(Y==null?void 0:Y.value)==="onConditionContents"))==null?void 0:x.content,Q=(A=s.itemData)==null?void 0:A.filter(Y=>(Y==null?void 0:Y.key)==="filterAllType");Q=Array.from(new Map(Q.filter(Boolean).map((Y,X)=>[Y.value,{...Y,_idx:X}])).values()).sort((Y,X)=>Y._idx-X._idx).map(({_idx:Y,...X})=>X),Q=(k=Q==null?void 0:Q[(Q==null?void 0:Q.length)-1])==null?void 0:k.value;const ne={content:d,singleContent:((C=c==null?void 0:c.contents)==null?void 0:C.length)>0?da(n):n,index:s==null?void 0:s.index,buttonName:Qe.value,column:I.value,parentTableId:s==null?void 0:s.parentTableId,filter:$,allFilter:Q,pathIndex:(W=(y=s.itemData)==null?void 0:y.find(Y=>(Y==null?void 0:Y.key)==="relatedFilter"))==null?void 0:W.index,rowContents:we.value};Ee.setTableLoading(s==null?void 0:s.index),ul.value=!1,Ke.value=void 0,ge("change",ne)}if((q=(P=(i=we.value)==null?void 0:i[0])==null?void 0:P.optionUrl)!=null&&q.menuId){ul.value=!1;let $=(b=s.itemData)==null?void 0:b.filter(Q=>(Q==null?void 0:Q.key)==="filterAllType");if(($==null?void 0:$.length)>0){let Q=$==null?void 0:$.map(X=>X==null?void 0:X.value),ne=(f=(m=(N=Q.flat().find(X=>{var ae;return(ae=X==null?void 0:X.content)==null?void 0:ae.includes("@Num")}))==null?void 0:N.content)==null?void 0:m.split(":"))==null?void 0:f[1];((ie=(T=(j=Q.flat().find(X=>{var ae;return(ae=X==null?void 0:X.content)==null?void 0:ae.includes("@Type:")}))==null?void 0:j.content)==null?void 0:T.split(":"))==null?void 0:ie[1])!=="Manual"&&(ne=parseInt(ne),le.value=(ue=le.value)==null?void 0:ue.slice(((H=le.value)==null?void 0:H.length)-ne,(re=le.value)==null?void 0:re.length))}}};l.onUnmounted(()=>{I.value=[],le.value=[],$e.value=[],oa.value=[],Ye.value=[],gl.value=[],_l.value=[],kl.value=[],we.value=[],ll.value=[],M.value=null});const Aa=async(e,a,o)=>{var g,w,E,L,v,_,U,B,z,V,K;tl.value=o==null?void 0:o.prop;const r=D.cloneDeep(s.itemData),n=r==null?void 0:r.map(x=>{var A;return(x==null?void 0:x.key)==="header"&&((A=x.contents)==null||A.map((k,C)=>{var y,W,i,P,q,b,N,m,f,j,T,ie,H,re,ue,$,Q,ne,Y;return k.type=k!=null&&k.type?k.type:(P=(i=(W=(y=k==null?void 0:k.key)==null?void 0:y.split("$"))==null?void 0:W[1])==null?void 0:i.split("("))!=null&&P[0]?(b=(q=te.FormType)==null?void 0:q.find(X=>{var ae,be,Ce,ke;return(X==null?void 0:X.key)===((ke=(Ce=(be=(ae=k==null?void 0:k.key)==null?void 0:ae.split("$"))==null?void 0:be[1])==null?void 0:Ce.split("("))==null?void 0:ke[0])}))==null?void 0:b.value:"Input",k.options=k!=null&&k.options?k.options:((f=(m=(N=k==null?void 0:k.key)==null?void 0:N.split("$"))==null?void 0:m[1])==null?void 0:f.length)>0?(H=(ie=fa((T=(j=k==null?void 0:k.key)==null?void 0:j.split("$"))==null?void 0:T[1]))==null?void 0:ie.split(","))==null?void 0:H.map(X=>({label:X,value:X})):[],(re=k==null?void 0:k.key)!=null&&re.includes("$")&&(k.key=($=(ue=k==null?void 0:k.key)==null?void 0:ue.split("$"))==null?void 0:$[0]),k.value=(Q=Object.values(a))==null?void 0:Q[C],k.optionUrl=k!=null&&k.formMenuSelect&&((ne=k==null?void 0:k.formMenuSelect)==null?void 0:ne.length)>0?{groupSelect:(Y=k==null?void 0:k.groupSelect)==null?void 0:Y.split(/[::]/).map(X=>X.trim()),menuSelect:k==null?void 0:k.formMenuSelect,selectRelateType:"",type:(k==null?void 0:k.formType)??(k!=null&&k.groupSelect?"Select":"")}:null,k})),x});let u=D.cloneDeep(we.value),c=(w=(g=D.cloneDeep(n))==null?void 0:g.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:w.contents;u=u==null?void 0:u.map(x=>{var A;return x.value=(A=c==null?void 0:c.find((k,C)=>C===(x==null?void 0:x.id)))==null?void 0:A.value,x});let d="",t=(v=(L=(E=D.cloneDeep(n))==null?void 0:E.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:L.contents)==null?void 0:v.find((x,A)=>{var k,C,y;return(x==null?void 0:x.label)===tl.value||(A==null?void 0:A.toString())===((y=(C=(k=tl.value)==null?void 0:k.split("a"))==null?void 0:C[1])==null?void 0:y.toString())});if((B=(U=(_=D.cloneDeep(n))==null?void 0:_.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:U.contents)==null||B.forEach(x=>{var A,k,C,y,W;d===""&&((C=(k=(A=x==null?void 0:x.optionUrl)==null?void 0:A.groupSelect)==null?void 0:k[1])!=null&&C.includes("["))&&(d=(W=(y=x==null?void 0:x.optionUrl)==null?void 0:y.groupSelect)==null?void 0:W[1])}),(z=t==null?void 0:t.optionUrl)!=null&&z.menuSelect){let x=await ga(t),A;if(x==null||x.forEach(k=>{var C,y,W,i,P,q,b,N,m,f;d===((y=(C=t==null?void 0:t.optionUrl)==null?void 0:C.groupSelect)==null?void 0:y[1])&&((P=(i=(W=t==null?void 0:t.optionUrl)==null?void 0:W.groupSelect)==null?void 0:i[1])!=null&&P.includes("["))&&((f=D.cloneDeep(k))==null?void 0:f[(m=(N=(b=(q=t==null?void 0:t.optionUrl)==null?void 0:q.groupSelect)==null?void 0:b[1])==null?void 0:N.replaceAll("[",""))==null?void 0:m.replaceAll("]","")])===(t==null?void 0:t.value)&&(A=k)}),A){let k=D.cloneDeep(u);k=k==null?void 0:k.map(y=>{var W,i,P,q,b,N,m,f,j,T,ie;return(A!=null&&A[y==null?void 0:y.label]||A!=null&&A[(q=(P=(i=(W=y==null?void 0:y.optionUrl)==null?void 0:W.groupSelect)==null?void 0:i[1])==null?void 0:P.replaceAll("[",""))==null?void 0:q.replaceAll("]","")])&&((m=(N=(b=y==null?void 0:y.optionUrl)==null?void 0:b.groupSelect)==null?void 0:N[1])!=null&&m.includes("["))&&(y.value=(A==null?void 0:A[y==null?void 0:y.label])||(A==null?void 0:A[(ie=(T=(j=(f=y==null?void 0:y.optionUrl)==null?void 0:f.groupSelect)==null?void 0:j[1])==null?void 0:T.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])),y}),le.value=(V=D.cloneDeep(le.value))==null?void 0:V.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const W={};return k==null||k.forEach(i=>{W[i.name]=i.value}),W.id=y==null?void 0:y.id,W}return y});let C=D.cloneDeep(k);C=C==null?void 0:C.map(y=>{var W,i,P,q;return(i=(W=y==null?void 0:y.optionUrl)==null?void 0:W.menuSelect)!=null&&i.some(b=>b==null?void 0:b.includes)&&(y.optionUrl.menuSelect=(q=(P=y==null?void 0:y.optionUrl)==null?void 0:P.menuSelect)==null?void 0:q.map(b=>{var N,m,f,j;if(b!=null&&b.includes("[")){let T=(m=(N=b==null?void 0:b.replaceAll("[","").replaceAll("]",""))==null?void 0:N.split(":"))==null?void 0:m[1];b=(j=(f=D.cloneDeep(k))==null?void 0:f.find(ie=>(ie==null?void 0:ie.label)===T))==null?void 0:j.value}return b})),y}),le.value=(K=D.cloneDeep(le.value))==null?void 0:K.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const W={};return C==null||C.forEach(i=>{W[i.name]=i.value}),W.id=y==null?void 0:y.id,W}return y})}}},Jr=async e=>{var E,L,v,_,U,B,z,V,K,x,A,k,C,y,W,i,P,q;if(!e)return;Ke.value=e;const a=D.cloneDeep(s.itemData);let o=a==null?void 0:a.map(b=>{var N;return(b==null?void 0:b.key)==="header"&&((N=b.contents)==null||N.map((m,f)=>{var j,T,ie,H,re,ue,$,Q,ne,Y,X,ae,be,Ce,ke,Je,qe,We,al;return m.type=m!=null&&m.type?m.type:(H=(ie=(T=(j=m==null?void 0:m.key)==null?void 0:j.split("$"))==null?void 0:T[1])==null?void 0:ie.split("("))!=null&&H[0]?(ue=(re=te.FormType)==null?void 0:re.find(Pe=>{var vl,pl,Fe,rl;return(Pe==null?void 0:Pe.key)===((rl=(Fe=(pl=(vl=m==null?void 0:m.key)==null?void 0:vl.split("$"))==null?void 0:pl[1])==null?void 0:Fe.split("("))==null?void 0:rl[0])}))==null?void 0:ue.value:"Input",m.options=m!=null&&m.options?m.options:((ne=(Q=($=m==null?void 0:m.key)==null?void 0:$.split("$"))==null?void 0:Q[1])==null?void 0:ne.length)>0?(be=(ae=fa((X=(Y=m==null?void 0:m.key)==null?void 0:Y.split("$"))==null?void 0:X[1]))==null?void 0:ae.split(","))==null?void 0:be.map(Pe=>({label:Pe,value:Pe})):[],(Ce=m==null?void 0:m.key)!=null&&Ce.includes("$")&&(m.key=(Je=(ke=m==null?void 0:m.key)==null?void 0:ke.split("$"))==null?void 0:Je[0]),m.value=(qe=Object.values(e))==null?void 0:qe[f],m.optionUrl=m!=null&&m.formMenuSelect&&((We=m==null?void 0:m.formMenuSelect)==null?void 0:We.length)>0?{groupSelect:(al=m==null?void 0:m.groupSelect)==null?void 0:al.split(/[::]/).map(Pe=>Pe.trim()),menuSelect:m==null?void 0:m.formMenuSelect,selectRelateType:"",type:(m==null?void 0:m.formType)??(m!=null&&m.groupSelect?"Select":"")}:null,m})),b}),r=we.value,n=(L=(E=D.cloneDeep(o))==null?void 0:E.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:L.contents;if(n=n==null?void 0:n.filter(b=>(b==null?void 0:b.label)!=="操作"),n.push({label:"操作",type:"operate"}),r=r==null?void 0:r.map(b=>{var N;return b.value=b.value??((N=n==null?void 0:n.find((m,f)=>(m==null?void 0:m.prop)===(b==null?void 0:b.name)))==null?void 0:N.value),b}),!Ol.value)return;let u="";(v=tl.value)!=null&&v.includes("·")&&(tl.value=(U=(_=tl.value)==null?void 0:_.split("·"))==null?void 0:U[0]);let c=(V=(z=(B=D.cloneDeep(o))==null?void 0:B.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:z.contents)==null?void 0:V.find((b,N)=>{var m,f,j;return(b==null?void 0:b.label)===tl.value||(N==null?void 0:N.toString())===((j=(f=(m=tl.value)==null?void 0:m.split("a"))==null?void 0:f[1])==null?void 0:j.toString())}),d=(K=c==null?void 0:c.optionUrl)==null?void 0:K.menuSelect,t=!0;(k=(A=(x=D.cloneDeep(o))==null?void 0:x.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:A.contents)==null||k.forEach(b=>{var N,m,f,j,T,ie;t&&((f=(m=(N=b==null?void 0:b.optionUrl)==null?void 0:N.groupSelect)==null?void 0:m[1])!=null&&f.includes("["))&&(u=(T=(j=b==null?void 0:b.optionUrl)==null?void 0:j.groupSelect)==null?void 0:T[1],JSON.stringify(d)===JSON.stringify((ie=b==null?void 0:b.optionUrl)==null?void 0:ie.menuSelect)&&(t=!1))});let g=D.cloneDeep(r);g=g==null?void 0:g.map(b=>{var N,m;return(b==null?void 0:b.type)==="Select"&&((m=(N=b==null?void 0:b.optionUrl)==null?void 0:N.allSelectionContents)==null?void 0:m.length)>0&&(b.optionUrl.contactValue=e),b.value=e==null?void 0:e[b==null?void 0:b.prop],b}),we.value=D.cloneDeep(g);let w=(W=(y=(C=we.value)==null?void 0:C.find(b=>{var N;return(N=b==null?void 0:b.optionUrl)==null?void 0:N.menuId}))==null?void 0:y.optionUrl)==null?void 0:W.menuId;if((i=c==null?void 0:c.optionUrl)!=null&&i.menuSelect&&Ol.value||w){let b=await ga(c,w),N;if((P=c==null?void 0:c.optionUrl)==null||P.menuSelect,b==null||b.forEach(m=>{var f,j,T,ie,H,re,ue,$,Q,ne,Y,X,ae,be,Ce;if(u===((j=(f=c==null?void 0:c.optionUrl)==null?void 0:f.groupSelect)==null?void 0:j[1])&&((H=(ie=(T=c==null?void 0:c.optionUrl)==null?void 0:T.groupSelect)==null?void 0:ie[1])!=null&&H.includes("["))&&((ne=D.cloneDeep(m))==null?void 0:ne[(Q=($=(ue=(re=c==null?void 0:c.optionUrl)==null?void 0:re.groupSelect)==null?void 0:ue[1])==null?void 0:$.replaceAll("[",""))==null?void 0:Q.replaceAll("]","")])===(c==null?void 0:c.value)&&(N=m),w){let ke=(X=(Y=we.value)==null?void 0:Y.find(qe=>{var We;return(We=qe==null?void 0:qe.optionUrl)==null?void 0:We.menuId}))==null?void 0:X.prop,Je=e[ke];ke!=null&&ke.includes("·")&&(Je=(be=(ae=e[ke])==null?void 0:ae.split(" "))==null?void 0:be[0],ke=(Ce=ke==null?void 0:ke.split("·"))==null?void 0:Ce[0]),m[ke]===Je&&(N=m)}}),N){let m=D.cloneDeep(r);m=m==null?void 0:m.map(T=>{var ie,H,re,ue,$,Q,ne,Y,X,ae,be,Ce,ke,Je,qe,We,al;return(N!=null&&N[T==null?void 0:T.prop]||N!=null&&N[(ue=(re=(H=(ie=T==null?void 0:T.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:H[1])==null?void 0:re.replaceAll("[",""))==null?void 0:ue.replaceAll("]","")])&&((ne=(Q=($=T==null?void 0:T.optionUrl)==null?void 0:$.groupSelect)==null?void 0:Q[1])!=null&&ne.includes("["))&&(T!=null&&T.relatedValueId)&&(T.value=(N==null?void 0:N[T==null?void 0:T.prop])||(N==null?void 0:N[(be=(ae=(X=(Y=T==null?void 0:T.optionUrl)==null?void 0:Y.groupSelect)==null?void 0:X[1])==null?void 0:ae.replaceAll("[",""))==null?void 0:be.replaceAll("]","")])),w&&(N!=null&&N[T==null?void 0:T.prop])&&(T!=null&&T.relatedValueId)&&Qe.value==="新增"?T.value=(N==null?void 0:N[T==null?void 0:T.prop])||(N==null?void 0:N[(qe=(Je=(ke=(Ce=T==null?void 0:T.optionUrl)==null?void 0:Ce.groupSelect)==null?void 0:ke[1])==null?void 0:Je.replaceAll("[",""))==null?void 0:qe.replaceAll("]","")]):T.value=(al=(We=we.value)==null?void 0:We.find(Pe=>(Pe==null?void 0:Pe.prop)===(T==null?void 0:T.prop)))==null?void 0:al.value,T}),we.value=D.cloneDeep(m);let f=D.cloneDeep(m);f=f==null?void 0:f.map(T=>{var ie,H,re,ue,$,Q;return(H=(ie=T==null?void 0:T.optionUrl)==null?void 0:ie.menuSelect)!=null&&H.some(ne=>ne==null?void 0:ne.includes("["))&&(T.optionUrl.oldMenuSelect=(ue=(re=D.cloneDeep(T))==null?void 0:re.optionUrl)==null?void 0:ue.menuSelect,T.optionUrl.menuSelect=(Q=($=T==null?void 0:T.optionUrl)==null?void 0:$.menuSelect)==null?void 0:Q.map(ne=>{var Y,X,ae,be;if(ne!=null&&ne.includes("[")){let Ce=(X=(Y=ne==null?void 0:ne.replaceAll("[","").replaceAll("]",""))==null?void 0:Y.split(":"))==null?void 0:X[1];ne=(be=(ae=D.cloneDeep(m))==null?void 0:ae.find(ke=>(ke==null?void 0:ke.label)===Ce))==null?void 0:be.value}return ne})),T}),we.value=f;let j={};(q=we.value)==null||q.forEach(T=>{j[T.prop]=T==null?void 0:T.value}),Ke.value=j}}Ol.value=!1},Wr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",Gr=e=>{var u,c;const a=(c=(u=Ye.value)==null?void 0:u.find(d=>(d==null?void 0:d.label)===(e==null?void 0:e.label)))==null?void 0:c.multiple,o=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;le.value.forEach(d=>{const t=d==null?void 0:d[o];a&&Ra.isString(t)&&(d[o]=[t]),!a&&!Ra.isString(t)&&(d[o]="")})},Ea=(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=>Ea(r,a))),e},pa=e=>{var o,r,n,u,c,d;Ll("");const a=(o=we.value)==null?void 0:o.reduce((t,g)=>(t[g.name]=g.value,t),{});if(((r=Object.keys(a))==null?void 0:r.length)>0){Ke.value=a,sl.value="",Tl.value=(n=le.value)==null?void 0:n.length,kl.value=(u=yl.value)==null?void 0:u.filter(g=>(g==null?void 0:g.label)!=="新增");const t=(d=(c=$e.value)==null?void 0:c.filter(g=>(g==null?void 0:g.label)!=="操作"))==null?void 0:d.map(g=>{var E,L,v;const w=(L=(E=Ye.value)==null?void 0:E.find(_=>(_==null?void 0:_.label)===(g==null?void 0:g.label)))==null?void 0:L.multiple;return Gr(g),{...g,contents:(g==null?void 0:g.options)??[],optionUrl:g!=null&&g.formMenuSelect&&((v=g==null?void 0:g.formMenuSelect)==null?void 0:v.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:w}:null}});I.value=t==null?void 0:t.map(g=>Ea(g,[{prop:"type",value:"edit"},{prop:"columnType",value:Wr(g==null?void 0:g.formType)||(g==null?void 0:g.columnType)}])),e==="createClick"&&Pl(!1)}},Al={START:"开始时间",END:"结束时间",HOURS:"工时"},Hr=(e,a)=>Number(te.dayjs(a).diff(te.dayjs(e),"day",!0).toFixed(1)),wa=e=>{var u;const a=s.itemData,o=(u=a==null?void 0:a.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:u.contents,r=new Map;return o==null||o.forEach((c,d)=>{const{label:t}=c;r.set(t,d)}),!r.has(Al.START)||!r.has(Al.END)||!r.has(Al.HOURS)?e:e==null?void 0:e.map(c=>{const d=c==null?void 0:c[Al.START],t=c==null?void 0:c[Al.END],g=Hr(d,t);return d&&t&&(c[Al.HOURS]=`${g}天`),c})},Ba=(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 c of e){const d=c[r];n.has(d)||n.set(d,[]),n.get(d)&&n.get(d).push(c)}const u=[];for(const[c,d]of n){const[t,...g]=d,w={...t};o+1===((a==null?void 0:a.length)??"")?w.children=d==null?void 0:d.map(E=>(E.level=D.cloneDeep(o)+1,E)).filter((E,L)=>L!==0):g.length>0&&(w.children=Ba(g,a,o+1)),w.level=o,u.push(w)}return u},_a=(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=Ba(e,a==null?void 0:a.contents,0),r},Ua=(e,a)=>{var v,_,U,B,z,V,K,x,A,k,C,y,W,i,P,q,b,N,m,f,j,T,ie,H,re,ue,$,Q,ne,Y,X,ae,be,Ce,ke,Je,qe,We,al,Pe,vl,pl,Fe,rl,ja,La,Pa,$a,Fa,Ka,Va,za;const o=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="header");e==null||e.filter(p=>(p==null?void 0:p.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="childTree")[0];let n=!0;if((U=(_=(v=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="filterAllType"))==null?void 0:v.value)==null?void 0:_.find(p=>(p==null?void 0:p.value)==="onPamButtonContents"))!=null&&U.content){let p=(V=(z=(B=e==null?void 0:e.find(Z=>(Z==null?void 0:Z.key)==="filterAllType"))==null?void 0:B.value)==null?void 0:z.find(Z=>(Z==null?void 0:Z.value)==="onPamButtonContents"))==null?void 0:V.content;p=(K=p==null?void 0:p.split(":"))==null?void 0:K[1],p=(x=p.slice(1,(p==null?void 0:p.length)-1))==null?void 0:x.split(","),n=!!(p!=null&&p.find(Z=>Z==="操作"))}let u=a;const c=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="page"),d=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="rowButton"),t=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="extraButton"),g=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableContents"),w=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableIndex");Ye.value=(k=(A=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableToForm"))==null?void 0:A[0])==null?void 0:k.contents,ya.value=(c==null?void 0:c.contents)??!0;let E=[];ml.value===""?E=o==null?void 0:o[0]:E=(o==null?void 0:o.find(p=>(p==null?void 0:p.selectLabel)==="("+ml.value+")"))??(o==null?void 0:o.find(p=>!(p!=null&&p.selectLabel)));let L=[];if(ml.value===""?L=w==null?void 0:w[0]:L=(w==null?void 0:w.find(p=>(p==null?void 0:p.selectLabel)==="("+ml.value+")"))??(w==null?void 0:w.find(p=>!(p!=null&&p.selectLabel))),((C=E==null?void 0:E.contents)==null?void 0:C.length)>0){let p=[];if(E!=null&&E.contents.some(R=>Array.isArray(R)&&(R==null?void 0:R.find(h=>h.children))))Ul.value===""?p=(W=(y=te.getGradeColumns(E==null?void 0:E.contents,n))==null?void 0:y[0])==null?void 0:W.filter(R=>!Array.isArray(R)):(Ul.value.split("-"),p=(i=te.getGradeColumns(E==null?void 0:E.contents,n))==null?void 0:i[0]);else{let R=E!=null&&E.contents.some(h=>Array.isArray(h))?(P=E==null?void 0:E.contents)==null?void 0:P[0]:E==null?void 0:E.contents;R==null||R.forEach((h,Re)=>{var Ge,Ze,Fl,Kl,Vl;let ze="";(Ze=(Ge=xe.value)==null?void 0:Ge.split("/"))==null||Ze.forEach(nl=>{var zl,ql,El;if(nl!==""){let He=(El=(ql=(zl=nl==null?void 0:nl.split(Le+"updateLoading"))==null?void 0:zl[0])==null?void 0:ql.split(Le+"loading"))==null?void 0:El[0];ze=ze===""?ze+He:ze+"/"+He}}),ze=ze+Le+(h==null?void 0:h.directiveLabel);const je=(Fl=Ye.value)==null?void 0:Fl.find(nl=>(nl==null?void 0:nl.prop)===(h==null?void 0:h.prop));p.push({label:(h==null?void 0:h.label)==="操作"?n?"操作":"":(h==null?void 0:h.label)??"",prop:(h==null?void 0:h.label)==="操作"?"operate":(h==null?void 0:h.prop)??"a"+Re,width:h!=null&&h.width?parseInt(h.width):"",fixed:(h==null?void 0:h.fixed)??void 0,sortable:(h==null?void 0:h.sortable)??!1,filterable:(h==null?void 0:h.filterable)??!1,operable:(h==null?void 0:h.operable)??!1,showSummary:(h==null?void 0:h.showSummary)??!1,align:(h==null?void 0:h.align)??"left",showOverflowTooltip:(h==null?void 0:h.showOverflowTooltip)??!0,isNotDrag:(h==null?void 0:h.isNotDrag)??!1,isEditCol:(h==null?void 0:h.isEditCol)??!1,isOperate:(h==null?void 0:h.isOperate)??!1,id:(h==null?void 0:h.id)??Re,type:(h==null?void 0:h.label)==="操作"?"operate":void 0,formType:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":""),isTableColHidden:h==null?void 0:h.isTableColHidden,isFormColHidden:h==null?void 0:h.isFormColHidden,disabled:h==null?void 0:h.disabled,options:(h==null?void 0:h.options)??[],value:(h==null?void 0:h.value)??"",formMenuSelect:(h==null?void 0:h.formMenuSelect)??[],isRoute:(h==null?void 0:h.isRoute)??!1,groupSelect:h!=null&&h.groupSelect?(Kl=h==null?void 0:h.groupSelect)==null?void 0:Kl.replaceAll('"',"").split(":"):[],isMainKey:(h==null?void 0:h.isMainKey)||(h==null?void 0:h.directiveLabel)==="#isMain",columnType:(je==null?void 0:je.type)||(h==null?void 0:h.columnType)||"TEXTAREA",directiveLabel:h==null?void 0:h.directiveLabel,directiveColor:(h==null?void 0:h.directiveColor)??!1,isExistChild:!!(h!=null&&h.directiveLabel&&!(u!=null&&u[ze])&&!((Vl=h==null?void 0:h.directiveLabel)!=null&&Vl.includes("@"))&&(h==null?void 0:h.directiveLabel)!=="#isMain"),childPath:(h==null?void 0:h.directiveLabel)!=="#isMain"?ze:void 0,allSelectionContents:(h==null?void 0:h.allSelectionContents)??[],selectFilter:h==null?void 0:h.selectFilter,menuId:h==null?void 0:h.menuId,filterContent:h==null?void 0:h.filterContent,relatedValueId:h==null?void 0:h.relatedValueId})})}I.value=te.getNewColumnChild(p),oa.value=te.getNewColumnChild(p),ee.value=(q=I.value)==null?void 0:q.map(R=>R==null?void 0:R.label),he.value=(b=I.value)==null?void 0:b.every(R=>R==null?void 0:R.filterable),me.value=(N=I.value)==null?void 0:N.every(R=>R==null?void 0:R.operable),hl.value=(m=I.value)==null?void 0:m.every(R=>R==null?void 0:R.sortable);let Z=(j=(f=te.getAllLeafNodes(I.value))==null?void 0:f.filter(R=>(R==null?void 0:R.type)!=="operate"))==null?void 0:j.map((R,h)=>({prop:(R==null?void 0:R.prop)??"a"+h,column:R.label}));Ie.value=Z;let _e=[];ml.value===""?_e=g==null?void 0:g[0]:_e=(g==null?void 0:g.find(R=>(R==null?void 0:R.selectLabel)==="("+ml.value+")"))??(g==null?void 0:g.find(R=>!(R!=null&&R.selectLabel)));let xl=Array.isArray((T=_e==null?void 0:_e.contents)==null?void 0:T[0])&&((ie=_e==null?void 0:_e.contents)!=null&&ie[0].every(R=>Array.isArray(R)))?(H=_e==null?void 0:_e.contents)==null?void 0:H[0]:_e==null?void 0:_e.contents;L!=null&&L.contents&&((re=L==null?void 0:L.contents)==null?void 0:re.length)!==0&&(xl=(ue=D.cloneDeep(xl))==null?void 0:ue.map((R,h)=>{if(!Array.isArray(R)){let Re={};for(let ze in R)ze!=="id"&&ze!=="index"&&(Re[ze]=R[ze]);R=Object.values(Re)}return R}));const en=!!(($=I.value)!=null&&$.find(R=>R.prop==="index"));xl=Ga(xl,L==null?void 0:L.contents,en);const $l=[];xl==null||xl.forEach((R,h)=>{var ze;let Re={};if(Array.isArray(R)){let je=[];R==null||R.filter(Ge=>!(Ge!=null&&Ge.id)).forEach((Ge,Ze)=>{var Fl,Kl,Vl,nl,zl,ql;if((Fl=Z==null?void 0:Z[Ze])!=null&&Fl.prop&&!Array.isArray(Ge)){let El={};El[Z[Ze].column]=Ge,De!=null&&De.value&&((Kl=De==null?void 0:De.value)==null?void 0:Kl.length)>0&&((Vl=De==null?void 0:De.value)!=null&&Vl.find(He=>JSON.stringify(He==null?void 0:He[0])===JSON.stringify(El)))&&(je=(nl=De==null?void 0:De.value)==null?void 0:nl.find(He=>JSON.stringify(He==null?void 0:He[0])===JSON.stringify(El))),je&&je.length>0?Re[Z[Ze].prop]=je!=null&&je.find(He=>{var Rl;return((Rl=Object.keys(He))==null?void 0:Rl[0])===Z[Ze].column})?(zl=je==null?void 0:je.find(He=>{var Rl;return((Rl=Object.keys(He))==null?void 0:Rl[0])===Z[Ze].column}))==null?void 0:zl[Z[Ze].column]:Ge:Re[Z[Ze].prop]=Ge}else Array.isArray(Ge)&&((ql=Z[Ze])!=null&&ql.prop?Re[Z[Ze].prop]=Ge:Re.children=ha(Ge,Z))})}else Re=R;Array.isArray(R)&&R.some(je=>je==null?void 0:je.id)?$l.push(Object.assign(Re,{id:(ze=R==null?void 0:R.find(je=>je.id))==null?void 0:ze.id})):Re.id?$l.push(Re):$l.push(Object.assign(Re,{id:h.toString()}))}),le.value=_a($l,r,I.value),Gl.value=$l,(Q=Gl.value)==null||Q.forEach(R=>{var h;(h=Hl.value)==null||h.set(R.id,R)})}else I.value=[],$e.value=[],le.value=[],Gl.value=[],Hl.value=new Map;if(((ne=d==null?void 0:d.contents)==null?void 0:ne.length)>0)if((ae=(X=(Y=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="filterAllType"))==null?void 0:Y.value)==null?void 0:X.find(p=>(p==null?void 0:p.value)==="onRowButtonContents"))!=null&&ae.content){let p=(ke=(Ce=(be=e==null?void 0:e.find(Z=>(Z==null?void 0:Z.key)==="filterAllType"))==null?void 0:be.value)==null?void 0:Ce.find(Z=>(Z==null?void 0:Z.value)==="onButtonContents"))==null?void 0:ke.content;p=(Je=p==null?void 0:p.split(":"))==null?void 0:Je[1],p=(qe=p.slice(1,(p==null?void 0:p.length)-1))==null?void 0:qe.split(","),gl.value=(We=d==null?void 0:d.contents)==null?void 0:We.filter(Z=>p==null?void 0:p.find(_e=>_e===(Z==null?void 0:Z.label)))}else gl.value=d==null?void 0:d.contents;else gl.value=[];if(((al=t==null?void 0:t.contents)==null?void 0:al.length)>0)if((pl=(vl=(Pe=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="filterAllType"))==null?void 0:Pe.value)==null?void 0:vl.find(p=>(p==null?void 0:p.value)==="onButtonContents"))!=null&&pl.content){let p=(ja=(rl=(Fe=e==null?void 0:e.find(Z=>(Z==null?void 0:Z.key)==="filterAllType"))==null?void 0:Fe.value)==null?void 0:rl.find(Z=>(Z==null?void 0:Z.value)==="onButtonContents"))==null?void 0:ja.content;p=(La=p==null?void 0:p.split(":"))==null?void 0:La[1],p=(Pa=p.slice(1,(p==null?void 0:p.length)-1))==null?void 0:Pa.split(","),kl.value=($a=t==null?void 0:t.contents)==null?void 0:$a.filter(Z=>p==null?void 0:p.find(_e=>_e===(Z==null?void 0:Z.label))),yl.value=(Fa=t==null?void 0:t.contents)==null?void 0:Fa.filter(Z=>p==null?void 0:p.find(_e=>_e===(Z==null?void 0:Z.label))),ve.value=!!(p!=null&&p.find(Z=>Z==="搜索")),Ae.value=!!(p!=null&&p.find(Z=>Z==="块状显示"))}else kl.value=t==null?void 0:t.contents,yl.value=t==null?void 0:t.contents;else kl.value=[],yl.value=[];Tl.value=((Ka=le==null?void 0:le.value)==null?void 0:Ka.length)??0,wa(le.value),Zl.value=le.value,el.value&&(I.value=(za=(Va=$e.value)==null?void 0:Va.filter(p=>(p==null?void 0:p.label)!=="操作"))==null?void 0:za.map(p=>{var Z;return{...p,type:"edit",optionUrl:p!=null&&p.formMenuSelect&&((Z=p==null?void 0:p.formMenuSelect)==null?void 0:Z.length)>0?{groupSelect:p==null?void 0:p.groupSelect,menuSelect:p==null?void 0:p.formMenuSelect,selectRelateType:"",type:p==null?void 0:p.formType}:null}}),pa())};l.watch(()=>[s.itemData,ml.value,ar.value,Ul.value,De==null?void 0:De.value],async()=>{var e,a,o,r,n,u;if((e=s==null?void 0:s.itemData)!=null&&e.find(c=>(c==null?void 0:c.key)==="columnPath")&&!((a=Bl.value)!=null&&a.find(c=>{var d,t;return(c==null?void 0:c.key)===((t=(d=s==null?void 0:s.itemData)==null?void 0:d.find(g=>(g==null?void 0:g.key)==="columnPath"))==null?void 0:t.contents)}))){let c=Bl.value,d={key:(r=(o=s==null?void 0:s.itemData)==null?void 0:o.find(t=>(t==null?void 0:t.key)==="columnPath"))==null?void 0:r.contents,value:(u=(n=s==null?void 0:s.itemData)==null?void 0:n.find(t=>(t==null?void 0:t.key)==="columnUsingPath"))==null?void 0:u.contents};c!=null&&c.find(t=>(t==null?void 0:t.key)===(d==null?void 0:d.key))?c=c==null?void 0:c.map(t=>((t==null?void 0:t.key)===(d==null?void 0:d.key)&&(t.value=d.value),t)):c.push(d),Ee.setTableViewContents(c)}Ua(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(Ll(e==null?void 0:e.form),Qe.value=e==null?void 0:e.dialogTitle,Yl.value=!0,ul.value=!0)},{immediate:!0,deep:!0});const Oa=()=>{var e;(e=Te.value)!=null&&e.includes("read")&&(el.value=!el.value)},Qr=()=>{Il.value=!Il.value};l.watch(()=>{var e;return(e=s==null?void 0:s.config)==null?void 0:e.viewport},e=>{var a;Te.value=e,(e==null?void 0:e.length)===0?el.value=!1:(e!=null&&e.includes("read")||(el.value=!0),e!=null&&e.includes("edit")||(el.value=!1)),ye.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||el.value},{immediate:!0}),l.watch(()=>el.value,e=>{var a;e?(pa("viewChange"),Ee.setCacheUpdatingData(null)):(kl.value=yl.value,I.value=oa.value,wl.value&&(Ee.setTableLoading(s==null?void 0:s.index),ge("change",wl.value))),se.value=e,ye.value=e||((a=s==null?void 0:s.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(()=>s==null?void 0:s.compNames,e=>{Be.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:e||[],width:1}]},{immediate:!0}),l.ref(!1);const Xr=(e,a)=>{var o;pa("createClick"),a===pe.pageSize&&(pe.currentPage=Math.ceil(((o=le.value)==null?void 0:o.length)/pe.pageSize))},Yr=(e,a,o)=>{var r;Aa(o,e,a),Ke.value=D.cloneDeep(e),sl.value=e==null?void 0:e.id,Tl.value=(r=le.value)==null?void 0:r.length,Qe.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",Pl(!1)},Ve=e=>{var t,g,w,E,L,v,_,U,B,z;const{row:a,column:o,item:r,slotData:n}=e;let u=a!=null&&a[o==null?void 0:o.prop]||(a==null?void 0:a[o==null?void 0:o.prop])===0?((g=(t=a==null?void 0:a[o==null?void 0:o.prop])==null?void 0:t[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]):((E=(w=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:w[0])==null?void 0:E.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((v=(L=n==null?void 0:n[r==null?void 0:r.prop])==null?void 0:L[0])==null?void 0:v.contents)??(n==null?void 0:n[r==null?void 0:r.prop])??((B=(U=a==null?void 0:a[(_=r==null?void 0:r.child)==null?void 0:_.prop])==null?void 0:U[0])==null?void 0:B.contents)??(a==null?void 0:a[(z=r==null?void 0:r.child)==null?void 0:z.prop]),d=Array.isArray(u)&&!(u!=null&&u.every(V=>typeof V=="string"||typeof V=="number"))?"查看":u;return d=Array.isArray(d)?d.join(","):d,d},Zr=e=>{var g,w,E,L,v,_,U,B,z,V;const{row:a,column:o,item:r,slotData:n}=e;let u=a!=null&&a[o==null?void 0:o.prop]?((w=(g=a==null?void 0:a[o==null?void 0:o.prop])==null?void 0:g[0])==null?void 0:w.contents)??(a==null?void 0:a[o==null?void 0:o.prop]):((L=(E=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:E[0])==null?void 0:L.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((_=(v=n==null?void 0:n[r==null?void 0:r.prop])==null?void 0:v[0])==null?void 0:_.contents)??(n==null?void 0:n[r==null?void 0:r.prop])??((z=(B=a==null?void 0:a[(U=r==null?void 0:r.child)==null?void 0:U.prop])==null?void 0:B[0])==null?void 0:z.contents)??(a==null?void 0:a[(V=r==null?void 0:r.child)==null?void 0:V.prop]);const d=Array.isArray(u)&&!(u!=null&&u.every(K=>typeof K=="string"||typeof K=="number")),t=Array.isArray(u)&&(u==null?void 0:u.find(K=>K==null?void 0:K.url));return d&&t},Ir=(e,a)=>e.find(o=>Object.values(o).some(r=>r===a));return l.watch(()=>Ya.value,async e=>{if(e){Me.setContentLoading(!0),await l.nextTick();const a=Ir(le.value,e==null?void 0:e.data);if(!a)return Me.setContentLoading(!1);await Sa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),Me.setContentLoading(!1)}},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.cacheNewData,e=>{var a;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(s==null?void 0:s.index)&&(le.value=(a=le.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,w,E,L;const o=l.resolveComponent("svg-icon"),r=l.resolveComponent("el-popover"),n=l.resolveComponent("el-switch"),u=l.resolveComponent("el-checkbox"),c=l.resolveComponent("el-checkbox-group"),d=l.resolveComponent("el-button"),t=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",_n,[va.value?(l.openBlock(),l.createBlock(ol.ssTable,{id:"excel-table",pageObj:pe,showIndex:ye.value,isTree:(g=F.compItem)==null?void 0:g.isTree,summaryInfo:ce,columns:I.value,defaultSort:de,isCardViewport:Il.value,checkedColumns:ee.value,key:sa.value+JSON.stringify(I.value),tableData:ba.value,isEditViewport:el.value,isShowPagination:ya.value,isShowEdit:!1,isShowDelete:!1,allowSelect:se.value,onDbClickRow:Ar,extraButton:kl.value,rowButton:gl.value,cacheExtraButtons:yl.value,isClearSelection:((w=ll.value)==null?void 0:w.length)===0,onDoCurrentChange:ur,onDoSizeChange:tr,onContentClick:Sa,onRowClick:wr,onSelectChange:yr,onCellChange:Yr,onChange:Aa,onPreview:ka,onSubmitEditingTable:gr,onHandleColEditChange:fr,onHandleColTypeChange:hr,onClickButton:aa},l.createSlots({headerButton:l.withCtx(v=>{var _,U;return[F.showHeader?(l.openBlock(),l.createBlock(kn,{key:0,pageLayout:F.pageLayout,lockingPage:l.unref(Wl)===l.unref(xe),filterValues:ma.value,selectNums:(_=ll.value)==null?void 0:_.length,dataNums:(U=le.value)==null?void 0:U.length,compName:F.compName,isDevMode:F.isDevMode,buttons:v.buttons,onButtonClick:a[1]||(a[1]=B=>aa(B,"",{})),columns:I.value,onFilter:Nr,onGetImportData:dr,level:F.level,filterShow:ve.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level","filterShow"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var v,_,U,B;return[((v=le.value)==null?void 0:v.length)>0&&F.allowOperate&&Ae.value?(l.openBlock(),l.createElementBlock("div",Mn,[(_=Te.value)!=null&&_.includes("read")&&((U=Te.value)!=null&&U.includes("edit"))&&((B=gl.value)!=null&&B.some(z=>(z==null?void 0:z.label)==="编辑"))&&!Il.value&&l.unref(Wl)!==l.unref(xe)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:Oa},[l.createVNode(o,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:Qr},[l.createVNode(o,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:v,index:_})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:U=>Xr(v,_)},[l.createVNode(o,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,jn)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Rr},{reference:l.withCtx(()=>[l.createElementVNode("span",Ln,[l.createVNode(o,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",Pn,[a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(n,{"model-value":hl.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=v=>ua(v,"sortable"))},null,8,["model-value"]),l.createVNode(n,{"model-value":he.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[4]||(a[4]=v=>ua(v,"filterable"))},null,8,["model-value"]),l.createVNode(n,{"model-value":me.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[5]||(a[5]=v=>ua(v,"operable"))},null,8,["model-value"]),a[13]||(a[13]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(c,{modelValue:ee.value,"onUpdate:modelValue":a[6]||(a[6]=v=>ee.value=v),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:M},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ml.value,v=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:v.label},[l.createVNode(u,{value:v.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:v.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(v.label),9,$n)]),_: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 _;return[l.createElementVNode("div",Fn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((_=Object.keys(v))==null?void 0:_.filter(U=>{var B;return(B=Xe.value)==null?void 0:B.find(z=>(z==null?void 0:z.value)===U)}),U=>{var B,z;return l.openBlock(),l.createElementBlock("div",{key:U},[l.createVNode(n,{"model-value":v==null?void 0:v[U],"active-text":(z=(B=Xe.value)==null?void 0:B.find(V=>(V==null?void 0:V.value)===U))==null?void 0:z.label,onChange:V=>kr(V,U,v)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",Kn,[l.createVNode(o,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(v=>{var _,U,B,z,V,K,x,A,k,C,y,W,i,P,q,b,N,m;return[Zr(v)?(l.openBlock(),l.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:l.withCtx(()=>[l.createElementVNode("span",Vn,l.toDisplayString(Ve(v)),1)]),default:l.withCtx(()=>{var f,j;return[l.createElementVNode("div",zn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((j=v==null?void 0:v.row)==null?void 0:j[(f=v==null?void 0:v.column)==null?void 0:f.prop],T=>(l.openBlock(),l.createElementBlock("div",qn,[l.createElementVNode("div",{class:"prop-url",title:la(T),onClick:ie=>xr(T)},l.toDisplayString(la(T)),9,Rn),l.createElementVNode("div",{class:"prop-download",onClick:ie=>Dr(T)}," 下载 ",8,Jn)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Ve(v))&&((U=(_=Ve(v))==null?void 0:_.toString())!=null&&U.includes(".txt")||(z=(B=Ve(v))==null?void 0:B.toString())!=null&&z.includes(".cpt")||(K=(V=Ve(v))==null?void 0:V.toString())!=null&&K.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ve(v))&&((A=(x=Ve(v))==null?void 0:x.toString())!=null&&A.includes(".txt")||(C=(k=Ve(v))==null?void 0:k.toString())!=null&&C.includes(".cpt")||(W=(y=Ve(v))==null?void 0:y.toString())!=null&&W.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ve(v))&&((P=(i=Ve(v))==null?void 0:i.toString())!=null&&P.includes(".txt")||(b=(q=Ve(v))==null?void 0:q.toString())!=null&&b.includes(".cpt")||(m=(N=Ve(v))==null?void 0:N.toString())!=null&&m.includes(".cyd"))?"pointer":"",marginLeft:(v==null?void 0:v.colIndex)===0?`${((v==null?void 0:v.level)??0)*20}px`:0}),onClick:f=>sr(Ve(v))},l.toDisplayString(Ve(v)===0?"0":Ve(v)),13,Wn))]}),_:2},[((E=gl.value)==null?void 0:E.length)>0&&l.unref(Wl)!==l.unref(xe)?{name:"actions",fn:l.withCtx(({item:v})=>[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",Un,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Cr(gl.value,v),(_,U)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:U,onClick:l.withModifiers(B=>aa(_==null?void 0:_.label,v,{extra:_}),["stop"])},[l.createElementVNode("div",{style:l.normalizeStyle({color:_==null?void 0:_.textColor}),class:"extra-button-label"},l.toDisplayString(_==null?void 0:_.label),5)],8,On))),128))])]),_:2},1024)]),key:"0"}:void 0,((L=le.value)==null?void 0:L.length)>0?{name:"batchButton",fn:l.withCtx(v=>[l.withDirectives(l.createVNode(Sn,{lockingPage:l.unref(Wl)===l.unref(xe),buttons:v.buttons,selectTableItems:ll.value,onButtonClick:a[2]||(a[2]=_=>aa(_,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,se.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!se.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(Jl.ssDialog,{title:Qe.value,visible:ul.value,width:nr.value,onBeforeDestroy:mr,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",Gn,[l.createVNode(ol.ssForm,{rowContents:we.value,isEnableWrap:!1,showOperator:!1,onChange:Jr,onClickTrigger:Sr,isEdit:Ql.value,onBlurChange:vr,onCreate:br},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[Yl.value?(l.openBlock(),l.createElementBlock("div",Hn,[l.createVNode(d,{onClick:a[7]||(a[7]=v=>ul.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[14]||(a[14]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[14]}),l.createVNode(d,{class:"ok-button",onClick:a[8]||(a[8]=v=>Pl(!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(Jl.ssDialog,{title:Qe.value,visible:Xl.value,width:ia.value,onBeforeDestroy:a[10]||(a[10]=v=>Xl.value=!1)},{default:l.withCtx(()=>[l.createVNode(Nn)]),footer:l.withCtx(()=>[l.createElementVNode("div",Qn,[l.createVNode(d,{onClick:a[9]||(a[9]=v=>Xl.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[16]||(a[16]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[16]}),l.createVNode(d,{class:"ok-button",onClick:Br,id:"themeButton"},{default:l.withCtx(()=>a[17]||(a[17]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[17]})])]),_:1},8,["title","visible","width"]),bl.value?(l.openBlock(),l.createBlock(ol.ssFilePreview,{key:1,fileDataList:Dl.value,onDestroy:Er},null,8,["fileDataList"])):l.createCommentVNode("",!0),Ue.value?(l.openBlock(),l.createBlock(Jl.ssDialog,{key:2,visible:Ue.value,onBeforeDestroy:zr,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:l.withCtx(()=>[l.createVNode(qa.ThreeViewerHost,{files:_l.value,threeData:S.value},null,8,["files","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Jl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[11]||(a[11]=v=>e.componentVisible=!1),width:ia.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(t,{dialogItem:Sl.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(Jl.ssDialog,{title:Be.title,visible:Be.show,width:Be.width,onBeforeDestroy:Lr},{default:l.withCtx(()=>[l.createElementVNode("div",Xn,[l.createVNode(ol.ssForm,{rowContents:Be==null?void 0:Be.contents,formRules:Be==null?void 0:Be.formRules,showOperator:!1,buttonValue:Be.buttonValue,isEdit:Ql.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:Pr},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},Zn=na._export_sfc(Yn,[["__scopeId","data-v-f04e959f"]]);exports.formGetOptions=fa;exports.getSelectRow=ga;exports.ssTable=Zn;exports.useFormComp=Xa;exports.useFormToTableComp=Wa;
|
|
1
|
+
"use strict";const l=require("vue"),D=require("./index-y1mE3_ai.cjs"),te=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B7Adlltj.cjs"),ol=require("./index-2T7wIHAe.cjs"),qa=require("./threeViewerHost-Birr5icJ.cjs"),ra=require("./index-C5woD5Cw.cjs");require("./index.vue_vue_type_style_index_1_lang-BgpaLloL.cjs");const na=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Jl=require("./index-CTTqwfEF.cjs");require("./index-Xb_d3z-H.cjs");const Ra=require("./isString-MUYgjroV.cjs"),fa=F=>F.match(/\((.*)\)/)[1],Ja={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(F){const oe=F,ee=l.ref(null),O=l.ref(!1),M=l.ref(null);return l.watch(()=>oe==null?void 0:oe.isVisible,()=>{O.value=oe==null?void 0:oe.isVisible},{deep:!0,immediate:!0}),l.watch(()=>M.value,()=>{l.nextTick(()=>{var s,se;(se=(s=ee.value)==null?void 0:s.updatePopper)==null||se.call(s)})},{deep:!0,immediate:!0}),(s,se)=>{const ye=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(ye,{visible:O.value,title:oe==null?void 0:oe.title,placement:oe==null?void 0:oe.placement,width:oe==null?void 0:oe.width,ref_key:"popOverRef",ref:ee},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:M})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},ln={key:0,class:"extra-button-content"},an={class:"table-operator-wrap"},rn={key:0,class:"extra-button-filter"},nn={class:"form-content-value"},on={key:1,class:"extra-header"},sn={class:"drop-menu",style:{width:"120px"}},un={key:0},tn={key:1},cn={key:1,class:"extra-button-content tabs-button-wrapper"},dn={class:"table-operator-wrap"},pn={class:"extra-button-filter"},fn={class:"form-content-value"},hn={key:0,class:"extra-header"},gn={class:"drop-menu",style:{width:"120px"}},yn={key:0},vn={key:1},bn={__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(F,{emit:oe}){const ee=oe,O=F,M=l.ref(""),s=l.ref(!1),se=l.ref([]),ye=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Te=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],ve=he=>{const me=he.raw;if(!me)return;const Ae=new FileReader;Ae.onload=ce=>{try{const pe=new Uint8Array(ce.target.result),ge=te.readSync(pe,{type:"array"}),I=ge.SheetNames[0],de=ge.Sheets[I],Ue=te.utils.decode_range(de["!ref"]).e.c+1,J=new Array(Ue).fill(""),S=[];for(const G in de){if(G[0]==="!")continue;const{r:fe,c:Se}=te.utils.decode_cell(G);let Oe=de[G].v;if(de[G].t==="n"&&Oe>0&&Oe<1e6&&(Oe=new Date((Oe-25569)*86400*1e3).toISOString().split("T")[0]),(Oe==null||Oe==="")&&(Oe=""),fe===0)J[Se]=Oe;else{if(!S[fe-1]){S[fe-1]={};for(let il=0;il<Ue;il++)S[fe-1][`col_${il}`]=""}S[fe-1][`col_${Se}`]=Oe}}for(let G=0;G<Ue;G++)J[G]===void 0&&(J[G]="");const Ne=S==null?void 0:S[0];if(!(Ne!=null&&Ne.hasOwnProperty("col_0")))return D.ElMessage.error("导入的数据列不匹配,请检查是否错位");ee("getImportData",J,S)}catch(pe){throw D.ElMessage.error(pe.message),new Error(pe.message)}},Ae.readAsArrayBuffer(me)},Xe=he=>{var Ae;const me=(Ae=se.value)==null?void 0:Ae.reduce((ce,pe,ge)=>(ge===0?ce[pe.label]=he:ce[pe.label]=pe==null?void 0:pe.value,ce),{});ee("filter",me,he,!0)},cl=he=>{ee("buttonClick",he)},fl=he=>{var me,Ae;se.value=(Ae=(me=te.getColumnChild(D.cloneDeep(he)))==null?void 0:me.filter(ce=>(ce==null?void 0:ce.label)!==""&&(ce==null?void 0:ce.label)!=="操作"))==null?void 0:Ae.map(ce=>({label:(ce==null?void 0:ce.label)??"",value:"",name:(ce==null?void 0:ce.label)??"",isFormColHidden:ce==null?void 0:ce.isTableColHidden,width:2}))},dl=l.ref(!1),Le=he=>{var me;if((he==null?void 0:he.buttonName)==="确认"&&(ee("filter",he==null?void 0:he.content),dl.value=(he==null?void 0:he.content)&&Object.values(he==null?void 0:he.content).length>0),(he==null?void 0:he.buttonName)==="清空"){const Ae=D.cloneDeep(he==null?void 0:he.content);for(const ce in Ae)Ae[ce]="";se.value=(me=se.value)==null?void 0:me.map(ce=>({...ce,value:""})),ee("filter",Ae),dl.value=!1}s.value=!1},hl=()=>{var me,Ae;se.value=(me=se.value)==null?void 0:me.map(ce=>({...ce,value:""}));const he=(Ae=se.value)==null?void 0:Ae.reduce((ce,pe)=>(ce[pe.label]=pe.value,ce),{});ee("filter",he)};return l.onMounted(()=>{fl(O.columns)}),l.watch(()=>O.columns,()=>{fl(O.columns)},{deep:!0,immediate:!0}),(he,me)=>{var de,$e,Ue,J;const Ae=l.resolveComponent("el-icon"),ce=l.resolveComponent("svg-icon"),pe=l.resolveComponent("el-input"),ge=l.resolveComponent("el-button"),I=l.resolveComponent("el-upload");return F.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",ln,[l.createElementVNode("div",{class:l.normalizeClass(F.compName?"table-name-wrap":""),style:l.normalizeStyle({background:(O==null?void 0:O.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((O==null?void 0:O.level)-1)*12+"px",fontWeight:600-((O==null?void 0:O.level)-1)*100>=400?600-((O==null?void 0:O.level)-1)*100:400,fontSize:17-(O==null?void 0:O.level)>=14?17-(O==null?void 0:O.level)+"px":"14px"})},l.toDisplayString(F.compName),7),l.createElementVNode("div",an,[O!=null&&O.filterShow?(l.openBlock(),l.createElementBlock("div",rn,[l.createVNode(Ja,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var S,Ne,G,fe;return[l.createVNode(pe,{modelValue:M.value,"onUpdate:modelValue":me[1]||(me[1]=Se=>M.value=Se),style:{"min-width":"80px"},placeholder:dl.value?(G=(Ne=(S=F.filterValues)==null?void 0:S.filter(Se=>Se))==null?void 0:Ne.slice(0,3))==null?void 0:G.join("/"):"搜索","prefix-icon":l.unref(D.search_default),clearable:"",onInput:Xe,disabled:((fe=se.value)==null?void 0:fe.length)===0},{suffix:l.withCtx(()=>{var Se,Oe;return[!M.value&&((Oe=(Se=F.filterValues)==null?void 0:Se.filter(il=>il))!=null&&Oe.join("/"))?(l.openBlock(),l.createBlock(Ae,{key:0,style:{cursor:"pointer"},onClick:hl},{default:l.withCtx(()=>[l.createVNode(l.unref(D.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:me[0]||(me[0]=Se=>s.value=!s.value)},[l.createVNode(ce,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",nn,[(l.openBlock(),l.createBlock(ol.ssForm,{rowContents:se.value,buttonValue:ye.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ye.value,isStartJustify:!1,onOnButtonClick:Le},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])])):l.createCommentVNode("",!0),F.buttons&&((de=F.buttons)==null?void 0:de.length)>0?(l.openBlock(),l.createElementBlock("div",on,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(($e=F.buttons)==null?void 0:$e.filter(S=>F.isDevMode||(S==null?void 0:S.label)!=="修改模板"),(S,Ne)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:Ne},[(S==null?void 0:S.type)==="upload"?(l.openBlock(),l.createBlock(I,{key:0,class:"upload-button-wrap","on-change":ve,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!F.lockingPage},{default:l.withCtx(()=>[l.createVNode(ge,{disabled:!!F.lockingPage,style:l.normalizeStyle({background:(S==null?void 0:S.background)??"var(--ssbutton-theme-bg)",color:(S==null?void 0:S.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(S==null?void 0:S.type)==="popover"?(l.openBlock(),l.createBlock(ol._sfc_main$1,{key:1},{dropTitle:l.withCtx(()=>[(S==null?void 0:S.type)==="popover"?(l.openBlock(),l.createBlock(ge,{key:0,disabled:!!F.lockingPage,style:l.normalizeStyle({background:(S==null?void 0:S.background)??"var(--ssbutton-theme-bg)",color:(S==null?void 0:S.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1032,["disabled","style"])):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",sn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(S==null?void 0:S.contents,G=>(l.openBlock(),l.createBlock(ge,{key:G==null?void 0:G.label,disabled:!!F.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:fe=>cl(G==null?void 0:G.label)},{default:l.withCtx(()=>{var fe,Se;return[l.createTextVNode(l.toDisplayString(G==null?void 0:G.label),1),(fe=G==null?void 0:G.label)!=null&&fe.includes("选中")?(l.openBlock(),l.createElementBlock("span",un,"("+l.toDisplayString(F.selectNums)+")",1)):l.createCommentVNode("",!0),(Se=G==null?void 0:G.label)!=null&&Se.includes("全部")?(l.openBlock(),l.createElementBlock("span",tn,"("+l.toDisplayString(F.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),S!=null&&S.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(ge,{key:2,id:"themeButton",disabled:!!F.lockingPage,style:l.normalizeStyle({background:(S==null?void 0:S.background)??"var(--ssbutton-theme-bg)",color:(S==null?void 0:S.color)??"var(--ssbutton-theme-color)"}),onClick:G=>cl(S==null?void 0:S.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])])):(l.openBlock(),l.createElementBlock("div",cn,[l.createElementVNode("div",dn,[l.createElementVNode("div",pn,[l.createVNode(Ja,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var S,Ne,G,fe;return[l.createVNode(pe,{modelValue:M.value,"onUpdate:modelValue":me[3]||(me[3]=Se=>M.value=Se),style:{"min-width":"80px"},placeholder:dl.value?(G=(Ne=(S=F.filterValues)==null?void 0:S.filter(Se=>Se))==null?void 0:Ne.slice(0,3))==null?void 0:G.join("/"):"搜索","prefix-icon":l.unref(D.search_default),clearable:"",onInput:Xe,disabled:((fe=se.value)==null?void 0:fe.length)===0},{suffix:l.withCtx(()=>{var Se,Oe;return[!M.value&&((Oe=(Se=F.filterValues)==null?void 0:Se.filter(il=>il))!=null&&Oe.join("/"))?(l.openBlock(),l.createBlock(Ae,{key:0,style:{cursor:"pointer"},onClick:hl},{default:l.withCtx(()=>[l.createVNode(l.unref(D.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:me[2]||(me[2]=Se=>s.value=!s.value)},[l.createVNode(ce,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",fn,[(l.openBlock(),l.createBlock(ol.ssForm,{rowContents:se.value,buttonValue:ye.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ye.value,isStartJustify:!1,onOnButtonClick:Le},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),F.buttons&&((Ue=F.buttons)==null?void 0:Ue.length)>0?(l.openBlock(),l.createElementBlock("div",hn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((J=F.buttons)==null?void 0:J.filter(S=>F.isDevMode||(S==null?void 0:S.label)!=="修改模板"),(S,Ne)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:Ne},[(S==null?void 0:S.type)==="upload"?(l.openBlock(),l.createBlock(I,{key:0,class:"upload-button-wrap","on-change":ve,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(ge,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var G;return[l.createVNode(ce,{name:(G=Te==null?void 0:Te.find(fe=>(fe==null?void 0:fe.label)===(S==null?void 0:S.label)))==null?void 0:G.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(S==null?void 0:S.type)==="popover"?(l.openBlock(),l.createBlock(ol._sfc_main$1,{key:1},{dropTitle:l.withCtx(()=>[(S==null?void 0:S.type)==="popover"?(l.openBlock(),l.createBlock(ge,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var G;return[l.createVNode(ce,{name:(G=Te==null?void 0:Te.find(fe=>(fe==null?void 0:fe.label)===(S==null?void 0:S.label)))==null?void 0:G.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",gn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(S==null?void 0:S.contents,G=>(l.openBlock(),l.createBlock(ge,{key:G==null?void 0:G.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:fe=>cl(G==null?void 0:G.label)},{default:l.withCtx(()=>{var fe,Se;return[l.createTextVNode(l.toDisplayString(G==null?void 0:G.label),1),(fe=G==null?void 0:G.label)!=null&&fe.includes("选中")?(l.openBlock(),l.createElementBlock("span",yn,"("+l.toDisplayString(F.selectNums)+")",1)):l.createCommentVNode("",!0),(Se=G==null?void 0:G.label)!=null&&Se.includes("全部")?(l.openBlock(),l.createElementBlock("span",vn,"("+l.toDisplayString(F.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),S!=null&&S.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(ge,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(S==null?void 0:S.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:G=>cl(S==null?void 0:S.label)},{icon:l.withCtx(()=>{var G;return[l.createVNode(ce,{name:(G=Te==null?void 0:Te.find(fe=>(fe==null?void 0:fe.label)===(S==null?void 0:S.label)))==null?void 0:G.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(S==null?void 0:S.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},kn=na._export_sfc(bn,[["__scopeId","data-v-2218a50d"]]),mn=l.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(F,{emit:oe}){const ee=F,O=oe,M=se=>{O("buttonClick",se)},s=se=>{var ye;return se!=null&&se.includes("删除")?((ye=ee.selectTableItems)==null?void 0:ye.length)>0?"warning-active-type":"warning-type":"default-type"};return(se,ye)=>{const Te=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(F.buttons,ve=>(l.openBlock(),l.createBlock(Te,{key:ve==null?void 0:ve.label,disabled:!!F.lockingPage,class:l.normalizeClass(s(ve==null?void 0:ve.label)),onClick:Xe=>M(ve==null?void 0:ve.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(ve==null?void 0:ve.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Sn=na._export_sfc(mn,[["__scopeId","data-v-70b12973"]]),Wa=D.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(F){this.selectArray=F},setSelectString(F){this.selectString=F}}}),xn={class:"calculator-content"},Dn={class:"calculator-child"},Cn={class:"calculator-child"},Tn=l.defineComponent({__name:"calculator",setup(F){const oe=l.ref(),ee=l.ref();return l.onMounted(()=>{oe.value=[{type:"Upload",label:"输入",name:"input"}],ee.value=[{type:"Upload",label:"输出",name:"output"}]}),(O,M)=>(l.openBlock(),l.createElementBlock("div",xn,[l.createElementVNode("div",Dn,[l.createVNode(ol.ssForm,{rowContents:oe.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Cn,[l.createVNode(ol.ssForm,{rowContents:ee.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Nn=na._export_sfc(Tn,[["__scopeId","data-v-73db0fe7"]]),ha=(F,oe)=>{let ee=F,O=oe;return Array.isArray(ee)&&(ee=ee==null?void 0:ee.map((M,s)=>{if(Array.isArray(M)){let se={};return M=M==null?void 0:M.forEach((ye,Te)=>{var ve;(ve=O==null?void 0:O[Te])!=null&&ve.prop?se[O[Te].prop]=ye:Array.isArray(ye)&&(se.children=ha(ye,O))}),Object.assign(se,{id:s})}else return M})),ee},Ga=(F,oe,ee)=>{let O=F,M=oe;return O=O==null?void 0:O.map((s,se)=>{var ye,Te;return!Array.isArray(s)||!((ye=M==null?void 0:M[se])!=null&&ye.label)&&!ee||(s.unshift(((Te=M==null?void 0:M[se])==null?void 0:Te.label)??""),s.some(ve=>Array.isArray(ve))&&(s=s==null?void 0:s.map(ve=>{var Xe;return Array.isArray(ve)&&(ve=Ga(ve,(Xe=M==null?void 0:M[se])==null?void 0:Xe.children,ee)),ve}))),s}),O},An=(F,oe,ee)=>{if(oe==="")return F==null?void 0:F.filter(O=>(O==null?void 0:O.id)!==ee);{const O=oe.split("-");return En(F,O,ee)}},En=(F,oe,ee)=>{let O=F,M=oe;return(M==null?void 0:M.length)===0?O=O==null?void 0:O.filter(s=>s.id!==ee):O=O==null?void 0:O.map(s=>(s.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),s=Ha(s,M,ee)),s)),O},Ha=(F,oe,ee)=>{var s,se;let O=F,M=oe;return(M==null?void 0:M.length)===0?O.children=(s=O.children)==null?void 0:s.filter(ye=>ye.id!==ee):O.children=(se=O.children)==null?void 0:se.map(ye=>(ye.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),ye=Ha(ye,M,ee)),ye)),O},wn=(F,oe,ee)=>{if(oe==="")return ee;{const O=oe.split("-");return Bn(F,O,ee)}},Bn=(F,oe,ee)=>{let O=F,M=oe;return(M==null?void 0:M.length)===0?O=ee:O=O==null?void 0:O.map(s=>(s.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),s=Qa(s,M,ee)),s)),O},Qa=(F,oe,ee)=>{var s;let O=F,M=oe;return(M==null?void 0:M.length)===0?O.children=ee:O.children=(s=O.children)==null?void 0:s.map(se=>(se.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),se=Qa(se,M,ee)),se)),O},Xa=D.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(F){this.objUrl=F},setBlobUrls(F){this.blobUrls=F}}}),ga=async(F,oe)=>{var se,ye,Te,ve,Xe,cl,fl,dl,Le,hl,he,me,Ae,ce,pe,ge,I;let ee=(ye=(se=D.cloneDeep(F))==null?void 0:se.optionUrl)==null?void 0:ye.menuSelect,O=[];ee==null||ee.forEach(de=>{});let M="",s=await te.menuToParent(ee);if(s==null||s.forEach(de=>{var $e,Ue,J,S;(de==null?void 0:de.name)===(((S=(J=(Ue=($e=D.cloneDeep(F))==null?void 0:$e.optionUrl)==null?void 0:Ue.groupSelect)==null?void 0:J[0])==null?void 0:S.replaceAll("'",""))??"")&&(M=de==null?void 0:de.id)}),oe){M=oe;const de=await D.getInsofDataApi({id:M}),$e=(cl=(Xe=(ve=(Te=de==null?void 0:de.data)==null?void 0:Te.result)==null?void 0:ve[0])==null?void 0:Xe.key)==null?void 0:cl.pageKey;s=await te.getItemData($e,sessionStorage.getItem("systemKey"),"")}if(M!==""){let de;oe?de=(fl=s==null?void 0:s.find(J=>(J==null?void 0:J.id)===oe))==null?void 0:fl.compData:de=(dl=s==null?void 0:s.find(J=>{var S,Ne,G,fe;return(J==null?void 0:J.name)===(((Ne=(S=F==null?void 0:F.groupSelect)==null?void 0:S.split(":"))==null?void 0:Ne[0])||((fe=(G=F==null?void 0:F.optionUrl)==null?void 0:G.groupSelect)==null?void 0:fe[0]))}))==null?void 0:dl.compData;let $e=(hl=(Le=de==null?void 0:de.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:Le.contents)==null?void 0:hl.map(J=>J==null?void 0:J.label);(me=(he=de==null?void 0:de.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:he.contents)!=null&&me.every(J=>Array.isArray(J))&&($e=(pe=te.getColumnChild((ce=(Ae=de==null?void 0:de.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:Ae.contents)==null?void 0:ce[0]))==null?void 0:pe.map(J=>J==null?void 0:J.prop));let Ue=(I=(ge=de==null?void 0:de.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:ge.contents)==null?void 0:I.map(J=>{if(Array.isArray(J))J=J==null?void 0:J.filter(S=>!(S!=null&&S.id));else{let S={};for(let Ne in J)Ne!=="id"&&(S[Ne]=J==null?void 0:J[Ne]);J=S}return J});Ue==null||Ue.forEach(J=>{Array.isArray(J)?O.push(te.getValueToObjectValue(J,$e)):O.push(J)})}return O},_n={class:"table-content"},Un={class:"menu-config-wrap"},On=["onClick"],Mn={key:0,class:"viewport-wrap"},jn=["onClick"],Ln={title:"选择显示列信息"},Pn={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},$n=["title"],Fn={class:"col-operate-wrap"},Kn={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Vn={class:"pop-view"},zn={class:"pop-wrapper"},qn={class:"file-list-pop"},Rn=["title","onClick"],Jn=["onClick"],Wn=["onClick"],Gn={class:"form-content"},Hn={key:0,class:"dialog-footer"},Qn={class:"dialog-footer"},Xn={class:"form-content"},Yn={__name:"index",props:{pageLayout:{type:String,default:"vertical"},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!1},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(F,{emit:oe}){var Ma;const ee=l.ref([]),O=Xa(D.pinia),M=l.ref(null),s=F,se=l.ref(s==null?void 0:s.allowSelect),ye=l.ref((Ma=s==null?void 0:s.config)==null?void 0:Ma.showIndex),Te=l.ref(),ve=l.ref(!0),Xe=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),cl=te.useOriginalState(D.pinia);let fl="$R";const{originalPath:dl}=D.storeToRefs(cl),Le=dl.value,hl=l.ref(!1),he=l.ref(!1),me=l.ref(!1),Ae=l.ref(!0),ce=l.reactive({column:{},status:!1,text:"合计"}),pe=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),ge=oe,I=l.ref([]),de=l.reactive({prop:"",order:null}),$e=l.ref([]),Ue=l.ref(!1),J=l.ref(!1),S=l.ref(null),{isUseBackdrop:Ne,initTrackFileType:G,getFileExtension:fe,setData:Se,getFileInfo:Oe,getFilesInfo:il}=qa.useThreeSystem(),oa=l.ref([]),bl=l.ref(!1),Dl=l.ref(),Me=ra.useMenuState(),{importLoading:In,activeMenuPath:xe,contentLoading:eo,linkMenuInfo:Ya}=D.storeToRefs(Me),Za=te.useTableComp(D.pinia),Ee=ra.useModelComp(D.pinia),{extraContents:De,cacheUpdatingData:wl,tableViewContents:Bl,tableLoading:lo,pageMapState:Cl,lockingPage:Wl}=D.storeToRefs(Ee),le=l.ref([]),Gl=l.ref([]),Hl=l.ref(new Map);l.ref(!1);const sl=l.ref("");l.ref();const Ql=l.ref(!0),Tl=l.ref(0),ya=l.ref(!0),Qe=l.ref(""),ul=l.ref(!1),Ia=l.ref({label:"查看三维模型"}),Xl=l.ref(!1),ia=l.ref(),Ye=l.ref([]),gl=l.ref([]),Yl=l.ref(!1),_l=l.ref([]),kl=l.ref([]),yl=l.ref([]),we=l.ref([]),Ie=l.ref(),Ke=l.ref(),er=Wa(D.pinia),Zl=l.ref(),sa=l.ref(0),lr=te.useUnit(D.pinia),{selectIndex:ar,selectMenu:Ul,selectTitle:ao}=D.storeToRefs(lr),{selectString:ml}=D.storeToRefs(er),rr=D.useLoginState(D.pinia),{loginUserInfo:Nl}=D.storeToRefs(rr),nr=l.ref(720),el=l.ref(!1),Il=l.ref(!1),ll=l.ref([]),tl=l.ref(),Ol=l.ref(!0),va=l.ref(!0),Sl=l.ref([]),or=l.inject("contentRef");l.provide("contentRef",or),l.watch(()=>{var e;return(e=le.value)==null?void 0:e.length},e=>{pe.total=e}),l.watch(()=>Bl.value,async()=>{var u,c,d,t,g,w,E,L,v,_,U,B,z,V,K,x,A,k;if(((u=Bl.value)==null?void 0:u.length)===0||!((c=s==null?void 0:s.itemData)!=null&&c.find(C=>(C==null?void 0:C.key)==="columnPath"))||!((d=s==null?void 0:s.itemData)!=null&&d.find(C=>(C==null?void 0:C.key)==="pageColumn")))return;let e=(v=(L=(E=(w=(g=(t=s==null?void 0:s.itemData)==null?void 0:t.find(C=>(C==null?void 0:C.key)==="pageColumn"))==null?void 0:g.contents)==null?void 0:w.split("["))==null?void 0:E[1])==null?void 0:L.split("]"))==null?void 0:v[0],a=((z=(B=(U=(_=s==null?void 0:s.itemData)==null?void 0:_.find(C=>(C==null?void 0:C.key)==="pageColumn"))==null?void 0:U.contents)==null?void 0:B.split("["))==null?void 0:z[0])+((K=(V=Bl.value)==null?void 0:V.find(C=>(C==null?void 0:C.key)===e))==null?void 0:K.value),o=((A=(x=s==null?void 0:s.itemData)==null?void 0:x.find(C=>(C==null?void 0:C.key)==="pageGroup"))==null?void 0:A.contents)??"",r=await te.getItemData(a,sessionStorage.getItem("systemKey"),""),n=(k=r==null?void 0:r.find(C=>(C==null?void 0:C.name)===(o===""?s==null?void 0:s.compName:o)))==null?void 0:k.compData;Ua(n,s.allMapContents)},{deep:!0});const ir=async(e,a)=>{var o,r,n,u,c;try{const d=await D.getInsofDataApi({id:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index)});let t;((o=d==null?void 0:d.data)==null?void 0:o.code)===200&&(t=((n=(r=d==null?void 0:d.data)==null?void 0:r.result)==null?void 0:n[0])||null);const g={type:"data",pageKey:s!=null&&s.parentTableId?(u=t==null?void 0:t.key)==null?void 0:u.pageKey:xe.value,tableId:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index),systemKey:sessionStorage.getItem("systemKey")},w=a==null?void 0:a.map(v=>{const _=Object.keys(v),U={};return _.forEach((B,z)=>{U[e[z]]=v[B]}),U}),E=w==null?void 0:w.map(v=>({key:g,value:{tableData:v}})),L=await D.batchAddInsofDataApi({dataList:E});((c=L==null?void 0:L.data)==null?void 0:c.code)===200?(Ee.setRefreshCurStructure(!0),D.ElMessage.success("导入数据成功")):D.ElMessage.error("导入数据响应失败")}catch(d){throw D.ElMessage.error("导入数据处理失败"),new Error(d)}},sr=async e=>{var a,o,r,n,u;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 c=await D.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});let t=URL.createObjectURL(d);Dl.value=[{name:(u=e==null?void 0:e.split("/"))==null?void 0:u[((n=e==null?void 0:e.split("/"))==null?void 0:n.length)-1],blobUrl:t}],bl.value=!0}};l.onBeforeUnmount(()=>{va.value=!1;let e=sa.value;sa.value=e+1});const ba=l.computed(()=>{var r,n;const e=(pe.currentPage-1)*pe.pageSize,a=e+pe.pageSize,o=(r=I.value)==null?void 0:r.find(u=>{var c;return(u==null?void 0:u.sortable)&&((c=u==null?void 0:u.label)==null?void 0:c.includes("时间"))});return o&&(de.order="descending",de.prop=o==null?void 0:o.prop),ge("getSliceContLength",pe),(n=le.value)==null?void 0:n.slice(e,a)}),ur=e=>{pe.currentPage=e,ge("getSliceContLength",pe)},tr=e=>{var a;pe.pageSize=e,e*pe.currentPage>((a=le.value)==null?void 0:a.length)&&(pe.currentPage=1,pe.pageSize=10,D.ElMessage.warning("分页无效,返回第一页")),ge("getSliceContLength",pe)},cr=(e,a)=>{var c,d;const o=(d=(c=I.value)==null?void 0:c.map(t=>t==null?void 0:t.prop))==null?void 0:d.filter(t=>t!=="operate");let r;const n=(e==null?void 0:e.length)===(o==null?void 0:o.length);if(e!=null&&e.includes("序号"))return D.ElMessage.error("导入的数据不需要包含序号列");if(r=n?e:e.slice(0,o==null?void 0:o.length),!(r==null?void 0:r.every(t=>o==null?void 0:o.find(g=>t===g))))return D.ElMessage.error("导入的数据表头不匹配");ir(r,a)},dr=(e,a)=>{var o;Ee.setRefreshCurStructure(!1),((o=I.value)==null?void 0:o.length)===0||cr(e,a)},pr=(e,a,o,r)=>{const n=[],u=[],c=g=>Object.keys(g).length;for(const g in e)if(e[g]!==void 0){const w=e[g],E=[];for(const[L,v]of Object.entries(w))E.push(v),u.length<c(w)&&u.push(L);n.push(E)}n.unshift(u);const d=te.utils.aoa_to_sheet(n),t=te.utils.book_new();te.utils.book_append_sheet(t,d,r),te.writeFileSync(t,`${a}.xlsx`),ll.value=[]},ea=async(e,a,o,r=!1,n)=>{var u,c,d,t,g,w,E,L;try{Ee.setRefreshCurStructure(!1);const v=await D.getInsofDataApi({id:s==null?void 0:s.index});if(((u=v==null?void 0:v.data)==null?void 0:u.code)===200){let _=(g=(t=(d=(c=v==null?void 0:v.data)==null?void 0:c.result)==null?void 0:d[0])==null?void 0:t.value)==null?void 0:g.pageData;r?_={..._,compData:(E=_==null?void 0:_.compData)==null?void 0:E.map(B=>{var z;return(B==null?void 0:B.key)==="header"?{...B,contents:(z=B==null?void 0:B.contents)==null?void 0:z.map(V=>({...V,[e]:o}))}:B})}:_={..._,compData:(w=_==null?void 0:_.compData)==null?void 0:w.map(B=>{var z,V;return(B==null?void 0:B.key)==="header"?{...B,contents:(z=B==null?void 0:B.contents)==null?void 0:z.map(K=>(K==null?void 0:K.prop)===(a==null?void 0:a.prop)?{...K,[e]:o}:K)}:(B==null?void 0:B.key)==="tableToForm"&&n?{...B,contents:(V=B==null?void 0:B.contents)==null?void 0:V.map(K=>(K==null?void 0:K.prop)===(a==null?void 0:a.prop)?{...K,[n]:o}:K)}:B})};const U=await D.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:_}});((L=U==null?void 0:U.data)==null?void 0:L.code)===200?(D.ElMessage.success("编辑成功"),Ee.setRefreshCurStructure(!0)):D.ElMessage.error("编辑响应失败")}}catch(v){D.ElMessage.error(v)}},fr=async(e,a)=>{await ea("label",a,e)},hr=async(e,a)=>{await ea("columnType",a,e,!1,"type")},gr=()=>{wl.value?el.value=!1:Oa()},yr=e=>{ll.value=e},vr=(e,a)=>{tl.value===a?Ol.value=!1:Ol.value=!0,tl.value=a==null?void 0:a.changeProp},br=e=>{if(!e)return;const{item:a,value:o}=e,r=we.value.find(n=>n.prop==a.prop);r&&r.contents.push({label:o,value:o})},Ml=l.computed(()=>{var o,r,n;const e=(o=I.value)==null?void 0:o.some(u=>u==null?void 0:u.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(n=(r=I.value)==null?void 0:r.filter(u=>(u==null?void 0:u.label)!=="操作"))==null?void 0:n.map(u=>({...u,filterable:!!(u!=null&&u.filterable),showSummary:!!(u!=null&&u.showSummary),operable:!!(u!=null&&u.operable)}))}),kr=async(e,a,o)=>{const r=D.cloneDeep(I.value);await l.nextTick(),I.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 ea(a,o,e)},ua=async(e,a)=>{await ea(a,null,e,!0)},mr=()=>{ul.value=!1},Sr=e=>{ge("clickTrigger",e)},ka=async e=>{var u,c,d,t,g,w,E,L,v,_,U,B,z,V,K;const a=e==null?void 0:e.row,o=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix;if((u=a==null?void 0:a.toString())!=null&&u.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(a.includes(",")){D.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(Ne(a)){const A={files:[Oe(a)],data:{}};Se(A);return}_l.value=[{url:a,extension:fe(a)}],J.value=!0,S.value={data:D.cloneDeep(o)},Ue.value=!0;return}let n=[];if((c=a==null?void 0:a.toString())!=null&&c.includes(".stl")||(d=a==null?void 0:a.toString())!=null&&d.includes(".STL")||(t=a==null?void 0:a.toString())!=null&&t.includes(".obj")||(g=a==null?void 0:a.toString())!=null&&g.includes(".mtl")){const x=(w=a==null?void 0:a.toString())==null?void 0:w.split(","),A=il(x),k=A==null?void 0:A[0];if(Ne(k==null?void 0:k.extension)){Se({files:A,data:{}});return}_l.value=A,J.value=!1,Ue.value=!0;return}if((E=a==null?void 0:a.toString())!=null&&E.includes(".stl")||(L=a==null?void 0:a.toString())!=null&&L.includes(".STL")||(v=a==null?void 0:a.toString())!=null&&v.includes(".obj")||(_=a==null?void 0:a.toString())!=null&&_.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let x,A=[],k={};if(Array.isArray(a)?x=a:x=a==null?void 0:a.split(","),x==null||x.forEach(C=>{C.includes(".mtl")?A.push(C):k.blob=k.blob?k.blob+","+C:C}),(A==null?void 0:A.length)>0&&(k.mtlBlobs=A),r&&(k.suffix=r),(B=(U=Object.values(k))==null?void 0:U[0])!=null&&B.includes("http:"))n.push(k);else{const C=new Blob([k.blob],{type:"application/octet-stream;charset=UTF-8"});let y=URL.createObjectURL(C),W="";(z=a==null?void 0:a.split("/"))==null||z.forEach((i,P)=>{var q;P===((q=a==null?void 0:a.split("/"))==null?void 0:q.length)-1&&(W=i)}),(V=k.blob)!=null&&V.includes(".stl")&&(W=(W==null?void 0:W.replaceAll(">",""))+".urdf"),Dl.value=[{name:W,blobUrl:y}],bl.value=!0}}else{const x=await D.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),A=new Blob([x.data],{type:"application/octet-stream;charset=UTF-8"});let k=URL.createObjectURL(A),C="";if((K=a==null?void 0:a.split("/"))==null||K.forEach((y,W)=>{var i;W===((i=a==null?void 0:a.split("/"))==null?void 0:i.length)-1&&(C=y)}),Ne(C)){const y=G(C),W=Oe(a);Se({files:[W],data:{trackFileType:y}});return}Dl.value=[{name:C,blobUrl:k}],bl.value=!0}(n==null?void 0:n.length)>0&&O.setBlobUrls(n)},la=e=>{var r,n,u,c;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(c=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:c[((u=(n=e==null?void 0:e.url)==null?void 0:n.split("."))==null?void 0:u.length)-1];return(e==null?void 0:e.name)+"."+a},xr=async e=>{let a=null,o=null;if(e!=null&&e.downloadUrl){const n=await ta(),u=ol.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),c=await D.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(()=>{u.close()}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(d),o=e==null?void 0:e.name}else{const n=await te.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=la(e)):a=e==null?void 0:e.url}if(Ne(a)){const n={row:`${a}`,suffix:fe(o)};ka(n);return}const r={name:o,blobUrl:a};Dl.value=[r],bl.value=!0},Dr=async e=>{let a=null,o=null;if(e!=null&&e.downloadUrl){const u=await ta(),c=await D.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:u,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(d),o=e==null?void 0:e.name}else{const u=await te.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(u.data),o=la(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)},Cr=(e,a)=>{var o;if(Object.values(a).length!==0)return Object.values(a).find(r=>{var n,u,c;return((n=r==null?void 0:r.toString())==null?void 0:n.includes(".txt"))||((u=r==null?void 0:r.toString())==null?void 0:u.includes(".cpt"))||((c=r==null?void 0:r.toString())==null?void 0:c.includes(".obj"))})?[...e,Ia.value]:(o=s==null?void 0:s.config)!=null&&o.allowMove?[...e,{label:"迁移"}]:e},Tr=(e,a={})=>[...e==null?void 0:e.values()].filter(o=>Object.keys(a).every(r=>{var c;const n=o[r],u=(c=a[r])==null?void 0:c.toLowerCase();return u&&n&&typeof n=="string"?n.toLowerCase().includes(u):!0})),ma=l.ref([]),Nr=async(e,a,o=!1)=>{var r;if(e){if(Ee.setTableLoading(!0),ma.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(n=>!n)))return le.value=Gl.value;if(o){le.value=[...Hl.value.values()].filter(n=>Object.values(n).some(u=>typeof u=="string"?u==null?void 0:u.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}le.value=Tr(Hl.value,e),Ee.setTableLoading(!1)}},Ar=async e=>{},Sa=async(e,a,o,r)=>{var n,u,c,d,t,g,w,E,L,v,_,U,B,z,V,K,x,A,k,C;if(ge("clickMainKey",o),(r==null?void 0:r.isExistChild)===!0){let y=(n=r==null?void 0:r.columnType)==null?void 0:n.prop,W=r==null?void 0:r.data;if(Sl.value=await te.getItemData(xe.value,sessionStorage.getItem("systemKey"),""),!Sl.value){let P=(d=(c=(u=xe.value)==null?void 0:u.split("/"))==null?void 0:c.filter((q,b)=>{var N,m;return b!==((m=(N=xe.value)==null?void 0:N.split("/"))==null?void 0:m.length)-1}))==null?void 0:d.join("/");Sl.value=await te.getItemData(P,sessionStorage.getItem("systemKey"),"")}let i=(t=Sl.value)==null?void 0:t.filter(P=>(P==null?void 0:P.name)===y);Sl.value=i==null?void 0:i.map(P=>{var q;return P.compData=(q=P.compData)==null?void 0:q.map(b=>{var N,m;return(b==null?void 0:b.key)==="tableContents"&&(N=b==null?void 0:b.contents)!=null&&N.every(f=>f==null?void 0:f.find(j=>j==null?void 0:j.id))&&(b.contents=(m=b==null?void 0:b.contents)==null?void 0:m.filter(f=>(f==null?void 0:f[1])===W)),b}),P}),ge("routeUrl",Sl.value,{isEdit:!0,routerUrl:xe.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=D.cloneDeep(e);y=await((g=D.cloneDeep(y))==null?void 0:g.map(async i=>{var b,N,m,f;const P=await te.downloadAvatarApi({url:i==null?void 0:i.url});let q=URL.createObjectURL(P.data);return{name:(i==null?void 0:i.name)+"."+((f=(b=i==null?void 0:i.url)==null?void 0:b.split("."))==null?void 0:f[((m=(N=i==null?void 0:i.url)==null?void 0:N.split("."))==null?void 0:m.length)-1]),blobUrl:q}}));let W=await Promise.all(y);Dl.value=W,bl.value=!0}if(D.cloneDeep(I.value),(r==null?void 0:r.isMainKey)===!0){Me.setActiveMenuPath(void 0),Ee.setRouteToChildPath(void 0),Ee.setFixMenuStatus(!0);let y=(E=(w=s.itemData)==null?void 0:w.find(i=>(i==null?void 0:i.key)==="contentTableId"))==null?void 0:E.contents,W=(v=(L=s.itemData)==null?void 0:L.find(i=>(i==null?void 0:i.key)==="relatedFilter"))==null?void 0:v.index;if(W!==0){let i=(U=(_=I.value)==null?void 0:_[W])==null?void 0:U.prop;if((o==null?void 0:o[i])===(r==null?void 0:r.data)){let P=await D.getInsofDataApi({id:y}),q=(K=(V=(z=(B=P==null?void 0:P.data)==null?void 0:B.result)==null?void 0:z[0])==null?void 0:V.key)==null?void 0:K.pageKey;Me.setActiveMenuPath(q+"/"+(r==null?void 0:r.data))}else{let P=await D.getInsofDataApi({key:{pageKey:D.cloneDeep(xe).value+"/"+(r==null?void 0:r.data),systemKey:sessionStorage.getItem("systemKey")}});((A=(x=P==null?void 0:P.data)==null?void 0:x.result)==null?void 0:A.length)>0&&Me.setActiveMenuPath(D.cloneDeep(xe).value+"/"+(r==null?void 0:r.data))}}else{let i=await D.getInsofDataApi({key:{pageKey:D.cloneDeep(xe).value+"/"+(r==null?void 0:r.data),systemKey:sessionStorage.getItem("systemKey")}});((C=(k=i==null?void 0:i.data)==null?void 0:k.result)==null?void 0:C.length)>0&&Me.setActiveMenuPath(D.cloneDeep(xe).value+"/"+(r==null?void 0:r.data))}}},Er=()=>{bl.value=!1},wr=e=>{ge("rowClick",e)};l.watch(()=>s.changedContent,()=>{var o,r;if(!s.changedContent)return;let e=(o=le.value)==null?void 0:o.map(n=>{var u;return n.id===((u=s.changedContent)==null?void 0:u.id)&&(n={...s.changedContent,id:s.changedContent.newId?s.changedContent.newId:s.changedContent.id},delete n.newId),n});const a=(r=s.itemData)==null?void 0:r.map(n=>((n==null?void 0:n.key)==="tableContents"&&(n.contents=e),n));le.value=e,ge("contentChange",{contents:a,index:s.index}),ge("change",{content:e,index:s==null?void 0:s.index,buttonName:"",id:s==null?void 0:s.index})},{deep:!0,immediate:!0});const Br=()=>{},_r=async()=>{const e=xe.value,a=sessionStorage.getItem("systemKey"),o=await te.getItemData(e,a,""),r=(o==null?void 0:o.find(d=>(d==null?void 0:d.name)==="方法明细"))||(o==null?void 0:o[0]),n=(r==null?void 0:r.compData)||[],u=n==null?void 0:n.find(d=>{const t=d==null?void 0:d.key;return t==="formContent"||t==="tableContents"});return u==null?void 0:u.contents},ta=async()=>`Bearer ${D.Local.get("access-token")}`,Ur=async(e,{token:a,inputData:o}={})=>await D.axios.post(e,o,{headers:{Authorization:a}}).catch(n=>(Me.setImportLoading(!1),Promise.reject(n))),Or=e=>{var r;let a={};const o=[];return a.form={},(r=D.cloneDeep(e))==null||r.forEach((n,u)=>{var c,d,t,g,w,E,L,v,_,U,B,z,V,K;if((n==null?void 0:n.comp)==="Table"){(d=(c=n==null?void 0:n.compData)==null?void 0:c.find(C=>(C==null?void 0:C.key)==="header"))==null||d.contents;let x=(w=(g=(t=n==null?void 0:n.compData)==null?void 0:t.find(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:g.contents)==null?void 0:w.map(C=>C.slice(1));(U=(_=(v=(L=(E=n==null?void 0:n.compData)==null?void 0:E.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:L.contents)==null?void 0:v[0])==null?void 0:_[0])==null||U.label;let A=(z=(B=n==null?void 0:n.compData)==null?void 0:B.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:z.contents,k=[];x==null||x.forEach(C=>{let y=[];C==null||C.forEach((W,i)=>{var q;let P={};((q=A[i])==null?void 0:q.label)!=="操作"&&(P[A[i].label]=W,y.push(P))}),k.push(y)}),a[n.name]=k}else{const x=(K=(V=n.compData)==null?void 0:V.find(A=>(A==null?void 0:A.key)==="formContent"))==null?void 0:K.contents;x==null||x.forEach(A=>{var k,C;if(A.prop!==""){let y=A==null?void 0:A.value;Array.isArray(y)?y=((k=y==null?void 0:y[0])==null?void 0:k.oldUrl)||"http://222.92.178.198:62001/"+((C=y==null?void 0:y[0])==null?void 0:C.url):y=y.toString(),A={key:(A==null?void 0:A.prop)??(A==null?void 0:A.label),value:y},o.push(A)}})}}),a.form=te.getFormContents(o),a},Mr=e=>{const a=[],o=r=>{r&&typeof r=="object"&&!Array.isArray(r)?Object.values(r).forEach(o):a.push(r)};return o(e),a},jr=async(e,a,o)=>{var A,k,C,y,W,i,P,q,b,N,m;Me.setImportLoading(!0),Ee.setFreshContent(!1);let r=await _r().catch(f=>(Me.setImportLoading(!1),Promise.reject(f)));r=r==null?void 0:r.filter(f=>{var j;return((j=f==null?void 0:f.find(T=>T==null?void 0:T.id))==null?void 0:j.id)===(a==null?void 0:a.id)});let n=te.getEqualChild([(A=I.value)==null?void 0:A.filter(f=>(f==null?void 0:f.label)!=="操作")]);const u=(C=(k=te.tableToForm(r,n))==null?void 0:k[0])==null?void 0:C.find(f=>{const j=f==null?void 0:f.key;return j==="Interface"||j==="方法体"}),c=u==null?void 0:u.value;if(!c){console.log("未搜索到isMain, 缺少算法执行接口"),Me.setImportLoading(!1);return}const d=I.value?te.getEqualChild([I.value]):[],t=d.find(f=>{const j=f==null?void 0:f.prop;return j==="Input1"||j==="输入数据.输入1"||j==="样本输入数据"}),g=t==null?void 0:t.prop;let w=a==null?void 0:a[g];const E=await ta().catch(f=>(Me.setImportLoading(!1),Promise.reject(f)));let L=!0,v="";(y=I.value)==null||y.forEach(f=>{(f==null?void 0:f.prop)===g&&(L=!!(f!=null&&f.childPath),v=f==null?void 0:f.childPath)});let _="";if(L){let f=(i=(W=I.value)==null?void 0:W.find(re=>(re==null?void 0:re.isMainKey)===!0))==null?void 0:i.prop;_=a==null?void 0:a[f];let j=v==null?void 0:v.split(Le),T=[];j==null||j.forEach((re,ue)=>{(j==null?void 0:j.length)-1===ue&&T.push(_),T.push(re)}),T=T==null?void 0:T[0];let ie=await te.getItemData(T,sessionStorage.getItem("systemKey"),""),H=ie==null?void 0:ie.filter(re=>(re==null?void 0:re.name)===g);H=H==null?void 0:H.map(re=>{var ue;return re.compData=(ue=re==null?void 0:re.compData)==null?void 0:ue.map($=>{var Q;return($==null?void 0:$.key)==="tableContents"&&($.contents=(Q=$==null?void 0:$.contents)==null?void 0:Q.filter(ne=>(ne==null?void 0:ne[1])===(a==null?void 0:a[g]))),$}),re}),(!H||(H==null?void 0:H.length)===0)&&(H=ie,H=H==null?void 0:H.map(re=>{var ue;return re.compData=(ue=re==null?void 0:re.compData)==null?void 0:ue.map($=>{var Q;return($==null?void 0:$.key)==="tableContents"&&($.contents=(Q=$==null?void 0:$.contents)==null?void 0:Q.filter(ne=>{var Y,X;return(ne==null?void 0:ne[1])===(a==null?void 0:a[(X=(Y=I==null?void 0:I.value)==null?void 0:Y[0])==null?void 0:X.prop])})),$}),re})),w=Or(H)}const U=await Ur(c,{token:E,inputData:w}).catch(f=>(Me.setImportLoading(!1),Promise.reject(f))),B=(P=U==null?void 0:U.data)==null?void 0:P.data,z=d.find(f=>(f==null?void 0:f.prop)==="Output1"),V=z==null?void 0:z.prop;let K=[],x=[];if(B&&((q=Object.values(B))==null?void 0:q.length)>0){let f=[];const j=new FormData,T=(b=Mr(B))==null?void 0:b.map(async H=>{var re,ue;if(!Array.isArray(H)&&(H!=null&&H.includes("http"))){let $=await D.axios.get(H,{responseType:"blob"}),Q=(ue=H==null?void 0:H.split("/"))==null?void 0:ue[((re=H==null?void 0:H.split("/"))==null?void 0:re.length)-1];j.append("files",$.data,Q)}else f.push(H)});if(await Promise.all(T),!te.isFormDataEmpty(j)){let H=await te.uploadAmountApi(j),re=(m=(N=H==null?void 0:H.data)==null?void 0:N.result)==null?void 0:m.map(ue=>{var $,Q,ne,Y,X,ae;return{name:(ae=(X=(Y=($=ue==null?void 0:ue.url)==null?void 0:$.split("/"))==null?void 0:Y[((ne=(Q=ue==null?void 0:ue.url)==null?void 0:Q.split("/"))==null?void 0:ne.length)-1])==null?void 0:X.split("."))==null?void 0:ae[0],url:ue==null?void 0:ue.url}});f=[...f,...re]}let ie={};for(let H in a)H!=="id"&&(ie[H]=a[H]);ie[V]=f,x.push({id:a==null?void 0:a.id,value:{tableData:ie}})}(x==null?void 0:x.length)>0&&await D.batchUpdateInsofDataApi({dataList:x}),(K==null?void 0:K.length)>0&&await D.batchAddInsofDataApi({dataList:K}),Pl(!0),Me.setImportLoading(!1),Ee.setFreshContent(!0)},xa=(e,a)=>(e=e==null?void 0:e.map(o=>{var r,n;return o!=null&&o.children&&((r=o.children)!=null&&r.find(u=>u.id===(a==null?void 0:a.id))?o.children=(n=o.children)==null?void 0:n.filter(u=>(u==null?void 0:u.id)!==(a==null?void 0:a.id)):o.children=xa(o.children,a)),o}),e),Be=l.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:s==null?void 0:s.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(e,a,o)=>{a===(s==null?void 0:s.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)"}]}),Lr=()=>{Be.show=!1},Pr=e=>{var a,o;if((e==null?void 0:e.buttonName)==="取消")return Be.show=!1;Be.to=e==null?void 0:e.content,!(!(s!=null&&s.index)||!((a=Be.to)!=null&&a.groupName))&&(s==null?void 0:s.index)!==((o=Be.to)==null?void 0:o.groupName)&&(ge("change",{buttonName:"迁移",value:{from:Be.from,to:Be.to,data:Be.selectRow}}),Be.show=!1)},aa=async(e,a,o)=>{var r,n,u,c,d,t,g,w,E,L,v,_,U,B,z;if(sl.value="",Yl.value=!0,Ql.value=!0,ge("onButtonClick",e,a),e==="删除")ra.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,K;(V=le.value)!=null&&V.find(x=>(x==null?void 0:x.id)===(a==null?void 0:a.id))?le.value=(K=D.cloneDeep(le.value))==null?void 0:K.filter(x=>(x==null?void 0:x.id)!==(a==null?void 0:a.id)):le.value=xa(D.cloneDeep(le.value),a),An(Zl.value,Ul.value,a==null?void 0:a.id),Ee.setTableLoading(s==null?void 0:s.index),ge("change",{content:le.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:I.value})});else if(e==="批量删除"){if(((r=ll.value)==null?void 0:r.length)===0)return D.ElMessage.warning("请先勾选操作的数据");ra.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var K,x;const V=(K=ll.value)==null?void 0:K.map(A=>A.id);le.value=(x=D.cloneDeep(le.value))==null?void 0:x.filter(A=>!(V!=null&&V.includes(A.id))),Ee.setTableLoading(s==null?void 0:s.index),ge("change",{content:le.value,singleContent:null,selectItems:ll.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:I.value})})}else if(e==="复制新增"){Qe.value="新增";const V=D.cloneDeep(a),K=(n=I.value)==null?void 0:n.find(k=>k==null?void 0:k.isMainKey),x=K||((u=I.value)==null?void 0:u[0]),A=(c=yl.value)==null?void 0:c.find(k=>(k==null?void 0:k.label)==="新建");await Ca(!0,A,{data:V,firstCol:x})}else if(e==="新增")Qe.value="新增",Ll(""),ul.value=!0;else if(e==="编辑")Qe.value="编辑",Ll(a),ul.value=!0;else if(e==="查看")Qe.value="查看",Ll(a),Yl.value=!1,Ql.value=!1,ul.value=!0;else if(e==="查看三维模型"){const V={};for(let x in a)x!=="id"&&(V[x]=a[x]);let K=(d=Object.values(V))==null?void 0:d[1];Za.setTableShowThree(K)}else if(((t=o==null?void 0:o.extra)==null?void 0:t.type)==="modelExample")Qe.value=e,Xl.value=!0;else if(e==="新建"){let V=Cl.value,K=[];for(let y in V)y!=null&&y.includes(`loading${((g=Nl.value)==null?void 0:g.account)||((w=Nl.value)==null?void 0:w.账号)}`)&&(K=[...K,...y]);let x=[];for(let y in V)y!=null&&y.includes(`updateLoading${((E=Nl.value)==null?void 0:E.account)||((L=Nl.value)==null?void 0:L.账号)}`)&&(x=[...x,...y]);let A=K==null?void 0:K.map(y=>y==null?void 0:y.id);const k=x==null?void 0:x.map(y=>y==null?void 0:y.id);A=[...D.cloneDeep(A),...k],(A==null?void 0:A.length)>0&&(A!=null&&A.every(y=>y!==null&&y))&&await D.batchDeleteInsofDataApi({ids:A});const C=(v=yl.value)==null?void 0:v.find(y=>(y==null?void 0:y.label)==="新建");await Ca(!1,C)}else if(e==="修改模板"){let V=D.cloneDeep(xe).value;Ee.setRouteToChildPath(V),Me.setActiveMenuPath(V+Le)}else if(e==="执行")jr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((_=ll.value)==null?void 0:_.length)===0)return D.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((U=le.value)==null?void 0:U.length)===0)return D.ElMessage.warning("暂无数据导出");const V=(z=(B=I.value)==null?void 0:B.map(x=>x==null?void 0:x.label))==null?void 0:z.filter(x=>x!=="操作"),K=e==="导出全部"?D.cloneDeep(le.value):D.cloneDeep(ll.value);K==null||K.forEach(x=>{x==null||delete x.id}),pr(K,s==null?void 0:s.compName,V,s==null?void 0:s.compName)}else e==="迁移"&&(Be.selectRow=a,Be.show=!0)},$r=async e=>{var o,r,n,u,c,d;const a=await D.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)&&((u=(n=a==null?void 0:a.data)==null?void 0:n.result)==null?void 0:u.length)>0?(d=(c=a==null?void 0:a.data)==null?void 0:c.result)==null?void 0:d.map(t=>{var g;return{id:t==null?void 0:t.id,...(g=t==null?void 0:t.value)==null?void 0:g.pageData}}):[]},Fr=async(e,a)=>{var o,r,n,u,c,d,t,g,w,E,L,v,_,U,B,z,V,K,x,A;try{let k,C;const y=(o=Cl.value[xe.value+Le])==null?void 0:o.filter(f=>{var j;return((j=f==null?void 0:f.key)==null?void 0:j.type)==="structureMethod"}),W=(r=Cl.value[xe.value+Le])==null?void 0:r.filter(f=>{var j;return((j=f==null?void 0:f.key)==null?void 0:j.type)==="structure"}),i=y==null?void 0:y.find(f=>{var j,T;return((T=(j=f==null?void 0:f.value)==null?void 0:j.pageData)==null?void 0:T.method)==="保存"});if(!i)return;const P=(d=(c=Cl.value[(u=(n=i==null?void 0:i.value)==null?void 0:n.pageData)==null?void 0:u.path])==null?void 0:c.filter(f=>{var j;return((j=f==null?void 0:f.key)==null?void 0:j.type)==="data"}))==null?void 0:d.find(f=>{var j,T,ie,H;return((T=(j=f==null?void 0:f.value)==null?void 0:j.tableData)==null?void 0:T.算法名称)===((H=(ie=i==null?void 0:i.value)==null?void 0:ie.pageData)==null?void 0:H.method)});if(!P)return;const q={buttonName:(g=(t=i==null?void 0:i.value)==null?void 0:t.pageData)==null?void 0:g.method,api:(E=(w=P==null?void 0:P.value)==null?void 0:w.tableData)==null?void 0:E.算法体,content:W==null?void 0:W.map(f=>{var j;return(j=f==null?void 0:f.value)==null?void 0:j.pageData}),extraContent:[],extraValues:(v=(L=i==null?void 0:i.value)==null?void 0:L.pageData)==null?void 0:v.data,methodName:(U=(_=i==null?void 0:i.value)==null?void 0:_.pageData)==null?void 0:U.path};if(!e)return;const b={...e,compData:(B=e==null?void 0:e.compData)==null?void 0:B.map(f=>{var j;return(f==null?void 0:f.key)==="formContent"?{...f,contents:(j=f==null?void 0:f.contents)==null?void 0:j.map(T=>(T==null?void 0:T.prop)===a?{...T,value:""}:T)}:f})},N={key:{pageKey:xe.value+Le,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:b}},m=await D.axios.post(q.api,N,{headers:{"Content-Type":"application/json"}});return((z=m==null?void 0:m.data)==null?void 0:z.code)===200&&(k=(K=(V=m==null?void 0:m.data)==null?void 0:V.result)==null?void 0:K.latestReportCode,C=(A=(x=m==null?void 0:m.data)==null?void 0:x.result)==null?void 0:A.status),{newMainKeyValue:k,newStatus:C}}catch(k){throw D.ElMessage.error(k),new Error(k)}},Da=(e,a,o,r)=>{var n;ge("contentChange",{contents:(n=e==null?void 0:e.compData)==null?void 0:n.map(u=>{var c;return(u==null?void 0:u.key)==="formContent"?{...u,contents:(c=u==null?void 0:u.contents)==null?void 0:c.map(d=>(d==null?void 0:d.key)===a?{...d,value:o}:jl.value&&(d==null?void 0:d.prop)===jl.prop?{...d,value:jl.value}:d)}:u}),index:e==null?void 0:e.id},r)},jl=l.reactive({prop:"状态",value:""}),Kr=l.ref(["系统自动生成信息","审批意见"]),Vr=async(e,a,o)=>{var t,g;let r=e==null?void 0:e[a==null?void 0:a.prop],n=1,u,c;const d=D.cloneDeep(xe).value+Le+r;if(d){jl.value="",u=(t=Cl.value[d])==null?void 0:t.filter(L=>{var v;return((v=L==null?void 0:L.key)==null?void 0:v.type)==="structure"});const w=u==null?void 0:u.find(L=>{var v,_,U;return((U=(_=(v=L==null?void 0:L.value)==null?void 0:v.pageData)==null?void 0:_.comp)==null?void 0:U.toUpperCase())==="FORM"});c={...(g=w==null?void 0:w.value)==null?void 0:g.pageData,id:w==null?void 0:w.id};const E=await Fr(c,a==null?void 0:a.prop);if(jl.value=E==null?void 0:E.newStatus,E!=null&&E.newMainKeyValue)return E==null?void 0:E.newMainKeyValue}if(le.value.some(w=>(w==null?void 0:w[a==null?void 0:a.prop])===r)){const w=r;for(;le.value.some(E=>(E==null?void 0:E[a==null?void 0:a.prop])===`${w}(${n})`);)n++;r=`${w}(${n})`}return r},Ca=async(e,a,o)=>{var c,d,t,g,w,E,L,v;let r,n;const u=await Vr(o==null?void 0:o.data,o==null?void 0:o.firstCol);if(e?(r=D.cloneDeep(xe).value+Le+((g=o==null?void 0:o.data)==null?void 0:g[(t=o==null?void 0:o.firstCol)==null?void 0:t.prop]),n=D.cloneDeep(xe).value+Le+u):(r=D.cloneDeep(xe).value+Le,n=D.cloneDeep(r)+`loading${((c=Nl.value)==null?void 0:c.account)||((d=Nl.value)==null?void 0:d.账号)}`),a){const _=(E=(w=Cl.value[n])==null?void 0:w.filter(U=>{var B;return((B=U==null?void 0:U.key)==null?void 0:B.parentTable)===""}))==null?void 0:E.map(U=>{var B;return{id:U==null?void 0:U.id,...(B=U==null?void 0:U.value)==null?void 0:B.pageData}});if((_==null?void 0:_.length)>0)if(e){const U=_==null?void 0:_.find(B=>{var z;return((z=B==null?void 0:B.comp)==null?void 0:z.toUpperCase())==="FORM"});U&&Da(U,(L=o==null?void 0:o.firstCol)==null?void 0:L.label,u,xe.value)}else Ee.setRouteToChildPath(D.cloneDeep(xe).value),Me.setActiveMenuPath(n);else if(await te.loadingConstruct(r,n,null,null,e?Kr.value:null),e){const U=await $r(n);if((U==null?void 0:U.length)>0){const B=U==null?void 0:U.find(z=>{var V;return((V=z==null?void 0:z.comp)==null?void 0:V.toUpperCase())==="FORM"});B&&Da(B,(v=o==null?void 0:o.firstCol)==null?void 0:v.label,u,xe.value)}}else Ee.setRouteToChildPath(D.cloneDeep(xe).value),Me.setActiveMenuPath(n)}else e?(sl.value="",Ke.value=o==null?void 0:o.data,Pl(!0,o==null?void 0:o.firstCol,u)):(Ee.setRouteToChildPath(D.cloneDeep(xe).value),Me.setActiveMenuPath(n))},zr=()=>{Ue.value=!1,_l.value=[],J.value=!1},Ll=e=>{var c,d,t,g,w,E,L,v,_,U,B,z,V,K,x,A,k,C,y,W;const a=[];let o=[];for(let i in e)Array.isArray(e==null?void 0:e[i])&&o.push(i);$e.value=D.cloneDeep(I.value),(d=te.getColumnChild((c=D.cloneDeep(I.value))==null?void 0:c.filter(i=>(i==null?void 0:i.label)!=="操作")))==null||d.forEach((i,P)=>{var q;o.find(b=>b===(i==null?void 0:i.prop))||(i!=null&&i.formType&&((q=i==null?void 0:i.formType)==null?void 0:q.toUpperCase())==="SELECT"||i!=null&&i.menuId?a.push({label:(i==null?void 0:i.label)||(i==null?void 0:i.prop)||"",name:(i==null?void 0:i.prop)??"t"+P,prop:i==null?void 0:i.prop,type:"Select",value:(e==null?void 0:e[i==null?void 0:i.prop])??(i==null?void 0:i.value)??"",id:(i==null?void 0:i.id)??P,contents:(i==null?void 0:i.options)??[],width:1,isFormColHidden:i==null?void 0:i.isFormColHidden,relatedValueId:i==null?void 0:i.relatedValueId,disabled:i==null?void 0:i.disabled,optionUrl:{groupSelect:i==null?void 0:i.groupSelect,menuSelect:i==null?void 0:i.formMenuSelect,type:"Select",selectRelateType:i==null?void 0:i.selectRelateType,allSelectionContents:(i==null?void 0:i.allSelectionContents)??[],selectFilter:i==null?void 0:i.selectFilter,menuId:i==null?void 0:i.menuId,filterContent:i==null?void 0:i.filterContent}}):a.push({label:(i==null?void 0:i.label)||(i==null?void 0:i.prop)||"",prop:i==null?void 0:i.prop,name:(i==null?void 0:i.prop)??"t"+P,type:!(i!=null&&i.formType)||(i==null?void 0:i.formType)===""?"Input":i==null?void 0:i.formType,value:(e==null?void 0:e[i==null?void 0:i.prop])??(i==null?void 0:i.value)??"",id:(i==null?void 0:i.id)??P,contents:(i==null?void 0:i.options)??[],width:1,isFormColHidden:i==null?void 0:i.isFormColHidden,disabled:i==null?void 0:i.disabled,relatedValueId:i==null?void 0:i.relatedValueId}))}),e===""||!e||(sl.value=(e==null?void 0:e.id)??"");let r=te.getColumnChild((t=D.cloneDeep(I.value))==null?void 0:t.filter(i=>(i==null?void 0:i.label)!=="操作"));Ye.value&&((g=Ye.value)==null?void 0:g.length)>0&&(Ye.value=(w=D.cloneDeep(Ye).value)==null?void 0:w.map(i=>{var q;let P=(i==null?void 0:i.prop)||((q=r==null?void 0:r.find(b=>(b==null?void 0:b.label)===(i==null?void 0:i.label)))==null?void 0:q.prop);return P&&(i.value=e[P]),i})),we.value=Ye.value&&((E=Ye.value)==null?void 0:E.length)>0?te.getTableFormToForm(Ye.value):a;let n=[],u=(L=s.itemData)==null?void 0:L.filter(i=>(i==null?void 0:i.key)==="filterAllType");if((u==null?void 0:u.length)>0&&(n=(u==null?void 0:u.map(P=>P==null?void 0:P.value)).flat()),(n==null?void 0:n.length)>0){let i=n==null?void 0:n.find(q=>{var b;return(b=q==null?void 0:q.content)==null?void 0:b.includes("@Type")});if(i!=null&&i.content){let q=(U=(_=(v=i==null?void 0:i.content)==null?void 0:v.replace(":",fl))==null?void 0:_.split(fl))==null?void 0:U[1];if(((B=q==null?void 0:q.trim())==null?void 0:B.toUpperCase())==="MANUAL"){let b=(A=(x=(z=s.itemData)==null?void 0:z.filter(N=>(N==null?void 0:N.key)==="contentTableId"))==null?void 0:x[((K=(V=s.itemData)==null?void 0:V.filter(N=>(N==null?void 0:N.key)==="contentTableId"))==null?void 0:K.length)-1])==null?void 0:A.contents;we.value=(k=we.value)==null?void 0:k.map((N,m)=>{var f,j,T,ie,H,re,ue,$,Q,ne,Y;return(f=N==null?void 0:N.optionUrl)!=null&&f.menuId&&(N.type="Select",(j=N==null?void 0:N.optionUrl)!=null&&j.menuId?(N.optionUrl.menuId=b,N.optionUrl.menuFilter=n,Qe.value==="新增"&&(N.optionUrl.multiple=(H=(ie=(T=n==null?void 0:n.find(X=>{var ae;return(ae=X==null?void 0:X.content)==null?void 0:ae.includes("@Num")}))==null?void 0:T.content)==null?void 0:ie.split(":"))!=null&&H[1]&&parseInt(($=(ue=(re=n==null?void 0:n.find(X=>{var ae;return(ae=X==null?void 0:X.content)==null?void 0:ae.includes("@Num")}))==null?void 0:re.content)==null?void 0:ue.split(":"))==null?void 0:$[1])>1?!0:void 0,N.optionUrl.multipleLimit=(Y=(ne=(Q=n==null?void 0:n.find(X=>{var ae;return(ae=X==null?void 0:X.content)==null?void 0:ae.includes("@Num")}))==null?void 0:Q.content)==null?void 0:ne.split(":"))==null?void 0:Y[1])):N.optionUrl={menuId:b,menuFilter:n}),N})}}let P=(C=we.value)==null?void 0:C.filter(q=>{var b,N;return((b=q==null?void 0:q.optionUrl)==null?void 0:b.menuId)&&((N=q==null?void 0:q.optionUrl)==null?void 0:N.menuId)!==""});if((P==null?void 0:P.length)>1){let q=P==null?void 0:P.map(f=>f==null?void 0:f.prop),b=P==null?void 0:P.map(f=>f==null?void 0:f.label),N=P==null?void 0:P.map(f=>f==null?void 0:f.value),m=(y=D.cloneDeep(P))==null?void 0:y[0];m.label=b==null?void 0:b.join("·"),m.value=N==null?void 0:N.join(" "),m.value.trim()===""&&(m.value=""),m.prop=q==null?void 0:q.join("·"),m.usingType="parent",we.value.unshift(m),we.value=(W=we.value)==null?void 0:W.map(f=>(q!=null&&q.find(j=>j===(f==null?void 0:f.prop))&&(f.isFormColHidden=!0),f))}}},qr=()=>{var a;const e=(a=M.value)==null?void 0:a.$el;e&&te.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:o=>{var c;const{oldIndex:r,newIndex:n}=o;if(r===n)return;const u=Ml.value.splice(r,1)[0];Ml.value.splice(n,0,u),I.value=(c=I.value)==null?void 0:c.slice().sort((d,t)=>{if(d.label==="操作")return 1;if(t.label==="操作")return-1;const g=Ml.value.findIndex(E=>E.label===d.label),w=Ml.value.findIndex(E=>E.label===t.label);return g-w})}})};l.onMounted(()=>{ia.value=window.innerWidth-240*2});const Rr=()=>{l.nextTick(()=>{qr()})},ca=(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 u,c;if((n==null?void 0:n.id)===sl.value){let d={};for(let t in n){let g=(u=a==null?void 0:a.find(w=>(w==null?void 0:w.prop)===t))==null?void 0:u.label;g?d[t]=(c=Ke.value)==null?void 0:c[g]:d[t]=n[t]}n=Object.assign(d,Ke.value),o=n}else{let d=ca(n,a);n=d==null?void 0:d.contents,o=d==null?void 0:d.currentSelectContents}return n}),{contents:e,currentSelectContents:o}},Ta=(e,a)=>{let o,r;return e!=null&&e.find(n=>(n==null?void 0:n.id)===sl.value)?o=e==null?void 0:e.map(n=>{var u,c;if((n==null?void 0:n.id)===sl.value){let d={};for(let t in n){let g=(u=a==null?void 0:a.find(w=>(w==null?void 0:w.prop)===t))==null?void 0:u.label;g?d[t]=(c=Ke.value)==null?void 0:c[g]:d[t]=n[t]}n=Object.assign(d,Ke.value),r=n}return n}):o=e==null?void 0:e.map(n=>{var u,c,d,t;if((n==null?void 0:n.id)===sl.value){let g={};for(let w in n){let E=(u=a==null?void 0:a.find(L=>(L==null?void 0:L.prop)===w))==null?void 0:u.label;E?g[w]=(c=Ke.value)==null?void 0:c[E]:g[w]=n[w]}n=Object.assign(g,Ke.value),r=n}else n=(d=ca(n,a))==null?void 0:d.contents,r=(t=ca(n,a))==null?void 0:t.currentSelectContents;return n}),{newContents:o,currentSelectContents:r}},Na=(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(Na)),e},da=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(...da(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const n={...r};return delete n.children,n}):[]},Pl=(e=!0,a,o)=>{var g,w,E,L,v,_,U,B,z,V,K,x,A,k,C,y,W,i,P,q,b,N,m,f,j,T,ie,H,re,ue;let r=te.getColumnChild((g=D.cloneDeep(I.value))==null?void 0:g.filter($=>($==null?void 0:$.label)!=="操作")),n,u=D.cloneDeep(le.value);if(!Ke.value){ul.value=!1;return}if(sl.value===""){Tl.value++;let $;a&&o?$={id:Tl.value.toString(),[a==null?void 0:a.prop]:o,children:Ke.value.children}:$={id:Tl.value.toString()},$!=null&&$.children&&($={...$,children:(w=$.children)==null?void 0:w.map(Q=>Na(Q,a,o))}),u.push(Object.assign(Ke.value,$)),n=Object.assign(Ke.value,$)}else u=(E=Ta(u,r))==null?void 0:E.newContents,n=(L=Ta(u,r))==null?void 0:L.currentSelectContents;const c=(v=s.itemData)==null?void 0:v.filter($=>($==null?void 0:$.key)==="childTree")[0];if(((_=c==null?void 0:c.contents)==null?void 0:_.length)>0){Qe.value="编辑";const $=[];u==null||u.forEach((Q,ne)=>{var X;let Y={};if(Array.isArray(Q)){let ae=[];Q==null||Q.filter(be=>!(be!=null&&be.id)).forEach((be,Ce)=>{var ke,Je,qe,We,al,Pe,vl;if((Je=(ke=Ie.value)==null?void 0:ke[Ce])!=null&&Je.prop&&!Array.isArray(be)){let pl={};pl[Ie.value[Ce].column]=be,De!=null&&De.value&&((qe=De==null?void 0:De.value)==null?void 0:qe.length)>0&&((We=De==null?void 0:De.value)!=null&&We.find(Fe=>JSON.stringify(Fe==null?void 0:Fe[0])===JSON.stringify(pl)))&&(ae=(al=De==null?void 0:De.value)==null?void 0:al.find(Fe=>JSON.stringify(Fe==null?void 0:Fe[0])===JSON.stringify(pl))),ae&&ae.length>0?Y[Ie.value[Ce].prop]=ae!=null&&ae.find(Fe=>{var rl;return((rl=Object.keys(Fe))==null?void 0:rl[0])===Ie.value[Ce].column})?(Pe=ae==null?void 0:ae.find(Fe=>{var rl;return((rl=Object.keys(Fe))==null?void 0:rl[0])===Ie.value[Ce].column}))==null?void 0:Pe[Ie.value[Ce].column]:be:Y[Ie.value[Ce].prop]=be}else Array.isArray(be)&&((vl=Ie.value[Ce])!=null&&vl.prop?Y[Ie.value[Ce].prop]=be:Y.children=ha(be,Ie.value))})}else Y=Q;Array.isArray(Q)&&Q.some(ae=>ae==null?void 0:ae.id)?$.push(Object.assign(Y,{id:(X=Q==null?void 0:Q.find(ae=>ae.id))==null?void 0:X.id})):Y.id?$.push(Y):$.push(Object.assign(Y,{id:ne.toString()}))}),le.value=_a($,c,I.value)}wa(le.value),Zl.value=le.value;const d=wn(Zl.value,Ul.value,u);let t=[];if(wl.value?(t=(U=D.cloneDeep(wl).value.singleContent)==null?void 0:U.filter($=>($==null?void 0:$.id)!==(n==null?void 0:n.id)),t.push(n)):t=[n],el.value){const $={content:d,singleContent:((B=c==null?void 0:c.contents)==null?void 0:B.length)>0?t==null?void 0:t.flatMap(da):t,index:s==null?void 0:s.index,buttonName:"编辑",column:I.value,parentTableId:s==null?void 0:s.parentTableId};Ee.setCacheUpdatingData($)}if(e){let $=(x=(K=(V=(z=s.itemData)==null?void 0:z.find(Y=>(Y==null?void 0:Y.key)==="filterAllType"))==null?void 0:V.value)==null?void 0:K.find(Y=>(Y==null?void 0:Y.value)==="onConditionContents"))==null?void 0:x.content,Q=(A=s.itemData)==null?void 0:A.filter(Y=>(Y==null?void 0:Y.key)==="filterAllType");Q=Array.from(new Map(Q.filter(Boolean).map((Y,X)=>[Y.value,{...Y,_idx:X}])).values()).sort((Y,X)=>Y._idx-X._idx).map(({_idx:Y,...X})=>X),Q=(k=Q==null?void 0:Q[(Q==null?void 0:Q.length)-1])==null?void 0:k.value;const ne={content:d,singleContent:((C=c==null?void 0:c.contents)==null?void 0:C.length)>0?da(n):n,index:s==null?void 0:s.index,buttonName:Qe.value,column:I.value,parentTableId:s==null?void 0:s.parentTableId,filter:$,allFilter:Q,pathIndex:(W=(y=s.itemData)==null?void 0:y.find(Y=>(Y==null?void 0:Y.key)==="relatedFilter"))==null?void 0:W.index,rowContents:we.value};Ee.setTableLoading(s==null?void 0:s.index),ul.value=!1,Ke.value=void 0,ge("change",ne)}if((q=(P=(i=we.value)==null?void 0:i[0])==null?void 0:P.optionUrl)!=null&&q.menuId){ul.value=!1;let $=(b=s.itemData)==null?void 0:b.filter(Q=>(Q==null?void 0:Q.key)==="filterAllType");if(($==null?void 0:$.length)>0){let Q=$==null?void 0:$.map(X=>X==null?void 0:X.value),ne=(f=(m=(N=Q.flat().find(X=>{var ae;return(ae=X==null?void 0:X.content)==null?void 0:ae.includes("@Num")}))==null?void 0:N.content)==null?void 0:m.split(":"))==null?void 0:f[1];((ie=(T=(j=Q.flat().find(X=>{var ae;return(ae=X==null?void 0:X.content)==null?void 0:ae.includes("@Type:")}))==null?void 0:j.content)==null?void 0:T.split(":"))==null?void 0:ie[1])!=="Manual"&&(ne=parseInt(ne),le.value=(ue=le.value)==null?void 0:ue.slice(((H=le.value)==null?void 0:H.length)-ne,(re=le.value)==null?void 0:re.length))}}};l.onUnmounted(()=>{I.value=[],le.value=[],$e.value=[],oa.value=[],Ye.value=[],gl.value=[],_l.value=[],kl.value=[],we.value=[],ll.value=[],M.value=null});const Aa=async(e,a,o)=>{var g,w,E,L,v,_,U,B,z,V,K;tl.value=o==null?void 0:o.prop;const r=D.cloneDeep(s.itemData),n=r==null?void 0:r.map(x=>{var A;return(x==null?void 0:x.key)==="header"&&((A=x.contents)==null||A.map((k,C)=>{var y,W,i,P,q,b,N,m,f,j,T,ie,H,re,ue,$,Q,ne,Y;return k.type=k!=null&&k.type?k.type:(P=(i=(W=(y=k==null?void 0:k.key)==null?void 0:y.split("$"))==null?void 0:W[1])==null?void 0:i.split("("))!=null&&P[0]?(b=(q=te.FormType)==null?void 0:q.find(X=>{var ae,be,Ce,ke;return(X==null?void 0:X.key)===((ke=(Ce=(be=(ae=k==null?void 0:k.key)==null?void 0:ae.split("$"))==null?void 0:be[1])==null?void 0:Ce.split("("))==null?void 0:ke[0])}))==null?void 0:b.value:"Input",k.options=k!=null&&k.options?k.options:((f=(m=(N=k==null?void 0:k.key)==null?void 0:N.split("$"))==null?void 0:m[1])==null?void 0:f.length)>0?(H=(ie=fa((T=(j=k==null?void 0:k.key)==null?void 0:j.split("$"))==null?void 0:T[1]))==null?void 0:ie.split(","))==null?void 0:H.map(X=>({label:X,value:X})):[],(re=k==null?void 0:k.key)!=null&&re.includes("$")&&(k.key=($=(ue=k==null?void 0:k.key)==null?void 0:ue.split("$"))==null?void 0:$[0]),k.value=(Q=Object.values(a))==null?void 0:Q[C],k.optionUrl=k!=null&&k.formMenuSelect&&((ne=k==null?void 0:k.formMenuSelect)==null?void 0:ne.length)>0?{groupSelect:(Y=k==null?void 0:k.groupSelect)==null?void 0:Y.split(/[::]/).map(X=>X.trim()),menuSelect:k==null?void 0:k.formMenuSelect,selectRelateType:"",type:(k==null?void 0:k.formType)??(k!=null&&k.groupSelect?"Select":"")}:null,k})),x});let u=D.cloneDeep(we.value),c=(w=(g=D.cloneDeep(n))==null?void 0:g.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:w.contents;u=u==null?void 0:u.map(x=>{var A;return x.value=(A=c==null?void 0:c.find((k,C)=>C===(x==null?void 0:x.id)))==null?void 0:A.value,x});let d="",t=(v=(L=(E=D.cloneDeep(n))==null?void 0:E.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:L.contents)==null?void 0:v.find((x,A)=>{var k,C,y;return(x==null?void 0:x.label)===tl.value||(A==null?void 0:A.toString())===((y=(C=(k=tl.value)==null?void 0:k.split("a"))==null?void 0:C[1])==null?void 0:y.toString())});if((B=(U=(_=D.cloneDeep(n))==null?void 0:_.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:U.contents)==null||B.forEach(x=>{var A,k,C,y,W;d===""&&((C=(k=(A=x==null?void 0:x.optionUrl)==null?void 0:A.groupSelect)==null?void 0:k[1])!=null&&C.includes("["))&&(d=(W=(y=x==null?void 0:x.optionUrl)==null?void 0:y.groupSelect)==null?void 0:W[1])}),(z=t==null?void 0:t.optionUrl)!=null&&z.menuSelect){let x=await ga(t),A;if(x==null||x.forEach(k=>{var C,y,W,i,P,q,b,N,m,f;d===((y=(C=t==null?void 0:t.optionUrl)==null?void 0:C.groupSelect)==null?void 0:y[1])&&((P=(i=(W=t==null?void 0:t.optionUrl)==null?void 0:W.groupSelect)==null?void 0:i[1])!=null&&P.includes("["))&&((f=D.cloneDeep(k))==null?void 0:f[(m=(N=(b=(q=t==null?void 0:t.optionUrl)==null?void 0:q.groupSelect)==null?void 0:b[1])==null?void 0:N.replaceAll("[",""))==null?void 0:m.replaceAll("]","")])===(t==null?void 0:t.value)&&(A=k)}),A){let k=D.cloneDeep(u);k=k==null?void 0:k.map(y=>{var W,i,P,q,b,N,m,f,j,T,ie;return(A!=null&&A[y==null?void 0:y.label]||A!=null&&A[(q=(P=(i=(W=y==null?void 0:y.optionUrl)==null?void 0:W.groupSelect)==null?void 0:i[1])==null?void 0:P.replaceAll("[",""))==null?void 0:q.replaceAll("]","")])&&((m=(N=(b=y==null?void 0:y.optionUrl)==null?void 0:b.groupSelect)==null?void 0:N[1])!=null&&m.includes("["))&&(y.value=(A==null?void 0:A[y==null?void 0:y.label])||(A==null?void 0:A[(ie=(T=(j=(f=y==null?void 0:y.optionUrl)==null?void 0:f.groupSelect)==null?void 0:j[1])==null?void 0:T.replaceAll("[",""))==null?void 0:ie.replaceAll("]","")])),y}),le.value=(V=D.cloneDeep(le.value))==null?void 0:V.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const W={};return k==null||k.forEach(i=>{W[i.name]=i.value}),W.id=y==null?void 0:y.id,W}return y});let C=D.cloneDeep(k);C=C==null?void 0:C.map(y=>{var W,i,P,q;return(i=(W=y==null?void 0:y.optionUrl)==null?void 0:W.menuSelect)!=null&&i.some(b=>b==null?void 0:b.includes)&&(y.optionUrl.menuSelect=(q=(P=y==null?void 0:y.optionUrl)==null?void 0:P.menuSelect)==null?void 0:q.map(b=>{var N,m,f,j;if(b!=null&&b.includes("[")){let T=(m=(N=b==null?void 0:b.replaceAll("[","").replaceAll("]",""))==null?void 0:N.split(":"))==null?void 0:m[1];b=(j=(f=D.cloneDeep(k))==null?void 0:f.find(ie=>(ie==null?void 0:ie.label)===T))==null?void 0:j.value}return b})),y}),le.value=(K=D.cloneDeep(le.value))==null?void 0:K.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const W={};return C==null||C.forEach(i=>{W[i.name]=i.value}),W.id=y==null?void 0:y.id,W}return y})}}},Jr=async e=>{var E,L,v,_,U,B,z,V,K,x,A,k,C,y,W,i,P,q;if(!e)return;Ke.value=e;const a=D.cloneDeep(s.itemData);let o=a==null?void 0:a.map(b=>{var N;return(b==null?void 0:b.key)==="header"&&((N=b.contents)==null||N.map((m,f)=>{var j,T,ie,H,re,ue,$,Q,ne,Y,X,ae,be,Ce,ke,Je,qe,We,al;return m.type=m!=null&&m.type?m.type:(H=(ie=(T=(j=m==null?void 0:m.key)==null?void 0:j.split("$"))==null?void 0:T[1])==null?void 0:ie.split("("))!=null&&H[0]?(ue=(re=te.FormType)==null?void 0:re.find(Pe=>{var vl,pl,Fe,rl;return(Pe==null?void 0:Pe.key)===((rl=(Fe=(pl=(vl=m==null?void 0:m.key)==null?void 0:vl.split("$"))==null?void 0:pl[1])==null?void 0:Fe.split("("))==null?void 0:rl[0])}))==null?void 0:ue.value:"Input",m.options=m!=null&&m.options?m.options:((ne=(Q=($=m==null?void 0:m.key)==null?void 0:$.split("$"))==null?void 0:Q[1])==null?void 0:ne.length)>0?(be=(ae=fa((X=(Y=m==null?void 0:m.key)==null?void 0:Y.split("$"))==null?void 0:X[1]))==null?void 0:ae.split(","))==null?void 0:be.map(Pe=>({label:Pe,value:Pe})):[],(Ce=m==null?void 0:m.key)!=null&&Ce.includes("$")&&(m.key=(Je=(ke=m==null?void 0:m.key)==null?void 0:ke.split("$"))==null?void 0:Je[0]),m.value=(qe=Object.values(e))==null?void 0:qe[f],m.optionUrl=m!=null&&m.formMenuSelect&&((We=m==null?void 0:m.formMenuSelect)==null?void 0:We.length)>0?{groupSelect:(al=m==null?void 0:m.groupSelect)==null?void 0:al.split(/[::]/).map(Pe=>Pe.trim()),menuSelect:m==null?void 0:m.formMenuSelect,selectRelateType:"",type:(m==null?void 0:m.formType)??(m!=null&&m.groupSelect?"Select":"")}:null,m})),b}),r=we.value,n=(L=(E=D.cloneDeep(o))==null?void 0:E.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:L.contents;if(n=n==null?void 0:n.filter(b=>(b==null?void 0:b.label)!=="操作"),n.push({label:"操作",type:"operate"}),r=r==null?void 0:r.map(b=>{var N;return b.value=b.value??((N=n==null?void 0:n.find((m,f)=>(m==null?void 0:m.prop)===(b==null?void 0:b.name)))==null?void 0:N.value),b}),!Ol.value)return;let u="";(v=tl.value)!=null&&v.includes("·")&&(tl.value=(U=(_=tl.value)==null?void 0:_.split("·"))==null?void 0:U[0]);let c=(V=(z=(B=D.cloneDeep(o))==null?void 0:B.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:z.contents)==null?void 0:V.find((b,N)=>{var m,f,j;return(b==null?void 0:b.label)===tl.value||(N==null?void 0:N.toString())===((j=(f=(m=tl.value)==null?void 0:m.split("a"))==null?void 0:f[1])==null?void 0:j.toString())}),d=(K=c==null?void 0:c.optionUrl)==null?void 0:K.menuSelect,t=!0;(k=(A=(x=D.cloneDeep(o))==null?void 0:x.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:A.contents)==null||k.forEach(b=>{var N,m,f,j,T,ie;t&&((f=(m=(N=b==null?void 0:b.optionUrl)==null?void 0:N.groupSelect)==null?void 0:m[1])!=null&&f.includes("["))&&(u=(T=(j=b==null?void 0:b.optionUrl)==null?void 0:j.groupSelect)==null?void 0:T[1],JSON.stringify(d)===JSON.stringify((ie=b==null?void 0:b.optionUrl)==null?void 0:ie.menuSelect)&&(t=!1))});let g=D.cloneDeep(r);g=g==null?void 0:g.map(b=>{var N,m;return(b==null?void 0:b.type)==="Select"&&((m=(N=b==null?void 0:b.optionUrl)==null?void 0:N.allSelectionContents)==null?void 0:m.length)>0&&(b.optionUrl.contactValue=e),b.value=e==null?void 0:e[b==null?void 0:b.prop],b}),we.value=D.cloneDeep(g);let w=(W=(y=(C=we.value)==null?void 0:C.find(b=>{var N;return(N=b==null?void 0:b.optionUrl)==null?void 0:N.menuId}))==null?void 0:y.optionUrl)==null?void 0:W.menuId;if((i=c==null?void 0:c.optionUrl)!=null&&i.menuSelect&&Ol.value||w){let b=await ga(c,w),N;if((P=c==null?void 0:c.optionUrl)==null||P.menuSelect,b==null||b.forEach(m=>{var f,j,T,ie,H,re,ue,$,Q,ne,Y,X,ae,be,Ce;if(u===((j=(f=c==null?void 0:c.optionUrl)==null?void 0:f.groupSelect)==null?void 0:j[1])&&((H=(ie=(T=c==null?void 0:c.optionUrl)==null?void 0:T.groupSelect)==null?void 0:ie[1])!=null&&H.includes("["))&&((ne=D.cloneDeep(m))==null?void 0:ne[(Q=($=(ue=(re=c==null?void 0:c.optionUrl)==null?void 0:re.groupSelect)==null?void 0:ue[1])==null?void 0:$.replaceAll("[",""))==null?void 0:Q.replaceAll("]","")])===(c==null?void 0:c.value)&&(N=m),w){let ke=(X=(Y=we.value)==null?void 0:Y.find(qe=>{var We;return(We=qe==null?void 0:qe.optionUrl)==null?void 0:We.menuId}))==null?void 0:X.prop,Je=e[ke];ke!=null&&ke.includes("·")&&(Je=(be=(ae=e[ke])==null?void 0:ae.split(" "))==null?void 0:be[0],ke=(Ce=ke==null?void 0:ke.split("·"))==null?void 0:Ce[0]),m[ke]===Je&&(N=m)}}),N){let m=D.cloneDeep(r);m=m==null?void 0:m.map(T=>{var ie,H,re,ue,$,Q,ne,Y,X,ae,be,Ce,ke,Je,qe,We,al;return(N!=null&&N[T==null?void 0:T.prop]||N!=null&&N[(ue=(re=(H=(ie=T==null?void 0:T.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:H[1])==null?void 0:re.replaceAll("[",""))==null?void 0:ue.replaceAll("]","")])&&((ne=(Q=($=T==null?void 0:T.optionUrl)==null?void 0:$.groupSelect)==null?void 0:Q[1])!=null&&ne.includes("["))&&(T!=null&&T.relatedValueId)&&(T.value=(N==null?void 0:N[T==null?void 0:T.prop])||(N==null?void 0:N[(be=(ae=(X=(Y=T==null?void 0:T.optionUrl)==null?void 0:Y.groupSelect)==null?void 0:X[1])==null?void 0:ae.replaceAll("[",""))==null?void 0:be.replaceAll("]","")])),w&&(N!=null&&N[T==null?void 0:T.prop])&&(T!=null&&T.relatedValueId)&&Qe.value==="新增"?T.value=(N==null?void 0:N[T==null?void 0:T.prop])||(N==null?void 0:N[(qe=(Je=(ke=(Ce=T==null?void 0:T.optionUrl)==null?void 0:Ce.groupSelect)==null?void 0:ke[1])==null?void 0:Je.replaceAll("[",""))==null?void 0:qe.replaceAll("]","")]):T.value=(al=(We=we.value)==null?void 0:We.find(Pe=>(Pe==null?void 0:Pe.prop)===(T==null?void 0:T.prop)))==null?void 0:al.value,T}),we.value=D.cloneDeep(m);let f=D.cloneDeep(m);f=f==null?void 0:f.map(T=>{var ie,H,re,ue,$,Q;return(H=(ie=T==null?void 0:T.optionUrl)==null?void 0:ie.menuSelect)!=null&&H.some(ne=>ne==null?void 0:ne.includes("["))&&(T.optionUrl.oldMenuSelect=(ue=(re=D.cloneDeep(T))==null?void 0:re.optionUrl)==null?void 0:ue.menuSelect,T.optionUrl.menuSelect=(Q=($=T==null?void 0:T.optionUrl)==null?void 0:$.menuSelect)==null?void 0:Q.map(ne=>{var Y,X,ae,be;if(ne!=null&&ne.includes("[")){let Ce=(X=(Y=ne==null?void 0:ne.replaceAll("[","").replaceAll("]",""))==null?void 0:Y.split(":"))==null?void 0:X[1];ne=(be=(ae=D.cloneDeep(m))==null?void 0:ae.find(ke=>(ke==null?void 0:ke.label)===Ce))==null?void 0:be.value}return ne})),T}),we.value=f;let j={};(q=we.value)==null||q.forEach(T=>{j[T.prop]=T==null?void 0:T.value}),Ke.value=j}}Ol.value=!1},Wr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",Gr=e=>{var u,c;const a=(c=(u=Ye.value)==null?void 0:u.find(d=>(d==null?void 0:d.label)===(e==null?void 0:e.label)))==null?void 0:c.multiple,o=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;le.value.forEach(d=>{const t=d==null?void 0:d[o];a&&Ra.isString(t)&&(d[o]=[t]),!a&&!Ra.isString(t)&&(d[o]="")})},Ea=(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=>Ea(r,a))),e},pa=e=>{var o,r,n,u,c,d;Ll("");const a=(o=we.value)==null?void 0:o.reduce((t,g)=>(t[g.name]=g.value,t),{});if(((r=Object.keys(a))==null?void 0:r.length)>0){Ke.value=a,sl.value="",Tl.value=(n=le.value)==null?void 0:n.length,kl.value=(u=yl.value)==null?void 0:u.filter(g=>(g==null?void 0:g.label)!=="新增");const t=(d=(c=$e.value)==null?void 0:c.filter(g=>(g==null?void 0:g.label)!=="操作"))==null?void 0:d.map(g=>{var E,L,v;const w=(L=(E=Ye.value)==null?void 0:E.find(_=>(_==null?void 0:_.label)===(g==null?void 0:g.label)))==null?void 0:L.multiple;return Gr(g),{...g,contents:(g==null?void 0:g.options)??[],optionUrl:g!=null&&g.formMenuSelect&&((v=g==null?void 0:g.formMenuSelect)==null?void 0:v.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:w}:null}});I.value=t==null?void 0:t.map(g=>Ea(g,[{prop:"type",value:"edit"},{prop:"columnType",value:Wr(g==null?void 0:g.formType)||(g==null?void 0:g.columnType)}])),e==="createClick"&&Pl(!1)}},Al={START:"开始时间",END:"结束时间",HOURS:"工时"},Hr=(e,a)=>Number(te.dayjs(a).diff(te.dayjs(e),"day",!0).toFixed(1)),wa=e=>{var u;const a=s.itemData,o=(u=a==null?void 0:a.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:u.contents,r=new Map;return o==null||o.forEach((c,d)=>{const{label:t}=c;r.set(t,d)}),!r.has(Al.START)||!r.has(Al.END)||!r.has(Al.HOURS)?e:e==null?void 0:e.map(c=>{const d=c==null?void 0:c[Al.START],t=c==null?void 0:c[Al.END],g=Hr(d,t);return d&&t&&(c[Al.HOURS]=`${g}天`),c})},Ba=(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 c of e){const d=c[r];n.has(d)||n.set(d,[]),n.get(d)&&n.get(d).push(c)}const u=[];for(const[c,d]of n){const[t,...g]=d,w={...t};o+1===((a==null?void 0:a.length)??"")?w.children=d==null?void 0:d.map(E=>(E.level=D.cloneDeep(o)+1,E)).filter((E,L)=>L!==0):g.length>0&&(w.children=Ba(g,a,o+1)),w.level=o,u.push(w)}return u},_a=(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=Ba(e,a==null?void 0:a.contents,0),r},Ua=(e,a)=>{var v,_,U,B,z,V,K,x,A,k,C,y,W,i,P,q,b,N,m,f,j,T,ie,H,re,ue,$,Q,ne,Y,X,ae,be,Ce,ke,Je,qe,We,al,Pe,vl,pl,Fe,rl,ja,La,Pa,$a,Fa,Ka,Va,za;const o=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="header");e==null||e.filter(p=>(p==null?void 0:p.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="childTree")[0];let n=!0;if((U=(_=(v=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="filterAllType"))==null?void 0:v.value)==null?void 0:_.find(p=>(p==null?void 0:p.value)==="onPamButtonContents"))!=null&&U.content){let p=(V=(z=(B=e==null?void 0:e.find(Z=>(Z==null?void 0:Z.key)==="filterAllType"))==null?void 0:B.value)==null?void 0:z.find(Z=>(Z==null?void 0:Z.value)==="onPamButtonContents"))==null?void 0:V.content;p=(K=p==null?void 0:p.split(":"))==null?void 0:K[1],p=(x=p.slice(1,(p==null?void 0:p.length)-1))==null?void 0:x.split(","),n=!!(p!=null&&p.find(Z=>Z==="操作"))}let u=a;const c=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="page"),d=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="rowButton"),t=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="extraButton"),g=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableContents"),w=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableIndex");Ye.value=(k=(A=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableToForm"))==null?void 0:A[0])==null?void 0:k.contents,ya.value=(c==null?void 0:c.contents)??!0;let E=[];ml.value===""?E=o==null?void 0:o[0]:E=(o==null?void 0:o.find(p=>(p==null?void 0:p.selectLabel)==="("+ml.value+")"))??(o==null?void 0:o.find(p=>!(p!=null&&p.selectLabel)));let L=[];if(ml.value===""?L=w==null?void 0:w[0]:L=(w==null?void 0:w.find(p=>(p==null?void 0:p.selectLabel)==="("+ml.value+")"))??(w==null?void 0:w.find(p=>!(p!=null&&p.selectLabel))),((C=E==null?void 0:E.contents)==null?void 0:C.length)>0){let p=[];if(E!=null&&E.contents.some(R=>Array.isArray(R)&&(R==null?void 0:R.find(h=>h.children))))Ul.value===""?p=(W=(y=te.getGradeColumns(E==null?void 0:E.contents,n))==null?void 0:y[0])==null?void 0:W.filter(R=>!Array.isArray(R)):(Ul.value.split("-"),p=(i=te.getGradeColumns(E==null?void 0:E.contents,n))==null?void 0:i[0]);else{let R=E!=null&&E.contents.some(h=>Array.isArray(h))?(P=E==null?void 0:E.contents)==null?void 0:P[0]:E==null?void 0:E.contents;R==null||R.forEach((h,Re)=>{var Ge,Ze,Fl,Kl,Vl;let ze="";(Ze=(Ge=xe.value)==null?void 0:Ge.split("/"))==null||Ze.forEach(nl=>{var zl,ql,El;if(nl!==""){let He=(El=(ql=(zl=nl==null?void 0:nl.split(Le+"updateLoading"))==null?void 0:zl[0])==null?void 0:ql.split(Le+"loading"))==null?void 0:El[0];ze=ze===""?ze+He:ze+"/"+He}}),ze=ze+Le+(h==null?void 0:h.directiveLabel);const je=(Fl=Ye.value)==null?void 0:Fl.find(nl=>(nl==null?void 0:nl.prop)===(h==null?void 0:h.prop));p.push({label:(h==null?void 0:h.label)==="操作"?n?"操作":"":(h==null?void 0:h.label)??"",prop:(h==null?void 0:h.label)==="操作"?"operate":(h==null?void 0:h.prop)??"a"+Re,width:h!=null&&h.width?parseInt(h.width):"",fixed:(h==null?void 0:h.fixed)??void 0,sortable:(h==null?void 0:h.sortable)??!1,filterable:(h==null?void 0:h.filterable)??!1,operable:(h==null?void 0:h.operable)??!1,showSummary:(h==null?void 0:h.showSummary)??!1,align:(h==null?void 0:h.align)??"left",showOverflowTooltip:(h==null?void 0:h.showOverflowTooltip)??!0,isNotDrag:(h==null?void 0:h.isNotDrag)??!1,isEditCol:(h==null?void 0:h.isEditCol)??!1,isOperate:(h==null?void 0:h.isOperate)??!1,id:(h==null?void 0:h.id)??Re,type:(h==null?void 0:h.label)==="操作"?"operate":void 0,formType:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":""),isTableColHidden:h==null?void 0:h.isTableColHidden,isFormColHidden:h==null?void 0:h.isFormColHidden,disabled:h==null?void 0:h.disabled,options:(h==null?void 0:h.options)??[],value:(h==null?void 0:h.value)??"",formMenuSelect:(h==null?void 0:h.formMenuSelect)??[],isRoute:(h==null?void 0:h.isRoute)??!1,groupSelect:h!=null&&h.groupSelect?(Kl=h==null?void 0:h.groupSelect)==null?void 0:Kl.replaceAll('"',"").split(":"):[],isMainKey:(h==null?void 0:h.isMainKey)||(h==null?void 0:h.directiveLabel)==="#isMain",columnType:(je==null?void 0:je.type)||(h==null?void 0:h.columnType)||"TEXTAREA",directiveLabel:h==null?void 0:h.directiveLabel,directiveColor:(h==null?void 0:h.directiveColor)??!1,isExistChild:!!(h!=null&&h.directiveLabel&&!(u!=null&&u[ze])&&!((Vl=h==null?void 0:h.directiveLabel)!=null&&Vl.includes("@"))&&(h==null?void 0:h.directiveLabel)!=="#isMain"),childPath:(h==null?void 0:h.directiveLabel)!=="#isMain"?ze:void 0,allSelectionContents:(h==null?void 0:h.allSelectionContents)??[],selectFilter:h==null?void 0:h.selectFilter,menuId:h==null?void 0:h.menuId,filterContent:h==null?void 0:h.filterContent,relatedValueId:h==null?void 0:h.relatedValueId})})}I.value=te.getNewColumnChild(p),oa.value=te.getNewColumnChild(p),ee.value=(q=I.value)==null?void 0:q.map(R=>R==null?void 0:R.label),he.value=(b=I.value)==null?void 0:b.every(R=>R==null?void 0:R.filterable),me.value=(N=I.value)==null?void 0:N.every(R=>R==null?void 0:R.operable),hl.value=(m=I.value)==null?void 0:m.every(R=>R==null?void 0:R.sortable);let Z=(j=(f=te.getAllLeafNodes(I.value))==null?void 0:f.filter(R=>(R==null?void 0:R.type)!=="operate"))==null?void 0:j.map((R,h)=>({prop:(R==null?void 0:R.prop)??"a"+h,column:R.label}));Ie.value=Z;let _e=[];ml.value===""?_e=g==null?void 0:g[0]:_e=(g==null?void 0:g.find(R=>(R==null?void 0:R.selectLabel)==="("+ml.value+")"))??(g==null?void 0:g.find(R=>!(R!=null&&R.selectLabel)));let xl=Array.isArray((T=_e==null?void 0:_e.contents)==null?void 0:T[0])&&((ie=_e==null?void 0:_e.contents)!=null&&ie[0].every(R=>Array.isArray(R)))?(H=_e==null?void 0:_e.contents)==null?void 0:H[0]:_e==null?void 0:_e.contents;L!=null&&L.contents&&((re=L==null?void 0:L.contents)==null?void 0:re.length)!==0&&(xl=(ue=D.cloneDeep(xl))==null?void 0:ue.map((R,h)=>{if(!Array.isArray(R)){let Re={};for(let ze in R)ze!=="id"&&ze!=="index"&&(Re[ze]=R[ze]);R=Object.values(Re)}return R}));const en=!!(($=I.value)!=null&&$.find(R=>R.prop==="index"));xl=Ga(xl,L==null?void 0:L.contents,en);const $l=[];xl==null||xl.forEach((R,h)=>{var ze;let Re={};if(Array.isArray(R)){let je=[];R==null||R.filter(Ge=>!(Ge!=null&&Ge.id)).forEach((Ge,Ze)=>{var Fl,Kl,Vl,nl,zl,ql;if((Fl=Z==null?void 0:Z[Ze])!=null&&Fl.prop&&!Array.isArray(Ge)){let El={};El[Z[Ze].column]=Ge,De!=null&&De.value&&((Kl=De==null?void 0:De.value)==null?void 0:Kl.length)>0&&((Vl=De==null?void 0:De.value)!=null&&Vl.find(He=>JSON.stringify(He==null?void 0:He[0])===JSON.stringify(El)))&&(je=(nl=De==null?void 0:De.value)==null?void 0:nl.find(He=>JSON.stringify(He==null?void 0:He[0])===JSON.stringify(El))),je&&je.length>0?Re[Z[Ze].prop]=je!=null&&je.find(He=>{var Rl;return((Rl=Object.keys(He))==null?void 0:Rl[0])===Z[Ze].column})?(zl=je==null?void 0:je.find(He=>{var Rl;return((Rl=Object.keys(He))==null?void 0:Rl[0])===Z[Ze].column}))==null?void 0:zl[Z[Ze].column]:Ge:Re[Z[Ze].prop]=Ge}else Array.isArray(Ge)&&((ql=Z[Ze])!=null&&ql.prop?Re[Z[Ze].prop]=Ge:Re.children=ha(Ge,Z))})}else Re=R;Array.isArray(R)&&R.some(je=>je==null?void 0:je.id)?$l.push(Object.assign(Re,{id:(ze=R==null?void 0:R.find(je=>je.id))==null?void 0:ze.id})):Re.id?$l.push(Re):$l.push(Object.assign(Re,{id:h.toString()}))}),le.value=_a($l,r,I.value),Gl.value=$l,(Q=Gl.value)==null||Q.forEach(R=>{var h;(h=Hl.value)==null||h.set(R.id,R)})}else I.value=[],$e.value=[],le.value=[],Gl.value=[],Hl.value=new Map;if(((ne=d==null?void 0:d.contents)==null?void 0:ne.length)>0)if((ae=(X=(Y=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="filterAllType"))==null?void 0:Y.value)==null?void 0:X.find(p=>(p==null?void 0:p.value)==="onRowButtonContents"))!=null&&ae.content){let p=(ke=(Ce=(be=e==null?void 0:e.find(Z=>(Z==null?void 0:Z.key)==="filterAllType"))==null?void 0:be.value)==null?void 0:Ce.find(Z=>(Z==null?void 0:Z.value)==="onButtonContents"))==null?void 0:ke.content;p=(Je=p==null?void 0:p.split(":"))==null?void 0:Je[1],p=(qe=p.slice(1,(p==null?void 0:p.length)-1))==null?void 0:qe.split(","),gl.value=(We=d==null?void 0:d.contents)==null?void 0:We.filter(Z=>p==null?void 0:p.find(_e=>_e===(Z==null?void 0:Z.label)))}else gl.value=d==null?void 0:d.contents;else gl.value=[];if(((al=t==null?void 0:t.contents)==null?void 0:al.length)>0)if((pl=(vl=(Pe=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="filterAllType"))==null?void 0:Pe.value)==null?void 0:vl.find(p=>(p==null?void 0:p.value)==="onButtonContents"))!=null&&pl.content){let p=(ja=(rl=(Fe=e==null?void 0:e.find(Z=>(Z==null?void 0:Z.key)==="filterAllType"))==null?void 0:Fe.value)==null?void 0:rl.find(Z=>(Z==null?void 0:Z.value)==="onButtonContents"))==null?void 0:ja.content;p=(La=p==null?void 0:p.split(":"))==null?void 0:La[1],p=(Pa=p.slice(1,(p==null?void 0:p.length)-1))==null?void 0:Pa.split(","),kl.value=($a=t==null?void 0:t.contents)==null?void 0:$a.filter(Z=>p==null?void 0:p.find(_e=>_e===(Z==null?void 0:Z.label))),yl.value=(Fa=t==null?void 0:t.contents)==null?void 0:Fa.filter(Z=>p==null?void 0:p.find(_e=>_e===(Z==null?void 0:Z.label))),ve.value=!!(p!=null&&p.find(Z=>Z==="搜索")),Ae.value=!!(p!=null&&p.find(Z=>Z==="块状显示"))}else kl.value=t==null?void 0:t.contents,yl.value=t==null?void 0:t.contents;else kl.value=[],yl.value=[];Tl.value=((Ka=le==null?void 0:le.value)==null?void 0:Ka.length)??0,wa(le.value),Zl.value=le.value,el.value&&(I.value=(za=(Va=$e.value)==null?void 0:Va.filter(p=>(p==null?void 0:p.label)!=="操作"))==null?void 0:za.map(p=>{var Z;return{...p,type:"edit",optionUrl:p!=null&&p.formMenuSelect&&((Z=p==null?void 0:p.formMenuSelect)==null?void 0:Z.length)>0?{groupSelect:p==null?void 0:p.groupSelect,menuSelect:p==null?void 0:p.formMenuSelect,selectRelateType:"",type:p==null?void 0:p.formType}:null}}),pa())};l.watch(()=>[s.itemData,ml.value,ar.value,Ul.value,De==null?void 0:De.value],async()=>{var e,a,o,r,n,u;if((e=s==null?void 0:s.itemData)!=null&&e.find(c=>(c==null?void 0:c.key)==="columnPath")&&!((a=Bl.value)!=null&&a.find(c=>{var d,t;return(c==null?void 0:c.key)===((t=(d=s==null?void 0:s.itemData)==null?void 0:d.find(g=>(g==null?void 0:g.key)==="columnPath"))==null?void 0:t.contents)}))){let c=Bl.value,d={key:(r=(o=s==null?void 0:s.itemData)==null?void 0:o.find(t=>(t==null?void 0:t.key)==="columnPath"))==null?void 0:r.contents,value:(u=(n=s==null?void 0:s.itemData)==null?void 0:n.find(t=>(t==null?void 0:t.key)==="columnUsingPath"))==null?void 0:u.contents};c!=null&&c.find(t=>(t==null?void 0:t.key)===(d==null?void 0:d.key))?c=c==null?void 0:c.map(t=>((t==null?void 0:t.key)===(d==null?void 0:d.key)&&(t.value=d.value),t)):c.push(d),Ee.setTableViewContents(c)}Ua(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(Ll(e==null?void 0:e.form),Qe.value=e==null?void 0:e.dialogTitle,Yl.value=!0,ul.value=!0)},{immediate:!0,deep:!0});const Oa=()=>{var e;(e=Te.value)!=null&&e.includes("read")&&(el.value=!el.value)},Qr=()=>{Il.value=!Il.value};l.watch(()=>{var e;return(e=s==null?void 0:s.config)==null?void 0:e.viewport},e=>{var a;Te.value=e,(e==null?void 0:e.length)===0?el.value=!1:(e!=null&&e.includes("read")||(el.value=!0),e!=null&&e.includes("edit")||(el.value=!1)),ye.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||el.value},{immediate:!0}),l.watch(()=>el.value,e=>{var a;e?(pa("viewChange"),Ee.setCacheUpdatingData(null)):(kl.value=yl.value,I.value=oa.value,wl.value&&(Ee.setTableLoading(s==null?void 0:s.index),ge("change",wl.value))),se.value=e,ye.value=e||((a=s==null?void 0:s.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(()=>s==null?void 0:s.compNames,e=>{Be.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:e||[],width:1}]},{immediate:!0}),l.ref(!1);const Xr=(e,a)=>{var o;pa("createClick"),a===pe.pageSize&&(pe.currentPage=Math.ceil(((o=le.value)==null?void 0:o.length)/pe.pageSize))},Yr=(e,a,o)=>{var r;Aa(o,e,a),Ke.value=D.cloneDeep(e),sl.value=e==null?void 0:e.id,Tl.value=(r=le.value)==null?void 0:r.length,Qe.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",Pl(!1)},Ve=e=>{var t,g,w,E,L,v,_,U,B,z;const{row:a,column:o,item:r,slotData:n}=e;let u=a!=null&&a[o==null?void 0:o.prop]||(a==null?void 0:a[o==null?void 0:o.prop])===0?((g=(t=a==null?void 0:a[o==null?void 0:o.prop])==null?void 0:t[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]):((E=(w=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:w[0])==null?void 0:E.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((v=(L=n==null?void 0:n[r==null?void 0:r.prop])==null?void 0:L[0])==null?void 0:v.contents)??(n==null?void 0:n[r==null?void 0:r.prop])??((B=(U=a==null?void 0:a[(_=r==null?void 0:r.child)==null?void 0:_.prop])==null?void 0:U[0])==null?void 0:B.contents)??(a==null?void 0:a[(z=r==null?void 0:r.child)==null?void 0:z.prop]),d=Array.isArray(u)&&!(u!=null&&u.every(V=>typeof V=="string"||typeof V=="number"))?"查看":u;return d=Array.isArray(d)?d.join(","):d,d},Zr=e=>{var g,w,E,L,v,_,U,B,z,V;const{row:a,column:o,item:r,slotData:n}=e;let u=a!=null&&a[o==null?void 0:o.prop]?((w=(g=a==null?void 0:a[o==null?void 0:o.prop])==null?void 0:g[0])==null?void 0:w.contents)??(a==null?void 0:a[o==null?void 0:o.prop]):((L=(E=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:E[0])==null?void 0:L.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((_=(v=n==null?void 0:n[r==null?void 0:r.prop])==null?void 0:v[0])==null?void 0:_.contents)??(n==null?void 0:n[r==null?void 0:r.prop])??((z=(B=a==null?void 0:a[(U=r==null?void 0:r.child)==null?void 0:U.prop])==null?void 0:B[0])==null?void 0:z.contents)??(a==null?void 0:a[(V=r==null?void 0:r.child)==null?void 0:V.prop]);const d=Array.isArray(u)&&!(u!=null&&u.every(K=>typeof K=="string"||typeof K=="number")),t=Array.isArray(u)&&(u==null?void 0:u.find(K=>K==null?void 0:K.url));return d&&t},Ir=(e,a)=>e.find(o=>Object.values(o).some(r=>r===a));return l.watch(()=>Ya.value,async e=>{if(e){Me.setContentLoading(!0),await l.nextTick();const a=Ir(le.value,e==null?void 0:e.data);if(!a)return Me.setContentLoading(!1);await Sa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),Me.setContentLoading(!1)}},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.cacheNewData,e=>{var a;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(s==null?void 0:s.index)&&(le.value=(a=le.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,w,E,L;const o=l.resolveComponent("svg-icon"),r=l.resolveComponent("el-popover"),n=l.resolveComponent("el-switch"),u=l.resolveComponent("el-checkbox"),c=l.resolveComponent("el-checkbox-group"),d=l.resolveComponent("el-button"),t=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",_n,[va.value?(l.openBlock(),l.createBlock(ol.ssTable,{id:"excel-table",pageObj:pe,showIndex:ye.value,isTree:(g=F.compItem)==null?void 0:g.isTree,summaryInfo:ce,columns:I.value,defaultSort:de,isCardViewport:Il.value,checkedColumns:ee.value,key:sa.value+JSON.stringify(I.value),tableData:ba.value,isEditViewport:el.value,isShowPagination:ya.value,isShowEdit:!1,isShowDelete:!1,allowSelect:se.value,onDbClickRow:Ar,extraButton:kl.value,rowButton:gl.value,cacheExtraButtons:yl.value,isClearSelection:((w=ll.value)==null?void 0:w.length)===0,onDoCurrentChange:ur,onDoSizeChange:tr,onContentClick:Sa,onRowClick:wr,onSelectChange:yr,onCellChange:Yr,onChange:Aa,onPreview:ka,onSubmitEditingTable:gr,onHandleColEditChange:fr,onHandleColTypeChange:hr,onClickButton:aa},l.createSlots({headerButton:l.withCtx(v=>{var _,U;return[F.showHeader?(l.openBlock(),l.createBlock(kn,{key:0,pageLayout:F.pageLayout,lockingPage:l.unref(Wl)===l.unref(xe),filterValues:ma.value,selectNums:(_=ll.value)==null?void 0:_.length,dataNums:(U=le.value)==null?void 0:U.length,compName:F.compName,isDevMode:F.isDevMode,buttons:v.buttons,onButtonClick:a[1]||(a[1]=B=>aa(B,"",{})),columns:I.value,onFilter:Nr,onGetImportData:dr,level:F.level,filterShow:ve.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level","filterShow"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var v,_,U,B;return[((v=le.value)==null?void 0:v.length)>0&&F.allowOperate&&Ae.value?(l.openBlock(),l.createElementBlock("div",Mn,[(_=Te.value)!=null&&_.includes("read")&&((U=Te.value)!=null&&U.includes("edit"))&&((B=gl.value)!=null&&B.some(z=>(z==null?void 0:z.label)==="编辑"))&&!Il.value&&l.unref(Wl)!==l.unref(xe)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:Oa},[l.createVNode(o,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:Qr},[l.createVNode(o,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:v,index:_})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:U=>Xr(v,_)},[l.createVNode(o,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,jn)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Rr},{reference:l.withCtx(()=>[l.createElementVNode("span",Ln,[l.createVNode(o,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",Pn,[a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(n,{"model-value":hl.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=v=>ua(v,"sortable"))},null,8,["model-value"]),l.createVNode(n,{"model-value":he.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[4]||(a[4]=v=>ua(v,"filterable"))},null,8,["model-value"]),l.createVNode(n,{"model-value":me.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[5]||(a[5]=v=>ua(v,"operable"))},null,8,["model-value"]),a[13]||(a[13]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(c,{modelValue:ee.value,"onUpdate:modelValue":a[6]||(a[6]=v=>ee.value=v),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:M},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ml.value,v=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:v.label},[l.createVNode(u,{value:v.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:v.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(v.label),9,$n)]),_: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 _;return[l.createElementVNode("div",Fn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((_=Object.keys(v))==null?void 0:_.filter(U=>{var B;return(B=Xe.value)==null?void 0:B.find(z=>(z==null?void 0:z.value)===U)}),U=>{var B,z;return l.openBlock(),l.createElementBlock("div",{key:U},[l.createVNode(n,{"model-value":v==null?void 0:v[U],"active-text":(z=(B=Xe.value)==null?void 0:B.find(V=>(V==null?void 0:V.value)===U))==null?void 0:z.label,onChange:V=>kr(V,U,v)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",Kn,[l.createVNode(o,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(v=>{var _,U,B,z,V,K,x,A,k,C,y,W,i,P,q,b,N,m;return[Zr(v)?(l.openBlock(),l.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:l.withCtx(()=>[l.createElementVNode("span",Vn,l.toDisplayString(Ve(v)),1)]),default:l.withCtx(()=>{var f,j;return[l.createElementVNode("div",zn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((j=v==null?void 0:v.row)==null?void 0:j[(f=v==null?void 0:v.column)==null?void 0:f.prop],T=>(l.openBlock(),l.createElementBlock("div",qn,[l.createElementVNode("div",{class:"prop-url",title:la(T),onClick:ie=>xr(T)},l.toDisplayString(la(T)),9,Rn),l.createElementVNode("div",{class:"prop-download",onClick:ie=>Dr(T)}," 下载 ",8,Jn)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Ve(v))&&((U=(_=Ve(v))==null?void 0:_.toString())!=null&&U.includes(".txt")||(z=(B=Ve(v))==null?void 0:B.toString())!=null&&z.includes(".cpt")||(K=(V=Ve(v))==null?void 0:V.toString())!=null&&K.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ve(v))&&((A=(x=Ve(v))==null?void 0:x.toString())!=null&&A.includes(".txt")||(C=(k=Ve(v))==null?void 0:k.toString())!=null&&C.includes(".cpt")||(W=(y=Ve(v))==null?void 0:y.toString())!=null&&W.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ve(v))&&((P=(i=Ve(v))==null?void 0:i.toString())!=null&&P.includes(".txt")||(b=(q=Ve(v))==null?void 0:q.toString())!=null&&b.includes(".cpt")||(m=(N=Ve(v))==null?void 0:N.toString())!=null&&m.includes(".cyd"))?"pointer":"",marginLeft:(v==null?void 0:v.colIndex)===0?`${((v==null?void 0:v.level)??0)*20}px`:0}),onClick:f=>sr(Ve(v))},l.toDisplayString(Ve(v)===0?"0":Ve(v)),13,Wn))]}),_:2},[((E=gl.value)==null?void 0:E.length)>0&&l.unref(Wl)!==l.unref(xe)?{name:"actions",fn:l.withCtx(({item:v})=>[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",Un,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Cr(gl.value,v),(_,U)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:U,onClick:l.withModifiers(B=>aa(_==null?void 0:_.label,v,{extra:_}),["stop"])},[l.createElementVNode("div",{style:l.normalizeStyle({color:_==null?void 0:_.textColor}),class:"extra-button-label"},l.toDisplayString(_==null?void 0:_.label),5)],8,On))),128))])]),_:2},1024)]),key:"0"}:void 0,((L=le.value)==null?void 0:L.length)>0?{name:"batchButton",fn:l.withCtx(v=>[l.withDirectives(l.createVNode(Sn,{lockingPage:l.unref(Wl)===l.unref(xe),buttons:v.buttons,selectTableItems:ll.value,onButtonClick:a[2]||(a[2]=_=>aa(_,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,se.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!se.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(Jl.ssDialog,{title:Qe.value,visible:ul.value,width:nr.value,onBeforeDestroy:mr,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",Gn,[l.createVNode(ol.ssForm,{rowContents:we.value,isEnableWrap:!1,showOperator:!1,onChange:Jr,onClickTrigger:Sr,isEdit:Ql.value,onBlurChange:vr,onCreate:br},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[Yl.value?(l.openBlock(),l.createElementBlock("div",Hn,[l.createVNode(d,{onClick:a[7]||(a[7]=v=>ul.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[14]||(a[14]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[14]}),l.createVNode(d,{class:"ok-button",onClick:a[8]||(a[8]=v=>Pl(!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(Jl.ssDialog,{title:Qe.value,visible:Xl.value,width:ia.value,onBeforeDestroy:a[10]||(a[10]=v=>Xl.value=!1)},{default:l.withCtx(()=>[l.createVNode(Nn)]),footer:l.withCtx(()=>[l.createElementVNode("div",Qn,[l.createVNode(d,{onClick:a[9]||(a[9]=v=>Xl.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[16]||(a[16]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[16]}),l.createVNode(d,{class:"ok-button",onClick:Br,id:"themeButton"},{default:l.withCtx(()=>a[17]||(a[17]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[17]})])]),_:1},8,["title","visible","width"]),bl.value?(l.openBlock(),l.createBlock(ol.ssFilePreview,{key:1,fileDataList:Dl.value,onDestroy:Er},null,8,["fileDataList"])):l.createCommentVNode("",!0),Ue.value?(l.openBlock(),l.createBlock(Jl.ssDialog,{key:2,visible:Ue.value,onBeforeDestroy:zr,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:l.withCtx(()=>[l.createVNode(qa.ThreeViewerHost,{files:_l.value,threeData:S.value},null,8,["files","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Jl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[11]||(a[11]=v=>e.componentVisible=!1),width:ia.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(t,{dialogItem:Sl.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(Jl.ssDialog,{title:Be.title,visible:Be.show,width:Be.width,onBeforeDestroy:Lr},{default:l.withCtx(()=>[l.createElementVNode("div",Xn,[l.createVNode(ol.ssForm,{rowContents:Be==null?void 0:Be.contents,formRules:Be==null?void 0:Be.formRules,showOperator:!1,buttonValue:Be.buttonValue,isEdit:Ql.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:Pr},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},Zn=na._export_sfc(Yn,[["__scopeId","data-v-f04e959f"]]);exports.formGetOptions=fa;exports.getSelectRow=ga;exports.ssTable=Zn;exports.useFormComp=Xa;exports.useFormToTableComp=Wa;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as l, watch as m, defineComponent as b, reactive as y, onMounted as g, createElementBlock as D, openBlock as f, createVNode as i } from "vue";
|
|
2
|
-
import { s as h } from "./index-
|
|
2
|
+
import { s as h } from "./index-CLY3ClAw.js";
|
|
3
3
|
import { g as C, s as c } from "./index-KFoWHXov.js";
|
|
4
4
|
import { ae as k, ad as _, a as S, u as A, af as T } from "./index-Dh_LOm8w.js";
|
|
5
5
|
const B = S(), { itemData: I } = c(B), u = l(0), P = l([
|