ss-component-new 1.2.26 → 1.2.28
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-j7rSXeZy.js → MTLLoader-BreJsr54.js} +1 -1
- package/dist/{MTLLoader-CSavblQS.cjs → MTLLoader-Cqv49Ps8.cjs} +1 -1
- package/dist/{OrbitControls-BYxGl2XB.js → OrbitControls-BCu-cP7k.js} +1 -1
- package/dist/{OrbitControls-dRON011u.cjs → OrbitControls-C956u7BP.cjs} +1 -1
- package/dist/{animationData-rmZ0EGb8.cjs → animationData-C3-BiUgV.cjs} +1 -1
- package/dist/{animationData-Br4BCkiq.js → animationData-CMjNjOqc.js} +4 -4
- package/dist/{array-CeASBMWY.cjs → array-0u9Sf3UC.cjs} +1 -1
- package/dist/{array-Cx8FbegO.js → array-BGIM4b6g.js} +2 -2
- package/dist/{dataUtil-RzgUhlgJ.cjs → dataUtil-BFjWNDM1.cjs} +1 -1
- package/dist/{dataUtil-CJxHUail.js → dataUtil-D9l7-XhR.js} +2 -2
- package/dist/{fileUtil-BM6WhafY.cjs → fileUtil-BFtJHTM0.cjs} +1 -1
- package/dist/{fileUtil-BVzW5lTY.js → fileUtil-D7XVXEhb.js} +1 -1
- package/dist/{iconfont-J7S-v_zE.js → iconfont-B9Cj3DQM.js} +2 -2
- package/dist/{iconfont-Dsx_JtWY.cjs → iconfont-BDfcbq2v.cjs} +1 -1
- package/dist/icons/svg//344/272/272/345/203/217.svg +1 -0
- package/dist/{index-ClzEamlP.js → index-3QB55tXZ.js} +7 -7
- package/dist/{index-BGm3sgAn.cjs → index-B33wtiif.cjs} +1 -1
- package/dist/{index-D7wMQSEM.js → index-B8bpiPXB.js} +1 -1
- package/dist/{index-BvgHldVC.cjs → index-B9TlIok8.cjs} +12 -12
- package/dist/{index-DbHiWNBM.cjs → index-BWxbWhC9.cjs} +1 -1
- package/dist/{index-BoTEVRWS.js → index-BZwQB2HO.js} +5 -5
- package/dist/{index-DRSU72SE.js → index-BaE0DPgC.js} +66 -59
- package/dist/{index-DN8avrWv.cjs → index-BccOOMaP.cjs} +1 -1
- package/dist/index-BgHY8wmn.cjs +1 -0
- package/dist/{index-DpxXt1oz.js → index-Boazv8yC.js} +2 -2
- package/dist/{index-D5YeHxKp.js → index-BqRVuEsE.js} +6 -6
- package/dist/{index-CyNvD7fs.js → index-BwLaQntz.js} +1 -1
- package/dist/{index-Dr7mB3zJ.js → index-C-8LROmP.js} +2 -2
- package/dist/{index-DcT0aYIX.js → index-C1lZkQG-.js} +423 -423
- package/dist/{index-DWBL8V_4.js → index-C5UpEVah.js} +2 -2
- package/dist/index-C5fTUrKx.js +573 -0
- package/dist/{index-BH-cEIyF.cjs → index-C9_Cxm8G.cjs} +1 -1
- package/dist/{index-D5fqqSXr.cjs → index-CBFF2bsB.cjs} +1 -1
- package/dist/{index-YhB_cMji.cjs → index-CC9RkSBT.cjs} +1 -1
- package/dist/{index-BJkToJcC.cjs → index-CK5VdzmO.cjs} +1 -1
- package/dist/{index-CeWLT1YO.js → index-CKY0sj_X.js} +3 -3
- package/dist/{index-Cm99VII_.js → index-CMwwUi6o.js} +6 -6
- package/dist/{index-DjMSxB8D.cjs → index-CP7b7BrB.cjs} +1 -1
- package/dist/{index-BU5WJczo.js → index-CZu3TggJ.js} +1 -1
- package/dist/{index-Bp0GMpLC.cjs → index-C_cWjavY.cjs} +1 -1
- package/dist/{index-DVv2nM9_.cjs → index-Cd9j5j41.cjs} +1 -1
- package/dist/{index-B7l9bX5c.cjs → index-Cwh5m4lg.cjs} +1 -1
- package/dist/index-D0XPyuy4.cjs +1 -0
- package/dist/{index-lw6M4N-Q.cjs → index-D3TgRd-7.cjs} +1 -1
- package/dist/{index-Ie0BUTFu.js → index-D5Dtcn-_.js} +6 -6
- package/dist/{index-Bp5zOMHT.cjs → index-DE-uHAMH.cjs} +1 -1
- package/dist/{index-T2VihBuZ.js → index-DHOcRi3S.js} +6 -6
- package/dist/{index-CMIII30g.cjs → index-DMyPjpxO.cjs} +1 -1
- package/dist/{index-BvB9p0W4.js → index-DR7aNxVH.js} +4 -4
- package/dist/{index-0dw7iEtO.cjs → index-DVqfroe6.cjs} +1 -1
- package/dist/{index-ggXXcZCO.js → index-DiTYB-a4.js} +63 -58
- package/dist/index-DnFxL5wb.cjs +1 -0
- package/dist/{index-CaGluCnk.js → index-DqR3IwgZ.js} +12 -12
- package/dist/{index-zAZNzNG-.js → index-DsCD1neC.js} +2 -2
- package/dist/{index-CNxiv6y5.js → index-Dx2X9pR1.js} +43 -43
- package/dist/{index-C2B83Ywj.cjs → index-GGokR_Lx.cjs} +1 -1
- package/dist/{index-7pDDKkwc.js → index-HduGypr9.js} +34 -34
- package/dist/index-LcnC2GQ4.cjs +1 -0
- package/dist/{index-DoWGbQss.js → index-OTxJnh9Z.js} +153 -153
- package/dist/{index-DodooTli.js → index-Rr9ZBYig.js} +2 -2
- package/dist/{index-BEfXSiWp.js → index-Sa2hQZ0h.js} +2 -2
- package/dist/{index-BkcjJQlg.cjs → index-TKouySTA.cjs} +1 -1
- package/dist/{index-veEr0Ju4.js → index-gPnrvvE9.js} +1324 -1321
- package/dist/{index-BPxe8bKe.js → index-gXbhagnF.js} +3 -3
- package/dist/{index-CAPstY_B.cjs → index-mpoVA-DC.cjs} +1 -1
- package/dist/{index-C9GfFRyr.cjs → index-uIVtG4RY.cjs} +1 -1
- package/dist/index-wQJN1jpI.js +2466 -0
- package/dist/index-zLkhy4JK.cjs +1 -0
- package/dist/{index-DFbvbOsE.js → index-zZ9bfGNx.js} +1 -1
- package/dist/{index-DMHh2MZZ.cjs → index-znR89ub7.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DGl2lQmW.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CuWDdCiy.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BWh0GUiI.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-TDoJ17os.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BjBzi9R7.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-BQiH2RRX.js} +11 -11
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BwjCaKYV.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-Dqpyi0E8.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-D21h7jT_.cjs +37 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DZGhek9_.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-PE_6dfIO.js} +12719 -12591
- package/dist/{index.vue_vue_type_style_index_1_lang-BHt4rvMd.js → index.vue_vue_type_style_index_1_lang-9ANlnWKt.js} +5 -5
- package/dist/index.vue_vue_type_style_index_1_lang-CrmWclPR.cjs +32 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-C2PJ2fvM.cjs → index.vue_vue_type_style_index_1_lang-D4RvHwPS.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-WD8HOZyf.js → index.vue_vue_type_style_index_1_lang-DwvuVXW6.js} +2580 -2471
- package/dist/{isString-BbPmUYHG.js → isString-BuBBWjRr.js} +1 -1
- package/dist/{main-DWa3MZxf.js → main-DpLQlLK2.js} +5 -5
- package/dist/{main-DlDkQh0n.cjs → main-Mx9r7ydp.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeModel-CBsLcTcX.js → threeModel-CZ-qFwwk.js} +5 -5
- package/dist/{threeModel-Dt9Ounip.cjs → threeModel-DTwQnnAO.cjs} +1 -1
- package/dist/{threePreview-DSMFTIuC.cjs → threePreview-CUGoEzKf.cjs} +1 -1
- package/dist/{threePreview-D99A_IHZ.js → threePreview-DutKTPWH.js} +4 -4
- package/dist/{threeSceneView-BD22yXw4.js → threeSceneView-CzgWYHBw.js} +11 -11
- package/dist/{threeSceneView-Dv2uGsTN.cjs → threeSceneView-f1V-z4jr.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CpBphI9E.js → threeSceneViewForCPMPIP-2sXIw3I1.js} +61 -61
- package/dist/{threeSceneViewForCPMPIP-DfaTaroP.cjs → threeSceneViewForCPMPIP-CojHDVHC.cjs} +1 -1
- package/dist/{threeTrackPathView-BGePzJh4.cjs → threeTrackPathView-BGHiOyJo.cjs} +1 -1
- package/dist/{threeTrackPathView-bFuXaesk.js → threeTrackPathView-DA4_8jas.js} +6 -6
- package/dist/{threeViewerHost-gGHqJpTR.js → threeViewerHost-BNObp9oA.js} +17 -17
- package/dist/{threeViewerHost-bQqnJLh9.cjs → threeViewerHost-D3WDKrIQ.cjs} +1 -1
- package/dist/{urdfTree-nXEMcLFV.cjs → urdfTree-CWStzmk2.cjs} +1 -1
- package/dist/{urdfTree-B2Zs54qS.js → urdfTree-CnkPddyT.js} +1 -1
- package/dist/{workpieceTreePanel-CXD_XizT.js → workpieceTreePanel-BvhFt3Xw.js} +5 -5
- package/dist/{workpieceTreePanel-Brforhya.cjs → workpieceTreePanel-DXyb_Wnw.cjs} +1 -1
- package/package.json +1 -1
- package/public/icons/svg//344/272/272/345/203/217.svg +1 -0
- package/dist/index-B3l8CoGZ.js +0 -2384
- package/dist/index-BRAUJGR3.cjs +0 -1
- package/dist/index-BjRAas3a.cjs +0 -1
- package/dist/index-Cf9NTS7v.cjs +0 -1
- package/dist/index-D3x3jleA.js +0 -654
- package/dist/index-DWTsFx-2.cjs +0 -1
- package/dist/index-Dc8TgzRR.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BKfBwnMQ.cjs +0 -37
- package/dist/index.vue_vue_type_style_index_1_lang-f2wxl9Ai.cjs +0 -32
package/dist/index-DWTsFx-2.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),b=require("./index-Dv1G67_Q.cjs"),ql=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BWh0GUiI.cjs"),Qe=require("./index-BvgHldVC.cjs"),ul=require("./threeViewerHost-bQqnJLh9.cjs"),te=require("./index.vue_vue_type_style_index_1_lang-f2wxl9Ai.cjs"),rl=require("./xlsx-BPHygxEf.cjs");require("./index.vue_vue_type_style_index_1_lang-C2PJ2fvM.cjs");const jl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ol=require("./index-C9GfFRyr.cjs");require("./index-YhB_cMji.cjs");const da=require("./isString-Cqq3-gAK.cjs"),Jl=K=>K.match(/\((.*)\)/)[1],gr={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(K){const Z=K,Q=a.ref(null),P=a.ref(!1),M=a.ref(null);return a.watch(()=>Z==null?void 0:Z.isVisible,()=>{P.value=Z==null?void 0:Z.isVisible},{deep:!0,immediate:!0}),a.watch(()=>M.value,()=>{a.nextTick(()=>{var i,ae;(ae=(i=Q.value)==null?void 0:i.updatePopper)==null||ae.call(i)})},{deep:!0,immediate:!0}),(i,ae)=>{const pe=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(pe,{visible:P.value,title:Z==null?void 0:Z.title,placement:Z==null?void 0:Z.placement,width:Z==null?void 0:Z.width,ref_key:"popOverRef",ref:Q},{reference:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(i.$slots,"reference",{ref_key:"referenceRef",ref:M})])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(i.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},hr={class:"extra-button-content"},yr={class:"table-operator-wrap"},vr={class:"extra-button-filter"},br={class:"form-content-value"},kr={key:0,class:"extra-header"},mr={class:"drop-menu",style:{width:"120px"}},Sr={key:0},Dr={key:1},Tr={__name:"header",props:{lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(K,{emit:Z}){const Q=Z,P=K,M=a.ref(""),i=a.ref(!1),ae=a.ref([]),pe=a.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Be=I=>{const ie=I.raw;if(!ie)return;const G=new FileReader;G.onload=re=>{try{const be=new Uint8Array(re.target.result),Ce=rl.readSync(be,{type:"array"}),we=Ce.SheetNames[0],Ue=Ce.Sheets[we],z=rl.utils.decode_range(Ue["!ref"]).e.c+1,ke=new Array(z).fill(""),B=[];for(const Y in Ue){if(Y[0]==="!")continue;const{r:Oe,c:qe}=rl.utils.decode_cell(Y);let je=Ue[Y].v;if(Ue[Y].t==="n"&&je>0&&je<1e6&&(je=new Date((je-25569)*86400*1e3).toISOString().split("T")[0]),(je==null||je==="")&&(je=""),Oe===0)ke[qe]=je;else{if(!B[Oe-1]){B[Oe-1]={};for(let fe=0;fe<z;fe++)B[Oe-1][`col_${fe}`]=""}B[Oe-1][`col_${qe}`]=je}}for(let Y=0;Y<z;Y++)ke[Y]===void 0&&(ke[Y]="");const De=B==null?void 0:B[0];if(!(De!=null&&De.hasOwnProperty("col_0")))return b.ElMessage.error("导入的数据列不匹配,请检查是否错位");Q("getImportData",ke,B)}catch(be){throw b.ElMessage.error(be.message),new Error(be.message)}},G.readAsArrayBuffer(ie)},de=I=>{var G;const ie=(G=ae.value)==null?void 0:G.reduce((re,be,Ce)=>(Ce===0?re[be.label]=I:re[be.label]=be==null?void 0:be.value,re),{});Q("filter",ie,I,!0)},se=I=>{Q("buttonClick",I)},Re=I=>{var ie,G;ae.value=(G=(ie=te.getColumnChild(b.cloneDeep(I)))==null?void 0:ie.filter(re=>(re==null?void 0:re.label)!==""&&(re==null?void 0:re.label)!=="操作"))==null?void 0:G.map(re=>({label:(re==null?void 0:re.label)??"",value:"",name:(re==null?void 0:re.label)??"",isFormColHidden:re==null?void 0:re.isTableColHidden,width:2}))},ze=a.ref(!1),Xe=I=>{var ie;if((I==null?void 0:I.buttonName)==="确认"&&(Q("filter",I==null?void 0:I.content),ze.value=(I==null?void 0:I.content)&&Object.values(I==null?void 0:I.content).length>0),(I==null?void 0:I.buttonName)==="清空"){const G=b.cloneDeep(I==null?void 0:I.content);for(const re in G)G[re]="";ae.value=(ie=ae.value)==null?void 0:ie.map(re=>({...re,value:""})),Q("filter",G),ze.value=!1}i.value=!1},nl=()=>{var ie,G;ae.value=(ie=ae.value)==null?void 0:ie.map(re=>({...re,value:""}));const I=(G=ae.value)==null?void 0:G.reduce((re,be)=>(re[be.label]=be.value,re),{});Q("filter",I)};return a.onMounted(()=>{Re(P.columns)}),a.watch(()=>P.columns,()=>{Re(P.columns)},{deep:!0,immediate:!0}),(I,ie)=>{var Ue,ue;const G=a.resolveComponent("el-icon"),re=a.resolveComponent("svg-icon"),be=a.resolveComponent("el-input"),Ce=a.resolveComponent("el-button"),we=a.resolveComponent("el-upload");return a.openBlock(),a.createElementBlock("div",hr,[a.createElementVNode("div",{class:a.normalizeClass(K.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(P==null?void 0:P.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:(P==null?void 0:P.level)>1?"0px":"8px",fontWeight:600-((P==null?void 0:P.level)-1)*100>=400?600-((P==null?void 0:P.level)-1)*100:400,fontSize:17-(P==null?void 0:P.level)>=14?17-(P==null?void 0:P.level)+"px":"14px"})},a.toDisplayString(K.compName),7),a.createElementVNode("div",yr,[a.createElementVNode("div",vr,[a.createVNode(gr,{title:"",width:800,placement:"bottom-start",isVisible:i.value},{reference:a.withCtx(()=>{var z,ke,B,De;return[a.createVNode(be,{modelValue:M.value,"onUpdate:modelValue":ie[1]||(ie[1]=Y=>M.value=Y),style:{"min-width":"80px"},placeholder:ze.value?(B=(ke=(z=K.filterValues)==null?void 0:z.filter(Y=>Y))==null?void 0:ke.slice(0,3))==null?void 0:B.join("/"):"搜索","prefix-icon":a.unref(b.search_default),clearable:"",onInput:de,disabled:((De=ae.value)==null?void 0:De.length)===0},{suffix:a.withCtx(()=>{var Y,Oe;return[!M.value&&((Oe=(Y=K.filterValues)==null?void 0:Y.filter(qe=>qe))!=null&&Oe.join("/"))?(a.openBlock(),a.createBlock(G,{key:0,style:{cursor:"pointer"},onClick:nl},{default:a.withCtx(()=>[a.createVNode(a.unref(b.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:ie[0]||(ie[0]=Y=>i.value=!i.value)},[a.createVNode(re,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",br,[(a.openBlock(),a.createBlock(Qe.ssForm,{rowContents:ae.value,buttonValue:pe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:pe.value,isStartJustify:!1,onOnButtonClick:Xe},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),K.buttons&&((Ue=K.buttons)==null?void 0:Ue.length)>0?(a.openBlock(),a.createElementBlock("div",kr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ue=K.buttons)==null?void 0:ue.filter(z=>K.isDevMode||(z==null?void 0:z.label)!=="修改模板"),(z,ke)=>(a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:ke},[(z==null?void 0:z.type)==="upload"?(a.openBlock(),a.createBlock(we,{key:0,class:"upload-button-wrap","on-change":Be,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!K.lockingPage},{default:a.withCtx(()=>[a.createVNode(Ce,{disabled:!!K.lockingPage,style:a.normalizeStyle({background:(z==null?void 0:z.background)??"var(--ssbutton-theme-bg)",color:(z==null?void 0:z.color)??"var(--ssbutton-theme-color)"})},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(z==null?void 0:z.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(z==null?void 0:z.type)==="popover"?(a.openBlock(),a.createBlock(Qe._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(z==null?void 0:z.type)==="popover"?(a.openBlock(),a.createBlock(Ce,{key:0,disabled:!!K.lockingPage,style:a.normalizeStyle({background:(z==null?void 0:z.background)??"var(--ssbutton-theme-bg)",color:(z==null?void 0:z.color)??"var(--ssbutton-theme-color)"})},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(z==null?void 0:z.label),1)]),_:2},1032,["disabled","style"])):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",mr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(z==null?void 0:z.contents,B=>(a.openBlock(),a.createBlock(Ce,{key:B==null?void 0:B.label,disabled:!!K.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:De=>se(B==null?void 0:B.label)},{default:a.withCtx(()=>{var De,Y;return[a.createTextVNode(a.toDisplayString(B==null?void 0:B.label),1),(De=B==null?void 0:B.label)!=null&&De.includes("选中")?(a.openBlock(),a.createElementBlock("span",Sr,"("+a.toDisplayString(K.selectNums)+")",1)):a.createCommentVNode("",!0),(Y=B==null?void 0:B.label)!=null&&Y.includes("全部")?(a.openBlock(),a.createElementBlock("span",Dr,"("+a.toDisplayString(K.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),z!=null&&z.type?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(Ce,{key:2,id:"themeButton",disabled:!!K.lockingPage,style:a.normalizeStyle({background:(z==null?void 0:z.background)??"var(--ssbutton-theme-bg)",color:(z==null?void 0:z.color)??"var(--ssbutton-theme-color)"}),onClick:B=>se(z==null?void 0:z.label)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(z==null?void 0:z.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):a.createCommentVNode("",!0)])])}}},Cr=jl._export_sfc(Tr,[["__scopeId","data-v-0f9ba5cc"]]),Ar=a.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(K,{emit:Z}){const Q=K,P=Z,M=ae=>{P("buttonClick",ae)},i=ae=>{var pe;return ae!=null&&ae.includes("删除")?((pe=Q.selectTableItems)==null?void 0:pe.length)>0?"warning-active-type":"warning-type":"default-type"};return(ae,pe)=>{const Be=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(K.buttons,de=>(a.openBlock(),a.createBlock(Be,{key:de==null?void 0:de.label,disabled:!!K.lockingPage,class:a.normalizeClass(i(de==null?void 0:de.label)),onClick:se=>M(de==null?void 0:de.label)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(de==null?void 0:de.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),xr=jl._export_sfc(Ar,[["__scopeId","data-v-70b12973"]]),pa=b.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(K){this.selectArray=K},setSelectString(K){this.selectString=K}}}),Er={class:"calculator-content"},Nr={class:"calculator-child"},Br={class:"calculator-child"},_r=a.defineComponent({__name:"calculator",setup(K){const Z=a.ref(),Q=a.ref();return a.onMounted(()=>{Z.value=[{type:"Upload",label:"输入",name:"input"}],Q.value=[{type:"Upload",label:"输出",name:"output"}]}),(P,M)=>(a.openBlock(),a.createElementBlock("div",Er,[a.createElementVNode("div",Nr,[a.createVNode(Qe.ssForm,{rowContents:Z.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",Br,[a.createVNode(Qe.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Ur=jl._export_sfc(_r,[["__scopeId","data-v-73db0fe7"]]),fa=b.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(K){this.selectIndex=K},setSelectMenu(K){this.selectMenu=K},setSelectTitle(K){this.selectTitle=K}}}),Rl=(K,Z)=>{let Q=K,P=Z;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((M,i)=>{if(Array.isArray(M)){let ae={};return M=M==null?void 0:M.forEach((pe,Be)=>{var de;(de=P==null?void 0:P[Be])!=null&&de.prop?ae[P[Be].prop]=pe:Array.isArray(pe)&&(ae.children=Rl(pe,P))}),Object.assign(ae,{id:i})}else return M})),Q},ga=(K,Z,Q)=>{let P=K,M=Z;return P=P==null?void 0:P.map((i,ae)=>{var pe,Be;return!Array.isArray(i)||!((pe=M==null?void 0:M[ae])!=null&&pe.label)&&!Q||(i.unshift(((Be=M==null?void 0:M[ae])==null?void 0:Be.label)??""),i.some(de=>Array.isArray(de))&&(i=i==null?void 0:i.map(de=>{var se;return Array.isArray(de)&&(de=ga(de,(se=M==null?void 0:M[ae])==null?void 0:se.children,Q)),de}))),i}),P},Or=(K,Z,Q)=>{if(Z==="")return K==null?void 0:K.filter(P=>(P==null?void 0:P.id)!==Q);{const P=Z.split("-");return jr(K,P,Q)}},jr=(K,Z,Q)=>{let P=K,M=Z;return(M==null?void 0:M.length)===0?P=P==null?void 0:P.filter(i=>i.id!==Q):P=P==null?void 0:P.map(i=>(i.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),i=ha(i,M,Q)),i)),P},ha=(K,Z,Q)=>{var i,ae;let P=K,M=Z;return(M==null?void 0:M.length)===0?P.children=(i=P.children)==null?void 0:i.filter(pe=>pe.id!==Q):P.children=(ae=P.children)==null?void 0:ae.map(pe=>(pe.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),pe=ha(pe,M,Q)),pe)),P},Lr=(K,Z,Q)=>{if(Z==="")return Q;{const P=Z.split("-");return wr(K,P,Q)}},wr=(K,Z,Q)=>{let P=K,M=Z;return(M==null?void 0:M.length)===0?P=Q:P=P==null?void 0:P.map(i=>(i.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),i=ya(i,M,Q)),i)),P},ya=(K,Z,Q)=>{var i;let P=K,M=Z;return(M==null?void 0:M.length)===0?P.children=Q:P.children=(i=P.children)==null?void 0:i.map(ae=>(ae.id.toString()===(M==null?void 0:M[0])&&(M==null||M.shift(),ae=ya(ae,M,Q)),ae)),P},va=b.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(K){this.objUrl=K},setBlobUrls(K){this.blobUrls=K}}}),Wl=async(K,Z)=>{var ae,pe,Be,de,se,Re,ze,Xe,nl,I,ie,G,re,be,Ce,we,Ue;let Q=(pe=(ae=b.cloneDeep(K))==null?void 0:ae.optionUrl)==null?void 0:pe.menuSelect,P=[];Q==null||Q.forEach(ue=>{});let M="",i=await te.menuToParent(Q);if(i==null||i.forEach(ue=>{var z,ke,B,De;(ue==null?void 0:ue.name)===(((De=(B=(ke=(z=b.cloneDeep(K))==null?void 0:z.optionUrl)==null?void 0:ke.groupSelect)==null?void 0:B[0])==null?void 0:De.replaceAll("'",""))??"")&&(M=ue==null?void 0:ue.id)}),Z){M=Z;const ue=await b.getInsofDataApi({id:M}),z=(Re=(se=(de=(Be=ue==null?void 0:ue.data)==null?void 0:Be.result)==null?void 0:de[0])==null?void 0:se.key)==null?void 0:Re.pageKey;i=await te.getItemData(z,sessionStorage.getItem("systemKey"),"")}if(M!==""){let ue;Z?ue=(ze=i==null?void 0:i.find(B=>(B==null?void 0:B.id)===Z))==null?void 0:ze.compData:ue=(Xe=i==null?void 0:i.find(B=>{var De,Y,Oe,qe;return(B==null?void 0:B.name)===(((Y=(De=K==null?void 0:K.groupSelect)==null?void 0:De.split(":"))==null?void 0:Y[0])||((qe=(Oe=K==null?void 0:K.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:qe[0]))}))==null?void 0:Xe.compData;let z=(I=(nl=ue==null?void 0:ue.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:nl.contents)==null?void 0:I.map(B=>B==null?void 0:B.label);(G=(ie=ue==null?void 0:ue.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:ie.contents)!=null&&G.every(B=>Array.isArray(B))&&(z=(Ce=te.getColumnChild((be=(re=ue==null?void 0:ue.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:re.contents)==null?void 0:be[0]))==null?void 0:Ce.map(B=>B==null?void 0:B.prop));let ke=(Ue=(we=ue==null?void 0:ue.find(B=>(B==null?void 0:B.key)==="tableContents"))==null?void 0:we.contents)==null?void 0:Ue.map(B=>(B=B==null?void 0:B.filter(De=>!(De!=null&&De.id)),B));ke==null||ke.forEach(B=>{P.push(te.getValueToObjectValue(B,z))})}return P},Mr={class:"table-content"},Pr={class:"menu-config-wrap"},$r=["onClick"],Fr={key:0,class:"viewport-wrap"},Kr=["onClick"],Vr={title:"选择显示列信息"},zr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},qr=["title"],Jr={class:"col-operate-wrap"},Rr={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Wr={class:"pop-view"},Gr={class:"pop-wrapper"},Hr={class:"file-list-pop"},Qr=["title","onClick"],Xr=["onClick"],Yr=["onClick"],Zr={class:"form-content"},Ir={key:0,class:"dialog-footer"},en={class:"dialog-footer"},ln={__name:"index",props:{level:{type:Number,default:1},compName:{type:String,default:"",required:!1},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(K,{emit:Z}){const Q=a.ref([]),P=va(b.pinia),M=a.ref(null),i=K,ae=a.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),pe=te.useOriginalState(b.pinia);let Be="$R";const{originalPath:de}=b.storeToRefs(pe),se=de.value,Re=a.ref(!1),ze=a.ref(!1),Xe=a.ref(!1),nl=a.reactive({column:{},status:!1,text:"合计"}),I=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),ie=Z,G=a.ref([]),re=a.reactive({prop:"",order:null}),be=a.ref([]),Ce=a.ref(!1),we=a.ref(!1),Ue=a.ref(null);ul.useThreeSystem();const ue=a.ref([]),z=a.ref(!1),ke=a.ref(),B=te.useMenuState(),{importLoading:De,activeMenuPath:Y,contentLoading:Oe,linkMenuInfo:qe}=b.storeToRefs(B),je=te.useTableComp(b.pinia),fe=te.useModelComp(b.pinia),{extraContents:ge,cacheUpdatingData:cl,tableViewContents:dl,tableLoading:rn,pageMapState:Ye,lockingPage:ml}=b.storeToRefs(fe),X=a.ref([]),Sl=a.ref([]),Dl=a.ref(new Map);a.ref(!1);const Ke=a.ref("");a.ref();const Ll=a.ref(!0),ol=a.ref(0),Gl=a.ref(!0),Me=a.ref(""),Ve=a.ref(!1),ba=a.ref({label:"查看三维模型"}),Tl=a.ref(!1),wl=a.ref(),Le=a.ref([]),Ze=a.ref([]),Cl=a.ref(!1),pl=a.ref([]),tl=a.ref([]),Ie=a.ref([]),Te=a.ref([]),Pe=a.ref(),Ee=a.ref(),ka=pa(b.pinia),Al=a.ref(),Ml=a.ref(0),xl=fa(b.pinia),{selectIndex:ma,selectMenu:Je,selectTitle:Pl}=b.storeToRefs(xl),{selectString:el}=b.storeToRefs(ka),Sa=b.useLoginState(b.pinia),{loginUserInfo:me}=b.storeToRefs(Sa),Da=a.ref(720),ll=a.ref(!1),El=a.ref(!1),$e=a.ref([]),al=a.ref(),fl=a.ref(!0),Hl=a.ref(!0),Nl=a.ref([]),Ta=a.inject("contentRef");a.provide("contentRef",Ta),a.watch(()=>{var e;return(e=X.value)==null?void 0:e.length},e=>{I.total=e}),a.watch(()=>dl.value,async()=>{var s,u,c,d,f,k,_,g,C,U,w,x,R,q,F,o,S,y;if(((s=dl.value)==null?void 0:s.length)===0||!((u=i==null?void 0:i.itemData)!=null&&u.find(T=>(T==null?void 0:T.key)==="columnPath"))||!((c=i==null?void 0:i.itemData)!=null&&c.find(T=>(T==null?void 0:T.key)==="pageColumn")))return;let e=(C=(g=(_=(k=(f=(d=i==null?void 0:i.itemData)==null?void 0:d.find(T=>(T==null?void 0:T.key)==="pageColumn"))==null?void 0:f.contents)==null?void 0:k.split("["))==null?void 0:_[1])==null?void 0:g.split("]"))==null?void 0:C[0],l=((R=(x=(w=(U=i==null?void 0:i.itemData)==null?void 0:U.find(T=>(T==null?void 0:T.key)==="pageColumn"))==null?void 0:w.contents)==null?void 0:x.split("["))==null?void 0:R[0])+((F=(q=dl.value)==null?void 0:q.find(T=>(T==null?void 0:T.key)===e))==null?void 0:F.value),n=((S=(o=i==null?void 0:i.itemData)==null?void 0:o.find(T=>(T==null?void 0:T.key)==="pageGroup"))==null?void 0:S.contents)??"",r=await te.getItemData(l,sessionStorage.getItem("systemKey"),""),t=(y=r==null?void 0:r.find(T=>(T==null?void 0:T.name)===(n===""?i==null?void 0:i.compName:n)))==null?void 0:y.compData;ua(t,i.allMapContents)},{deep:!0});const Ca=async(e,l)=>{var n,r,t,s,u;try{const c=await b.getInsofDataApi({id:(i==null?void 0:i.parentTableId)||(i==null?void 0:i.index)});let d;((n=c==null?void 0:c.data)==null?void 0:n.code)===200&&(d=((t=(r=c==null?void 0:c.data)==null?void 0:r.result)==null?void 0:t[0])||null);const f={type:"data",pageKey:i!=null&&i.parentTableId?(s=d==null?void 0:d.key)==null?void 0:s.pageKey:Y.value,tableId:(i==null?void 0:i.parentTableId)||(i==null?void 0:i.index),systemKey:sessionStorage.getItem("systemKey")},k=l==null?void 0:l.map(C=>{const U=Object.keys(C),w={};return U.forEach((x,R)=>{w[e[R]]=C[x]}),w}),_=k==null?void 0:k.map(C=>({key:f,value:{tableData:C}})),g=await b.batchAddInsofDataApi({dataList:_});((u=g==null?void 0:g.data)==null?void 0:u.code)===200?(fe.setRefreshCurStructure(!0),b.ElMessage.success("导入数据成功")):b.ElMessage.error("导入数据响应失败")}catch(c){throw b.ElMessage.error("导入数据处理失败"),new Error(c)}},Aa=async e=>{var l,n;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await b.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),t=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let s=URL.createObjectURL(t);ke.value=[{name:(n=e==null?void 0:e.split("/"))==null?void 0:n[((l=e==null?void 0:e.split("/"))==null?void 0:l.length)-1],blobUrl:s}],z.value=!0}};a.onBeforeUnmount(()=>{Hl.value=!1;let e=Ml.value;Ml.value=e+1});const Ql=a.computed(()=>{var r,t;const e=(I.currentPage-1)*I.pageSize,l=e+I.pageSize,n=(r=G.value)==null?void 0:r.find(s=>{var u;return(s==null?void 0:s.sortable)&&((u=s==null?void 0:s.label)==null?void 0:u.includes("时间"))});return n&&(re.order="descending",re.prop=n==null?void 0:n.prop),(t=X.value)==null?void 0:t.slice(e,l)}),xa=e=>{I.currentPage=e},Ea=e=>{var l;I.pageSize=e,e*I.currentPage>((l=X.value)==null?void 0:l.length)&&(I.currentPage=1,b.ElMessage.warning("分页无效,返回第一页"))},Na=(e,l)=>{var u,c;const n=(c=(u=G.value)==null?void 0:u.map(d=>d==null?void 0:d.prop))==null?void 0:c.filter(d=>d!=="operate");let r;const t=(e==null?void 0:e.length)===(n==null?void 0:n.length);if(e!=null&&e.includes("序号"))return b.ElMessage.error("导入的数据不需要包含序号列");if(r=t?e:e.slice(0,n==null?void 0:n.length),!(r==null?void 0:r.every(d=>n==null?void 0:n.find(f=>d===f))))return b.ElMessage.error("导入的数据表头不匹配");Ca(r,l)},Ba=(e,l)=>{var n;fe.setRefreshCurStructure(!1),((n=G.value)==null?void 0:n.length)===0||Na(e,l)},_a=(e,l,n,r)=>{const t=[],s=[],u=f=>Object.keys(f).length;for(const f in e)if(e[f]!==void 0){const k=e[f],_=[];for(const[g,C]of Object.entries(k))_.push(C),s.length<u(k)&&s.push(g);t.push(_)}t.unshift(s);const c=rl.utils.aoa_to_sheet(t),d=rl.utils.book_new();rl.utils.book_append_sheet(d,c,r),rl.writeFileSync(d,`${l}.xlsx`),$e.value=[]},Bl=async(e,l,n,r=!1,t)=>{var s,u,c,d,f,k,_,g;try{fe.setRefreshCurStructure(!1);const C=await b.getInsofDataApi({id:i==null?void 0:i.index});if(((s=C==null?void 0:C.data)==null?void 0:s.code)===200){let U=(f=(d=(c=(u=C==null?void 0:C.data)==null?void 0:u.result)==null?void 0:c[0])==null?void 0:d.value)==null?void 0:f.pageData;r?U={...U,compData:(_=U==null?void 0:U.compData)==null?void 0:_.map(x=>{var R;return(x==null?void 0:x.key)==="header"?{...x,contents:(R=x==null?void 0:x.contents)==null?void 0:R.map(q=>({...q,[e]:n}))}:x})}:U={...U,compData:(k=U==null?void 0:U.compData)==null?void 0:k.map(x=>{var R,q;return(x==null?void 0:x.key)==="header"?{...x,contents:(R=x==null?void 0:x.contents)==null?void 0:R.map(F=>(F==null?void 0:F.prop)===(l==null?void 0:l.prop)?{...F,[e]:n}:F)}:(x==null?void 0:x.key)==="tableToForm"&&t?{...x,contents:(q=x==null?void 0:x.contents)==null?void 0:q.map(F=>(F==null?void 0:F.prop)===(l==null?void 0:l.prop)?{...F,[t]:n}:F)}:x})};const w=await b.updateInsofDataApi({id:i==null?void 0:i.index,value:{pageData:U}});((g=w==null?void 0:w.data)==null?void 0:g.code)===200?(b.ElMessage.success("编辑成功"),fe.setRefreshCurStructure(!0)):b.ElMessage.error("编辑响应失败")}}catch(C){b.ElMessage.error(C)}},Ua=async(e,l)=>{await Bl("label",l,e)},Oa=async(e,l)=>{await Bl("columnType",l,e,!1,"type")},ja=()=>{cl.value?ll.value=!1:ca()},La=e=>{$e.value=e},wa=(e,l)=>{al.value===l?fl.value=!1:fl.value=!0,al.value=l==null?void 0:l.changeProp},gl=a.computed(()=>{var n,r,t;const e=(n=G.value)==null?void 0:n.some(s=>s==null?void 0:s.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(t=(r=G.value)==null?void 0:r.filter(s=>(s==null?void 0:s.label)!=="操作"))==null?void 0:t.map(s=>({...s,filterable:!!(s!=null&&s.filterable),showSummary:!!(s!=null&&s.showSummary),operable:!!(s!=null&&s.operable)}))}),Ma=async(e,l,n)=>{const r=b.cloneDeep(G.value);await a.nextTick(),G.value=r==null?void 0:r.map(t=>(n==null?void 0:n.label)===(t==null?void 0:t.label)?{...t,[l]:e}:t),await Bl(l,n,e)},$l=async(e,l)=>{await Bl(l,null,e,!0)},Pa=()=>{Ve.value=!1},$a=e=>{ie("clickTrigger",e)},Xl=async e=>{var s,u,c,d,f,k,_,g,C,U,w,x,R,q,F;const l=e==null?void 0:e.row,n=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix;if((s=l==null?void 0:l.toString())!=null&&s.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(l.includes(",")){b.ElMessage.error("当前版本仅允许单个urdf预览!");return}pl.value=[l],we.value=!0,Ue.value={data:b.cloneDeep(n)},Ce.value=!0;return}let t=[];if((u=l==null?void 0:l.toString())!=null&&u.includes(".stl")||(c=l==null?void 0:l.toString())!=null&&c.includes(".STL")||(d=l==null?void 0:l.toString())!=null&&d.includes(".obj")||(f=l==null?void 0:l.toString())!=null&&f.includes(".mtl")){pl.value=(k=l==null?void 0:l.toString())==null?void 0:k.split(","),we.value=!1,Ce.value=!0;return}if((_=l==null?void 0:l.toString())!=null&&_.includes(".stl")||(g=l==null?void 0:l.toString())!=null&&g.includes(".STL")||(C=l==null?void 0:l.toString())!=null&&C.includes(".obj")||(U=l==null?void 0:l.toString())!=null&&U.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let o,S=[],y={};if(Array.isArray(l)?o=l:o=l==null?void 0:l.split(","),o==null||o.forEach(T=>{T.includes(".mtl")?S.push(T):y.blob=y.blob?y.blob+","+T:T}),(S==null?void 0:S.length)>0&&(y.mtlBlobs=S),r&&(y.suffix=r),(x=(w=Object.values(y))==null?void 0:w[0])!=null&&x.includes("http:"))t.push(y);else{const T=new Blob([y.blob],{type:"application/octet-stream;charset=UTF-8"});let D=URL.createObjectURL(T),H="";(R=l==null?void 0:l.split("/"))==null||R.forEach((j,N)=>{var J;N===((J=l==null?void 0:l.split("/"))==null?void 0:J.length)-1&&(H=j)}),(q=y.blob)!=null&&q.includes(".stl")&&(H=(H==null?void 0:H.replaceAll(">",""))+".urdf"),ke.value=[{name:H,blobUrl:D}],z.value=!0}}else{const o=await b.axios.get(l,{responseType:"blob",headers:{"Content-Type":"application/json"}}),S=new Blob([o.data],{type:"application/octet-stream;charset=UTF-8"});let y=URL.createObjectURL(S),T="";(F=l==null?void 0:l.split("/"))==null||F.forEach((D,H)=>{var j;H===((j=l==null?void 0:l.split("/"))==null?void 0:j.length)-1&&(T=D)}),ke.value=[{name:T,blobUrl:y}],z.value=!0}(t==null?void 0:t.length)>0&&P.setBlobUrls(t)},_l=e=>{var r,t,s,u;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const l=(u=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:u[((s=(t=e==null?void 0:e.url)==null?void 0:t.split("."))==null?void 0:s.length)-1];return(e==null?void 0:e.name)+"."+l},Fa=async e=>{let l=null,n=null,r=null;if(e!=null&&e.downloadUrl){const s=await Fl(),u=Qe.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),c=await b.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:s,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{u.close()}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});l=URL.createObjectURL(d),n=e==null?void 0:e.name;const f=n==null?void 0:n.lastIndexOf(".");r=n==null?void 0:n.slice(f)}else{const s=await ul.downloadAvatarApi({url:e==null?void 0:e.url});!e.url.toUpperCase().includes(".OBJ")&&!e.url.toUpperCase().includes(".STL")&&!e.url.toUpperCase().includes(".MTL")&&!e.url.toUpperCase().includes(".URDF")?(l=URL.createObjectURL(s.data),n=_l(e)):l=e==null?void 0:e.url}if(r!=null&&r.includes(".urdf")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){const s={row:`${l}`,suffix:r};Xl(s);return}const t={name:n,blobUrl:l};ke.value=[t],z.value=!0},Ka=async e=>{let l=null,n=null;if(e!=null&&e.downloadUrl){const s=await Fl(),u=await b.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:s,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),c=new Blob([u.data],{type:"application/octet-stream;charset=UTF-8"});l=URL.createObjectURL(c),n=e==null?void 0:e.name}else{const s=await ul.downloadAvatarApi({url:e==null?void 0:e.url});l=URL.createObjectURL(s.data),n=_l(e)}const r={name:n,blobUrl:l},t=document.createElement("a");t.href=r.blobUrl,t.download=r.name,t.style.display="none",document.body.appendChild(t),t.click(),setTimeout(()=>{document.body.removeChild(t)},100)},Va=(e,l)=>{if(Object.values(l).length!==0)return Object.values(l).find(n=>{var r,t,s;return((r=n==null?void 0:n.toString())==null?void 0:r.includes(".txt"))||((t=n==null?void 0:n.toString())==null?void 0:t.includes(".cpt"))||((s=n==null?void 0:n.toString())==null?void 0:s.includes(".obj"))})?[...e,ba.value]:e},za=(e,l={})=>[...e==null?void 0:e.values()].filter(n=>Object.keys(l).every(r=>{var u;const t=n[r],s=(u=l[r])==null?void 0:u.toLowerCase();return s&&t&&typeof t=="string"?t.toLowerCase().includes(s):!0})),Yl=a.ref([]),qa=async(e,l,n=!1)=>{var r;if(e){if(fe.setTableLoading(!0),Yl.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(t=>!t)))return X.value=Sl.value;if(n){X.value=[...Dl.value.values()].filter(t=>Object.values(t).some(s=>typeof s=="string"?s==null?void 0:s.toLowerCase().includes(l==null?void 0:l.toLowerCase()):!1));return}X.value=za(Dl.value,e),fe.setTableLoading(!1)}},Ja=async e=>{var u,c,d,f,k,_,g,C,U,w,x,R,q,F,o;const l=await b.getInsofDataApi({keyLikes:{pageKey:`loading${((u=me.value)==null?void 0:u.account)||((c=me.value)==null?void 0:c.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await b.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((d=me.value)==null?void 0:d.account)||((f=me.value)==null?void 0:f.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(_=(k=l==null?void 0:l.data)==null?void 0:k.result)==null?void 0:_.map(S=>S==null?void 0:S.id);const t=(C=(g=n==null?void 0:n.data)==null?void 0:g.result)==null?void 0:C.map(S=>S==null?void 0:S.id);r=[...b.cloneDeep(r),...t],(r==null?void 0:r.length)>0&&(r!=null&&r.every(S=>S!==null&&S))&&await b.batchDeleteInsofDataApi({ids:r});let s=await te.getItemData(Y.value,sessionStorage.getItem("systemKey"),e.id);if(s=s==null?void 0:s.filter(S=>S.comp!=="methodButton"),s&&s.length>0){const S=!Array.isArray(Pl.value)&&((U=Pl.value)==null?void 0:U.key)!=="main"?[]:Pl.value;S.push({key:Je.value===""?(w=e==null?void 0:e.id)==null?void 0:w.toString():Je.value+"-"+((x=e==null?void 0:e.id)==null?void 0:x.toString()),value:e[(R=Object.keys(e))==null?void 0:R.filter(y=>y!=="index"&&y!=="id")[0]]}),xl.setSelectMenu(Je.value===""?(q=e==null?void 0:e.id)==null?void 0:q.toString():Je.value+"-"+((F=e==null?void 0:e.id)==null?void 0:F.toString())),xl.setSelectTitle(S),xl.setSelectIndex((o=e==null?void 0:e.id)==null?void 0:o.toString()),ie("pageChange",s)}},Zl=async(e,l,n,r)=>{var s,u,c,d,f,k,_,g,C,U,w,x,R,q,F,o,S,y,T,D,H,j,N,J,m;if((r==null?void 0:r.isExistChild)===!0){let O=(u=(s=G.value)==null?void 0:s.find(L=>(L==null?void 0:L.isMainKey)===!0))==null?void 0:u.prop,E=(c=r==null?void 0:r.rowContent)==null?void 0:c[O],p=(f=(d=r==null?void 0:r.columnType)==null?void 0:d.childPath)==null?void 0:f.split(se),$=[];p==null||p.forEach((L,v)=>{(p==null?void 0:p.length)-1===v&&$.push(E),$.push(L)}),$=$.join(se);let V=await te.getItemData($,sessionStorage.getItem("systemKey"),""),ee=await te.getItemData((k=r==null?void 0:r.columnType)==null?void 0:k.childPath,sessionStorage.getItem("systemKey"),"");if(!V||(V==null?void 0:V.length)===0){let L=[];ee==null||ee.forEach(W=>{var Se,ye,A,h;let le={type:"structure",pageKey:$,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(Se=me.value)==null?void 0:Se.id,parentPageKey:"",createUserLayer:((ye=me.value)==null?void 0:ye.dept)||((A=me.value)==null?void 0:A.部门名称)},he={pageData:{comp:W==null?void 0:W.comp,compData:(h=W==null?void 0:W.compData)==null?void 0:h.filter(oe=>(oe==null?void 0:oe.key)!=="tableContents"),name:W==null?void 0:W.name,isShow:W==null?void 0:W.isShow}};L.push({key:le,value:he})}),(L==null?void 0:L.length)>0&&await b.batchAddInsofDataApi({dataList:L});let v=await te.getItemData($,sessionStorage.getItem("systemKey"),"");Nl.value=v}else Nl.value=V;ie("routeUrl",Nl.value,{isEdit:!0,routerUrl:$});return}if((r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(O=>(O==null?void 0:O.url)&&(O==null?void 0:O.name)))){let O=b.cloneDeep(e);O=await((_=b.cloneDeep(O))==null?void 0:_.map(async p=>{var ee,L,v,W;const $=await ul.downloadAvatarApi({url:p==null?void 0:p.url});let V=URL.createObjectURL($.data);return{name:(p==null?void 0:p.name)+"."+((W=(ee=p==null?void 0:p.url)==null?void 0:ee.split("."))==null?void 0:W[((v=(L=p==null?void 0:p.url)==null?void 0:L.split("."))==null?void 0:v.length)-1]),blobUrl:V}}));let E=await Promise.all(O);ke.value=E,z.value=!0}const t=b.cloneDeep(G.value);if((r==null?void 0:r.isMainKey)===!0&&(t==null?void 0:t.length)>0){(g=t==null?void 0:t[0])==null||g.prop;let O=b.cloneDeep(Y).value+se+(r==null?void 0:r.data),E=b.cloneDeep(Y).value,p=(U=(C=Ye.value[O])==null?void 0:C.filter(L=>{var v,W;return((v=L==null?void 0:L.key)==null?void 0:v.type)==="structure"&&((W=L==null?void 0:L.key)==null?void 0:W.parentTable)===""}))==null?void 0:U.map(L=>{var v;return(v=L==null?void 0:L.value)==null?void 0:v.pageData}),$={};(w=G.value)==null||w.forEach(L=>{(L==null?void 0:L.label)!=="操作"&&($[L.label]=n[L.prop]??n[L.label])});let V=(R=(x=i==null?void 0:i.itemData)==null?void 0:x.find(L=>(L==null?void 0:L.key)==="mainRouters"))==null?void 0:R.contents,ee;if((V==null?void 0:V.length)>0){let L=O==null?void 0:O.split(se)[((q=O==null?void 0:O.split(se))==null?void 0:q.length)-1],v=V==null?void 0:V.find(W=>(W==null?void 0:W.key)===L);ee=(v==null?void 0:v.routerContent)+se+(v==null?void 0:v.key)}if((p==null?void 0:p.length)>0)await te.getItemData(O+se+`updateLoading${((F=me.value)==null?void 0:F.account)||((o=me.value)==null?void 0:o.账号)}`,sessionStorage.getItem("systemKey"),"")||await te.loadingConstruct(O,O+se+`updateLoading${((S=me.value)==null?void 0:S.account)||((y=me.value)==null?void 0:y.账号)}`,$,ee),fe.setRouteToChildPath(E),B.setActiveMenuPath(O+se+`updateLoading${((T=me.value)==null?void 0:T.account)||((D=me.value)==null?void 0:D.账号)}`);else{(H=t==null?void 0:t[0])==null||H.prop;let L=b.cloneDeep(Y).value+se+(r==null?void 0:r.data),v=b.cloneDeep(Y).value;await te.getItemData(v+se,sessionStorage.getItem("systemKey"),""),await te.loadingConstruct(v+se,L,$),await te.loadingConstruct(L,L+se+`updateLoading${((j=me.value)==null?void 0:j.account)||((N=me.value)==null?void 0:N.账号)}`,$,ee),fe.setRouteToChildPath(v),B.setActiveMenuPath(L+se+`updateLoading${((J=me.value)==null?void 0:J.account)||((m=me.value)==null?void 0:m.账号)}`)}}},Ra=()=>{z.value=!1},Wa=e=>{ie("rowClick",e)};a.watch(()=>i.changedContent,()=>{var n,r;if(!i.changedContent)return;let e=(n=X.value)==null?void 0:n.map(t=>{var s;return t.id===((s=i.changedContent)==null?void 0:s.id)&&(t={...i.changedContent,id:i.changedContent.newId?i.changedContent.newId:i.changedContent.id},delete t.newId),t});const l=(r=i.itemData)==null?void 0:r.map(t=>((t==null?void 0:t.key)==="tableContents"&&(t.contents=e),t));X.value=e,ie("contentChange",{contents:l,index:i.index}),ie("change",{content:e,index:i==null?void 0:i.index,buttonName:"",id:i==null?void 0:i.index})},{deep:!0,immediate:!0});const Ga=()=>{},Ha=async()=>{const e=Y.value,l=sessionStorage.getItem("systemKey"),n=await te.getItemData(e,l,""),r=(n==null?void 0:n.find(c=>(c==null?void 0:c.name)==="方法明细"))||(n==null?void 0:n[0]),t=(r==null?void 0:r.compData)||[],s=t==null?void 0:t.find(c=>{const d=c==null?void 0:c.key;return d==="formContent"||d==="tableContents"});return s==null?void 0:s.contents},Fl=async()=>`Bearer ${b.Local.get("access-token")}`,Qa=async(e,{token:l,inputData:n}={})=>await b.axios.post(e,n,{headers:{Authorization:l}}).catch(t=>(B.setImportLoading(!1),Promise.reject(t))),Xa=e=>{const l=[],n=r=>{r&&typeof r=="object"&&!Array.isArray(r)?Object.values(r).forEach(n):l.push(r)};return n(e),l},Ya=async(e,l,n)=>{var q,F,o,S,y,T,D,H;B.setImportLoading(!0),fe.setFreshContent(!1);let r=await Ha().catch(j=>(B.setImportLoading(!1),Promise.reject(j)));r=r==null?void 0:r.filter(j=>{var N;return((N=j==null?void 0:j.find(J=>J==null?void 0:J.id))==null?void 0:N.id)===(l==null?void 0:l.id)});let t=te.getEqualChild([(q=G.value)==null?void 0:q.filter(j=>(j==null?void 0:j.label)!=="操作")]);const s=(o=(F=te.tableToForm(r,t))==null?void 0:F[0])==null?void 0:o.find(j=>{const N=j==null?void 0:j.key;return N==="算法体"||N==="方法体"}),u=s==null?void 0:s.value;if(!u){console.log("未搜索到isMain, 缺少算法执行接口"),B.setImportLoading(!1);return}const c=G.value?te.getEqualChild([G.value]):[],d=c.find(j=>{const N=j==null?void 0:j.prop;return N==="输入"||N==="输入数据.输入1"||N==="样本输入数据"}),f=d==null?void 0:d.prop;let k=l==null?void 0:l[f];const _=await Fl().catch(j=>(B.setImportLoading(!1),Promise.reject(j))),g=await Qa(u,{token:_,inputData:k}).catch(j=>(B.setImportLoading(!1),Promise.reject(j))),C=(S=g==null?void 0:g.data)==null?void 0:S.data,U=c.find(j=>(j==null?void 0:j.prop)==="输出数据.输出1"),w=U==null?void 0:U.prop;let x=[],R=[];if(((y=Object.values(C))==null?void 0:y.length)>0){let j=[];const N=new FormData,J=(T=Xa(C))==null?void 0:T.map(async O=>{var E,p;if(!Array.isArray(O)&&(O!=null&&O.includes("http"))){let $=await b.axios.get(O,{responseType:"blob"}),V=(p=O==null?void 0:O.split("/"))==null?void 0:p[((E=O==null?void 0:O.split("/"))==null?void 0:E.length)-1];N.append("files",$.data,V)}else j.push(O)});if(await Promise.all(J),!te.isFormDataEmpty(N)){let O=await ul.uploadAmountApi(N),E=(H=(D=O==null?void 0:O.data)==null?void 0:D.result)==null?void 0:H.map(p=>{var $,V,ee,L,v,W;return{name:(W=(v=(L=($=p==null?void 0:p.url)==null?void 0:$.split("/"))==null?void 0:L[((ee=(V=p==null?void 0:p.url)==null?void 0:V.split("/"))==null?void 0:ee.length)-1])==null?void 0:v.split("."))==null?void 0:W[0],url:p==null?void 0:p.url}});j=[...j,...E]}let m={};for(let O in l)O!=="id"&&(m[O]=l[O]);m[w]=j,R.push({id:l==null?void 0:l.id,value:{tableData:m}})}(R==null?void 0:R.length)>0&&await b.batchUpdateInsofDataApi({dataList:R}),(x==null?void 0:x.length)>0&&await b.batchAddInsofDataApi({dataList:x}),vl(!0),B.setImportLoading(!1),fe.setFreshContent(!0)},Il=(e,l)=>(e=e==null?void 0:e.map(n=>{var r,t;return n!=null&&n.children&&((r=n.children)!=null&&r.find(s=>s.id===(l==null?void 0:l.id))?n.children=(t=n.children)==null?void 0:t.filter(s=>(s==null?void 0:s.id)!==(l==null?void 0:l.id)):n.children=Il(n.children,l)),n}),e),Ul=async(e,l,n)=>{var r,t,s,u,c,d,f,k,_,g,C,U,w,x,R;if(Ke.value="",Cl.value=!0,Ll.value=!0,ie("onButtonClick",e,l),e==="删除")te.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var q,F;(q=X.value)!=null&&q.find(o=>(o==null?void 0:o.id)===(l==null?void 0:l.id))?X.value=(F=b.cloneDeep(X.value))==null?void 0:F.filter(o=>(o==null?void 0:o.id)!==(l==null?void 0:l.id)):X.value=Il(b.cloneDeep(X.value),l),Or(Al.value,Je.value,l==null?void 0:l.id),fe.setTableLoading(i==null?void 0:i.index),ie("change",{content:X.value,singleContent:l,index:i==null?void 0:i.index,type:"delete",buttonName:e,column:G.value})});else if(e==="批量删除"){if(((r=$e.value)==null?void 0:r.length)===0)return b.ElMessage.warning("请先勾选操作的数据");te.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,o;const q=(F=$e.value)==null?void 0:F.map(S=>S.id);X.value=(o=b.cloneDeep(X.value))==null?void 0:o.filter(S=>!(q!=null&&q.includes(S.id))),fe.setTableLoading(i==null?void 0:i.index),ie("change",{content:X.value,singleContent:null,selectItems:$e.value,index:i==null?void 0:i.index,type:"batchDelete",buttonName:e,column:G.value})})}else if(e==="复制新增"){Me.value="新增";const q=b.cloneDeep(l),F=(t=G.value)==null?void 0:t.find(y=>y==null?void 0:y.isMainKey),o=F||((s=G.value)==null?void 0:s[0]),S=(u=Ie.value)==null?void 0:u.find(y=>(y==null?void 0:y.label)==="新建");await la(!0,S,{data:q,firstCol:o})}else if(e==="新增")Me.value="新增",yl(""),Ve.value=!0;else if(e==="编辑")Me.value="编辑",yl(l),Ve.value=!0;else if(e==="查看")Me.value="查看",yl(l),Cl.value=!1,Ll.value=!1,Ve.value=!0;else if(e==="查看三维模型"){const q={};for(let o in l)o!=="id"&&(q[o]=l[o]);let F=(c=Object.values(q))==null?void 0:c[1];je.setTableShowThree(F)}else if(((d=n==null?void 0:n.extra)==null?void 0:d.type)==="modelExample")Me.value=e,Tl.value=!0;else if(e==="新建"){let q=Ye.value,F=[];for(let D in q)D!=null&&D.includes(`loading${((f=me.value)==null?void 0:f.account)||((k=me.value)==null?void 0:k.账号)}`)&&(F=[...F,...D]);let o=[];for(let D in q)D!=null&&D.includes(`updateLoading${((_=me.value)==null?void 0:_.account)||((g=me.value)==null?void 0:g.账号)}`)&&(o=[...o,...D]);let S=F==null?void 0:F.map(D=>D==null?void 0:D.id);const y=o==null?void 0:o.map(D=>D==null?void 0:D.id);S=[...b.cloneDeep(S),...y],(S==null?void 0:S.length)>0&&(S!=null&&S.every(D=>D!==null&&D))&&await b.batchDeleteInsofDataApi({ids:S});const T=(C=Ie.value)==null?void 0:C.find(D=>(D==null?void 0:D.label)==="新建");await la(!1,T)}else if(e==="修改模板"){let q=b.cloneDeep(Y).value;fe.setRouteToChildPath(q),B.setActiveMenuPath(q+se)}else if(e==="执行")Ya(e,l);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((U=$e.value)==null?void 0:U.length)===0)return b.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((w=X.value)==null?void 0:w.length)===0)return b.ElMessage.warning("暂无数据导出");const q=(R=(x=G.value)==null?void 0:x.map(o=>o==null?void 0:o.label))==null?void 0:R.filter(o=>o!=="操作"),F=e==="导出全部"?b.cloneDeep(X.value):b.cloneDeep($e.value);F==null||F.forEach(o=>{o==null||delete o.id}),_a(F,i==null?void 0:i.compName,q,i==null?void 0:i.compName)}},Za=async e=>{var n,r,t,s,u,c;const l=await b.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((n=l==null?void 0:l.data)==null?void 0:n.code)===200)return Array.isArray((r=l==null?void 0:l.data)==null?void 0:r.result)&&((s=(t=l==null?void 0:l.data)==null?void 0:t.result)==null?void 0:s.length)>0?(c=(u=l==null?void 0:l.data)==null?void 0:u.result)==null?void 0:c.map(d=>{var f;return{id:d==null?void 0:d.id,...(f=d==null?void 0:d.value)==null?void 0:f.pageData}}):[]},Ia=async(e,l)=>{var n,r,t,s,u,c,d,f,k,_,g,C,U,w,x,R,q,F,o,S;try{let y,T;const D=(n=Ye.value[Y.value+se])==null?void 0:n.filter(p=>{var $;return(($=p==null?void 0:p.key)==null?void 0:$.type)==="structureMethod"}),H=(r=Ye.value[Y.value+se])==null?void 0:r.filter(p=>{var $;return(($=p==null?void 0:p.key)==null?void 0:$.type)==="structure"}),j=D==null?void 0:D.find(p=>{var $,V;return((V=($=p==null?void 0:p.value)==null?void 0:$.pageData)==null?void 0:V.method)==="保存"});if(!j)return;const N=(c=(u=Ye.value[(s=(t=j==null?void 0:j.value)==null?void 0:t.pageData)==null?void 0:s.path])==null?void 0:u.filter(p=>{var $;return(($=p==null?void 0:p.key)==null?void 0:$.type)==="data"}))==null?void 0:c.find(p=>{var $,V,ee,L;return((V=($=p==null?void 0:p.value)==null?void 0:$.tableData)==null?void 0:V.算法名称)===((L=(ee=j==null?void 0:j.value)==null?void 0:ee.pageData)==null?void 0:L.method)});if(!N)return;const J={buttonName:(f=(d=j==null?void 0:j.value)==null?void 0:d.pageData)==null?void 0:f.method,api:(_=(k=N==null?void 0:N.value)==null?void 0:k.tableData)==null?void 0:_.算法体,content:H==null?void 0:H.map(p=>{var $;return($=p==null?void 0:p.value)==null?void 0:$.pageData}),extraContent:[],extraValues:(C=(g=j==null?void 0:j.value)==null?void 0:g.pageData)==null?void 0:C.data,methodName:(w=(U=j==null?void 0:j.value)==null?void 0:U.pageData)==null?void 0:w.path};if(!e)return;const m={...e,compData:(x=e==null?void 0:e.compData)==null?void 0:x.map(p=>{var $;return(p==null?void 0:p.key)==="formContent"?{...p,contents:($=p==null?void 0:p.contents)==null?void 0:$.map(V=>(V==null?void 0:V.prop)===l?{...V,value:""}:V)}:p})},O={key:{pageKey:Y.value+se,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:m}},E=await b.axios.post(J.api,O,{headers:{"Content-Type":"application/json"}});return((R=E==null?void 0:E.data)==null?void 0:R.code)===200&&(y=(F=(q=E==null?void 0:E.data)==null?void 0:q.result)==null?void 0:F.latestReportCode,T=(S=(o=E==null?void 0:E.data)==null?void 0:o.result)==null?void 0:S.status),{newMainKeyValue:y,newStatus:T}}catch(y){throw b.ElMessage.error(y),new Error(y)}},ea=(e,l,n,r)=>{var t;ie("contentChange",{contents:(t=e==null?void 0:e.compData)==null?void 0:t.map(s=>{var u;return(s==null?void 0:s.key)==="formContent"?{...s,contents:(u=s==null?void 0:s.contents)==null?void 0:u.map(c=>(c==null?void 0:c.key)===l?{...c,value:n}:hl.value&&(c==null?void 0:c.prop)===hl.prop?{...c,value:hl.value}:c)}:s}),index:e==null?void 0:e.id},r)},hl=a.reactive({prop:"状态",value:""}),er=a.ref(["系统自动生成信息","审批意见"]),lr=async(e,l,n)=>{var d,f;let r=e==null?void 0:e[l==null?void 0:l.prop],t=1,s,u;const c=b.cloneDeep(Y).value+se+r;if(c){hl.value="",s=(d=Ye.value[c])==null?void 0:d.filter(g=>{var C;return((C=g==null?void 0:g.key)==null?void 0:C.type)==="structure"});const k=s==null?void 0:s.find(g=>{var C,U,w;return((w=(U=(C=g==null?void 0:g.value)==null?void 0:C.pageData)==null?void 0:U.comp)==null?void 0:w.toUpperCase())==="FORM"});u={...(f=k==null?void 0:k.value)==null?void 0:f.pageData,id:k==null?void 0:k.id};const _=await Ia(u,l==null?void 0:l.prop);if(hl.value=_==null?void 0:_.newStatus,_!=null&&_.newMainKeyValue)return _==null?void 0:_.newMainKeyValue}if(X.value.some(k=>(k==null?void 0:k[l==null?void 0:l.prop])===r)){const k=r;for(;X.value.some(_=>(_==null?void 0:_[l==null?void 0:l.prop])===`${k}(${t})`);)t++;r=`${k}(${t})`}return r},la=async(e,l,n)=>{var u,c,d,f,k,_,g,C;let r,t;const s=await lr(n==null?void 0:n.data,n==null?void 0:n.firstCol);if(e?(r=b.cloneDeep(Y).value+se+((f=n==null?void 0:n.data)==null?void 0:f[(d=n==null?void 0:n.firstCol)==null?void 0:d.prop]),t=b.cloneDeep(Y).value+se+s):(r=b.cloneDeep(Y).value+se,t=b.cloneDeep(r)+`loading${((u=me.value)==null?void 0:u.account)||((c=me.value)==null?void 0:c.账号)}`),l){const U=(_=(k=Ye.value[t])==null?void 0:k.filter(w=>{var x;return((x=w==null?void 0:w.key)==null?void 0:x.parentTable)===""}))==null?void 0:_.map(w=>{var x;return{id:w==null?void 0:w.id,...(x=w==null?void 0:w.value)==null?void 0:x.pageData}});if((U==null?void 0:U.length)>0)if(e){const w=U==null?void 0:U.find(x=>{var R;return((R=x==null?void 0:x.comp)==null?void 0:R.toUpperCase())==="FORM"});w&&ea(w,(g=n==null?void 0:n.firstCol)==null?void 0:g.label,s,Y.value)}else fe.setRouteToChildPath(b.cloneDeep(Y).value),B.setActiveMenuPath(t);else if(await te.loadingConstruct(r,t,null,null,e?er.value:null),e){const w=await Za(t);if((w==null?void 0:w.length)>0){const x=w==null?void 0:w.find(R=>{var q;return((q=R==null?void 0:R.comp)==null?void 0:q.toUpperCase())==="FORM"});x&&ea(x,(C=n==null?void 0:n.firstCol)==null?void 0:C.label,s,Y.value)}}else fe.setRouteToChildPath(b.cloneDeep(Y).value),B.setActiveMenuPath(t)}else e?(Ke.value="",Ee.value=n==null?void 0:n.data,vl(!0,n==null?void 0:n.firstCol,s)):(fe.setRouteToChildPath(b.cloneDeep(Y).value),B.setActiveMenuPath(t))},ar=()=>{Ce.value=!1,pl.value=[],we.value=!1},yl=e=>{var u,c,d,f,k,_,g,C,U,w,x,R,q,F;const l=[];let n=[];for(let o in e)Array.isArray(e==null?void 0:e[o])&&n.push(o);be.value=b.cloneDeep(G.value),(c=te.getColumnChild((u=b.cloneDeep(G.value))==null?void 0:u.filter(o=>(o==null?void 0:o.label)!=="操作")))==null||c.forEach((o,S)=>{var y;n.find(T=>T===(o==null?void 0:o.prop))||(o!=null&&o.formType&&((y=o==null?void 0:o.formType)==null?void 0:y.toUpperCase())==="SELECT"?l.push({label:(o==null?void 0:o.prop)||(o==null?void 0:o.label)||"",name:(o==null?void 0:o.prop)??"t"+S,prop:o==null?void 0:o.prop,type:!(o!=null&&o.formType)||(o==null?void 0:o.formType)===""?"Input":o==null?void 0:o.formType,value:(e==null?void 0:e[o==null?void 0:o.prop])??(o==null?void 0:o.value)??"",id:(o==null?void 0:o.id)??S,contents:(o==null?void 0:o.options)??[],width:1,isFormColHidden:o==null?void 0:o.isFormColHidden,disabled:o==null?void 0:o.disabled,optionUrl:{groupSelect:o==null?void 0:o.groupSelect,menuSelect:o==null?void 0:o.formMenuSelect,type:"Select",selectRelateType:o==null?void 0:o.selectRelateType}}):l.push({label:(o==null?void 0:o.prop)||(o==null?void 0:o.label)||"",prop:o==null?void 0:o.prop,name:(o==null?void 0:o.prop)??"t"+S,type:!(o!=null&&o.formType)||(o==null?void 0:o.formType)===""?"Input":o==null?void 0:o.formType,value:(e==null?void 0:e[o==null?void 0:o.prop])??(o==null?void 0:o.value)??"",id:(o==null?void 0:o.id)??S,contents:(o==null?void 0:o.options)??[],width:1,isFormColHidden:o==null?void 0:o.isFormColHidden,disabled:o==null?void 0:o.disabled}))}),e===""||!e||(Ke.value=(e==null?void 0:e.id)??"");let r=te.getColumnChild((d=b.cloneDeep(G.value))==null?void 0:d.filter(o=>(o==null?void 0:o.label)!=="操作"));Le.value&&((f=Le.value)==null?void 0:f.length)>0&&(Le.value=(k=b.cloneDeep(Le).value)==null?void 0:k.map(o=>{var y;let S=(o==null?void 0:o.prop)||((y=r==null?void 0:r.find(T=>(T==null?void 0:T.label)===(o==null?void 0:o.label)))==null?void 0:y.prop);return S&&(o.value=e[S]),o})),Te.value=Le.value&&((_=Le.value)==null?void 0:_.length)>0?te.getTableFormToForm(Le.value):l;let t=[],s=(g=i.itemData)==null?void 0:g.filter(o=>(o==null?void 0:o.key)==="filterAllType");if((s==null?void 0:s.length)>0&&(t=(s==null?void 0:s.map(S=>S==null?void 0:S.value)).flat()),(t==null?void 0:t.length)>0){let o=t==null?void 0:t.find(S=>{var y;return(y=S==null?void 0:S.content)==null?void 0:y.includes("@Type")});if(o!=null&&o.content){let S=(w=(U=(C=o==null?void 0:o.content)==null?void 0:C.replace(":",Be))==null?void 0:U.split(Be))==null?void 0:w[1];if(((x=S==null?void 0:S.trim())==null?void 0:x.toUpperCase())==="MANUAL"){let y=(q=(R=i.itemData)==null?void 0:R.find(T=>(T==null?void 0:T.key)==="contentTableId"))==null?void 0:q.contents;Te.value=(F=Te.value)==null?void 0:F.map((T,D)=>{var H;return D===0&&(T.type="Select",(H=T==null?void 0:T.optionUrl)!=null&&H.menuId?(T.optionUrl.menuId=y,T.optionUrl.menuFilter=t):T.optionUrl={menuId:y,menuFilter:t}),T})}}}},rr=()=>{var l;const e=(l=M.value)==null?void 0:l.$el;e&&ql.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:n=>{var u;const{oldIndex:r,newIndex:t}=n;if(r===t)return;const s=gl.value.splice(r,1)[0];gl.value.splice(t,0,s),G.value=(u=G.value)==null?void 0:u.slice().sort((c,d)=>{if(c.label==="操作")return 1;if(d.label==="操作")return-1;const f=gl.value.findIndex(_=>_.label===c.label),k=gl.value.findIndex(_=>_.label===d.label);return f-k})}})};a.onMounted(()=>{wl.value=window.innerWidth-240*2});const nr=()=>{a.nextTick(()=>{rr()})},Kl=(e,l)=>{var r;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let n;return e.children=(r=e.children)==null?void 0:r.map(t=>{var s,u;if((t==null?void 0:t.id)===Ke.value){let c={};for(let d in t){let f=(s=l==null?void 0:l.find(k=>(k==null?void 0:k.prop)===d))==null?void 0:s.label;f?c[d]=(u=Ee.value)==null?void 0:u[f]:c[d]=t[d]}t=Object.assign(c,Ee.value),n=t}else{let c=Kl(t,l);t=c==null?void 0:c.contents,n=c==null?void 0:c.currentSelectContents}return t}),{contents:e,currentSelectContents:n}},aa=(e,l)=>{let n,r;return e!=null&&e.find(t=>(t==null?void 0:t.id)===Ke.value)?n=e==null?void 0:e.map(t=>{var s,u;if((t==null?void 0:t.id)===Ke.value){let c={};for(let d in t){let f=(s=l==null?void 0:l.find(k=>(k==null?void 0:k.prop)===d))==null?void 0:s.label;f?c[d]=(u=Ee.value)==null?void 0:u[f]:c[d]=t[d]}t=Object.assign(c,Ee.value),r=t}return t}):n=e==null?void 0:e.map(t=>{var s,u,c,d;if((t==null?void 0:t.id)===Ke.value){let f={};for(let k in t){let _=(s=l==null?void 0:l.find(g=>(g==null?void 0:g.prop)===k))==null?void 0:s.label;_?f[k]=(u=Ee.value)==null?void 0:u[_]:f[k]=t[k]}t=Object.assign(f,Ee.value),r=t}else t=(c=Kl(t,l))==null?void 0:c.contents,r=(d=Kl(t,l))==null?void 0:d.currentSelectContents;return t}),{newContents:n,currentSelectContents:r}},ra=(e,l,n)=>{var r,t;return e[l==null?void 0:l.prop]=n,typeof e.id=="number"&&(e.id=(r=e.id)==null?void 0:r.toString()),e.children&&((t=e.children)==null?void 0:t.length)>0&&(e.children=e.children.map(ra)),e},Vl=e=>{var n;const l=[];return l.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((n=e.children)==null||n.forEach(r=>{l.push(...Vl(r))})),(l==null?void 0:l.length)>0?l==null?void 0:l.map(r=>{const t={...r};return delete t.children,t}):[]},vl=(e=!0,l,n)=>{var f,k,_,g,C,U,w,x,R,q,F,o,S,y,T,D,H,j,N,J,m,O;let r=te.getColumnChild((f=b.cloneDeep(G.value))==null?void 0:f.filter(E=>(E==null?void 0:E.label)!=="操作")),t,s=b.cloneDeep(X.value);if(!Ee.value){Ve.value=!1;return}if(Ke.value===""){ol.value++;let E;l&&n?E={id:ol.value.toString(),[l==null?void 0:l.prop]:n,children:Ee.value.children}:E={id:ol.value.toString()},E!=null&&E.children&&(E={...E,children:(k=E.children)==null?void 0:k.map(p=>ra(p,l,n))}),s.push(Object.assign(Ee.value,E)),t=Object.assign(Ee.value,E)}else s=(_=aa(s,r))==null?void 0:_.newContents,t=(g=aa(s,r))==null?void 0:g.currentSelectContents;const u=(C=i.itemData)==null?void 0:C.filter(E=>(E==null?void 0:E.key)==="childTree")[0];if(((U=u==null?void 0:u.contents)==null?void 0:U.length)>0){Me.value="编辑";const E=[];s==null||s.forEach((p,$)=>{var ee;let V={};if(Array.isArray(p)){let L=[];p==null||p.filter(v=>!(v!=null&&v.id)).forEach((v,W)=>{var le,he,Se,ye,A,h,oe;if((he=(le=Pe.value)==null?void 0:le[W])!=null&&he.prop&&!Array.isArray(v)){let ce={};ce[Pe.value[W].column]=v,ge!=null&&ge.value&&((Se=ge==null?void 0:ge.value)==null?void 0:Se.length)>0&&((ye=ge==null?void 0:ge.value)!=null&&ye.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(ce)))&&(L=(A=ge==null?void 0:ge.value)==null?void 0:A.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(ce))),L&&L.length>0?V[Pe.value[W].prop]=L!=null&&L.find(ne=>{var ve;return((ve=Object.keys(ne))==null?void 0:ve[0])===Pe.value[W].column})?(h=L==null?void 0:L.find(ne=>{var ve;return((ve=Object.keys(ne))==null?void 0:ve[0])===Pe.value[W].column}))==null?void 0:h[Pe.value[W].column]:v:V[Pe.value[W].prop]=v}else Array.isArray(v)&&((oe=Pe.value[W])!=null&&oe.prop?V[Pe.value[W].prop]=v:V.children=Rl(v,Pe.value))})}else V=p;Array.isArray(p)&&p.some(L=>L==null?void 0:L.id)?E.push(Object.assign(V,{id:(ee=p==null?void 0:p.find(L=>L.id))==null?void 0:ee.id})):V.id?E.push(V):E.push(Object.assign(V,{id:$.toString()}))}),X.value=ia(E,u,G.value)}else X.value=s;ta(X.value),Al.value=X.value;const c=Lr(Al.value,Je.value,s);let d=[];if(cl.value?(d=(w=b.cloneDeep(cl).value.singleContent)==null?void 0:w.filter(E=>(E==null?void 0:E.id)!==(t==null?void 0:t.id)),d.push(t)):d=[t],ll.value){const E={content:c,singleContent:((x=u==null?void 0:u.contents)==null?void 0:x.length)>0?d==null?void 0:d.flatMap(Vl):d,index:i==null?void 0:i.index,buttonName:"编辑",column:G.value,parentTableId:i==null?void 0:i.parentTableId};fe.setCacheUpdatingData(E)}if(e&&!((F=(q=(R=Te.value)==null?void 0:R[0])==null?void 0:q.optionUrl)!=null&&F.menuId)){const E={content:c,singleContent:((o=u==null?void 0:u.contents)==null?void 0:o.length)>0?Vl(t):t,index:i==null?void 0:i.index,buttonName:Me.value,column:G.value,parentTableId:i==null?void 0:i.parentTableId};fe.setTableLoading(i==null?void 0:i.index),Ve.value=!1,Ee.value=void 0,ie("change",E)}if((T=(y=(S=Te.value)==null?void 0:S[0])==null?void 0:y.optionUrl)!=null&&T.menuId){Ve.value=!1;let E=(D=i.itemData)==null?void 0:D.filter(p=>(p==null?void 0:p.key)==="filterAllType");if((E==null?void 0:E.length)>0){let $=(N=(j=(H=(E==null?void 0:E.map(V=>V==null?void 0:V.value)).flat().find(V=>{var ee;return(ee=V==null?void 0:V.content)==null?void 0:ee.includes("@Num")}))==null?void 0:H.content)==null?void 0:j.split(":"))==null?void 0:N[1];$=parseInt($),X.value=(O=X.value)==null?void 0:O.slice(((J=X.value)==null?void 0:J.length)-$,(m=X.value)==null?void 0:m.length)}}};a.onUnmounted(()=>{G.value=[],X.value=[],be.value=[],ue.value=[],Le.value=[],Ze.value=[],pl.value=[],tl.value=[],Te.value=[],$e.value=[],M.value=null});const na=async(e,l,n)=>{var f,k,_,g,C,U,w,x,R,q,F;al.value=n==null?void 0:n.prop;const r=b.cloneDeep(i.itemData),t=r==null?void 0:r.map(o=>{var S;return(o==null?void 0:o.key)==="header"&&((S=o.contents)==null||S.map((y,T)=>{var D,H,j,N,J,m,O,E,p,$,V,ee,L,v,W,le,he,Se,ye;return y.type=y!=null&&y.type?y.type:(N=(j=(H=(D=y==null?void 0:y.key)==null?void 0:D.split("$"))==null?void 0:H[1])==null?void 0:j.split("("))!=null&&N[0]?(m=(J=te.FormType)==null?void 0:J.find(A=>{var h,oe,ce,ne;return(A==null?void 0:A.key)===((ne=(ce=(oe=(h=y==null?void 0:y.key)==null?void 0:h.split("$"))==null?void 0:oe[1])==null?void 0:ce.split("("))==null?void 0:ne[0])}))==null?void 0:m.value:"Input",y.options=y!=null&&y.options?y.options:((p=(E=(O=y==null?void 0:y.key)==null?void 0:O.split("$"))==null?void 0:E[1])==null?void 0:p.length)>0?(L=(ee=Jl((V=($=y==null?void 0:y.key)==null?void 0:$.split("$"))==null?void 0:V[1]))==null?void 0:ee.split(","))==null?void 0:L.map(A=>({label:A,value:A})):[],(v=y==null?void 0:y.key)!=null&&v.includes("$")&&(y.key=(le=(W=y==null?void 0:y.key)==null?void 0:W.split("$"))==null?void 0:le[0]),y.value=(he=Object.values(l))==null?void 0:he[T],y.optionUrl=y!=null&&y.formMenuSelect&&((Se=y==null?void 0:y.formMenuSelect)==null?void 0:Se.length)>0?{groupSelect:(ye=y==null?void 0:y.groupSelect)==null?void 0:ye.split(/[::]/).map(A=>A.trim()),menuSelect:y==null?void 0:y.formMenuSelect,selectRelateType:"",type:(y==null?void 0:y.formType)??(y!=null&&y.groupSelect?"Select":"")}:null,y})),o});let s=b.cloneDeep(Te.value),u=(k=(f=b.cloneDeep(t))==null?void 0:f.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:k.contents;s=s==null?void 0:s.map(o=>{var S;return o.value=(S=u==null?void 0:u.find((y,T)=>T===(o==null?void 0:o.id)))==null?void 0:S.value,o});let c="",d=(C=(g=(_=b.cloneDeep(t))==null?void 0:_.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:g.contents)==null?void 0:C.find((o,S)=>{var y,T,D;return(o==null?void 0:o.label)===al.value||(S==null?void 0:S.toString())===((D=(T=(y=al.value)==null?void 0:y.split("a"))==null?void 0:T[1])==null?void 0:D.toString())});if((x=(w=(U=b.cloneDeep(t))==null?void 0:U.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:w.contents)==null||x.forEach(o=>{var S,y,T,D,H;c===""&&((T=(y=(S=o==null?void 0:o.optionUrl)==null?void 0:S.groupSelect)==null?void 0:y[1])!=null&&T.includes("["))&&(c=(H=(D=o==null?void 0:o.optionUrl)==null?void 0:D.groupSelect)==null?void 0:H[1])}),(R=d==null?void 0:d.optionUrl)!=null&&R.menuSelect){let o=await Wl(d),S;if(o==null||o.forEach(y=>{var T,D,H,j,N,J,m,O,E,p;c===((D=(T=d==null?void 0:d.optionUrl)==null?void 0:T.groupSelect)==null?void 0:D[1])&&((N=(j=(H=d==null?void 0:d.optionUrl)==null?void 0:H.groupSelect)==null?void 0:j[1])!=null&&N.includes("["))&&((p=b.cloneDeep(y))==null?void 0:p[(E=(O=(m=(J=d==null?void 0:d.optionUrl)==null?void 0:J.groupSelect)==null?void 0:m[1])==null?void 0:O.replaceAll("[",""))==null?void 0:E.replaceAll("]","")])===(d==null?void 0:d.value)&&(S=y)}),S){let y=b.cloneDeep(s);y=y==null?void 0:y.map(D=>{var H,j,N,J,m,O,E,p,$,V,ee;return(S!=null&&S[D==null?void 0:D.label]||S!=null&&S[(J=(N=(j=(H=D==null?void 0:D.optionUrl)==null?void 0:H.groupSelect)==null?void 0:j[1])==null?void 0:N.replaceAll("[",""))==null?void 0:J.replaceAll("]","")])&&((E=(O=(m=D==null?void 0:D.optionUrl)==null?void 0:m.groupSelect)==null?void 0:O[1])!=null&&E.includes("["))&&(D.value=(S==null?void 0:S[D==null?void 0:D.label])||(S==null?void 0:S[(ee=(V=($=(p=D==null?void 0:D.optionUrl)==null?void 0:p.groupSelect)==null?void 0:$[1])==null?void 0:V.replaceAll("[",""))==null?void 0:ee.replaceAll("]","")])),D}),X.value=(q=b.cloneDeep(X.value))==null?void 0:q.map(D=>{if((D==null?void 0:D.id)===(l==null?void 0:l.id)){const H={};return y==null||y.forEach(j=>{H[j.name]=j.value}),H.id=D==null?void 0:D.id,H}return D});let T=b.cloneDeep(y);T=T==null?void 0:T.map(D=>{var H,j,N,J;return(j=(H=D==null?void 0:D.optionUrl)==null?void 0:H.menuSelect)!=null&&j.some(m=>m==null?void 0:m.includes)&&(D.optionUrl.menuSelect=(J=(N=D==null?void 0:D.optionUrl)==null?void 0:N.menuSelect)==null?void 0:J.map(m=>{var O,E,p,$;if(m!=null&&m.includes("[")){let V=(E=(O=m==null?void 0:m.replaceAll("[","").replaceAll("]",""))==null?void 0:O.split(":"))==null?void 0:E[1];m=($=(p=b.cloneDeep(y))==null?void 0:p.find(ee=>(ee==null?void 0:ee.label)===V))==null?void 0:$.value}return m})),D}),X.value=(F=b.cloneDeep(X.value))==null?void 0:F.map(D=>{if((D==null?void 0:D.id)===(l==null?void 0:l.id)){const H={};return T==null||T.forEach(j=>{H[j.name]=j.value}),H.id=D==null?void 0:D.id,H}return D})}}},or=async e=>{var f,k,_,g,C,U,w,x,R,q,F,o,S,y,T,D,H,j;if(!e)return;Ee.value=e;const l=b.cloneDeep(i.itemData);let n=l==null?void 0:l.map(N=>{var J;return(N==null?void 0:N.key)==="header"&&((J=N.contents)==null||J.map((m,O)=>{var E,p,$,V,ee,L,v,W,le,he,Se,ye,A,h,oe,ce,ne,ve,Ae;return m.type=m!=null&&m.type?m.type:(V=($=(p=(E=m==null?void 0:m.key)==null?void 0:E.split("$"))==null?void 0:p[1])==null?void 0:$.split("("))!=null&&V[0]?(L=(ee=te.FormType)==null?void 0:ee.find(xe=>{var We,_e,Ge,He;return(xe==null?void 0:xe.key)===((He=(Ge=(_e=(We=m==null?void 0:m.key)==null?void 0:We.split("$"))==null?void 0:_e[1])==null?void 0:Ge.split("("))==null?void 0:He[0])}))==null?void 0:L.value:"Input",m.options=m!=null&&m.options?m.options:((le=(W=(v=m==null?void 0:m.key)==null?void 0:v.split("$"))==null?void 0:W[1])==null?void 0:le.length)>0?(A=(ye=Jl((Se=(he=m==null?void 0:m.key)==null?void 0:he.split("$"))==null?void 0:Se[1]))==null?void 0:ye.split(","))==null?void 0:A.map(xe=>({label:xe,value:xe})):[],(h=m==null?void 0:m.key)!=null&&h.includes("$")&&(m.key=(ce=(oe=m==null?void 0:m.key)==null?void 0:oe.split("$"))==null?void 0:ce[0]),m.value=(ne=Object.values(e))==null?void 0:ne[O],m.optionUrl=m!=null&&m.formMenuSelect&&((ve=m==null?void 0:m.formMenuSelect)==null?void 0:ve.length)>0?{groupSelect:(Ae=m==null?void 0:m.groupSelect)==null?void 0:Ae.split(/[::]/).map(xe=>xe.trim()),menuSelect:m==null?void 0:m.formMenuSelect,selectRelateType:"",type:(m==null?void 0:m.formType)??(m!=null&&m.groupSelect?"Select":"")}:null,m})),N}),r=Te.value,t=(k=(f=b.cloneDeep(n))==null?void 0:f.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:k.contents;if(t=t==null?void 0:t.filter(N=>(N==null?void 0:N.label)!=="操作"),t.push({label:"操作",type:"operate"}),r=r==null?void 0:r.map(N=>{var J;return N.value=N.value??((J=t==null?void 0:t.find((m,O)=>(m==null?void 0:m.prop)===(N==null?void 0:N.name)))==null?void 0:J.value),N}),!fl.value)return;let s="",u=(C=(g=(_=b.cloneDeep(n))==null?void 0:_.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:g.contents)==null?void 0:C.find((N,J)=>{var m,O,E;return(N==null?void 0:N.label)===al.value||(J==null?void 0:J.toString())===((E=(O=(m=al.value)==null?void 0:m.split("a"))==null?void 0:O[1])==null?void 0:E.toString())}),c=(U=u==null?void 0:u.optionUrl)==null?void 0:U.menuSelect,d=!0;if((R=(x=(w=b.cloneDeep(n))==null?void 0:w.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:x.contents)==null||R.forEach(N=>{var J,m,O,E,p,$;d&&((O=(m=(J=N==null?void 0:N.optionUrl)==null?void 0:J.groupSelect)==null?void 0:m[1])!=null&&O.includes("["))&&(s=(p=(E=N==null?void 0:N.optionUrl)==null?void 0:E.groupSelect)==null?void 0:p[1],JSON.stringify(c)===JSON.stringify(($=N==null?void 0:N.optionUrl)==null?void 0:$.menuSelect)&&(d=!1))}),(q=u==null?void 0:u.optionUrl)!=null&&q.menuSelect&&fl.value||(S=(o=(F=Te.value)==null?void 0:F[0])==null?void 0:o.optionUrl)!=null&&S.menuId){let N=await Wl(u,(D=(T=(y=Te.value)==null?void 0:y[0])==null?void 0:T.optionUrl)==null?void 0:D.menuId),J;if((H=u==null?void 0:u.optionUrl)==null||H.menuSelect,N==null||N.forEach(m=>{var O,E,p,$,V,ee,L,v,W,le,he,Se,ye,A,h,oe,ce;s===((E=(O=u==null?void 0:u.optionUrl)==null?void 0:O.groupSelect)==null?void 0:E[1])&&((V=($=(p=u==null?void 0:u.optionUrl)==null?void 0:p.groupSelect)==null?void 0:$[1])!=null&&V.includes("["))&&((le=b.cloneDeep(m))==null?void 0:le[(W=(v=(L=(ee=u==null?void 0:u.optionUrl)==null?void 0:ee.groupSelect)==null?void 0:L[1])==null?void 0:v.replaceAll("[",""))==null?void 0:W.replaceAll("]","")])===(u==null?void 0:u.value)&&(J=m),(ye=(Se=(he=Te.value)==null?void 0:he[0])==null?void 0:Se.optionUrl)!=null&&ye.menuId&&m[(h=(A=Te.value)==null?void 0:A[0])==null?void 0:h.prop]===e[(ce=(oe=Te.value)==null?void 0:oe[0])==null?void 0:ce.prop]&&(J=m)}),J){let m=b.cloneDeep(r);m=m==null?void 0:m.map(p=>{var $,V,ee,L,v,W,le,he,Se,ye,A,h,oe,ce,ne,ve,Ae,xe;return(J!=null&&J[p==null?void 0:p.label]||J!=null&&J[(L=(ee=(V=($=p==null?void 0:p.optionUrl)==null?void 0:$.groupSelect)==null?void 0:V[1])==null?void 0:ee.replaceAll("[",""))==null?void 0:L.replaceAll("]","")])&&((le=(W=(v=p==null?void 0:p.optionUrl)==null?void 0:v.groupSelect)==null?void 0:W[1])!=null&&le.includes("["))&&(p.value=(J==null?void 0:J[p==null?void 0:p.label])||(J==null?void 0:J[(A=(ye=(Se=(he=p==null?void 0:p.optionUrl)==null?void 0:he.groupSelect)==null?void 0:Se[1])==null?void 0:ye.replaceAll("[",""))==null?void 0:A.replaceAll("]","")])),(ce=(oe=(h=Te.value)==null?void 0:h[0])==null?void 0:oe.optionUrl)!=null&&ce.menuId&&(p.value=(J==null?void 0:J[p==null?void 0:p.label])||(J==null?void 0:J[(xe=(Ae=(ve=(ne=p==null?void 0:p.optionUrl)==null?void 0:ne.groupSelect)==null?void 0:ve[1])==null?void 0:Ae.replaceAll("[",""))==null?void 0:xe.replaceAll("]","")])),p}),Te.value=b.cloneDeep(m);let O=b.cloneDeep(m);O=O==null?void 0:O.map(p=>{var $,V,ee,L,v,W;return(V=($=p==null?void 0:p.optionUrl)==null?void 0:$.menuSelect)!=null&&V.some(le=>le==null?void 0:le.includes("["))&&(p.optionUrl.oldMenuSelect=(L=(ee=b.cloneDeep(p))==null?void 0:ee.optionUrl)==null?void 0:L.menuSelect,p.optionUrl.menuSelect=(W=(v=p==null?void 0:p.optionUrl)==null?void 0:v.menuSelect)==null?void 0:W.map(le=>{var he,Se,ye,A;if(le!=null&&le.includes("[")){let h=(Se=(he=le==null?void 0:le.replaceAll("[","").replaceAll("]",""))==null?void 0:he.split(":"))==null?void 0:Se[1];le=(A=(ye=b.cloneDeep(m))==null?void 0:ye.find(oe=>(oe==null?void 0:oe.label)===h))==null?void 0:A.value}return le})),p}),Te.value=O;let E={};(j=Te.value)==null||j.forEach(p=>{E[p.prop]=p==null?void 0:p.value}),Ee.value=E}}fl.value=!1},tr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",sr=e=>{var s,u;const l=(u=(s=Le.value)==null?void 0:s.find(c=>(c==null?void 0:c.label)===(e==null?void 0:e.label)))==null?void 0:u.multiple,n=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;X.value.forEach(c=>{const d=c==null?void 0:c[n];l&&da.isString(d)&&(c[n]=[d]),!l&&!da.isString(d)&&(c[n]="")})},oa=(e,l)=>{var n;return l==null||l.forEach(r=>{e[r==null?void 0:r.prop]=r==null?void 0:r.value}),e.children&&((n=e.children)==null?void 0:n.length)>0&&(e.children=e.children.map(r=>oa(r,l))),e},zl=e=>{var n,r,t,s,u,c;yl("");const l=(n=Te.value)==null?void 0:n.reduce((d,f)=>(d[f.name]=f.value,d),{});if(((r=Object.keys(l))==null?void 0:r.length)>0){Ee.value=l,Ke.value="",ol.value=(t=X.value)==null?void 0:t.length,tl.value=(s=Ie.value)==null?void 0:s.filter(f=>(f==null?void 0:f.label)!=="新增");const d=(c=(u=be.value)==null?void 0:u.filter(f=>(f==null?void 0:f.label)!=="操作"))==null?void 0:c.map(f=>{var _,g,C;const k=(g=(_=Le.value)==null?void 0:_.find(U=>(U==null?void 0:U.label)===(f==null?void 0:f.label)))==null?void 0:g.multiple;return sr(f),{...f,contents:(f==null?void 0:f.options)??[],optionUrl:f!=null&&f.formMenuSelect&&((C=f==null?void 0:f.formMenuSelect)==null?void 0:C.length)>0?{groupSelect:f==null?void 0:f.groupSelect,menuSelect:f==null?void 0:f.formMenuSelect,selectRelateType:"",type:f==null?void 0:f.formType,multiple:k}:null}});G.value=d==null?void 0:d.map(f=>oa(f,[{prop:"type",value:"edit"},{prop:"columnType",value:tr(f==null?void 0:f.formType)||(f==null?void 0:f.columnType)}])),e==="createClick"&&vl(!1)}},sl={START:"开始时间",END:"结束时间",HOURS:"工时"},ir=(e,l)=>Number(ql.dayjs(l).diff(ql.dayjs(e),"day",!0).toFixed(1)),ta=e=>{var s;const l=i.itemData,n=(s=l==null?void 0:l.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:s.contents,r=new Map;return n==null||n.forEach((u,c)=>{const{label:d}=u;r.set(d,c)}),!r.has(sl.START)||!r.has(sl.END)||!r.has(sl.HOURS)?e:e==null?void 0:e.map(u=>{const c=u==null?void 0:u[sl.START],d=u==null?void 0:u[sl.END],f=ir(c,d);return c&&d&&(u[sl.HOURS]=`${f}天`),u})},sa=(e,l,n=0)=>{if(n>((l==null?void 0:l.length)??""))return e;const r=l==null?void 0:l[n],t=new Map;for(const u of e){const c=u[r];t.has(c)||t.set(c,[]),t.get(c)&&t.get(c).push(u)}const s=[];for(const[u,c]of t){const[d,...f]=c,k={...d};n+1===((l==null?void 0:l.length)??"")?k.children=c==null?void 0:c.map(_=>(_.level=b.cloneDeep(n)+1,_)).filter((_,g)=>g!==0):f.length>0&&(k.children=sa(f,l,n+1)),k.level=n,s.push(k)}return s},ia=(e,l,n)=>{var t;if(!(l!=null&&l.contents)||((t=l==null?void 0:l.contents)==null?void 0:t.length)===0)return e;let r=[];return r=sa(e,l==null?void 0:l.contents,0),r},ua=(e,l)=>{var g,C,U,w,x,R,q,F,o,S,y,T,D,H,j,N,J,m,O,E,p,$,V,ee,L;const n=e==null?void 0:e.filter(v=>(v==null?void 0:v.key)==="header");e==null||e.filter(v=>(v==null?void 0:v.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(v=>(v==null?void 0:v.key)==="childTree")[0];let t=l;const s=e==null?void 0:e.find(v=>(v==null?void 0:v.key)==="page"),u=e==null?void 0:e.find(v=>(v==null?void 0:v.key)==="rowButton"),c=e==null?void 0:e.find(v=>(v==null?void 0:v.key)==="extraButton"),d=e==null?void 0:e.filter(v=>(v==null?void 0:v.key)==="tableContents"),f=e==null?void 0:e.filter(v=>(v==null?void 0:v.key)==="tableIndex");Le.value=(C=(g=e==null?void 0:e.filter(v=>(v==null?void 0:v.key)==="tableToForm"))==null?void 0:g[0])==null?void 0:C.contents,Gl.value=(s==null?void 0:s.contents)??!0;let k=[];el.value===""?k=n==null?void 0:n[0]:k=(n==null?void 0:n.find(v=>(v==null?void 0:v.selectLabel)==="("+el.value+")"))??(n==null?void 0:n.find(v=>!(v!=null&&v.selectLabel)));let _=[];if(el.value===""?_=f==null?void 0:f[0]:_=(f==null?void 0:f.find(v=>(v==null?void 0:v.selectLabel)==="("+el.value+")"))??(f==null?void 0:f.find(v=>!(v!=null&&v.selectLabel))),((U=k==null?void 0:k.contents)==null?void 0:U.length)>0){let v=[];if(k!=null&&k.contents.some(A=>Array.isArray(A)&&(A==null?void 0:A.find(h=>h.children))))Je.value===""?v=(x=(w=te.getGradeColumns(k==null?void 0:k.contents))==null?void 0:w[0])==null?void 0:x.filter(A=>!Array.isArray(A)):(Je.value.split("-"),v=(R=te.getGradeColumns(k==null?void 0:k.contents))==null?void 0:R[0]);else{let A=k!=null&&k.contents.some(h=>Array.isArray(h))?(q=k==null?void 0:k.contents)==null?void 0:q[0]:k==null?void 0:k.contents;A==null||A.forEach((h,oe)=>{var ve,Ae,xe,We;let ce="";(Ae=(ve=Y.value)==null?void 0:ve.split("/"))==null||Ae.forEach(_e=>{var Ge,He,bl;if(_e!==""){let il=(bl=(He=(Ge=_e==null?void 0:_e.split(se+"updateLoading"))==null?void 0:Ge[0])==null?void 0:He.split(se+"loading"))==null?void 0:bl[0];ce=ce===""?ce+il:ce+"/"+il}}),ce=ce+se+(h==null?void 0:h.directiveLabel);const ne=(xe=Le.value)==null?void 0:xe.find(_e=>(_e==null?void 0:_e.prop)===(h==null?void 0:h.prop));v.push({label:(h==null?void 0:h.label)??"",prop:(h==null?void 0:h.label)==="操作"?"operate":(h==null?void 0:h.prop)??"a"+oe,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)??oe,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?(We=h==null?void 0:h.groupSelect)==null?void 0:We.replaceAll('"',"").split(":"):[],isMainKey:(h==null?void 0:h.isMainKey)||(h==null?void 0:h.directiveLabel)&&!t[ce],columnType:(ne==null?void 0:ne.type)||(h==null?void 0:h.columnType)||"TEXTAREA",directiveLabel:h==null?void 0:h.directiveLabel,isExistChild:!!(h!=null&&h.directiveLabel&&t[ce]),childPath:ce})})}G.value=te.getNewColumnChild(v),ue.value=te.getNewColumnChild(v),Q.value=(F=G.value)==null?void 0:F.map(A=>A==null?void 0:A.label),ze.value=(o=G.value)==null?void 0:o.every(A=>A==null?void 0:A.filterable),Xe.value=(S=G.value)==null?void 0:S.every(A=>A==null?void 0:A.operable),Re.value=(y=G.value)==null?void 0:y.every(A=>A==null?void 0:A.sortable);let W=(D=(T=te.getAllLeafNodes(G.value))==null?void 0:T.filter(A=>(A==null?void 0:A.type)!=="operate"))==null?void 0:D.map((A,h)=>({prop:(A==null?void 0:A.prop)??"a"+h,column:A.label}));Pe.value=W;let le=[];el.value===""?le=d==null?void 0:d[0]:le=(d==null?void 0:d.find(A=>(A==null?void 0:A.selectLabel)==="("+el.value+")"))??(d==null?void 0:d.find(A=>!(A!=null&&A.selectLabel)));let he=Array.isArray((H=le==null?void 0:le.contents)==null?void 0:H[0])&&((j=le==null?void 0:le.contents)!=null&&j[0].every(A=>Array.isArray(A)))?(N=le==null?void 0:le.contents)==null?void 0:N[0]:le==null?void 0:le.contents;_!=null&&_.contents&&((J=_==null?void 0:_.contents)==null?void 0:J.length)!==0&&(he=(m=b.cloneDeep(he))==null?void 0:m.map((A,h)=>{if(!Array.isArray(A)){let oe={};for(let ce in A)ce!=="id"&&ce!=="index"&&(oe[ce]=A[ce]);A=Object.values(oe)}return A}));const Se=!!((O=G.value)!=null&&O.find(A=>A.prop==="index"));he=ga(he,_==null?void 0:_.contents,Se);const ye=[];he==null||he.forEach((A,h)=>{var ce;let oe={};if(Array.isArray(A)){let ne=[];A==null||A.filter(ve=>!(ve!=null&&ve.id)).forEach((ve,Ae)=>{var xe,We,_e,Ge,He,bl;if((xe=W==null?void 0:W[Ae])!=null&&xe.prop&&!Array.isArray(ve)){let il={};il[W[Ae].column]=ve,ge!=null&&ge.value&&((We=ge==null?void 0:ge.value)==null?void 0:We.length)>0&&((_e=ge==null?void 0:ge.value)!=null&&_e.find(Fe=>JSON.stringify(Fe==null?void 0:Fe[0])===JSON.stringify(il)))&&(ne=(Ge=ge==null?void 0:ge.value)==null?void 0:Ge.find(Fe=>JSON.stringify(Fe==null?void 0:Fe[0])===JSON.stringify(il))),ne&&ne.length>0?oe[W[Ae].prop]=ne!=null&&ne.find(Fe=>{var kl;return((kl=Object.keys(Fe))==null?void 0:kl[0])===W[Ae].column})?(He=ne==null?void 0:ne.find(Fe=>{var kl;return((kl=Object.keys(Fe))==null?void 0:kl[0])===W[Ae].column}))==null?void 0:He[W[Ae].column]:ve:oe[W[Ae].prop]=ve}else Array.isArray(ve)&&((bl=W[Ae])!=null&&bl.prop?oe[W[Ae].prop]=ve:oe.children=Rl(ve,W))})}else oe=A;Array.isArray(A)&&A.some(ne=>ne==null?void 0:ne.id)?ye.push(Object.assign(oe,{id:(ce=A==null?void 0:A.find(ne=>ne.id))==null?void 0:ce.id})):oe.id?ye.push(oe):ye.push(Object.assign(oe,{id:h.toString()}))}),X.value=ia(ye,r,G.value),Sl.value=ye,(E=Sl.value)==null||E.forEach(A=>{var h;(h=Dl.value)==null||h.set(A.id,A)})}else G.value=[],be.value=[],X.value=[],Sl.value=[],Dl.value=new Map;((p=u==null?void 0:u.contents)==null?void 0:p.length)>0?Ze.value=u==null?void 0:u.contents:Ze.value=[],(($=c==null?void 0:c.contents)==null?void 0:$.length)>0?(tl.value=c==null?void 0:c.contents,Ie.value=c==null?void 0:c.contents):(tl.value=[],Ie.value=[]),ol.value=((V=X==null?void 0:X.value)==null?void 0:V.length)??0,ta(X.value),Al.value=X.value,ll.value&&(G.value=(L=(ee=be.value)==null?void 0:ee.filter(v=>(v==null?void 0:v.label)!=="操作"))==null?void 0:L.map(v=>{var W;return{...v,type:"edit",optionUrl:v!=null&&v.formMenuSelect&&((W=v==null?void 0:v.formMenuSelect)==null?void 0:W.length)>0?{groupSelect:v==null?void 0:v.groupSelect,menuSelect:v==null?void 0:v.formMenuSelect,selectRelateType:"",type:v==null?void 0:v.formType}:null}}),zl())};a.watch(()=>[i.itemData,el.value,ma.value,Je.value,ge==null?void 0:ge.value],async()=>{var e,l,n,r,t,s;if((e=i==null?void 0:i.itemData)!=null&&e.find(u=>(u==null?void 0:u.key)==="columnPath")&&!((l=dl.value)!=null&&l.find(u=>{var c,d;return(u==null?void 0:u.key)===((d=(c=i==null?void 0:i.itemData)==null?void 0:c.find(f=>(f==null?void 0:f.key)==="columnPath"))==null?void 0:d.contents)}))){let u=dl.value,c={key:(r=(n=i==null?void 0:i.itemData)==null?void 0:n.find(d=>(d==null?void 0:d.key)==="columnPath"))==null?void 0:r.contents,value:(s=(t=i==null?void 0:i.itemData)==null?void 0:t.find(d=>(d==null?void 0:d.key)==="columnUsingPath"))==null?void 0:s.contents};u!=null&&u.find(d=>(d==null?void 0:d.key)===(c==null?void 0:c.key))?u=u==null?void 0:u.map(d=>((d==null?void 0:d.key)===(c==null?void 0:c.key)&&(d.value=c.value),d)):u.push(c),fe.setTableViewContents(u)}ua(i.itemData,i.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>i==null?void 0:i.operatingForm,e=>{e!=null&&e.form&&(yl(e==null?void 0:e.form),Me.value=e==null?void 0:e.dialogTitle,Cl.value=!0,Ve.value=!0)},{immediate:!0,deep:!0});const ca=()=>{ll.value=!ll.value},ur=()=>{El.value=!El.value};a.watch(()=>ll.value,e=>{e?(zl("viewChange"),fe.setCacheUpdatingData(null)):(tl.value=Ie.value,G.value=ue.value,cl.value&&(fe.setTableLoading(i==null?void 0:i.index),ie("change",cl.value)))},{immediate:!0}),a.watch(()=>{var e;return(e=Ql.value)==null?void 0:e.length},e=>{e===0&&(I.currentPage=1)}),a.ref(!1);const cr=(e,l)=>{var n;zl("createClick"),l===I.pageSize&&(I.currentPage=Math.ceil(((n=X.value)==null?void 0:n.length)/I.pageSize))},dr=(e,l,n)=>{var r;na(n,e,l),Ee.value=b.cloneDeep(e),Ke.value=e==null?void 0:e.id,ol.value=(r=X.value)==null?void 0:r.length,Me.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",vl(!1)},Ne=e=>{var d,f,k,_,g,C,U,w,x,R;const{row:l,column:n,item:r,slotData:t}=e;let s=l!=null&&l[n==null?void 0:n.prop]||(l==null?void 0:l[n==null?void 0:n.prop])===0?((f=(d=l==null?void 0:l[n==null?void 0:n.prop])==null?void 0:d[0])==null?void 0:f.contents)??((l==null?void 0:l[n==null?void 0:n.prop])===0?"0":l==null?void 0:l[n==null?void 0:n.prop]):((_=(k=l==null?void 0:l[r==null?void 0:r.prop])==null?void 0:k[0])==null?void 0:_.contents)??(l==null?void 0:l[r==null?void 0:r.prop])??((C=(g=t==null?void 0:t[r==null?void 0:r.prop])==null?void 0:g[0])==null?void 0:C.contents)??(t==null?void 0:t[r==null?void 0:r.prop])??((x=(w=l==null?void 0:l[(U=r==null?void 0:r.child)==null?void 0:U.prop])==null?void 0:w[0])==null?void 0:x.contents)??(l==null?void 0:l[(R=r==null?void 0:r.child)==null?void 0:R.prop]),c=Array.isArray(s)&&!(s!=null&&s.every(q=>typeof q=="string"||typeof q=="number"))?"查看":s;return c=Array.isArray(c)?c.join(","):c,c},pr=e=>{var f,k,_,g,C,U,w,x,R,q;const{row:l,column:n,item:r,slotData:t}=e;let s=l!=null&&l[n==null?void 0:n.prop]?((k=(f=l==null?void 0:l[n==null?void 0:n.prop])==null?void 0:f[0])==null?void 0:k.contents)??(l==null?void 0:l[n==null?void 0:n.prop]):((g=(_=l==null?void 0:l[r==null?void 0:r.prop])==null?void 0:_[0])==null?void 0:g.contents)??(l==null?void 0:l[r==null?void 0:r.prop])??((U=(C=t==null?void 0:t[r==null?void 0:r.prop])==null?void 0:C[0])==null?void 0:U.contents)??(t==null?void 0:t[r==null?void 0:r.prop])??((R=(x=l==null?void 0:l[(w=r==null?void 0:r.child)==null?void 0:w.prop])==null?void 0:x[0])==null?void 0:R.contents)??(l==null?void 0:l[(q=r==null?void 0:r.child)==null?void 0:q.prop]);const c=Array.isArray(s)&&!(s!=null&&s.every(F=>typeof F=="string"||typeof F=="number")),d=Array.isArray(s)&&(s==null?void 0:s.find(F=>F==null?void 0:F.url));return c&&d},fr=(e,l)=>e.find(n=>Object.values(n).some(r=>r===l));return a.watch(()=>qe.value,async e=>{if(e){B.setContentLoading(!0),await a.nextTick();const l=fr(X.value,e==null?void 0:e.data);if(!l)return B.setContentLoading(!1);await Zl(e==null?void 0:e.data,null,l,{data:e==null?void 0:e.data,isMainKey:!0}),B.setContentLoading(!1)}},{deep:!0,immediate:!0}),a.watch(()=>i==null?void 0:i.cacheNewData,e=>{var l;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(i==null?void 0:i.index)&&(X.value=(l=X.value)==null?void 0:l.map(n=>{var r;return(n==null?void 0:n.id)===((r=e==null?void 0:e.data)==null?void 0:r.id)?{...n,id:e==null?void 0:e.resId}:n})))},{immediate:!0,deep:!0}),(e,l)=>{var f,k,_;const n=a.resolveComponent("svg-icon"),r=a.resolveComponent("el-popover"),t=a.resolveComponent("el-switch"),s=a.resolveComponent("el-checkbox"),u=a.resolveComponent("el-checkbox-group"),c=a.resolveComponent("el-button"),d=a.resolveComponent("LookComponent");return a.openBlock(),a.createElementBlock("div",Mr,[Hl.value?(a.openBlock(),a.createBlock(Qe.ssTable,{id:"excel-table",pageObj:I,summaryInfo:nl,columns:G.value,defaultSort:re,isCardViewport:El.value,checkedColumns:Q.value,key:Ml.value+JSON.stringify(G.value),tableData:Ql.value,isEditViewport:ll.value,isShowPagination:Gl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:K.allowSelect,onDbClickRow:Ja,extraButton:tl.value,rowButton:Ze.value,cacheExtraButtons:Ie.value,isClearSelection:((f=$e.value)==null?void 0:f.length)===0,onDoCurrentChange:xa,onDoSizeChange:Ea,onContentClick:Zl,onRowClick:Wa,onSelectChange:La,onCellChange:dr,onChange:na,onPreview:Xl,onSubmitEditingTable:ja,onHandleColEditChange:Ua,onHandleColTypeChange:Oa,onClickButton:Ul},a.createSlots({headerButton:a.withCtx(g=>{var C,U;return[K.showHeader?(a.openBlock(),a.createBlock(Cr,{key:0,lockingPage:a.unref(ml)===a.unref(Y),filterValues:Yl.value,selectNums:(C=$e.value)==null?void 0:C.length,dataNums:(U=X.value)==null?void 0:U.length,compName:K.compName,isDevMode:K.isDevMode,buttons:g.buttons,onButtonClick:l[0]||(l[0]=w=>Ul(w,"",{})),columns:G.value,onFilter:qa,onGetImportData:Ba,level:K.level},null,8,["lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var g,C;return[((g=X.value)==null?void 0:g.length)>0&&K.allowOperate?(a.openBlock(),a.createElementBlock("div",Fr,[(C=Ze.value)!=null&&C.some(U=>(U==null?void 0:U.label)==="编辑")&&!El.value&&a.unref(ml)!==a.unref(Y)?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:ca},[a.createVNode(n,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0),a.createElementVNode("span",{title:"卡片视图",onClick:ur},[a.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:g,index:C})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:U=>cr(g,C)},[a.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,Kr)]),operateCol:a.withCtx(()=>[a.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:nr},{reference:a.withCtx(()=>[a.createElementVNode("span",Vr,[a.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",zr,[l[11]||(l[11]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(t,{"model-value":Re.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:l[2]||(l[2]=g=>$l(g,"sortable"))},null,8,["model-value"]),a.createVNode(t,{"model-value":ze.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:l[3]||(l[3]=g=>$l(g,"filterable"))},null,8,["model-value"]),a.createVNode(t,{"model-value":Xe.value,"active-text":"编辑所有表头","inactive-text":"",onChange:l[4]||(l[4]=g=>$l(g,"operable"))},null,8,["model-value"]),l[12]||(l[12]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(u,{modelValue:Q.value,"onUpdate:modelValue":l[5]||(l[5]=g=>Q.value=g),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:M},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(gl.value,g=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:g.label},[a.createVNode(s,{value:g.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:g.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(g.label),9,qr)]),_:2},1032,["value"]),a.createVNode(r,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(n,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var C;return[a.createElementVNode("div",Jr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((C=Object.keys(g))==null?void 0:C.filter(U=>{var w;return(w=ae.value)==null?void 0:w.find(x=>(x==null?void 0:x.value)===U)}),U=>{var w,x;return a.openBlock(),a.createElementBlock("div",{key:U},[a.createVNode(t,{"model-value":g==null?void 0:g[U],"active-text":(x=(w=ae.value)==null?void 0:w.find(R=>(R==null?void 0:R.value)===U))==null?void 0:x.label,onChange:R=>Ma(R,U,g)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",Rr,[a.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(g=>{var C,U,w,x,R,q,F,o,S,y,T,D,H,j,N,J,m,O;return[pr(g)?(a.openBlock(),a.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",Wr,a.toDisplayString(Ne(g)),1)]),default:a.withCtx(()=>{var E,p;return[a.createElementVNode("div",Gr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((p=g==null?void 0:g.row)==null?void 0:p[(E=g==null?void 0:g.column)==null?void 0:E.prop],$=>(a.openBlock(),a.createElementBlock("div",Hr,[a.createElementVNode("div",{class:"prop-url",title:_l($),onClick:V=>Fa($)},a.toDisplayString(_l($)),9,Qr),a.createElementVNode("div",{class:"prop-download",onClick:V=>Ka($)}," 下载 ",8,Xr)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock("div",{key:1,style:a.normalizeStyle({color:!Array.isArray(Ne(g))&&((U=(C=Ne(g))==null?void 0:C.toString())!=null&&U.includes(".txt")||(x=(w=Ne(g))==null?void 0:w.toString())!=null&&x.includes(".cpt")||(q=(R=Ne(g))==null?void 0:R.toString())!=null&&q.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ne(g))&&((o=(F=Ne(g))==null?void 0:F.toString())!=null&&o.includes(".txt")||(y=(S=Ne(g))==null?void 0:S.toString())!=null&&y.includes(".cpt")||(D=(T=Ne(g))==null?void 0:T.toString())!=null&&D.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ne(g))&&((j=(H=Ne(g))==null?void 0:H.toString())!=null&&j.includes(".txt")||(J=(N=Ne(g))==null?void 0:N.toString())!=null&&J.includes(".cpt")||(O=(m=Ne(g))==null?void 0:m.toString())!=null&&O.includes(".cyd"))?"pointer":"",marginLeft:(g==null?void 0:g.colIndex)===0?`${((g==null?void 0:g.level)??0)*20}px`:0}),onClick:E=>Aa(Ne(g))},a.toDisplayString(Ne(g)===0?"0":Ne(g)),13,Yr))]}),_:2},[((k=Ze.value)==null?void 0:k.length)>0&&a.unref(ml)!==a.unref(Y)?{name:"actions",fn:a.withCtx(({item:g})=>[a.createVNode(r,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(n,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:a.withCtx(()=>[a.createElementVNode("div",Pr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Va(Ze.value,g),(C,U)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:U,onClick:w=>Ul(C==null?void 0:C.label,g,{extra:C})},[a.createElementVNode("div",{style:a.normalizeStyle({color:C==null?void 0:C.textColor}),class:"extra-button-label"},a.toDisplayString(C==null?void 0:C.label),5)],8,$r))),128))])]),_:2},1024)]),key:"0"}:void 0,((_=X.value)==null?void 0:_.length)>0?{name:"batchButton",fn:a.withCtx(g=>[a.createVNode(xr,{lockingPage:a.unref(ml)===a.unref(Y),buttons:g.buttons,selectTableItems:$e.value,onButtonClick:l[1]||(l[1]=C=>Ul(C,"",{}))},null,8,["lockingPage","buttons","selectTableItems"])]),key:"1"}:void 0]),1032,["pageObj","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):a.createCommentVNode("",!0),a.createVNode(Ol.ssDialog,{title:Me.value,visible:Ve.value,width:Da.value,onBeforeDestroy:Pa,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",Zr,[a.createVNode(Qe.ssForm,{rowContents:Te.value,isEnableWrap:!1,showOperator:!1,onChange:or,onClickTrigger:$a,isEdit:Ll.value,onBlurChange:wa},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[Cl.value?(a.openBlock(),a.createElementBlock("div",Ir,[a.createVNode(c,{onClick:l[6]||(l[6]=g=>Ve.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>l[13]||(l[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(c,{class:"ok-button",onClick:l[7]||(l[7]=g=>vl(!0)),id:"themeButton"},{default:a.withCtx(()=>l[14]||(l[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])):a.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),a.createVNode(Ol.ssDialog,{title:Me.value,visible:Tl.value,width:wl.value,onBeforeDestroy:l[9]||(l[9]=g=>Tl.value=!1)},{default:a.withCtx(()=>[a.createVNode(Ur)]),footer:a.withCtx(()=>[a.createElementVNode("div",en,[a.createVNode(c,{onClick:l[8]||(l[8]=g=>Tl.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>l[15]||(l[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(c,{class:"ok-button",onClick:Ga,id:"themeButton"},{default:a.withCtx(()=>l[16]||(l[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["title","visible","width"]),z.value?(a.openBlock(),a.createBlock(Qe.ssFilePreview,{key:1,fileDataList:ke.value,onDestroy:Ra},null,8,["fileDataList"])):a.createCommentVNode("",!0),Ce.value?(a.openBlock(),a.createBlock(Ol.ssDialog,{key:2,visible:Ce.value,onBeforeDestroy:ar,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(ul.ThreeViewerHost,{"file-urls":pl.value,isThreeScene:we.value,isSelfWindow:!0,threeData:Ue.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(Ol.ssDialog,{visible:e.componentVisible,onBeforeDestroy:l[10]||(l[10]=g=>e.componentVisible=!1),width:wl.value,style:{height:"70vh"}},{default:a.withCtx(()=>[a.createVNode(d,{dialogItem:Nl.value},null,8,["dialogItem"])]),_:1},8,["visible","width"])])}}},an=jl._export_sfc(ln,[["__scopeId","data-v-c6360b92"]]);exports.formGetOptions=Jl;exports.getSelectRow=Wl;exports.ssTable=an;exports.useFormComp=va;exports.useFormToTableComp=pa;exports.useUnit=fa;
|
package/dist/index-Dc8TgzRR.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),v=require("./index-Dv1G67_Q.cjs"),V=require("./index.vue_vue_type_style_index_1_lang-f2wxl9Ai.cjs"),j=require("vue-router"),H=require("./index-CAPstY_B.cjs"),W={},z={class:"left-wrap"},ee={class:"left-bg"};function te(C,E){return e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("div",ee,[e.renderSlot(C.$slots,"img",{},void 0,!0)])])}const ae=K._export_sfc(W,[["render",te],["__scopeId","data-v-9b7ee6c9"]]),ne={class:"right-wrap"},oe={class:"tab-content"},se={class:"tab-tips"},re={class:"tab-content"},ce={class:"tab-tips"},ie={class:"tab-content"},le={class:"tab-tips"},de=e.defineComponent({__name:"index",props:{tabList:{type:Array,default:[]},loading:{type:Boolean,default:!1}},emits:["clickLogin","handleTabClick"],setup(C,{emit:E}){const b=e.ref("account"),u=E,m=()=>{u("clickLogin",b.value)},_=()=>{u("handleTabClick",b.value)};return(l,y)=>{const p=e.resolveComponent("el-button"),c=e.resolveComponent("el-tab-pane"),i=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(i,{modelValue:b.value,"onUpdate:modelValue":y[0]||(y[0]=A=>b.value=A),class:"right-tabs",onTabClick:_},{default:e.withCtx(()=>[e.createVNode(c,{name:"account"},{label:e.withCtx(()=>[e.renderSlot(l.$slots,"tabLabel1",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",oe,[e.renderSlot(l.$slots,"tabContent1",{},void 0,!0)]),e.createElementVNode("div",{class:"tab-button special",onClick:m},[e.createVNode(p,{loading:C.loading},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"tabButton1",{},void 0,!0)]),_:3},8,["loading"])]),e.createElementVNode("div",se,[e.renderSlot(l.$slots,"tabTips1",{},void 0,!0)])]),_:3}),e.createVNode(c,{name:"face"},{label:e.withCtx(()=>[e.renderSlot(l.$slots,"tabLabel2",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",re,[e.renderSlot(l.$slots,"tabContent2",{},void 0,!0)]),e.createElementVNode("div",ce,[e.renderSlot(l.$slots,"tabTips2",{},void 0,!0)])]),_:3}),e.createVNode(c,{name:"card"},{label:e.withCtx(()=>[e.renderSlot(l.$slots,"tabLabel3",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",ie,[e.renderSlot(l.$slots,"tabContent3",{},void 0,!0)]),e.createElementVNode("div",{class:"tab-button special",onClick:m},[e.createVNode(p,{loading:C.loading},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"tabButton3",{},void 0,!0)]),_:3},8,["loading"])]),e.createElementVNode("div",le,[e.renderSlot(l.$slots,"tabTips3",{},void 0,!0)])]),_:3})]),_:3},8,["modelValue"])])}}}),ue=K._export_sfc(de,[["__scopeId","data-v-c2476df5"]]),pe={class:"account-wrap"},fe=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(C,{emit:E}){const b=C,u=e.reactive({account:"",password:""}),m=e.reactive({account:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}),_=e.ref(null),l=E;return e.watch(()=>b.isClickLogin,y=>{var p;y&&(b==null?void 0:b.activeTabName)==="account"&&((p=_.value)==null||p.validate(c=>{var i;for(let A in u)u.hasOwnProperty(A)&&(u[A]=(i=u[A])==null?void 0:i.trim());l("handleLoginFormChange",c,c?u:null)}))},{immediate:!0}),e.watch(()=>b.activeTabName,y=>{var p;y==="account"&&((p=_.value)==null||p.resetFields())}),(y,p)=>{const c=e.resolveComponent("svg-icon"),i=e.resolveComponent("el-input"),A=e.resolveComponent("el-form-item"),S=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",pe,[e.createVNode(S,{model:u,rules:m,ref_key:"formRef",ref:_},{default:e.withCtx(()=>[e.createVNode(A,{label:"",prop:"account"},{default:e.withCtx(()=>[e.createVNode(i,{class:"account-input",modelValue:u.account,"onUpdate:modelValue":p[0]||(p[0]=N=>u.account=N),placeholder:"请输入账号",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(c,{name:"account",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(A,{label:"",prop:"password"},{default:e.withCtx(()=>[e.createVNode(i,{class:"account-input",modelValue:u.password,"onUpdate:modelValue":p[1]||(p[1]=N=>u.password=N),type:"password",placeholder:"请输入密码","show-password":"",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(c,{name:"password",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])}}}),ge=K._export_sfc(fe,[["__scopeId","data-v-48037c0f"]]);function me(C){return v.service({url:"http://192.168.124.108:20013/api/face/face-verify",method:"post",data:C})}const ve={class:"account-wrap"},ye={class:"video-wrap"},he=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(C,{emit:E}){const b=C,u=E,m=e.ref(null),_=e.ref(null);e.watch(()=>b.isClickLogin,c=>{c&&(b==null||b.activeTabName)},{immediate:!0});const l=async c=>{if(!c)return;const i=new FormData;i.set("file",c);const A=await me(i),{data:S}=A||{},{match:N,account:I,password:x}=S;if(!N){v.ElMessage.error("识别失败,请重新识别!");return}u("handleLoginFormChange",!0,{account:I,password:x})},y=()=>{if(!_.value||!m.value)return;const c=_.value,i=c.getContext("2d"),A=m.value;c.width=200,c.height=200;const S=A.videoWidth||640,N=A.videoHeight||480,I=Math.min(200/S,200/N),x=S*I,L=N*I,R=(200-x)/2,P=(200-L)/2;i==null||i.drawImage(A,0,0,S,N,R,P,x,L),c.toBlob(U=>{if(U){const Q=new File([U],"face.png",{type:"image/png"});l(Q)}},"image/png")},p=async()=>{if(!m.value)return;const c=m.value;try{const i=await navigator.mediaDevices.getUserMedia({video:{facingMode:"user"},audio:!1});if(c){const A=c;A.srcObject=i}}catch(i){v.ElMessage.warning("摄像头失败: "+i.message)}};return e.onMounted(()=>{p()}),(c,i)=>(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("div",ye,[e.createElementVNode("video",{class:"face-video",ref_key:"videoRef",ref:m,id:"v",autoplay:"",playsinline:""},null,512)]),e.createElementVNode("button",{class:"face-screenshot",onClick:y},"人脸识别"),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:_,id:"canvas"},null,512)]))}}),be=K._export_sfc(he,[["__scopeId","data-v-4f612c1a"]]),Ae="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAd9JREFUWEftl71OAkEQx/97QC8XEj+iiTGexo/OnvgE0ChPIIXHQwgP4amxsYZGnkCtpbAxxiyJFEqCJie1yK7ZixhUuNtZYkLUa2/+M7+ZnbnbYTB87P3bIpi1BWCt34UEzpkUF35huWjimpmIlCbp8TMGbA7RX/uus27i2xjI9rgMC+i7jpFvI5EC+XEg2+NlSKTBMKmTuS5QlB2ApgRqz66TVXGDCmmIPhh7RxGl0bXrT15pWNLjVQZkdBuwF0i3qaPAv8StMNvjDwBmdIGQwJyfd+51xn7i4GbekvE7bd8SLQUUOi3fnElR0v3GvEPvaQOpHiIDKe9SlIQlTtq7K41BwexjPosXsQNmkWCCpjYCoqRMtP0HiirY76uQBWQRS1xalhCvnW4aQDmqCmHvR6rQsB/oKIMyClDOd53KoGxTHs8IoGpSKWOgeCI29ZhfaA0EOmpMi26n+beBAIzXkanjGLemDlpkrMbepGmjNMZTFuXY9D0dSF09wE7bhaWrsKD2IV+FgNrNtilwVKCK7zo5SgDqJY0EFJPMeSos1ilAKa++ISBruhoSUNi3Z1hA2+PqyLR/uPRLvm6qJnbqkk9dg0ziEDQV8qJIcE42DRbFnkp3lSZHiRZ8WqXfAFwe+He0YFLSAAAAAElFTkSuQmCC",_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAx1JREFUWEfFV01oE1EQnnmpYJRGL/6gYsGLVCoUzMGLNrO1B4sYKooXQT0JWtSK4KEHEVERPCjUHgqCQlFED4raUmP3bS0UhRQKnrTorQdFBBOkBZP97AuJbNo0+2KF7GlJ3sz3zcw3M2+Z6vxwnfHJmkAqlVrT0NCwB8BepdQuAOuJaEMxgK/M/M33/UlmfpvL5cY7Ojp+2gQXSiCdTq/IZrNniOg0gM1WTplniKi/sbHxbjwe/13NpioBrXUcwB0iarUBrnBmipnPiUh6KfslCXiet9/3/af/CFxmppQ6nEgkhiv5qkhAa90N4Ob/AC/5YOZLItK30OciAlrrAwAe24Iz8yul1A0imgPQ5ft+75LpZj4qIi+D/5cRMILLZDJejTXvcRxnwDgdGxtrzufzS9abiKZisVgiKMwyAlrr8wCu2UZvzjHzgIj0mHet9fH59uyvqnrmXhG5/bc0pZehoaFYNBpN27ZaoLY/mPk1EeUAmDnRFEJgZnZ2Nt7Z2ZkpBFA6rLXeB+B5LdEXM/ARwPZa7Jg5KSJvygi4rnuFiC7aOlJKPSCiR4lEYrw4L0aIaKWl/S3HcS6XEfA8b9T3/d2WDoxORhzHmQxk0JSv2cZeKfVunnj7whJ8ALDNwkFBpMy8Q0SOBQhMA9hkYW9sv4jIzoUEvgFYbeHAEOgFcKK9vf1JUf0tAN5b2BaOMPMvETHLrEyEtgQKTmKx2NpSP7uue4GIri6XgG0JTARDInIkkP5hs6ZrILC4BLWIkJlPicigAZyYmIjOzc19twU35yqKsJY2zGazG5PJZNY4c103SUQPayFARIvb0HYQMfOoiBwMpL8PwEkiMkPMkAl9Kg4i21HMzGdF5F4JxfO8TwA+Axg33RGGzsyVR3GxnUKXETM3iUih5lrrFiK6T0TdRPQCwCoLApWXkTG0WceRSKS1ra1tugSUSqWa5397RkRbwsBD13ExqqoXEqXUYD6fvx6JRLYCOEREXQDWWYCb9q1+IQkIq35XsoC46ncpDWSiftfyEom6fpgEhVW3TzMbdS/nTOi34XKc29j+AXyzojCfNKqJAAAAAElFTkSuQmCC",Ce={class:"card-wrap"},we={class:"card-icon card"},Ne={class:"card-input"},Ee={class:"card-icon info"},Se=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""}},emits:["handleCardInput"],setup(C,{emit:E}){const b=C,u=e.ref(""),m=E,_=l=>{m("handleCardInput",l==null?void 0:l.trim())};return e.watch(()=>b.activeTabName,l=>{l&&(u.value="")}),(l,y)=>{const p=e.resolveComponent("el-image"),c=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",we,[e.createVNode(p,{src:e.unref(Ae),fit:"contain"},null,8,["src"])]),e.createElementVNode("div",Ne,[e.createVNode(c,{modelValue:u.value,"onUpdate:modelValue":y[0]||(y[0]=i=>u.value=i),onChange:_,clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",Ee,[e.createVNode(p,{src:e.unref(_e),fit:"contain"},null,8,["src"])])])}}}),ke=K._export_sfc(Se,[["__scopeId","data-v-e8a73fc2"]]);function Ie(){const C={account:"superadmin",password:"1c8e7623312244c1feb677732278fb8b2af6af1a5335fdaebbdb2720137b372b7871292d11165b83b2967b9c39fa37027d63d37a2f36d764257b566dcfa99f334faa8995301601aec549adf39aef8d89c8788da03a9164937a5f73af20a15ea60d47c7cf01cf",tenantId:-1,code:"",codeId:0};return v.service({url:"/api/sysAuth/login",method:"post",data:C})}const Ve={class:"login-wrap"},xe={class:"login-body"},Te={class:"login-body-item left"},Ke={class:"title"},Be={class:"login-body-item right"},Me=e.defineComponent({__name:"index",emits:["change"],setup(C,{emit:E}){const b=j.useRouter(),u=v.useLoginState(v.pinia),{systemKey:m,systemInfo:_,loginUserInfo:l}=v.storeToRefs(u),y=e.ref({sysCTitle:"",sysETitle:"",loginTitle:"账户密码登录",tabs:[{name:"密码登录",btnLabel:"登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"},{name:"人脸识别",btnLabel:"人脸识别",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"},{name:"刷卡登录",btnLabel:"登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"}]}),p=e.ref("account"),c=e.ref(!1),i=e.ref(!1),A=()=>{c.value=!0},S=a=>{c.value=!1,q(a)},N=(a,n)=>{c.value=!1,a&&q(n)},I=a=>V.getFirstArrayProperty(a),x=a=>{let n;const o=V.convertArrayToTree(a),s=V.addPathToTree(o),f=V.getLeafNodesRecursive(s),h=V.groupByField(f,"parentPath");return n=V.handleRowAuthorityRender(h),n},L=(a,n)=>{var s,f,h;const o=(n==null?void 0:n.userRoles)??(n==null?void 0:n.角色名称);try{if(n.layer&&((s=n==null?void 0:n.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN")return"superAdmin";if(Array.isArray(o)){if((o==null?void 0:o.length)===1){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===(o==null?void 0:o[0])||t.角色名称===(o==null?void 0:o[0])),w=I(r),d=x(r==null?void 0:r[w]);return r&&d&&Array.isArray(d)?r?d==null?void 0:d.flatMap(t=>t.checkedButtons):[]:[]}if((o==null?void 0:o.length)>1){let r=a==null?void 0:a.filter(t=>o==null?void 0:o.includes(t.roleName||(t==null?void 0:t.角色名称)));const w=I(r==null?void 0:r[0]),d=(h=(f=r==null?void 0:r.map(t=>Array.isArray(t==null?void 0:t[w])?t==null?void 0:t[w]:[]))==null?void 0:f.flat())==null?void 0:h.flatMap(t=>t.checkedButtons);return(d==null?void 0:d.length)===0?v.ElMessage.error("该用户没有权限,请联系管理员"):new Set(d)}}if(typeof o=="string"){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===o||(t==null?void 0:t.角色名称)===o),w=I(r),d=x(r==null?void 0:r[w]);return r&&d&&Array.isArray(d)?r?d==null?void 0:d.flatMap(t=>t.checkedButtons):[]:[]}}catch(r){throw new Error(r)}},R=async a=>{var n,o;try{let s=[];const f=await v.getInsofDataApi({key:{systemKey:m.value?m.value:a==null?void 0:a.systemKey,pageKey:"系统管理/角色管理",type:"data"}});if(f.data.code===200){const h=(o=(n=f.data)==null?void 0:n.result)==null?void 0:o.map(r=>r.value.tableData);s=L(h,a)}if(s)return Array.isArray(s)?Array.from(s):s;throw v.ElMessage.error("获取用户权限失败,请联系管理员"),new Error("获取用户权限失败,请联系管理员")}catch(s){throw v.ElMessage.error("获取用户权限失败,请联系管理员"),new Error(s)}},P=async a=>{var n,o,s,f,h,r,w;try{let d=[],t,T,B;m.value?B={pageKey:"系统管理/用户管理",type:"data",systemKey:m.value}:B={pageKey:"系统管理/用户管理",type:"data"};const F=await v.getInsofDataApi({key:B});let D;if(!sessionStorage.getItem("systemKey")||sessionStorage.getItem("systemKey")===""?D=await v.getInsofDataApi({key:{layer:"superAdmin"}}):D=await v.getInsofDataApi({key:{layer:"superAdmin",systemKey:sessionStorage.getItem("systemKey")}}),F.data.code===200&&D.data.code===200){const Z=(o=(n=D.data)==null?void 0:n.result)==null?void 0:o.map(g=>{var k,M;return{...g.value.tableData,layer:(k=g.key)==null?void 0:k.layer,systemKey:(M=g==null?void 0:g.key)==null?void 0:M.systemKey,id:g.id}}),Y=(f=(s=F.data)==null?void 0:s.result)==null?void 0:f.map(g=>{var k,M;return{...g.value.tableData,layer:(k=g.key)==null?void 0:k.layer,systemKey:(M=g==null?void 0:g.key)==null?void 0:M.systemKey,id:g.id}}),O=[...Z,...Y];if(t=O==null?void 0:O.find(g=>(g==null?void 0:g.account)===(a==null?void 0:a.account)||(g==null?void 0:g.账号)===(a==null?void 0:a.account)),t){if(((h=t.layer)==null?void 0:h.toUpperCase())!=="SUPERADMIN"&&(!(t!=null&&t.状态)||(t==null?void 0:t.状态)==="禁用"||(t==null?void 0:t.status)==="禁用")){v.ElMessage.error("该用户已被禁用,请联系管理员"),i.value=!1;return}d=await R(t);const{privateKey:g}=await u.getModelSecretAsync(t);let k;if(t.password?k=((r=t.layer)==null?void 0:r.toUpperCase())==="SUPERADMIN"?t.password:V.decryptData(t.password,g):k=((w=t.layer)==null?void 0:w.toUpperCase())==="SUPERADMIN"?t.password:V.resetPassword,(a==null?void 0:a.password)===k)T=t;else throw T=null,v.ElMessage.error("输入的密码错误,请重新输入"),i.value=!1,new Error("输入的密码错误,请重新输入")}else return v.ElMessage.error("该用户不存在,请重新输入")}return T&&d?{matchedUser:T,userAuthority:d}:void 0}catch(d){throw new Error(d)}},U=async a=>{var o,s,f;const n=await P(a);if(n!=null&&n.matchedUser){u.setLoginUserInfo(n.matchedUser),sessionStorage.setItem("authority",JSON.stringify(n.userAuthority));const h=((s=(o=n.matchedUser)==null?void 0:o.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN";return sessionStorage.setItem("isSuperAdmin",JSON.stringify(h)),sessionStorage.setItem("systemKey",m.value?m.value:(f=n.matchedUser)==null?void 0:f.systemKey),await Q(n.matchedUser),!0}else throw i.value=!1,new Error("该用户数据处理失败,请联系管理员")},Q=async a=>{var o,s,f,h,r,w,d,t,T;const n=await v.getInsofDataApi({key:{layer:"superAdmin",systemKey:m.value?m.value:a==null?void 0:a.systemKey}});if(n.data.code===200&&(o=n.data)!=null&&o.result&&Array.isArray((s=n.data)==null?void 0:s.result)&&((h=(f=n.data)==null?void 0:f.result)==null?void 0:h.length)>0){const B=(T=(t=(d=(w=(r=n.data)==null?void 0:r.result)==null?void 0:w[0])==null?void 0:d.value)==null?void 0:t.tableData)==null?void 0:T.account;u.setSuperAdminInfo({account:B})}},$=async()=>{var a,n,o;try{const s=await Ie();return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("loginToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){v.ElMessage.error(s)}},J=async()=>{var a,n,o;try{const s=await v.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("magicToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){v.ElMessage.error(s)}},q=async a=>{var f,h,r,w;i.value=!0;let n=[U(a),$(),J()];const o=await Promise.all(n);(o==null?void 0:o.every(d=>d))&&(await H.verifyStructureDataToStore(),b.push("/"),u.setLogRecordAsync({type:"登录",data:{account:((f=l.value)==null?void 0:f.account)??((h=l.value)==null?void 0:h.账号),userName:((r=l.value)==null?void 0:r.姓名)||((w=l.value)==null?void 0:w.userName)||"未知"}},"/login","login"))},X=a=>{p.value=a,c.value=!1,i.value=!1},G=a=>/^[\u4e00-\u9fa5\s,。!?《》“”【】]+$/.test(a);return(a,n)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",xe,[e.createElementVNode("div",Te,[e.createVNode(ae,{class:"login-left-bg"},{img:e.withCtx(()=>{var o,s,f,h;return[e.createElementVNode("div",Ke,[e.createElementVNode("div",null,e.toDisplayString(((o=e.unref(_))==null?void 0:o.EnglishName)||"INSOFWORKS"),1),e.createElementVNode("div",null,e.toDisplayString((s=e.unref(_))!=null&&s.chineseName&&G((f=e.unref(_))==null?void 0:f.chineseName)?(h=e.unref(_))==null?void 0:h.chineseName:"工业软件集成开发平台"),1)]),n[0]||(n[0]=e.createElementVNode("div",{class:"divide-line"},null,-1))]}),_:1})]),e.createElementVNode("div",Be,[e.createVNode(ue,{loading:i.value,onClickLogin:A,onHandleTabClick:X},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value.loginTitle),1)]),tabLabel1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value.tabs[0].name),1)]),tabContent1:e.withCtx(()=>[e.createVNode(ge,{activeTabName:p.value,isClickLogin:c.value,onHandleLoginFormChange:N},null,8,["activeTabName","isClickLogin"])]),tabButton1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value.tabs[0].btnLabel),1)]),tabLabel2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value.tabs[1].name),1)]),tabContent2:e.withCtx(()=>[e.createVNode(be,{activeTabName:p.value,isClickLogin:c.value,onHandleLoginFormChange:N},null,8,["activeTabName","isClickLogin"])]),tabButton2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value.tabs[1].btnLabel),1)]),tabLabel3:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value.tabs[2].name),1)]),tabContent3:e.withCtx(()=>[e.createVNode(ke,{activeTabName:p.value,onHandleCardInput:S},null,8,["activeTabName"])]),tabButton3:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value.tabs[2].btnLabel),1)]),_:1},8,["loading"])])])]))}}),Le=K._export_sfc(Me,[["__scopeId","data-v-3c402c7d"]]);exports.default=Le;
|