ss-component-new 1.2.106 → 1.2.108

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.
Files changed (64) hide show
  1. package/dist/{animationData-d-I6rIYf.cjs → animationData-BTq-RxMO.cjs} +1 -1
  2. package/dist/{animationData-gAZPz1po.js → animationData-DHgdfcSK.js} +1 -1
  3. package/dist/{index-CojY4aA5.js → index--TdrCuf-.js} +1 -1
  4. package/dist/{index-BrtphiOP.js → index-2F9nABQ3.js} +2 -2
  5. package/dist/{index-Df6piz7f.cjs → index-2OwdHgRr.cjs} +1 -1
  6. package/dist/{index-DG7Kot2c.cjs → index-8Zr3lVBd.cjs} +1 -1
  7. package/dist/{index-CtbJwjWn.cjs → index-B00T4si5.cjs} +1 -1
  8. package/dist/{index-DzmrRL98.js → index-BDerBzEy.js} +2 -2
  9. package/dist/{index-CXkd46FK.js → index-BFsNllH8.js} +615 -615
  10. package/dist/{index-CjUycxaM.js → index-BGz5BWEW.js} +5 -5
  11. package/dist/{index-BE5p_FCo.js → index-BNtDkALx.js} +1 -1
  12. package/dist/{index-DkrMnsND.cjs → index-BPw73VIc.cjs} +1 -1
  13. package/dist/{index-CuoVSqv8.cjs → index-BX7PKzEP.cjs} +1 -1
  14. package/dist/{index-D-cXqwbi.js → index-BmSuOK2M.js} +1 -1
  15. package/dist/{index-DeK-Sr6h.cjs → index-BuZzPhFm.cjs} +1 -1
  16. package/dist/{index-BM5ZjQ-o.js → index-Bw8H1nvh.js} +4 -4
  17. package/dist/{index-BWfB6gMh.cjs → index-ByYkTwpr.cjs} +1 -1
  18. package/dist/{index-BT5WCidO.js → index-C4-dQFCE.js} +1 -1
  19. package/dist/{index-CHT0T4iC.js → index-CDMMPJ3X.js} +1 -1
  20. package/dist/{index-BbB5vgqU.cjs → index-CKmprTMc.cjs} +1 -1
  21. package/dist/{index-B1BxbYTw.cjs → index-Ca7I8O7o.cjs} +1 -1
  22. package/dist/{index-C0Z_cQ9d.cjs → index-CqSEEbBZ.cjs} +1 -1
  23. package/dist/{index-0gk_Di2v.cjs → index-CxpwBlvN.cjs} +1 -1
  24. package/dist/{index-RiS2ubsZ.js → index-D9S5nz-N.js} +3 -3
  25. package/dist/{index-B_ilOpm-.cjs → index-DD42kf7u.cjs} +1 -1
  26. package/dist/{index-ns2TLF6Q.cjs → index-DJ9Oqj2S.cjs} +1 -1
  27. package/dist/{index-Cd_mgUdE.cjs → index-DNWZjpUa.cjs} +1 -1
  28. package/dist/{index-CxVmAaXi.js → index-DRxjTuyo.js} +2 -2
  29. package/dist/{index-Y8tgl6Wn.cjs → index-DSAl1fpo.cjs} +1 -1
  30. package/dist/{index-DxxW0DPS.cjs → index-Daba3foy.cjs} +1 -1
  31. package/dist/{index-DWTi02Iz.cjs → index-DpzB0HOB.cjs} +1 -1
  32. package/dist/{index-BWg7tTHP.js → index-DsvN-U_v.js} +2 -2
  33. package/dist/{index-DRWEMPXW.js → index-DzthlKkH.js} +1 -1
  34. package/dist/{index-Bgk5d5Cg.js → index-KkVa7Wyk.js} +3 -3
  35. package/dist/{index-CJxYcIeF.js → index-VSxxw6n6.js} +1 -1
  36. package/dist/{index-r7KKxjZL.js → index-hfzjur9U.js} +1 -1
  37. package/dist/{index-CuDS6Two.cjs → index-ny-jmbEv.cjs} +1 -1
  38. package/dist/{index-B-uQTVtj.js → index-tQgYmgB1.js} +12 -12
  39. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BFAAsQF-.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DbVgG7FR.cjs} +1 -1
  40. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DghbePbo.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-mOOz_ku5.js} +4 -4
  41. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DKx8ocb7.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-BT4c4IpN.js} +2 -2
  42. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-nW8EBngH.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-bt6KDisJ.cjs} +1 -1
  43. package/dist/{index.vue_vue_type_style_index_1_lang-DiSjkZ_Q.cjs → index.vue_vue_type_style_index_1_lang-D2yvbyv5.cjs} +1 -1
  44. package/dist/{index.vue_vue_type_style_index_1_lang-B_HHyW6a.js → index.vue_vue_type_style_index_1_lang-Dn1a-3xV.js} +1 -1
  45. package/dist/{main-Cl9TMtFR.cjs → main-CTqNXiox.cjs} +1 -1
  46. package/dist/{main-B9qNt-K9.js → main-aN5y2Vue.js} +2 -2
  47. package/dist/ss-component.cjs +1 -1
  48. package/dist/ss-component.css +1 -1
  49. package/dist/ss-component.js +6 -6
  50. package/dist/ss-component2.cjs +1 -1
  51. package/dist/ss-component2.js +10 -10
  52. package/dist/{threeModel-2-5KGGD5.js → threeModel-CWpAR69t.js} +2 -2
  53. package/dist/{threeModel-CmDfA24Y.cjs → threeModel-DL7PXVdj.cjs} +1 -1
  54. package/dist/{threeSceneView-JEKrBGgr.js → threeSceneView-BOtOqlXq.js} +3 -3
  55. package/dist/{threeSceneView-BbPhB3K-.cjs → threeSceneView-CI6GjgZv.cjs} +1 -1
  56. package/dist/{threeSceneViewForCPMPIP-CWTKPqJh.cjs → threeSceneViewForCPMPIP-C7t6iOXA.cjs} +1 -1
  57. package/dist/{threeSceneViewForCPMPIP-CZPstRPF.js → threeSceneViewForCPMPIP-CaVgZ0Y4.js} +3 -3
  58. package/dist/{threeTrackPathView-KxTJ8A12.js → threeTrackPathView-Bgl23xqE.js} +1 -1
  59. package/dist/{threeTrackPathView-BQTGOuCs.cjs → threeTrackPathView-Co9j0Cff.cjs} +1 -1
  60. package/dist/{threeViewerHost-DBinkWUH.cjs → threeViewerHost-DULXVjvJ.cjs} +1 -1
  61. package/dist/{threeViewerHost-DyMqzRBH.js → threeViewerHost-MhfjL3rv.js} +1 -1
  62. package/dist/{workpieceTreePanel-DT4Ia_nc.cjs → workpieceTreePanel-CEdPIoSh.cjs} +1 -1
  63. package/dist/{workpieceTreePanel-DnEmMwB1.js → workpieceTreePanel-wX-OOv5d.js} +2 -2
  64. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const V=require("./index.vue_vue_type_style_index_1_lang-B8_elAaU.cjs"),k=require("./threeViewerHost-DBinkWUH.cjs"),a=require("./dataUtil-B4sGo38_.cjs"),q=require("./index-C8qRkCgn.cjs"),E=async()=>{let n={};const c=["弯管仿真加工分析","模具筛选安装"],y=await a.getMenuData(c),L=a.getTargetGroup("输入(加工件)",y),i=a.getFormData(L),u=i.管长||0,m=i.外径||0;console.log("管长",u,"外径",m,i);const P=u,C=m/2,T=["弯管仿真加工分析","加工位姿生成"],G=await a.getMenuData(T),R=a.getTargetGroup("输入",G),g=a.getFormData(R),D=g.夹持长度||0;console.log("夹持长度",D,g);const _=Number(D),r={},A=["弯管仿真加工分析","仿真动画生成"],s=await a.getMenuData(A);s==null||s.forEach(t=>{var h,b,f,d,M,F;if((t==null?void 0:t.comp)==="Table"){let w=[],p=(f=(b=(h=t==null?void 0:t.compData)==null?void 0:h.find(e=>(e==null?void 0:e.key)==="header"))==null?void 0:b.contents)==null?void 0:f.map(e=>e==null?void 0:e.label),l=(F=(M=(d=t==null?void 0:t.compData)==null?void 0:d.find(e=>(e==null?void 0:e.key)==="tableContents"))==null?void 0:M.contents)==null?void 0:F.map(e=>(e=e==null?void 0:e.filter(o=>!(o!=null&&o.id)),e));l==null||l.forEach(e=>{w.push(V.getValueToObjectValue(e,p==null?void 0:p.filter(o=>o!=="操作")))}),r[t.name]=w,r[t.name+"Content"]=t}});const x=q.cloneDeep(r)||[];return n={initialPipeLength:P,pipeRadius:C,clampLength:_,animationData:x},n},O=async()=>{let n={};const c=["双弯管仿真加工分析","模具筛选安装"],y=await a.getMenuData(c),L=a.getTargetGroup("输入(加工件)",y),i=a.getFormData(L),u=i.管长||0,m=i.外径||0;console.log("管长",u,"外径",m,i);const P=u,C=m/2,T=["双弯管仿真加工分析","加工工艺生成"],G=await a.getMenuData(T),R=a.getTargetGroup("输入",G),g=a.getFormData(R),D=g.夹持位置||0;console.log("夹持长度",D,g);const _=Number(D),r={},A=["双弯管仿真加工分析","仿真动画生成"],s=await a.getMenuData(A);s==null||s.forEach(t=>{var h,b,f,d,M,F;if((t==null?void 0:t.comp)==="Table"){let w=[],p=(f=(b=(h=t==null?void 0:t.compData)==null?void 0:h.find(e=>(e==null?void 0:e.key)==="header"))==null?void 0:b.contents)==null?void 0:f.map(e=>e==null?void 0:e.label),l=(F=(M=(d=t==null?void 0:t.compData)==null?void 0:d.find(e=>(e==null?void 0:e.key)==="tableContents"))==null?void 0:M.contents)==null?void 0:F.map(e=>(e=e==null?void 0:e.filter(o=>!(o!=null&&o.id)),e));l==null||l.forEach(e=>{w.push(V.getValueToObjectValue(e,p==null?void 0:p.filter(o=>o!=="操作")))}),r[t.name]=w,r[t.name+"Content"]=t}});const x=q.cloneDeep(r)||[];return n={initialPipeLength:P,pipeRadius:C,clampLength:_,animationData:x},n},B=async n=>await k.downloadFile(n),X=async n=>await k.readCsv(n),Y=async n=>{const c=await B(n);return await X(c)};exports.fetchDoubleRobotAnimationData=O;exports.fetchSingleRobotAnimationData=E;exports.initXYZBCList=Y;
1
+ "use strict";const V=require("./index.vue_vue_type_style_index_1_lang-B8_elAaU.cjs"),k=require("./threeViewerHost-DULXVjvJ.cjs"),a=require("./dataUtil-B4sGo38_.cjs"),q=require("./index-C8qRkCgn.cjs"),E=async()=>{let n={};const c=["弯管仿真加工分析","模具筛选安装"],y=await a.getMenuData(c),L=a.getTargetGroup("输入(加工件)",y),i=a.getFormData(L),u=i.管长||0,m=i.外径||0;console.log("管长",u,"外径",m,i);const P=u,C=m/2,T=["弯管仿真加工分析","加工位姿生成"],G=await a.getMenuData(T),R=a.getTargetGroup("输入",G),g=a.getFormData(R),D=g.夹持长度||0;console.log("夹持长度",D,g);const _=Number(D),r={},A=["弯管仿真加工分析","仿真动画生成"],s=await a.getMenuData(A);s==null||s.forEach(t=>{var h,b,f,d,M,F;if((t==null?void 0:t.comp)==="Table"){let w=[],p=(f=(b=(h=t==null?void 0:t.compData)==null?void 0:h.find(e=>(e==null?void 0:e.key)==="header"))==null?void 0:b.contents)==null?void 0:f.map(e=>e==null?void 0:e.label),l=(F=(M=(d=t==null?void 0:t.compData)==null?void 0:d.find(e=>(e==null?void 0:e.key)==="tableContents"))==null?void 0:M.contents)==null?void 0:F.map(e=>(e=e==null?void 0:e.filter(o=>!(o!=null&&o.id)),e));l==null||l.forEach(e=>{w.push(V.getValueToObjectValue(e,p==null?void 0:p.filter(o=>o!=="操作")))}),r[t.name]=w,r[t.name+"Content"]=t}});const x=q.cloneDeep(r)||[];return n={initialPipeLength:P,pipeRadius:C,clampLength:_,animationData:x},n},O=async()=>{let n={};const c=["双弯管仿真加工分析","模具筛选安装"],y=await a.getMenuData(c),L=a.getTargetGroup("输入(加工件)",y),i=a.getFormData(L),u=i.管长||0,m=i.外径||0;console.log("管长",u,"外径",m,i);const P=u,C=m/2,T=["双弯管仿真加工分析","加工工艺生成"],G=await a.getMenuData(T),R=a.getTargetGroup("输入",G),g=a.getFormData(R),D=g.夹持位置||0;console.log("夹持长度",D,g);const _=Number(D),r={},A=["双弯管仿真加工分析","仿真动画生成"],s=await a.getMenuData(A);s==null||s.forEach(t=>{var h,b,f,d,M,F;if((t==null?void 0:t.comp)==="Table"){let w=[],p=(f=(b=(h=t==null?void 0:t.compData)==null?void 0:h.find(e=>(e==null?void 0:e.key)==="header"))==null?void 0:b.contents)==null?void 0:f.map(e=>e==null?void 0:e.label),l=(F=(M=(d=t==null?void 0:t.compData)==null?void 0:d.find(e=>(e==null?void 0:e.key)==="tableContents"))==null?void 0:M.contents)==null?void 0:F.map(e=>(e=e==null?void 0:e.filter(o=>!(o!=null&&o.id)),e));l==null||l.forEach(e=>{w.push(V.getValueToObjectValue(e,p==null?void 0:p.filter(o=>o!=="操作")))}),r[t.name]=w,r[t.name+"Content"]=t}});const x=q.cloneDeep(r)||[];return n={initialPipeLength:P,pipeRadius:C,clampLength:_,animationData:x},n},B=async n=>await k.downloadFile(n),X=async n=>await k.readCsv(n),Y=async n=>{const c=await B(n);return await X(c)};exports.fetchDoubleRobotAnimationData=O;exports.fetchSingleRobotAnimationData=E;exports.initXYZBCList=Y;
@@ -1,5 +1,5 @@
1
1
  import { k as x } from "./index.vue_vue_type_style_index_1_lang-Cg1p_3ne.js";
2
- import { i as N, j as V } from "./threeViewerHost-DyMqzRBH.js";
2
+ import { i as N, j as V } from "./threeViewerHost-MhfjL3rv.js";
3
3
  import { g as r, a as L, e as y } from "./dataUtil-DQX9rTvE.js";
4
4
  import { c as O } from "./index-BUYYl2Pc.js";
5
5
  const z = async () => {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as y, ref as C, onMounted as _, createElementBlock as c, openBlock as g, createVNode as v } from "vue";
2
2
  import { p as h, s as k, c as m, g as x } from "./index-BUYYl2Pc.js";
3
3
  import { u as M } from "./index.vue_vue_type_style_index_1_lang-Cg1p_3ne.js";
4
- import { s as D } from "./index-RiS2ubsZ.js";
4
+ import { s as D } from "./index-D9S5nz-N.js";
5
5
  import { a as T, d as S, f as w } from "./index-DV9P2GJQ.js";
6
6
  import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const N = { class: "menu-content" }, E = /* @__PURE__ */ y({
@@ -1,5 +1,5 @@
1
- import { _ as b } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-DKx8ocb7.js";
2
- import { s as K } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-DKx8ocb7.js";
1
+ import { _ as b } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-BT4c4IpN.js";
2
+ import { s as K } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-BT4c4IpN.js";
3
3
  import { resolveComponent as r, createElementBlock as s, openBlock as n, Fragment as p, createVNode as l, createCommentVNode as k, withCtx as i, createElementVNode as d, normalizeStyle as w, toDisplayString as c, renderList as v, createTextVNode as _, createBlock as B, resolveDynamicComponent as I } from "vue";
4
4
  import { _ as m } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const L = ["title"], V = {
@@ -1 +1 @@
1
- "use strict";const l=require("vue"),m=require("./index-C8qRkCgn.cjs"),Jl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-K6lh7Rrj.cjs"),Re=require("./index-BbB5vgqU.cjs"),Ve=require("./threeViewerHost-DBinkWUH.cjs"),te=require("./index.vue_vue_type_style_index_1_lang-B8_elAaU.cjs");require("./index.vue_vue_type_style_index_1_lang-DiSjkZ_Q.cjs");const jl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Cl=require("./index-DhufphmT.cjs");require("./index-a6bC3A9D.cjs");const ga=require("./isString--eJE54G5.cjs"),Wl=O=>O.match(/\((.*)\)/)[1],ha={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(O){const Z=O,Q=l.ref(null),$=l.ref(!1),U=l.ref(null);return l.watch(()=>Z==null?void 0:Z.isVisible,()=>{$.value=Z==null?void 0:Z.isVisible},{deep:!0,immediate:!0}),l.watch(()=>U.value,()=>{l.nextTick(()=>{var s,I;(I=(s=Q.value)==null?void 0:s.updatePopper)==null||I.call(s)})},{deep:!0,immediate:!0}),(s,I)=>{const de=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(de,{visible:$.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:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:U})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},mr={key:0,class:"extra-button-content"},Sr={class:"table-operator-wrap"},Cr={class:"extra-button-filter"},Dr={class:"form-content-value"},xr={key:0,class:"extra-header"},Tr={class:"drop-menu",style:{width:"120px"}},Er={key:0},Nr={key:1},Br={key:1,class:"extra-button-content tabs-button-wrapper"},wr={class:"table-operator-wrap"},Ar={class:"extra-button-filter"},_r={class:"form-content-value"},Ur={key:0,class:"extra-header"},Or={class:"drop-menu",style:{width:"120px"}},Lr={key:0},Vr={key:1},jr={__name:"header",props:{pageLayout:{type:String,default:"vertical"},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(O,{emit:Z}){const Q=Z,$=O,U=l.ref(""),s=l.ref(!1),I=l.ref([]),de=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),be=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],pe=ne=>{const re=ne.raw;if(!re)return;const oe=new FileReader;oe.onload=V=>{try{const Ce=new Uint8Array(V.target.result),Te=Ve.readSync(Ce,{type:"array"}),qe=Te.SheetNames[0],Ue=Te.Sheets[qe],Je=Ve.utils.decode_range(Ue["!ref"]).e.c+1,we=new Array(Je).fill(""),C=[];for(const J in Ue){if(J[0]==="!")continue;const{r:W,c:ke}=Ve.utils.decode_cell(J);let Ee=Ue[J].v;if(Ue[J].t==="n"&&Ee>0&&Ee<1e6&&(Ee=new Date((Ee-25569)*86400*1e3).toISOString().split("T")[0]),(Ee==null||Ee==="")&&(Ee=""),W===0)we[ke]=Ee;else{if(!C[W-1]){C[W-1]={};for(let We=0;We<Je;We++)C[W-1][`col_${We}`]=""}C[W-1][`col_${ke}`]=Ee}}for(let J=0;J<Je;J++)we[J]===void 0&&(we[J]="");const fe=C==null?void 0:C[0];if(!(fe!=null&&fe.hasOwnProperty("col_0")))return m.ElMessage.error("导入的数据列不匹配,请检查是否错位");Q("getImportData",we,C)}catch(Ce){throw m.ElMessage.error(Ce.message),new Error(Ce.message)}},oe.readAsArrayBuffer(re)},je=ne=>{var oe;const re=(oe=I.value)==null?void 0:oe.reduce((V,Ce,Te)=>(Te===0?V[Ce.label]=ne:V[Ce.label]=Ce==null?void 0:Ce.value,V),{});Q("filter",re,ne,!0)},He=ne=>{Q("buttonClick",ne)},ee=ne=>{var re,oe;I.value=(oe=(re=te.getColumnChild(m.cloneDeep(ne)))==null?void 0:re.filter(V=>(V==null?void 0:V.label)!==""&&(V==null?void 0:V.label)!=="操作"))==null?void 0:oe.map(V=>({label:(V==null?void 0:V.label)??"",value:"",name:(V==null?void 0:V.label)??"",isFormColHidden:V==null?void 0:V.isTableColHidden,width:2}))},Ae=l.ref(!1),_e=ne=>{var re;if((ne==null?void 0:ne.buttonName)==="确认"&&(Q("filter",ne==null?void 0:ne.content),Ae.value=(ne==null?void 0:ne.content)&&Object.values(ne==null?void 0:ne.content).length>0),(ne==null?void 0:ne.buttonName)==="清空"){const oe=m.cloneDeep(ne==null?void 0:ne.content);for(const V in oe)oe[V]="";I.value=(re=I.value)==null?void 0:re.map(V=>({...V,value:""})),Q("filter",oe),Ae.value=!1}s.value=!1},ue=()=>{var re,oe;I.value=(re=I.value)==null?void 0:re.map(V=>({...V,value:""}));const ne=(oe=I.value)==null?void 0:oe.reduce((V,Ce)=>(V[Ce.label]=Ce.value,V),{});Q("filter",ne)};return l.onMounted(()=>{ee($.columns)}),l.watch(()=>$.columns,()=>{ee($.columns)},{deep:!0,immediate:!0}),(ne,re)=>{var Ue,rl,Je,we;const oe=l.resolveComponent("el-icon"),V=l.resolveComponent("svg-icon"),Ce=l.resolveComponent("el-input"),Te=l.resolveComponent("el-button"),qe=l.resolveComponent("el-upload");return O.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",mr,[l.createElementVNode("div",{class:l.normalizeClass(O.compName?"table-name-wrap":""),style:l.normalizeStyle({background:($==null?void 0:$.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:($==null?void 0:$.level)>1?"0px":"8px",fontWeight:600-(($==null?void 0:$.level)-1)*100>=400?600-(($==null?void 0:$.level)-1)*100:400,fontSize:15-($==null?void 0:$.level)>=12?15-($==null?void 0:$.level)+"px":"14px"})},l.toDisplayString(O.compName),7),l.createElementVNode("div",Sr,[l.createElementVNode("div",Cr,[l.createVNode(ha,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,fe,J,W;return[l.createVNode(Ce,{modelValue:U.value,"onUpdate:modelValue":re[1]||(re[1]=ke=>U.value=ke),style:{"min-width":"80px"},placeholder:Ae.value?(J=(fe=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:fe.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(m.search_default),clearable:"",onInput:je,disabled:((W=I.value)==null?void 0:W.length)===0},{suffix:l.withCtx(()=>{var ke,Ee;return[!U.value&&((Ee=(ke=O.filterValues)==null?void 0:ke.filter(We=>We))!=null&&Ee.join("/"))?(l.openBlock(),l.createBlock(oe,{key:0,style:{cursor:"pointer"},onClick:ue},{default:l.withCtx(()=>[l.createVNode(l.unref(m.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:re[0]||(re[0]=ke=>s.value=!s.value)},[l.createVNode(V,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Dr,[(l.openBlock(),l.createBlock(Re.ssForm,{rowContents:I.value,buttonValue:de.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:de.value,isStartJustify:!1,onOnButtonClick:_e},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Ue=O.buttons)==null?void 0:Ue.length)>0?(l.openBlock(),l.createElementBlock("div",xr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((rl=O.buttons)==null?void 0:rl.filter(C=>O.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,fe)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:fe},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":pe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!O.lockingPage},{default:l.withCtx(()=>[l.createVNode(Te,{disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Re._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Te,{key:0,disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style"])):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",Tr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,J=>(l.openBlock(),l.createBlock(Te,{key:J==null?void 0:J.label,disabled:!!O.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:W=>He(J==null?void 0:J.label)},{default:l.withCtx(()=>{var W,ke;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(W=J==null?void 0:J.label)!=null&&W.includes("选中")?(l.openBlock(),l.createElementBlock("span",Er,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Nr,"("+l.toDisplayString(O.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),C!=null&&C.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Te,{key:2,id:"themeButton",disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"}),onClick:J=>He(C==null?void 0:C.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])])):(l.openBlock(),l.createElementBlock("div",Br,[l.createElementVNode("div",wr,[l.createElementVNode("div",Ar,[l.createVNode(ha,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,fe,J,W;return[l.createVNode(Ce,{modelValue:U.value,"onUpdate:modelValue":re[3]||(re[3]=ke=>U.value=ke),style:{"min-width":"80px"},placeholder:Ae.value?(J=(fe=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:fe.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(m.search_default),clearable:"",onInput:je,disabled:((W=I.value)==null?void 0:W.length)===0},{suffix:l.withCtx(()=>{var ke,Ee;return[!U.value&&((Ee=(ke=O.filterValues)==null?void 0:ke.filter(We=>We))!=null&&Ee.join("/"))?(l.openBlock(),l.createBlock(oe,{key:0,style:{cursor:"pointer"},onClick:ue},{default:l.withCtx(()=>[l.createVNode(l.unref(m.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:re[2]||(re[2]=ke=>s.value=!s.value)},[l.createVNode(V,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",_r,[(l.openBlock(),l.createBlock(Re.ssForm,{rowContents:I.value,buttonValue:de.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:de.value,isStartJustify:!1,onOnButtonClick:_e},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Je=O.buttons)==null?void 0:Je.length)>0?(l.openBlock(),l.createElementBlock("div",Ur,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((we=O.buttons)==null?void 0:we.filter(C=>O.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,fe)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:fe},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":pe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(Te,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=be==null?void 0:be.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Re._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Te,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=be==null?void 0:be.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",Or,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,J=>(l.openBlock(),l.createBlock(Te,{key:J==null?void 0:J.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:W=>He(J==null?void 0:J.label)},{default:l.withCtx(()=>{var W,ke;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(W=J==null?void 0:J.label)!=null&&W.includes("选中")?(l.openBlock(),l.createElementBlock("span",Lr,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Vr,"("+l.toDisplayString(O.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),C!=null&&C.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Te,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(C==null?void 0:C.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:J=>He(C==null?void 0:C.label)},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=be==null?void 0:be.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},Mr=jl._export_sfc(jr,[["__scopeId","data-v-b0dbf278"]]),$r=l.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(O,{emit:Z}){const Q=O,$=Z,U=I=>{$("buttonClick",I)},s=I=>{var de;return I!=null&&I.includes("删除")?((de=Q.selectTableItems)==null?void 0:de.length)>0?"warning-active-type":"warning-type":"default-type"};return(I,de)=>{const be=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(O.buttons,pe=>(l.openBlock(),l.createBlock(be,{key:pe==null?void 0:pe.label,disabled:!!O.lockingPage,class:l.normalizeClass(s(pe==null?void 0:pe.label)),onClick:je=>U(pe==null?void 0:pe.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(pe==null?void 0:pe.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Pr=jl._export_sfc($r,[["__scopeId","data-v-70b12973"]]),ya=m.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(O){this.selectArray=O},setSelectString(O){this.selectString=O}}}),Kr={class:"calculator-content"},Fr={class:"calculator-child"},zr={class:"calculator-child"},Rr=l.defineComponent({__name:"calculator",setup(O){const Z=l.ref(),Q=l.ref();return l.onMounted(()=>{Z.value=[{type:"Upload",label:"输入",name:"input"}],Q.value=[{type:"Upload",label:"输出",name:"output"}]}),($,U)=>(l.openBlock(),l.createElementBlock("div",Kr,[l.createElementVNode("div",Fr,[l.createVNode(Re.ssForm,{rowContents:Z.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",zr,[l.createVNode(Re.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),qr=jl._export_sfc(Rr,[["__scopeId","data-v-73db0fe7"]]),va=m.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(O){this.selectIndex=O},setSelectMenu(O){this.selectMenu=O},setSelectTitle(O){this.selectTitle=O}}}),Gl=(O,Z)=>{let Q=O,$=Z;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((U,s)=>{if(Array.isArray(U)){let I={};return U=U==null?void 0:U.forEach((de,be)=>{var pe;(pe=$==null?void 0:$[be])!=null&&pe.prop?I[$[be].prop]=de:Array.isArray(de)&&(I.children=Gl(de,$))}),Object.assign(I,{id:s})}else return U})),Q},ba=(O,Z,Q)=>{let $=O,U=Z;return $=$==null?void 0:$.map((s,I)=>{var de,be;return!Array.isArray(s)||!((de=U==null?void 0:U[I])!=null&&de.label)&&!Q||(s.unshift(((be=U==null?void 0:U[I])==null?void 0:be.label)??""),s.some(pe=>Array.isArray(pe))&&(s=s==null?void 0:s.map(pe=>{var je;return Array.isArray(pe)&&(pe=ba(pe,(je=U==null?void 0:U[I])==null?void 0:je.children,Q)),pe}))),s}),$},Jr=(O,Z,Q)=>{if(Z==="")return O==null?void 0:O.filter($=>($==null?void 0:$.id)!==Q);{const $=Z.split("-");return Wr(O,$,Q)}},Wr=(O,Z,Q)=>{let $=O,U=Z;return(U==null?void 0:U.length)===0?$=$==null?void 0:$.filter(s=>s.id!==Q):$=$==null?void 0:$.map(s=>(s.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),s=ka(s,U,Q)),s)),$},ka=(O,Z,Q)=>{var s,I;let $=O,U=Z;return(U==null?void 0:U.length)===0?$.children=(s=$.children)==null?void 0:s.filter(de=>de.id!==Q):$.children=(I=$.children)==null?void 0:I.map(de=>(de.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),de=ka(de,U,Q)),de)),$},Gr=(O,Z,Q)=>{if(Z==="")return Q;{const $=Z.split("-");return Hr(O,$,Q)}},Hr=(O,Z,Q)=>{let $=O,U=Z;return(U==null?void 0:U.length)===0?$=Q:$=$==null?void 0:$.map(s=>(s.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),s=ma(s,U,Q)),s)),$},ma=(O,Z,Q)=>{var s;let $=O,U=Z;return(U==null?void 0:U.length)===0?$.children=Q:$.children=(s=$.children)==null?void 0:s.map(I=>(I.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),I=ma(I,U,Q)),I)),$},Sa=m.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(O){this.objUrl=O},setBlobUrls(O){this.blobUrls=O}}}),Hl=async O=>{var s,I,de,be,pe,je,He;let Z=(I=(s=m.cloneDeep(O))==null?void 0:s.optionUrl)==null?void 0:I.menuSelect,Q=[];Z==null||Z.forEach(ee=>{});let $="";const U=await te.menuToParent(Z);if(U==null||U.forEach(ee=>{var Ae,_e,ue,ne;(ee==null?void 0:ee.name)===(((ne=(ue=(_e=(Ae=m.cloneDeep(O))==null?void 0:Ae.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:ue[0])==null?void 0:ne.replaceAll("'",""))??"")&&($=ee==null?void 0:ee.id)}),$!==""){const ee=(de=U==null?void 0:U.find(ue=>{var ne,re,oe,V;return(ue==null?void 0:ue.name)===(((re=(ne=O==null?void 0:O.groupSelect)==null?void 0:ne.split(":"))==null?void 0:re[0])||((V=(oe=O==null?void 0:O.optionUrl)==null?void 0:oe.groupSelect)==null?void 0:V[0]))}))==null?void 0:de.compData;let Ae=(pe=(be=ee==null?void 0:ee.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:be.contents)==null?void 0:pe.map(ue=>ue==null?void 0:ue.label),_e=(He=(je=ee==null?void 0:ee.find(ue=>(ue==null?void 0:ue.key)==="tableContents"))==null?void 0:je.contents)==null?void 0:He.map(ue=>(ue=ue==null?void 0:ue.filter(ne=>!(ne!=null&&ne.id)),ue));_e==null||_e.forEach(ue=>{Q.push(te.getValueToObjectValue(ue,Ae))})}return Q},Qr={class:"table-content"},Xr={class:"menu-config-wrap"},Yr=["onClick"],Zr={key:0,class:"viewport-wrap"},Ir=["onClick"],en={title:"选择显示列信息"},ln={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},an=["title"],rn={class:"col-operate-wrap"},nn={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},on={class:"pop-view"},tn={class:"pop-wrapper"},sn={class:"file-list-pop"},un=["title","onClick"],cn=["onClick"],dn=["onClick"],pn={class:"form-content"},fn={key:0,class:"dialog-footer"},gn={class:"dialog-footer"},hn={class:"form-content"},yn={__name:"index",props:{pageLayout:{type:String,default:"vertical"},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!1},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(O,{emit:Z}){var fa;const Q=l.ref([]),$=Sa(m.pinia),U=l.ref(null),s=O,I=l.ref(s==null?void 0:s.allowSelect),de=l.ref((fa=s==null?void 0:s.config)==null?void 0:fa.showIndex),be=l.ref(),pe=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),je=te.useOriginalState(m.pinia),{originalPath:He}=m.storeToRefs(je),ee=He.value,Ae=l.ref(!1),_e=l.ref(!1),ue=l.ref(!1),ne=l.reactive({column:{},status:!1,text:"合计"}),re=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),oe=Z,V=l.ref([]),Ce=l.reactive({prop:"",order:null}),Te=l.ref([]),qe=l.ref(!1),Ue=l.ref(!1),rl=l.ref(null);Ve.useThreeSystem();const Je=l.ref([]),we=l.ref(!1),C=l.ref(),fe=te.useMenuState(),{importLoading:J,activeMenuPath:W,contentLoading:ke,linkMenuInfo:Ee}=m.storeToRefs(fe),We=te.useTableComp(m.pinia),De=te.useModelComp(m.pinia),{extraContents:ye,cacheUpdatingData:il,tableViewContents:ul,tableLoading:bn,pageMapState:Ze,lockingPage:Dl}=m.storeToRefs(De),Y=l.ref([]),xl=l.ref([]),Tl=l.ref(new Map);l.ref(!1);const Ge=l.ref("");l.ref();const El=l.ref(!0),nl=l.ref(0),Ql=l.ref(!0),Me=l.ref(""),Qe=l.ref(!1),Ca=l.ref({label:"查看三维模型"}),Nl=l.ref(!1),Ml=l.ref(),Oe=l.ref([]),Ie=l.ref([]),Bl=l.ref(!1),cl=l.ref([]),ol=l.ref([]),el=l.ref([]),Xe=l.ref([]),$e=l.ref(),Ne=l.ref(),Da=ya(m.pinia),wl=l.ref(),$l=l.ref(0),Al=va(m.pinia),{selectIndex:xa,selectMenu:Ye,selectTitle:Pl}=m.storeToRefs(Al),{selectString:ll}=m.storeToRefs(Da),Ta=m.useLoginState(m.pinia),{loginUserInfo:ce}=m.storeToRefs(Ta),Ea=l.ref(720),Pe=l.ref(!1),_l=l.ref(!1),Ke=l.ref([]),al=l.ref(),dl=l.ref(!0),Xl=l.ref(!0),Ul=l.ref([]),Na=l.inject("contentRef");l.provide("contentRef",Na),l.watch(()=>{var e;return(e=Y.value)==null?void 0:e.length},e=>{re.total=e}),l.watch(()=>ul.value,async()=>{var i,d,c,f,k,t,T,M,y,B,A,S,K,x,L,D,g,h;if(((i=ul.value)==null?void 0:i.length)===0||!((d=s==null?void 0:s.itemData)!=null&&d.find(u=>(u==null?void 0:u.key)==="columnPath"))||!((c=s==null?void 0:s.itemData)!=null&&c.find(u=>(u==null?void 0:u.key)==="pageColumn")))return;let e=(y=(M=(T=(t=(k=(f=s==null?void 0:s.itemData)==null?void 0:f.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:k.contents)==null?void 0:t.split("["))==null?void 0:T[1])==null?void 0:M.split("]"))==null?void 0:y[0],a=((K=(S=(A=(B=s==null?void 0:s.itemData)==null?void 0:B.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:A.contents)==null?void 0:S.split("["))==null?void 0:K[0])+((L=(x=ul.value)==null?void 0:x.find(u=>(u==null?void 0:u.key)===e))==null?void 0:L.value),n=((g=(D=s==null?void 0:s.itemData)==null?void 0:D.find(u=>(u==null?void 0:u.key)==="pageGroup"))==null?void 0:g.contents)??"",r=await te.getItemData(a,sessionStorage.getItem("systemKey"),""),o=(h=r==null?void 0:r.find(u=>(u==null?void 0:u.name)===(n===""?s==null?void 0:s.compName:n)))==null?void 0:h.compData;da(o,s.allMapContents)},{deep:!0});const Ba=async(e,a)=>{var n,r,o,i,d;try{const c=await m.getInsofDataApi({id:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index)});let f;((n=c==null?void 0:c.data)==null?void 0:n.code)===200&&(f=((o=(r=c==null?void 0:c.data)==null?void 0:r.result)==null?void 0:o[0])||null);const k={type:"data",pageKey:s!=null&&s.parentTableId?(i=f==null?void 0:f.key)==null?void 0:i.pageKey:W.value,tableId:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index),systemKey:sessionStorage.getItem("systemKey")},t=a==null?void 0:a.map(y=>{const B=Object.keys(y),A={};return B.forEach((S,K)=>{A[e[K]]=y[S]}),A}),T=t==null?void 0:t.map(y=>({key:k,value:{tableData:y}})),M=await m.batchAddInsofDataApi({dataList:T});((d=M==null?void 0:M.data)==null?void 0:d.code)===200?(De.setRefreshCurStructure(!0),m.ElMessage.success("导入数据成功")):m.ElMessage.error("导入数据响应失败")}catch(c){throw m.ElMessage.error("导入数据处理失败"),new Error(c)}},wa=async e=>{var a,n;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await m.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),o=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let i=URL.createObjectURL(o);C.value=[{name:(n=e==null?void 0:e.split("/"))==null?void 0:n[((a=e==null?void 0:e.split("/"))==null?void 0:a.length)-1],blobUrl:i}],we.value=!0}};l.onBeforeUnmount(()=>{Xl.value=!1;let e=$l.value;$l.value=e+1});const Yl=l.computed(()=>{var r,o;const e=(re.currentPage-1)*re.pageSize,a=e+re.pageSize,n=(r=V.value)==null?void 0:r.find(i=>{var d;return(i==null?void 0:i.sortable)&&((d=i==null?void 0:i.label)==null?void 0:d.includes("时间"))});return n&&(Ce.order="descending",Ce.prop=n==null?void 0:n.prop),oe("getSliceContLength",re),(o=Y.value)==null?void 0:o.slice(e,a)}),Aa=e=>{re.currentPage=e,oe("getSliceContLength",re)},_a=e=>{var a;re.pageSize=e,e*re.currentPage>((a=Y.value)==null?void 0:a.length)&&(re.currentPage=1,re.pageSize=10,m.ElMessage.warning("分页无效,返回第一页")),oe("getSliceContLength",re)},Ua=(e,a)=>{var d,c;const n=(c=(d=V.value)==null?void 0:d.map(f=>f==null?void 0:f.prop))==null?void 0:c.filter(f=>f!=="operate");let r;const o=(e==null?void 0:e.length)===(n==null?void 0:n.length);if(e!=null&&e.includes("序号"))return m.ElMessage.error("导入的数据不需要包含序号列");if(r=o?e:e.slice(0,n==null?void 0:n.length),!(r==null?void 0:r.every(f=>n==null?void 0:n.find(k=>f===k))))return m.ElMessage.error("导入的数据表头不匹配");Ba(r,a)},Oa=(e,a)=>{var n;De.setRefreshCurStructure(!1),((n=V.value)==null?void 0:n.length)===0||Ua(e,a)},La=(e,a,n,r)=>{const o=[],i=[],d=k=>Object.keys(k).length;for(const k in e)if(e[k]!==void 0){const t=e[k],T=[];for(const[M,y]of Object.entries(t))T.push(y),i.length<d(t)&&i.push(M);o.push(T)}o.unshift(i);const c=Ve.utils.aoa_to_sheet(o),f=Ve.utils.book_new();Ve.utils.book_append_sheet(f,c,r),Ve.writeFileSync(f,`${a}.xlsx`),Ke.value=[]},Ol=async(e,a,n,r=!1,o)=>{var i,d,c,f,k,t,T,M;try{De.setRefreshCurStructure(!1);const y=await m.getInsofDataApi({id:s==null?void 0:s.index});if(((i=y==null?void 0:y.data)==null?void 0:i.code)===200){let B=(k=(f=(c=(d=y==null?void 0:y.data)==null?void 0:d.result)==null?void 0:c[0])==null?void 0:f.value)==null?void 0:k.pageData;r?B={...B,compData:(T=B==null?void 0:B.compData)==null?void 0:T.map(S=>{var K;return(S==null?void 0:S.key)==="header"?{...S,contents:(K=S==null?void 0:S.contents)==null?void 0:K.map(x=>({...x,[e]:n}))}:S})}:B={...B,compData:(t=B==null?void 0:B.compData)==null?void 0:t.map(S=>{var K,x;return(S==null?void 0:S.key)==="header"?{...S,contents:(K=S==null?void 0:S.contents)==null?void 0:K.map(L=>(L==null?void 0:L.prop)===(a==null?void 0:a.prop)?{...L,[e]:n}:L)}:(S==null?void 0:S.key)==="tableToForm"&&o?{...S,contents:(x=S==null?void 0:S.contents)==null?void 0:x.map(L=>(L==null?void 0:L.prop)===(a==null?void 0:a.prop)?{...L,[o]:n}:L)}:S})};const A=await m.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:B}});((M=A==null?void 0:A.data)==null?void 0:M.code)===200?(m.ElMessage.success("编辑成功"),De.setRefreshCurStructure(!0)):m.ElMessage.error("编辑响应失败")}}catch(y){m.ElMessage.error(y)}},Va=async(e,a)=>{await Ol("label",a,e)},ja=async(e,a)=>{await Ol("columnType",a,e,!1,"type")},Ma=()=>{il.value?Pe.value=!1:pa()},$a=e=>{Ke.value=e},Pa=(e,a)=>{al.value===a?dl.value=!1:dl.value=!0,al.value=a==null?void 0:a.changeProp},pl=l.computed(()=>{var n,r,o;const e=(n=V.value)==null?void 0:n.some(i=>i==null?void 0:i.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(o=(r=V.value)==null?void 0:r.filter(i=>(i==null?void 0:i.label)!=="操作"))==null?void 0:o.map(i=>({...i,filterable:!!(i!=null&&i.filterable),showSummary:!!(i!=null&&i.showSummary),operable:!!(i!=null&&i.operable)}))}),Ka=async(e,a,n)=>{const r=m.cloneDeep(V.value);await l.nextTick(),V.value=r==null?void 0:r.map(o=>(n==null?void 0:n.label)===(o==null?void 0:o.label)?{...o,[a]:e}:o),await Ol(a,n,e)},Kl=async(e,a)=>{await Ol(a,null,e,!0)},Fa=()=>{Qe.value=!1},za=e=>{oe("clickTrigger",e)},Zl=async e=>{var i,d,c,f,k,t,T,M,y,B,A,S,K,x,L;const a=e==null?void 0:e.row,n=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix;if((i=a==null?void 0:a.toString())!=null&&i.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(a.includes(",")){m.ElMessage.error("当前版本仅允许单个urdf预览!");return}cl.value=[a],Ue.value=!0,rl.value={data:m.cloneDeep(n)},qe.value=!0;return}let o=[];if((d=a==null?void 0:a.toString())!=null&&d.includes(".stl")||(c=a==null?void 0:a.toString())!=null&&c.includes(".STL")||(f=a==null?void 0:a.toString())!=null&&f.includes(".obj")||(k=a==null?void 0:a.toString())!=null&&k.includes(".mtl")){cl.value=(t=a==null?void 0:a.toString())==null?void 0:t.split(","),Ue.value=!1,qe.value=!0;return}if((T=a==null?void 0:a.toString())!=null&&T.includes(".stl")||(M=a==null?void 0:a.toString())!=null&&M.includes(".STL")||(y=a==null?void 0:a.toString())!=null&&y.includes(".obj")||(B=a==null?void 0:a.toString())!=null&&B.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let D,g=[],h={};if(Array.isArray(a)?D=a:D=a==null?void 0:a.split(","),D==null||D.forEach(u=>{u.includes(".mtl")?g.push(u):h.blob=h.blob?h.blob+","+u:u}),(g==null?void 0:g.length)>0&&(h.mtlBlobs=g),r&&(h.suffix=r),(S=(A=Object.values(h))==null?void 0:A[0])!=null&&S.includes("http:"))o.push(h);else{const u=new Blob([h.blob],{type:"application/octet-stream;charset=UTF-8"});let v=URL.createObjectURL(u),P="";(K=a==null?void 0:a.split("/"))==null||K.forEach((E,G)=>{var le;G===((le=a==null?void 0:a.split("/"))==null?void 0:le.length)-1&&(P=E)}),(x=h.blob)!=null&&x.includes(".stl")&&(P=(P==null?void 0:P.replaceAll(">",""))+".urdf"),C.value=[{name:P,blobUrl:v}],we.value=!0}}else{const D=await m.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),g=new Blob([D.data],{type:"application/octet-stream;charset=UTF-8"});let h=URL.createObjectURL(g),u="";(L=a==null?void 0:a.split("/"))==null||L.forEach((v,P)=>{var E;P===((E=a==null?void 0:a.split("/"))==null?void 0:E.length)-1&&(u=v)}),C.value=[{name:u,blobUrl:h}],we.value=!0}(o==null?void 0:o.length)>0&&$.setBlobUrls(o)},Ll=e=>{var r,o,i,d;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(d=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:d[((i=(o=e==null?void 0:e.url)==null?void 0:o.split("."))==null?void 0:i.length)-1];return(e==null?void 0:e.name)+"."+a},Ra=async e=>{let a=null,n=null,r=null;if(e!=null&&e.downloadUrl){const i=await Fl(),d=Re.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),c=await m.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:i,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{d.close()}),f=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(f),n=e==null?void 0:e.name;const k=n==null?void 0:n.lastIndexOf(".");r=n==null?void 0:n.slice(k)}else{const i=await Ve.downloadAvatarApi({url:e==null?void 0:e.url});!e.url.toUpperCase().includes(".OBJ")&&!e.url.toUpperCase().includes(".STL")&&!e.url.toUpperCase().includes(".MTL")&&!e.url.toUpperCase().includes(".URDF")?(a=URL.createObjectURL(i.data),n=Ll(e)):a=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 i={row:`${a}`,suffix:r};Zl(i);return}const o={name:n,blobUrl:a};C.value=[o],we.value=!0},qa=async e=>{let a=null,n=null;if(e!=null&&e.downloadUrl){const i=await Fl(),d=await m.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:i,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),c=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(c),n=e==null?void 0:e.name}else{const i=await Ve.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(i.data),n=Ll(e)}const r={name:n,blobUrl:a},o=document.createElement("a");o.href=r.blobUrl,o.download=r.name,o.style.display="none",document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o)},100)},Ja=(e,a)=>{var n;if(Object.values(a).length!==0)return Object.values(a).find(r=>{var o,i,d;return((o=r==null?void 0:r.toString())==null?void 0:o.includes(".txt"))||((i=r==null?void 0:r.toString())==null?void 0:i.includes(".cpt"))||((d=r==null?void 0:r.toString())==null?void 0:d.includes(".obj"))})?[...e,Ca.value]:(n=s==null?void 0:s.config)!=null&&n.allowMove?[...e,{label:"迁移"}]:e},Wa=(e,a={})=>[...e==null?void 0:e.values()].filter(n=>Object.keys(a).every(r=>{var d;const o=n[r],i=(d=a[r])==null?void 0:d.toLowerCase();return i&&o&&typeof o=="string"?o.toLowerCase().includes(i):!0})),Il=l.ref([]),Ga=async(e,a,n=!1)=>{var r;if(e){if(De.setTableLoading(!0),Il.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(o=>!o)))return Y.value=xl.value;if(n){Y.value=[...Tl.value.values()].filter(o=>Object.values(o).some(i=>typeof i=="string"?i==null?void 0:i.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}Y.value=Wa(Tl.value,e),De.setTableLoading(!1)}},Ha=async e=>{var d,c,f,k,t,T,M,y,B,A,S,K,x,L,D;const a=await m.getInsofDataApi({keyLikes:{pageKey:`loading${((d=ce.value)==null?void 0:d.account)||((c=ce.value)==null?void 0:c.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await m.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((f=ce.value)==null?void 0:f.account)||((k=ce.value)==null?void 0:k.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(T=(t=a==null?void 0:a.data)==null?void 0:t.result)==null?void 0:T.map(g=>g==null?void 0:g.id);const o=(y=(M=n==null?void 0:n.data)==null?void 0:M.result)==null?void 0:y.map(g=>g==null?void 0:g.id);r=[...m.cloneDeep(r),...o],(r==null?void 0:r.length)>0&&(r!=null&&r.every(g=>g!==null&&g))&&await m.batchDeleteInsofDataApi({ids:r});let i=await te.getItemData(W.value,sessionStorage.getItem("systemKey"),e.id);if(i=i==null?void 0:i.filter(g=>g.comp!=="methodButton"),i&&i.length>0){const g=!Array.isArray(Pl.value)&&((B=Pl.value)==null?void 0:B.key)!=="main"?[]:Pl.value;g.push({key:Ye.value===""?(A=e==null?void 0:e.id)==null?void 0:A.toString():Ye.value+"-"+((S=e==null?void 0:e.id)==null?void 0:S.toString()),value:e[(K=Object.keys(e))==null?void 0:K.filter(h=>h!=="index"&&h!=="id")[0]]}),Al.setSelectMenu(Ye.value===""?(x=e==null?void 0:e.id)==null?void 0:x.toString():Ye.value+"-"+((L=e==null?void 0:e.id)==null?void 0:L.toString())),Al.setSelectTitle(g),Al.setSelectIndex((D=e==null?void 0:e.id)==null?void 0:D.toString()),oe("pageChange",i)}},ea=async(e,a,n,r)=>{var i,d,c,f,k,t,T,M,y,B,A,S,K,x,L,D,g,h,u,v,P,E,G,le,X;if(oe("clickMainKey",n),(r==null?void 0:r.isExistChild)===!0){let q=(d=(i=V.value)==null?void 0:i.find(z=>(z==null?void 0:z.isMainKey)===!0))==null?void 0:d.prop,H=(c=r==null?void 0:r.rowContent)==null?void 0:c[q],w=(k=(f=r==null?void 0:r.columnType)==null?void 0:f.childPath)==null?void 0:k.split(ee),j=[];w==null||w.forEach((z,p)=>{(w==null?void 0:w.length)-1===p&&j.push(H),j.push(z)}),j=j.join(ee);let R=await te.getItemData(j,sessionStorage.getItem("systemKey"),""),ae=await te.getItemData((t=r==null?void 0:r.columnType)==null?void 0:t.childPath,sessionStorage.getItem("systemKey"),"");if(!R||(R==null?void 0:R.length)===0){let z=[];ae==null||ae.forEach(F=>{var me,he,N,b;let _={type:"structure",pageKey:j,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(me=ce.value)==null?void 0:me.id,parentPageKey:"",createUserLayer:((he=ce.value)==null?void 0:he.dept)||((N=ce.value)==null?void 0:N.部门名称)},ve={pageData:{comp:F==null?void 0:F.comp,compData:(b=F==null?void 0:F.compData)==null?void 0:b.filter(se=>(se==null?void 0:se.key)!=="tableContents"),name:F==null?void 0:F.name,isShow:F==null?void 0:F.isShow}};z.push({key:_,value:ve})}),(z==null?void 0:z.length)>0&&await m.batchAddInsofDataApi({dataList:z});let p=await te.getItemData(j,sessionStorage.getItem("systemKey"),"");Ul.value=p}else Ul.value=R;oe("routeUrl",Ul.value,{isEdit:!0,routerUrl:j});return}if((r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(q=>(q==null?void 0:q.url)&&(q==null?void 0:q.name)))){let q=m.cloneDeep(e);q=await((T=m.cloneDeep(q))==null?void 0:T.map(async w=>{var ae,z,p,F;const j=await Ve.downloadAvatarApi({url:w==null?void 0:w.url});let R=URL.createObjectURL(j.data);return{name:(w==null?void 0:w.name)+"."+((F=(ae=w==null?void 0:w.url)==null?void 0:ae.split("."))==null?void 0:F[((p=(z=w==null?void 0:w.url)==null?void 0:z.split("."))==null?void 0:p.length)-1]),blobUrl:R}}));let H=await Promise.all(q);C.value=H,we.value=!0}const o=m.cloneDeep(V.value);if((r==null?void 0:r.isMainKey)===!0&&(o==null?void 0:o.length)>0){(M=o==null?void 0:o[0])==null||M.prop;let q=m.cloneDeep(W).value+ee+(r==null?void 0:r.data),H=m.cloneDeep(W).value,w=(B=(y=Ze.value[q])==null?void 0:y.filter(z=>{var p,F;return((p=z==null?void 0:z.key)==null?void 0:p.type)==="structure"&&((F=z==null?void 0:z.key)==null?void 0:F.parentTable)===""}))==null?void 0:B.map(z=>{var p;return(p=z==null?void 0:z.value)==null?void 0:p.pageData}),j={};(A=V.value)==null||A.forEach(z=>{(z==null?void 0:z.label)!=="操作"&&(j[z.label]=n[z.prop]??n[z.label])});let R=(K=(S=s==null?void 0:s.itemData)==null?void 0:S.find(z=>(z==null?void 0:z.key)==="mainRouters"))==null?void 0:K.contents,ae;if((R==null?void 0:R.length)>0){let z=q==null?void 0:q.split(ee)[((x=q==null?void 0:q.split(ee))==null?void 0:x.length)-1],p=R==null?void 0:R.find(F=>(F==null?void 0:F.key)===z);ae=(p==null?void 0:p.routerContent)+ee+(p==null?void 0:p.key)}if((w==null?void 0:w.length)>0)await te.getItemData(q+ee+`updateLoading${((L=ce.value)==null?void 0:L.account)||((D=ce.value)==null?void 0:D.账号)}`,sessionStorage.getItem("systemKey"),"")||await te.loadingConstruct(q,q+ee+`updateLoading${((g=ce.value)==null?void 0:g.account)||((h=ce.value)==null?void 0:h.账号)}`,j,ae),De.setRouteToChildPath(H),fe.setActiveMenuPath(q+ee+`updateLoading${((u=ce.value)==null?void 0:u.account)||((v=ce.value)==null?void 0:v.账号)}`);else{(P=o==null?void 0:o[0])==null||P.prop;let z=m.cloneDeep(W).value+ee+(r==null?void 0:r.data),p=m.cloneDeep(W).value;await te.getItemData(p+ee,sessionStorage.getItem("systemKey"),""),await te.loadingConstruct(p+ee,z,j),await te.loadingConstruct(z,z+ee+`updateLoading${((E=ce.value)==null?void 0:E.account)||((G=ce.value)==null?void 0:G.账号)}`,j,ae),De.setRouteToChildPath(p),fe.setActiveMenuPath(z+ee+`updateLoading${((le=ce.value)==null?void 0:le.account)||((X=ce.value)==null?void 0:X.账号)}`)}}},Qa=()=>{we.value=!1},Xa=e=>{oe("rowClick",e)};l.watch(()=>s.changedContent,()=>{var n,r;if(!s.changedContent)return;let e=(n=Y.value)==null?void 0:n.map(o=>{var i;return o.id===((i=s.changedContent)==null?void 0:i.id)&&(o={...s.changedContent,id:s.changedContent.newId?s.changedContent.newId:s.changedContent.id},delete o.newId),o});const a=(r=s.itemData)==null?void 0:r.map(o=>((o==null?void 0:o.key)==="tableContents"&&(o.contents=e),o));Y.value=e,oe("contentChange",{contents:a,index:s.index}),oe("change",{content:e,index:s==null?void 0:s.index,buttonName:"",id:s==null?void 0:s.index})},{deep:!0,immediate:!0});const Ya=()=>{},Za=async()=>{const e=W.value,a=sessionStorage.getItem("systemKey"),n=await te.getItemData(e,a,""),r=n==null?void 0:n.find(c=>(c==null?void 0:c.name)==="方法明细"),o=(r==null?void 0:r.compData)||[],i=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="formContent");return i==null?void 0:i.contents},Fl=async()=>`Bearer ${m.Local.get("access-token")}`,Ia=async(e,{token:a,inputData:n}={})=>await m.axios.post(e,n,{headers:{Authorization:a}}).catch(o=>(fe.setImportLoading(!1),Promise.reject(o))),er=e=>{var r;let a={};const n=[];return a.form={},(r=m.cloneDeep(e))==null||r.forEach((o,i)=>{var d,c,f,k,t,T,M,y,B,A,S,K,x,L;if((o==null?void 0:o.comp)==="Table"){(c=(d=o==null?void 0:o.compData)==null?void 0:d.find(u=>(u==null?void 0:u.key)==="header"))==null||c.contents;let D=(t=(k=(f=o==null?void 0:o.compData)==null?void 0:f.find(u=>(u==null?void 0:u.key)==="tableContents"))==null?void 0:k.contents)==null?void 0:t.map(u=>u.slice(1));(A=(B=(y=(M=(T=o==null?void 0:o.compData)==null?void 0:T.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:M.contents)==null?void 0:y[0])==null?void 0:B[0])==null||A.label;let g=(K=(S=o==null?void 0:o.compData)==null?void 0:S.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:K.contents,h=[];D==null||D.forEach(u=>{let v=[];u==null||u.forEach((P,E)=>{var le;let G={};((le=g[E])==null?void 0:le.label)!=="操作"&&(G[g[E].label]=P,v.push(G))}),h.push(v)}),a[o.name]=h}else{const D=(L=(x=o.compData)==null?void 0:x.find(g=>(g==null?void 0:g.key)==="formContent"))==null?void 0:L.contents;D==null||D.forEach(g=>{var h,u;if(g.prop!==""){let v=g==null?void 0:g.value;Array.isArray(v)?v=((h=v==null?void 0:v[0])==null?void 0:h.oldUrl)||"http://222.92.178.198:62001/"+((u=v==null?void 0:v[0])==null?void 0:u.url):v=v.toString(),g={key:(g==null?void 0:g.prop)??(g==null?void 0:g.label),value:v},n.push(g)}})}}),a.form=te.getFormContents(n),a},lr=async(e,a,n)=>{var P,E,G,le,X,q,H,w,j,R,ae,z;fe.setImportLoading(!0);const r=await Za().catch(p=>(fe.setImportLoading(!1),Promise.reject(p))),o=r==null?void 0:r.find(p=>(p==null?void 0:p.key)==="算法体"),i=o==null?void 0:o.value;if(!i){console.log("未搜索到isMain, 缺少算法执行接口"),fe.setImportLoading(!1);return}const d=V.value||[],c=d.find(p=>(p==null?void 0:p.prop)==="输入"),f=c==null?void 0:c.prop;let k=a==null?void 0:a[f];const t=await Fl().catch(p=>(fe.setImportLoading(!1),Promise.reject(p)));let T=!1,M="";(P=V.value)==null||P.forEach(p=>{(p==null?void 0:p.prop)===f&&(T=!!(p!=null&&p.childPath),M=p==null?void 0:p.childPath)});let y="",B="";if(T){let p=(G=(E=V.value)==null?void 0:E.find(me=>(me==null?void 0:me.isMainKey)===!0))==null?void 0:G.prop;B=a==null?void 0:a[p];let F=M==null?void 0:M.split(ee),_=[];F==null||F.forEach((me,he)=>{(F==null?void 0:F.length)-1===he&&_.push(B),_.push(me)}),_=_.join(ee),y=_;let ve=await te.getItemData(_,sessionStorage.getItem("systemKey"),"");k=er(ve)}const A=await Ia(i,{token:t,inputData:k}).catch(p=>(fe.setImportLoading(!1),Promise.reject(p))),S=(le=A==null?void 0:A.data)==null?void 0:le.data,K=r==null?void 0:r.find(p=>(p==null?void 0:p.prop)==="算法名称");K==null||K.value;const x=d.find(p=>(p==null?void 0:p.prop)==="输出"),L=x==null?void 0:x.directiveLabel;y=y==null?void 0:y.replaceAll(c==null?void 0:c.directiveLabel,L);const D=(X=m.cloneDeep(y))==null?void 0:X.replaceAll(ee+B,"");let g=await te.getItemData(y,sessionStorage.getItem("systemKey"),""),h=await te.getItemData(D,sessionStorage.getItem("systemKey"),"");if(g){let p=[],F=[];g==null||g.forEach(_=>{var ve,me;if((_==null?void 0:_.comp)==="Table")(ve=_==null?void 0:_.compData)==null||ve.forEach(he=>{var N;(he==null?void 0:he.key)==="tableContents"&&((N=he==null?void 0:he.contents)==null||N.forEach(b=>{var se,ie;(se=b==null?void 0:b[0])!=null&&se.id&&p.push((ie=b==null?void 0:b[0])==null?void 0:ie.id)}))});else if((_==null?void 0:_.comp)==="Form"){_.compData=(me=_==null?void 0:_.compData)==null?void 0:me.map(N=>{var b;return(N==null?void 0:N.key)==="formContent"&&(N.contents=(b=N==null?void 0:N.contents)==null?void 0:b.map(se=>{var ie,ge;return(ie=S==null?void 0:S.form)!=null&&ie[se.prop]&&(se.value=(ge=S==null?void 0:S.form)==null?void 0:ge[se.prop]),se})),N});let he={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};F.push({id:_==null?void 0:_.id,value:he})}}),(F==null?void 0:F.length)>0&&await m.batchUpdateInsofDataApi({dataList:F}),p=[...new Set(p)],(p==null?void 0:p.length)>0&&await m.batchDeleteInsofDataApi({ids:p})}else{let p=[];if(S!=null&&S.table){let F={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:y,parentTable:"",createUserId:(q=ce.value)==null?void 0:q.id,createUserOrg:((H=ce.value)==null?void 0:H.dept)||((w=ce.value)==null?void 0:w.部门名称)};h==null||h.forEach(_=>{let me={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};p.push({key:F,value:me})})}if(S!=null&&S.form){let F={type:"structure",pageKey:y,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(j=ce.value)==null?void 0:j.id,parentPageKey:"",createUserLayer:((R=ce.value)==null?void 0:R.dept)||((ae=ce.value)==null?void 0:ae.部门名称)};h==null||h.forEach(_=>{var N;let ve=(N=_==null?void 0:_.compData)==null?void 0:N.map(b=>{var se;return(b==null?void 0:b.key)==="formContent"&&(b.contents=(se=b.contents)==null?void 0:se.map(ie=>{var ge,xe;return(ge=S==null?void 0:S.form)!=null&&ge[ie.prop]&&(ie.value=(xe=S==null?void 0:S.form)==null?void 0:xe[ie.prop]),ie})),b}),he={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:ve}};p.push({key:F,value:he})})}(p==null?void 0:p.length)>0&&await m.batchAddInsofDataApi({dataList:p})}let u=await te.getItemData(y,sessionStorage.getItem("systemKey"),""),v=[];S!=null&&S.table&&((z=S==null?void 0:S.table)==null||z.forEach(p=>{var ve,me,he,N;let F={type:"data",pageKey:y,tableId:(ve=u==null?void 0:u[0])==null?void 0:ve.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(me=ce.value)==null?void 0:me.id,createUserOrg:((he=ce.value)==null?void 0:he.dept)||((N=ce.value)==null?void 0:N.部门名称)},_={tableData:p};v.push({key:F,value:_})})),(v==null?void 0:v.length)>0&&await m.batchAddInsofDataApi({dataList:v}),hl(!0),fe.setImportLoading(!1)},la=(e,a)=>(e=e==null?void 0:e.map(n=>{var r,o;return n!=null&&n.children&&((r=n.children)!=null&&r.find(i=>i.id===(a==null?void 0:a.id))?n.children=(o=n.children)==null?void 0:o.filter(i=>(i==null?void 0:i.id)!==(a==null?void 0:a.id)):n.children=la(n.children,a)),n}),e),Se=l.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:s==null?void 0:s.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(e,a,n)=>{a===(s==null?void 0:s.index)?n(new Error("选择源不能和目标源一致")):n()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),ar=()=>{Se.show=!1},rr=e=>{var a,n;if((e==null?void 0:e.buttonName)==="取消")return Se.show=!1;Se.to=e==null?void 0:e.content,!(!(s!=null&&s.index)||!((a=Se.to)!=null&&a.groupName))&&(s==null?void 0:s.index)!==((n=Se.to)==null?void 0:n.groupName)&&(oe("change",{buttonName:"迁移",value:{from:Se.from,to:Se.to,data:Se.selectRow}}),Se.show=!1)},Vl=async(e,a,n)=>{var r,o,i,d,c,f,k,t,T,M,y,B,A,S,K;if(Ge.value="",Bl.value=!0,El.value=!0,oe("onButtonClick",e,a),e==="删除")te.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,L;(x=Y.value)!=null&&x.find(D=>(D==null?void 0:D.id)===(a==null?void 0:a.id))?Y.value=(L=m.cloneDeep(Y.value))==null?void 0:L.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)):Y.value=la(m.cloneDeep(Y.value),a),Jr(wl.value,Ye.value,a==null?void 0:a.id),De.setTableLoading(s==null?void 0:s.index),oe("change",{content:Y.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:V.value})});else if(e==="批量删除"){if(((r=Ke.value)==null?void 0:r.length)===0)return m.ElMessage.warning("请先勾选操作的数据");te.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var L,D;const x=(L=Ke.value)==null?void 0:L.map(g=>g.id);Y.value=(D=m.cloneDeep(Y.value))==null?void 0:D.filter(g=>!(x!=null&&x.includes(g.id))),De.setTableLoading(s==null?void 0:s.index),oe("change",{content:Y.value,singleContent:null,selectItems:Ke.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:V.value})})}else if(e==="复制新增"){Me.value="新增";const x=m.cloneDeep(a),L=(o=V.value)==null?void 0:o.find(h=>h==null?void 0:h.isMainKey),D=L||((i=V.value)==null?void 0:i[0]),g=(d=el.value)==null?void 0:d.find(h=>(h==null?void 0:h.label)==="新建");await ra(!0,g,{data:x,firstCol:D})}else if(e==="新增")Me.value="新增",gl(""),Qe.value=!0;else if(e==="编辑")Me.value="编辑",gl(a),Qe.value=!0;else if(e==="查看")Me.value="查看",gl(a),Bl.value=!1,El.value=!1,Qe.value=!0;else if(e==="查看三维模型"){const x={};for(let D in a)D!=="id"&&(x[D]=a[D]);let L=(c=Object.values(x))==null?void 0:c[1];We.setTableShowThree(L)}else if(((f=n==null?void 0:n.extra)==null?void 0:f.type)==="modelExample")Me.value=e,Nl.value=!0;else if(e==="新建"){let x=Ze.value,L=[];for(let v in x)v!=null&&v.includes(`loading${((k=ce.value)==null?void 0:k.account)||((t=ce.value)==null?void 0:t.账号)}`)&&(L=[...L,...v]);let D=[];for(let v in x)v!=null&&v.includes(`updateLoading${((T=ce.value)==null?void 0:T.account)||((M=ce.value)==null?void 0:M.账号)}`)&&(D=[...D,...v]);let g=L==null?void 0:L.map(v=>v==null?void 0:v.id);const h=D==null?void 0:D.map(v=>v==null?void 0:v.id);g=[...m.cloneDeep(g),...h],(g==null?void 0:g.length)>0&&(g!=null&&g.every(v=>v!==null&&v))&&await m.batchDeleteInsofDataApi({ids:g});const u=(y=el.value)==null?void 0:y.find(v=>(v==null?void 0:v.label)==="新建");await ra(!1,u)}else if(e==="修改模板"){let x=m.cloneDeep(W).value;De.setRouteToChildPath(x),fe.setActiveMenuPath(x+ee)}else if(e==="执行")lr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((B=Ke.value)==null?void 0:B.length)===0)return m.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((A=Y.value)==null?void 0:A.length)===0)return m.ElMessage.warning("暂无数据导出");const x=(K=(S=V.value)==null?void 0:S.map(D=>D==null?void 0:D.label))==null?void 0:K.filter(D=>D!=="操作"),L=e==="导出全部"?m.cloneDeep(Y.value):m.cloneDeep(Ke.value);L==null||L.forEach(D=>{D==null||delete D.id}),La(L,s==null?void 0:s.compName,x,s==null?void 0:s.compName)}else e==="迁移"&&(Se.selectRow=a,Se.show=!0)},nr=async e=>{var n,r,o,i,d,c;const a=await m.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((n=a==null?void 0:a.data)==null?void 0:n.code)===200)return Array.isArray((r=a==null?void 0:a.data)==null?void 0:r.result)&&((i=(o=a==null?void 0:a.data)==null?void 0:o.result)==null?void 0:i.length)>0?(c=(d=a==null?void 0:a.data)==null?void 0:d.result)==null?void 0:c.map(f=>{var k;return{id:f==null?void 0:f.id,...(k=f==null?void 0:f.value)==null?void 0:k.pageData}}):[]},or=async(e,a)=>{var n,r,o,i,d,c,f,k,t,T,M,y,B,A,S,K,x,L,D,g;try{let h,u;const v=(n=Ze.value[W.value+ee])==null?void 0:n.filter(w=>{var j;return((j=w==null?void 0:w.key)==null?void 0:j.type)==="structureMethod"}),P=(r=Ze.value[W.value+ee])==null?void 0:r.filter(w=>{var j;return((j=w==null?void 0:w.key)==null?void 0:j.type)==="structure"}),E=v==null?void 0:v.find(w=>{var j,R;return((R=(j=w==null?void 0:w.value)==null?void 0:j.pageData)==null?void 0:R.method)==="保存"});if(!E)return;const G=(c=(d=Ze.value[(i=(o=E==null?void 0:E.value)==null?void 0:o.pageData)==null?void 0:i.path])==null?void 0:d.filter(w=>{var j;return((j=w==null?void 0:w.key)==null?void 0:j.type)==="data"}))==null?void 0:c.find(w=>{var j,R,ae,z;return((R=(j=w==null?void 0:w.value)==null?void 0:j.tableData)==null?void 0:R.算法名称)===((z=(ae=E==null?void 0:E.value)==null?void 0:ae.pageData)==null?void 0:z.method)});if(!G)return;const le={buttonName:(k=(f=E==null?void 0:E.value)==null?void 0:f.pageData)==null?void 0:k.method,api:(T=(t=G==null?void 0:G.value)==null?void 0:t.tableData)==null?void 0:T.算法体,content:P==null?void 0:P.map(w=>{var j;return(j=w==null?void 0:w.value)==null?void 0:j.pageData}),extraContent:[],extraValues:(y=(M=E==null?void 0:E.value)==null?void 0:M.pageData)==null?void 0:y.data,methodName:(A=(B=E==null?void 0:E.value)==null?void 0:B.pageData)==null?void 0:A.path};if(!e)return;const X={...e,compData:(S=e==null?void 0:e.compData)==null?void 0:S.map(w=>{var j;return(w==null?void 0:w.key)==="formContent"?{...w,contents:(j=w==null?void 0:w.contents)==null?void 0:j.map(R=>(R==null?void 0:R.prop)===a?{...R,value:""}:R)}:w})},q={key:{pageKey:W.value+ee,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:X}},H=await m.axios.post(le.api,q,{headers:{"Content-Type":"application/json"}});return((K=H==null?void 0:H.data)==null?void 0:K.code)===200&&(h=(L=(x=H==null?void 0:H.data)==null?void 0:x.result)==null?void 0:L.latestReportCode,u=(g=(D=H==null?void 0:H.data)==null?void 0:D.result)==null?void 0:g.status),{newMainKeyValue:h,newStatus:u}}catch(h){throw m.ElMessage.error(h),new Error(h)}},aa=(e,a,n,r)=>{var o;oe("contentChange",{contents:(o=e==null?void 0:e.compData)==null?void 0:o.map(i=>{var d;return(i==null?void 0:i.key)==="formContent"?{...i,contents:(d=i==null?void 0:i.contents)==null?void 0:d.map(c=>(c==null?void 0:c.key)===a?{...c,value:n}:fl.value&&(c==null?void 0:c.prop)===fl.prop?{...c,value:fl.value}:c)}:i}),index:e==null?void 0:e.id},r)},fl=l.reactive({prop:"状态",value:""}),tr=l.ref(["系统自动生成信息","审批意见"]),sr=async(e,a,n)=>{var f,k;let r=e==null?void 0:e[a==null?void 0:a.prop],o=1,i,d;const c=m.cloneDeep(W).value+ee+r;if(c){fl.value="",i=(f=Ze.value[c])==null?void 0:f.filter(M=>{var y;return((y=M==null?void 0:M.key)==null?void 0:y.type)==="structure"});const t=i==null?void 0:i.find(M=>{var y,B,A;return((A=(B=(y=M==null?void 0:M.value)==null?void 0:y.pageData)==null?void 0:B.comp)==null?void 0:A.toUpperCase())==="FORM"});d={...(k=t==null?void 0:t.value)==null?void 0:k.pageData,id:t==null?void 0:t.id};const T=await or(d,a==null?void 0:a.prop);if(fl.value=T==null?void 0:T.newStatus,T!=null&&T.newMainKeyValue)return T==null?void 0:T.newMainKeyValue}if(Y.value.some(t=>(t==null?void 0:t[a==null?void 0:a.prop])===r)){const t=r;for(;Y.value.some(T=>(T==null?void 0:T[a==null?void 0:a.prop])===`${t}(${o})`);)o++;r=`${t}(${o})`}return r},ra=async(e,a,n)=>{var d,c,f,k,t,T,M,y;let r,o;const i=await sr(n==null?void 0:n.data,n==null?void 0:n.firstCol);if(e?(r=m.cloneDeep(W).value+ee+((k=n==null?void 0:n.data)==null?void 0:k[(f=n==null?void 0:n.firstCol)==null?void 0:f.prop]),o=m.cloneDeep(W).value+ee+i):(r=m.cloneDeep(W).value+ee,o=m.cloneDeep(r)+`loading${((d=ce.value)==null?void 0:d.account)||((c=ce.value)==null?void 0:c.账号)}`),a){const B=(T=(t=Ze.value[o])==null?void 0:t.filter(A=>{var S;return((S=A==null?void 0:A.key)==null?void 0:S.parentTable)===""}))==null?void 0:T.map(A=>{var S;return{id:A==null?void 0:A.id,...(S=A==null?void 0:A.value)==null?void 0:S.pageData}});if((B==null?void 0:B.length)>0)if(e){const A=B==null?void 0:B.find(S=>{var K;return((K=S==null?void 0:S.comp)==null?void 0:K.toUpperCase())==="FORM"});A&&aa(A,(M=n==null?void 0:n.firstCol)==null?void 0:M.label,i,W.value)}else De.setRouteToChildPath(m.cloneDeep(W).value),fe.setActiveMenuPath(o);else if(await te.loadingConstruct(r,o,null,null,e?tr.value:null),e){const A=await nr(o);if((A==null?void 0:A.length)>0){const S=A==null?void 0:A.find(K=>{var x;return((x=K==null?void 0:K.comp)==null?void 0:x.toUpperCase())==="FORM"});S&&aa(S,(y=n==null?void 0:n.firstCol)==null?void 0:y.label,i,W.value)}}else De.setRouteToChildPath(m.cloneDeep(W).value),fe.setActiveMenuPath(o)}else e?(Ge.value="",Ne.value=n==null?void 0:n.data,hl(!0,n==null?void 0:n.firstCol,i)):(De.setRouteToChildPath(m.cloneDeep(W).value),fe.setActiveMenuPath(o))},ir=()=>{qe.value=!1,cl.value=[],Ue.value=!1},gl=e=>{var o,i,d,c,f,k;const a=[];let n=[];for(let t in e)Array.isArray(e==null?void 0:e[t])&&n.push(t);Te.value=m.cloneDeep(V.value),(i=te.getColumnChild((o=m.cloneDeep(V.value))==null?void 0:o.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||i.forEach((t,T)=>{var M;n.find(y=>y===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((M=t==null?void 0:t.formType)==null?void 0:M.toUpperCase())==="SELECT"?a.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",name:(t==null?void 0:t.prop)??"t"+T,prop:t==null?void 0:t.prop,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??T,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled,optionUrl:{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.formMenuSelect,type:"Select",selectRelateType:t==null?void 0:t.selectRelateType}}):a.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",prop:t==null?void 0:t.prop,name:(t==null?void 0:t.prop)??"t"+T,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??T,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled}))}),e===""||!e||(Ge.value=(e==null?void 0:e.id)??"");let r=te.getColumnChild((d=m.cloneDeep(V.value))==null?void 0:d.filter(t=>(t==null?void 0:t.label)!=="操作"));Oe.value&&((c=Oe.value)==null?void 0:c.length)>0&&(Oe.value=(f=m.cloneDeep(Oe).value)==null?void 0:f.map(t=>{var M;let T=(t==null?void 0:t.prop)||((M=r==null?void 0:r.find(y=>(y==null?void 0:y.label)===(t==null?void 0:t.label)))==null?void 0:M.prop);return T&&(t.value=e[T]),t})),Xe.value=Oe.value&&((k=Oe.value)==null?void 0:k.length)>0?te.getTableFormToForm(Oe.value):a},ur=()=>{var a;const e=(a=U.value)==null?void 0:a.$el;e&&Jl.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:n=>{var d;const{oldIndex:r,newIndex:o}=n;if(r===o)return;const i=pl.value.splice(r,1)[0];pl.value.splice(o,0,i),V.value=(d=V.value)==null?void 0:d.slice().sort((c,f)=>{if(c.label==="操作")return 1;if(f.label==="操作")return-1;const k=pl.value.findIndex(T=>T.label===c.label),t=pl.value.findIndex(T=>T.label===f.label);return k-t})}})};l.onMounted(()=>{Ml.value=window.innerWidth-240*2});const cr=()=>{l.nextTick(()=>{ur()})},zl=(e,a)=>{var r;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let n;return e.children=(r=e.children)==null?void 0:r.map(o=>{var i,d;if((o==null?void 0:o.id)===Ge.value){let c={};for(let f in o){let k=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:i.label;k?c[f]=(d=Ne.value)==null?void 0:d[k]:c[f]=o[f]}o=Object.assign(c,Ne.value),n=o}else{let c=zl(o,a);o=c==null?void 0:c.contents,n=c==null?void 0:c.currentSelectContents}return o}),{contents:e,currentSelectContents:n}},na=(e,a)=>{let n,r;return e!=null&&e.find(o=>(o==null?void 0:o.id)===Ge.value)?n=e==null?void 0:e.map(o=>{var i,d;if((o==null?void 0:o.id)===Ge.value){let c={};for(let f in o){let k=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:i.label;k?c[f]=(d=Ne.value)==null?void 0:d[k]:c[f]=o[f]}o=Object.assign(c,Ne.value),r=o}return o}):n=e==null?void 0:e.map(o=>{var i,d,c,f;if((o==null?void 0:o.id)===Ge.value){let k={};for(let t in o){let T=(i=a==null?void 0:a.find(M=>(M==null?void 0:M.prop)===t))==null?void 0:i.label;T?k[t]=(d=Ne.value)==null?void 0:d[T]:k[t]=o[t]}o=Object.assign(k,Ne.value),r=o}else o=(c=zl(o,a))==null?void 0:c.contents,r=(f=zl(o,a))==null?void 0:f.currentSelectContents;return o}),{newContents:n,currentSelectContents:r}},oa=(e,a,n)=>{var r,o;return e[a==null?void 0:a.prop]=n,typeof e.id=="number"&&(e.id=(r=e.id)==null?void 0:r.toString()),e.children&&((o=e.children)==null?void 0:o.length)>0&&(e.children=e.children.map(oa)),e},Rl=e=>{var n;const a=[];return a.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((n=e.children)==null||n.forEach(r=>{a.push(...Rl(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const o={...r};return delete o.children,o}):[]},hl=(e=!0,a,n)=>{var k,t,T,M,y,B,A,S,K;let r=te.getColumnChild((k=m.cloneDeep(V.value))==null?void 0:k.filter(x=>(x==null?void 0:x.label)!=="操作")),o,i=m.cloneDeep(Y.value);if(!Ne.value){Qe.value=!1;return}if(Ge.value===""){nl.value++;let x;a&&n?x={id:nl.value.toString(),[a==null?void 0:a.prop]:n,children:Ne.value.children}:x={id:nl.value.toString()},x!=null&&x.children&&(x={...x,children:(t=x.children)==null?void 0:t.map(L=>oa(L,a,n))}),i.push(Object.assign(Ne.value,x)),o=Object.assign(Ne.value,x)}else i=(T=na(i,r))==null?void 0:T.newContents,o=(M=na(i,r))==null?void 0:M.currentSelectContents;const d=(y=s.itemData)==null?void 0:y.filter(x=>(x==null?void 0:x.key)==="childTree")[0];if(((B=d==null?void 0:d.contents)==null?void 0:B.length)>0){Me.value="编辑";const x=[];i==null||i.forEach((L,D)=>{var h;let g={};if(Array.isArray(L)){let u=[];L==null||L.filter(v=>!(v!=null&&v.id)).forEach((v,P)=>{var E,G,le,X,q,H,w;if((G=(E=$e.value)==null?void 0:E[P])!=null&&G.prop&&!Array.isArray(v)){let j={};j[$e.value[P].column]=v,ye!=null&&ye.value&&((le=ye==null?void 0:ye.value)==null?void 0:le.length)>0&&((X=ye==null?void 0:ye.value)!=null&&X.find(R=>JSON.stringify(R==null?void 0:R[0])===JSON.stringify(j)))&&(u=(q=ye==null?void 0:ye.value)==null?void 0:q.find(R=>JSON.stringify(R==null?void 0:R[0])===JSON.stringify(j))),u&&u.length>0?g[$e.value[P].prop]=u!=null&&u.find(R=>{var ae;return((ae=Object.keys(R))==null?void 0:ae[0])===$e.value[P].column})?(H=u==null?void 0:u.find(R=>{var ae;return((ae=Object.keys(R))==null?void 0:ae[0])===$e.value[P].column}))==null?void 0:H[$e.value[P].column]:v:g[$e.value[P].prop]=v}else Array.isArray(v)&&((w=$e.value[P])!=null&&w.prop?g[$e.value[P].prop]=v:g.children=Gl(v,$e.value))})}else g=L;Array.isArray(L)&&L.some(u=>u==null?void 0:u.id)?x.push(Object.assign(g,{id:(h=L==null?void 0:L.find(u=>u.id))==null?void 0:h.id})):g.id?x.push(g):x.push(Object.assign(g,{id:D.toString()}))}),Y.value=ca(x,d,V.value)}else Y.value=i;ia(Y.value),wl.value=Y.value;const c=Gr(wl.value,Ye.value,i);let f=[];if(il.value?(f=(A=m.cloneDeep(il).value.singleContent)==null?void 0:A.filter(x=>(x==null?void 0:x.id)!==(o==null?void 0:o.id)),f.push(o)):f=[o],Pe.value){const x={content:c,singleContent:((S=d==null?void 0:d.contents)==null?void 0:S.length)>0?f==null?void 0:f.flatMap(Rl):f,index:s==null?void 0:s.index,buttonName:"编辑",column:V.value,parentTableId:s==null?void 0:s.parentTableId};De.setCacheUpdatingData(x)}if(e){const x={content:c,singleContent:((K=d==null?void 0:d.contents)==null?void 0:K.length)>0?Rl(o):o,index:s==null?void 0:s.index,buttonName:Me.value,column:V.value,parentTableId:s==null?void 0:s.parentTableId};De.setTableLoading(s==null?void 0:s.index),Qe.value=!1,Ne.value=void 0,oe("change",x)}};l.onUnmounted(()=>{V.value=[],Y.value=[],Te.value=[],Je.value=[],Oe.value=[],Ie.value=[],cl.value=[],ol.value=[],Xe.value=[],Ke.value=[],U.value=null});const ta=async(e,a,n)=>{var k,t,T,M,y,B,A,S,K,x,L;al.value=n==null?void 0:n.prop;const r=m.cloneDeep(s.itemData),o=r==null?void 0:r.map(D=>{var g;return(D==null?void 0:D.key)==="header"&&((g=D.contents)==null||g.map((h,u)=>{var v,P,E,G,le,X,q,H,w,j,R,ae,z,p,F,_,ve,me,he;return h.type=h!=null&&h.type?h.type:(G=(E=(P=(v=h==null?void 0:h.key)==null?void 0:v.split("$"))==null?void 0:P[1])==null?void 0:E.split("("))!=null&&G[0]?(X=(le=te.FormType)==null?void 0:le.find(N=>{var b,se,ie,ge;return(N==null?void 0:N.key)===((ge=(ie=(se=(b=h==null?void 0:h.key)==null?void 0:b.split("$"))==null?void 0:se[1])==null?void 0:ie.split("("))==null?void 0:ge[0])}))==null?void 0:X.value:"Input",h.options=h!=null&&h.options?h.options:((w=(H=(q=h==null?void 0:h.key)==null?void 0:q.split("$"))==null?void 0:H[1])==null?void 0:w.length)>0?(z=(ae=Wl((R=(j=h==null?void 0:h.key)==null?void 0:j.split("$"))==null?void 0:R[1]))==null?void 0:ae.split(","))==null?void 0:z.map(N=>({label:N,value:N})):[],(p=h==null?void 0:h.key)!=null&&p.includes("$")&&(h.key=(_=(F=h==null?void 0:h.key)==null?void 0:F.split("$"))==null?void 0:_[0]),h.value=(ve=Object.values(a))==null?void 0:ve[u],h.optionUrl=h!=null&&h.formMenuSelect&&((me=h==null?void 0:h.formMenuSelect)==null?void 0:me.length)>0?{groupSelect:(he=h==null?void 0:h.groupSelect)==null?void 0:he.split(/[::]/).map(N=>N.trim()),menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":"")}:null,h})),D});let i=m.cloneDeep(Xe.value),d=(t=(k=m.cloneDeep(o))==null?void 0:k.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:t.contents;i=i==null?void 0:i.map(D=>{var g;return D.value=(g=d==null?void 0:d.find((h,u)=>u===(D==null?void 0:D.id)))==null?void 0:g.value,D});let c="",f=(y=(M=(T=m.cloneDeep(o))==null?void 0:T.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:M.contents)==null?void 0:y.find((D,g)=>{var h,u,v;return(D==null?void 0:D.label)===al.value||(g==null?void 0:g.toString())===((v=(u=(h=al.value)==null?void 0:h.split("a"))==null?void 0:u[1])==null?void 0:v.toString())});if((S=(A=(B=m.cloneDeep(o))==null?void 0:B.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:A.contents)==null||S.forEach(D=>{var g,h,u,v,P;c===""&&((u=(h=(g=D==null?void 0:D.optionUrl)==null?void 0:g.groupSelect)==null?void 0:h[1])!=null&&u.includes("["))&&(c=(P=(v=D==null?void 0:D.optionUrl)==null?void 0:v.groupSelect)==null?void 0:P[1])}),(K=f==null?void 0:f.optionUrl)!=null&&K.menuSelect){let D=await Hl(f),g;if(D==null||D.forEach(h=>{var u,v,P,E,G,le,X,q,H,w;c===((v=(u=f==null?void 0:f.optionUrl)==null?void 0:u.groupSelect)==null?void 0:v[1])&&((G=(E=(P=f==null?void 0:f.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1])!=null&&G.includes("["))&&((w=m.cloneDeep(h))==null?void 0:w[(H=(q=(X=(le=f==null?void 0:f.optionUrl)==null?void 0:le.groupSelect)==null?void 0:X[1])==null?void 0:q.replaceAll("[",""))==null?void 0:H.replaceAll("]","")])===(f==null?void 0:f.value)&&(g=h)}),g){let h=m.cloneDeep(i);h=h==null?void 0:h.map(v=>{var P,E,G,le,X,q,H,w,j,R,ae;return(g!=null&&g[v==null?void 0:v.label]||g!=null&&g[(le=(G=(E=(P=v==null?void 0:v.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1])==null?void 0:G.replaceAll("[",""))==null?void 0:le.replaceAll("]","")])&&((H=(q=(X=v==null?void 0:v.optionUrl)==null?void 0:X.groupSelect)==null?void 0:q[1])!=null&&H.includes("["))&&(v.value=(g==null?void 0:g[v==null?void 0:v.label])||(g==null?void 0:g[(ae=(R=(j=(w=v==null?void 0:v.optionUrl)==null?void 0:w.groupSelect)==null?void 0:j[1])==null?void 0:R.replaceAll("[",""))==null?void 0:ae.replaceAll("]","")])),v}),Y.value=(x=m.cloneDeep(Y.value))==null?void 0:x.map(v=>{if((v==null?void 0:v.id)===(a==null?void 0:a.id)){const P={};return h==null||h.forEach(E=>{P[E.name]=E.value}),P.id=v==null?void 0:v.id,P}return v});let u=m.cloneDeep(h);u=u==null?void 0:u.map(v=>{var P,E,G,le;return(E=(P=v==null?void 0:v.optionUrl)==null?void 0:P.menuSelect)!=null&&E.some(X=>X==null?void 0:X.includes)&&(v.optionUrl.menuSelect=(le=(G=v==null?void 0:v.optionUrl)==null?void 0:G.menuSelect)==null?void 0:le.map(X=>{var q,H,w,j;if(X!=null&&X.includes("[")){let R=(H=(q=X==null?void 0:X.replaceAll("[","").replaceAll("]",""))==null?void 0:q.split(":"))==null?void 0:H[1];X=(j=(w=m.cloneDeep(h))==null?void 0:w.find(ae=>(ae==null?void 0:ae.label)===R))==null?void 0:j.value}return X})),v}),Y.value=(L=m.cloneDeep(Y.value))==null?void 0:L.map(v=>{if((v==null?void 0:v.id)===(a==null?void 0:a.id)){const P={};return u==null||u.forEach(E=>{P[E.name]=E.value}),P.id=v==null?void 0:v.id,P}return v})}}},dr=async e=>{var k,t,T,M,y,B,A,S,K,x,L,D;if(!e)return;Ne.value=e;const a=m.cloneDeep(s.itemData);let n=a==null?void 0:a.map(g=>{var h;return(g==null?void 0:g.key)==="header"&&((h=g.contents)==null||h.map((u,v)=>{var P,E,G,le,X,q,H,w,j,R,ae,z,p,F,_,ve,me,he,N;return u.type=u!=null&&u.type?u.type:(le=(G=(E=(P=u==null?void 0:u.key)==null?void 0:P.split("$"))==null?void 0:E[1])==null?void 0:G.split("("))!=null&&le[0]?(q=(X=te.FormType)==null?void 0:X.find(b=>{var se,ie,ge,xe;return(b==null?void 0:b.key)===((xe=(ge=(ie=(se=u==null?void 0:u.key)==null?void 0:se.split("$"))==null?void 0:ie[1])==null?void 0:ge.split("("))==null?void 0:xe[0])}))==null?void 0:q.value:"Input",u.options=u!=null&&u.options?u.options:((j=(w=(H=u==null?void 0:u.key)==null?void 0:H.split("$"))==null?void 0:w[1])==null?void 0:j.length)>0?(p=(z=Wl((ae=(R=u==null?void 0:u.key)==null?void 0:R.split("$"))==null?void 0:ae[1]))==null?void 0:z.split(","))==null?void 0:p.map(b=>({label:b,value:b})):[],(F=u==null?void 0:u.key)!=null&&F.includes("$")&&(u.key=(ve=(_=u==null?void 0:u.key)==null?void 0:_.split("$"))==null?void 0:ve[0]),u.value=(me=Object.values(e))==null?void 0:me[v],u.optionUrl=u!=null&&u.formMenuSelect&&((he=u==null?void 0:u.formMenuSelect)==null?void 0:he.length)>0?{groupSelect:(N=u==null?void 0:u.groupSelect)==null?void 0:N.split(/[::]/).map(b=>b.trim()),menuSelect:u==null?void 0:u.formMenuSelect,selectRelateType:"",type:(u==null?void 0:u.formType)??(u!=null&&u.groupSelect?"Select":"")}:null,u})),g}),r=Xe.value,o=(t=(k=m.cloneDeep(n))==null?void 0:k.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:t.contents;if(r=r==null?void 0:r.map(g=>{var h;return g.value=(h=o==null?void 0:o.find((u,v)=>(u==null?void 0:u.prop)===(g==null?void 0:g.name)))==null?void 0:h.value,g}),!dl.value)return;let i="",d=(y=(M=(T=m.cloneDeep(n))==null?void 0:T.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:M.contents)==null?void 0:y.find((g,h)=>{var u,v,P;return(g==null?void 0:g.label)===al.value||(h==null?void 0:h.toString())===((P=(v=(u=al.value)==null?void 0:u.split("a"))==null?void 0:v[1])==null?void 0:P.toString())}),c=(B=d==null?void 0:d.optionUrl)==null?void 0:B.menuSelect,f=!0;if((K=(S=(A=m.cloneDeep(n))==null?void 0:A.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:S.contents)==null||K.forEach(g=>{var h,u,v,P,E,G;f&&((v=(u=(h=g==null?void 0:g.optionUrl)==null?void 0:h.groupSelect)==null?void 0:u[1])!=null&&v.includes("["))&&(i=(E=(P=g==null?void 0:g.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1],JSON.stringify(c)===JSON.stringify((G=g==null?void 0:g.optionUrl)==null?void 0:G.menuSelect)&&(f=!1))}),(x=d==null?void 0:d.optionUrl)!=null&&x.menuSelect&&dl.value){let g=await Hl(d),h;if((L=d==null?void 0:d.optionUrl)==null||L.menuSelect,g==null||g.forEach(u=>{var v,P,E,G,le,X,q,H,w,j;i===((P=(v=d==null?void 0:d.optionUrl)==null?void 0:v.groupSelect)==null?void 0:P[1])&&((le=(G=(E=d==null?void 0:d.optionUrl)==null?void 0:E.groupSelect)==null?void 0:G[1])!=null&&le.includes("["))&&((j=m.cloneDeep(u))==null?void 0:j[(w=(H=(q=(X=d==null?void 0:d.optionUrl)==null?void 0:X.groupSelect)==null?void 0:q[1])==null?void 0:H.replaceAll("[",""))==null?void 0:w.replaceAll("]","")])===(d==null?void 0:d.value)&&(h=u)}),h){let u=m.cloneDeep(r);u=u==null?void 0:u.map(E=>{var G,le,X,q,H,w,j,R,ae,z,p;return(h!=null&&h[E==null?void 0:E.label]||h!=null&&h[(q=(X=(le=(G=E==null?void 0:E.optionUrl)==null?void 0:G.groupSelect)==null?void 0:le[1])==null?void 0:X.replaceAll("[",""))==null?void 0:q.replaceAll("]","")])&&((j=(w=(H=E==null?void 0:E.optionUrl)==null?void 0:H.groupSelect)==null?void 0:w[1])!=null&&j.includes("["))&&(E.value=(h==null?void 0:h[E==null?void 0:E.label])||(h==null?void 0:h[(p=(z=(ae=(R=E==null?void 0:E.optionUrl)==null?void 0:R.groupSelect)==null?void 0:ae[1])==null?void 0:z.replaceAll("[",""))==null?void 0:p.replaceAll("]","")])),E}),Xe.value=m.cloneDeep(u);let v=m.cloneDeep(u);v=v==null?void 0:v.map(E=>{var G,le,X,q,H,w;return(le=(G=E==null?void 0:E.optionUrl)==null?void 0:G.menuSelect)!=null&&le.some(j=>j==null?void 0:j.includes("["))&&(E.optionUrl.oldMenuSelect=(q=(X=m.cloneDeep(E))==null?void 0:X.optionUrl)==null?void 0:q.menuSelect,E.optionUrl.menuSelect=(w=(H=E==null?void 0:E.optionUrl)==null?void 0:H.menuSelect)==null?void 0:w.map(j=>{var R,ae,z,p;if(j!=null&&j.includes("[")){let F=(ae=(R=j==null?void 0:j.replaceAll("[","").replaceAll("]",""))==null?void 0:R.split(":"))==null?void 0:ae[1];j=(p=(z=m.cloneDeep(u))==null?void 0:z.find(_=>(_==null?void 0:_.label)===F))==null?void 0:p.value}return j})),E}),Xe.value=v;let P={};(D=Xe.value)==null||D.forEach(E=>{P[E.prop]=E==null?void 0:E.value}),Ne.value=P}}dl.value=!1},pr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",fr=e=>{var i,d;const a=(d=(i=Oe.value)==null?void 0:i.find(c=>(c==null?void 0:c.label)===(e==null?void 0:e.label)))==null?void 0:d.multiple,n=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;Y.value.forEach(c=>{const f=c==null?void 0:c[n];a&&ga.isString(f)&&(c[n]=[f]),!a&&!ga.isString(f)&&(c[n]="")})},sa=(e,a)=>{var n;return a==null||a.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=>sa(r,a))),e},ql=e=>{var n,r,o,i,d,c;gl("");const a=(n=Xe.value)==null?void 0:n.reduce((f,k)=>(f[k.name]=k.value,f),{});if(((r=Object.keys(a))==null?void 0:r.length)>0){Ne.value=a,Ge.value="",nl.value=(o=Y.value)==null?void 0:o.length,ol.value=(i=el.value)==null?void 0:i.filter(k=>(k==null?void 0:k.label)!=="新增");const f=(c=(d=Te.value)==null?void 0:d.filter(k=>(k==null?void 0:k.label)!=="操作"))==null?void 0:c.map(k=>{var T,M,y;const t=(M=(T=Oe.value)==null?void 0:T.find(B=>(B==null?void 0:B.label)===(k==null?void 0:k.label)))==null?void 0:M.multiple;return fr(k),{...k,contents:(k==null?void 0:k.options)??[],optionUrl:k!=null&&k.formMenuSelect&&((y=k==null?void 0:k.formMenuSelect)==null?void 0:y.length)>0?{groupSelect:k==null?void 0:k.groupSelect,menuSelect:k==null?void 0:k.formMenuSelect,selectRelateType:"",type:k==null?void 0:k.formType,multiple:t}:null}});V.value=f==null?void 0:f.map(k=>sa(k,[{prop:"type",value:"edit"},{prop:"columnType",value:pr(k==null?void 0:k.formType)||(k==null?void 0:k.columnType)}])),e==="createClick"&&hl(!1)}},tl={START:"开始时间",END:"结束时间",HOURS:"工时"},gr=(e,a)=>Number(Jl.dayjs(a).diff(Jl.dayjs(e),"day",!0).toFixed(1)),ia=e=>{var i;const a=s.itemData,n=(i=a==null?void 0:a.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:i.contents,r=new Map;return n==null||n.forEach((d,c)=>{const{label:f}=d;r.set(f,c)}),!r.has(tl.START)||!r.has(tl.END)||!r.has(tl.HOURS)?e:e==null?void 0:e.map(d=>{const c=d==null?void 0:d[tl.START],f=d==null?void 0:d[tl.END],k=gr(c,f);return c&&f&&(d[tl.HOURS]=`${k}天`),d})},ua=(e,a,n=0)=>{if(n>((a==null?void 0:a.length)??""))return e;const r=a==null?void 0:a[n],o=new Map;for(const d of e){const c=d[r];o.has(c)||o.set(c,[]),o.get(c)&&o.get(c).push(d)}const i=[];for(const[d,c]of o){const[f,...k]=c,t={...f};n+1===((a==null?void 0:a.length)??"")?t.children=c==null?void 0:c.map(T=>(T.level=m.cloneDeep(n)+1,T)).filter((T,M)=>M!==0):k.length>0&&(t.children=ua(k,a,n+1)),t.level=n,i.push(t)}return i},ca=(e,a,n)=>{var o;if(!(a!=null&&a.contents)||((o=a==null?void 0:a.contents)==null?void 0:o.length)===0)return e;let r=[];return r=ua(e,a==null?void 0:a.contents,0),r},da=(e,a)=>{var M,y,B,A,S,K,x,L,D,g,h,u,v,P,E,G,le,X,q,H,w,j,R,ae,z;const n=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="header");e==null||e.filter(p=>(p==null?void 0:p.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="childTree")[0];let o=a;const i=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="page"),d=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="rowButton"),c=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="extraButton"),f=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableContents"),k=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableIndex");Oe.value=(y=(M=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableToForm"))==null?void 0:M[0])==null?void 0:y.contents,Ql.value=(i==null?void 0:i.contents)??!0;let t=[];ll.value===""?t=n==null?void 0:n[0]:t=(n==null?void 0:n.find(p=>(p==null?void 0:p.selectLabel)==="("+ll.value+")"))??(n==null?void 0:n.find(p=>!(p!=null&&p.selectLabel)));let T=[];if(ll.value===""?T=k==null?void 0:k[0]:T=(k==null?void 0:k.find(p=>(p==null?void 0:p.selectLabel)==="("+ll.value+")"))??(k==null?void 0:k.find(p=>!(p!=null&&p.selectLabel))),((B=t==null?void 0:t.contents)==null?void 0:B.length)>0){let p=[];if(t!=null&&t.contents.some(N=>Array.isArray(N)&&(N==null?void 0:N.find(b=>b.children))))Ye.value===""?p=(S=(A=te.getGradeColumns(t==null?void 0:t.contents))==null?void 0:A[0])==null?void 0:S.filter(N=>!Array.isArray(N)):(Ye.value.split("-"),p=(K=te.getGradeColumns(t==null?void 0:t.contents))==null?void 0:K[0]);else{let N=t!=null&&t.contents.some(b=>Array.isArray(b))?(x=t==null?void 0:t.contents)==null?void 0:x[0]:t==null?void 0:t.contents;N==null||N.forEach((b,se)=>{var xe,Le,yl,vl;let ie="";(Le=(xe=W.value)==null?void 0:xe.split("/"))==null||Le.forEach(Fe=>{var bl,kl,ml;if(Fe!==""){let sl=(ml=(kl=(bl=Fe==null?void 0:Fe.split(ee+"updateLoading"))==null?void 0:bl[0])==null?void 0:kl.split(ee+"loading"))==null?void 0:ml[0];ie=ie===""?ie+sl:ie+"/"+sl}}),ie=ie+ee+(b==null?void 0:b.directiveLabel);const ge=(yl=Oe.value)==null?void 0:yl.find(Fe=>(Fe==null?void 0:Fe.prop)===(b==null?void 0:b.prop));p.push({label:(b==null?void 0:b.label)??"",prop:(b==null?void 0:b.label)==="操作"?"operate":(b==null?void 0:b.prop)??"a"+se,width:b!=null&&b.width?parseInt(b.width):"",fixed:(b==null?void 0:b.fixed)??void 0,sortable:(b==null?void 0:b.sortable)??!1,filterable:(b==null?void 0:b.filterable)??!1,operable:(b==null?void 0:b.operable)??!1,showSummary:(b==null?void 0:b.showSummary)??!1,align:(b==null?void 0:b.align)??"left",showOverflowTooltip:(b==null?void 0:b.showOverflowTooltip)??!0,isNotDrag:(b==null?void 0:b.isNotDrag)??!1,isEditCol:(b==null?void 0:b.isEditCol)??!1,isOperate:(b==null?void 0:b.isOperate)??!1,id:(b==null?void 0:b.id)??se,type:(b==null?void 0:b.label)==="操作"?"operate":void 0,formType:(b==null?void 0:b.formType)??(b!=null&&b.groupSelect?"Select":""),isTableColHidden:b==null?void 0:b.isTableColHidden,isFormColHidden:b==null?void 0:b.isFormColHidden,disabled:b==null?void 0:b.disabled,options:(b==null?void 0:b.options)??[],value:(b==null?void 0:b.value)??"",formMenuSelect:(b==null?void 0:b.formMenuSelect)??[],isRoute:(b==null?void 0:b.isRoute)??!1,groupSelect:b!=null&&b.groupSelect?(vl=b==null?void 0:b.groupSelect)==null?void 0:vl.replaceAll('"',"").split(":"):[],isMainKey:(b==null?void 0:b.isMainKey)||(b==null?void 0:b.directiveLabel)&&!o[ie],columnType:(ge==null?void 0:ge.type)||(b==null?void 0:b.columnType)||"TEXTAREA",directiveLabel:b==null?void 0:b.directiveLabel,isExistChild:!!(b!=null&&b.directiveLabel&&o[ie]),childPath:ie})})}V.value=te.getNewColumnChild(p),Je.value=te.getNewColumnChild(p),Q.value=(L=V.value)==null?void 0:L.map(N=>N==null?void 0:N.label),_e.value=(D=V.value)==null?void 0:D.every(N=>N==null?void 0:N.filterable),ue.value=(g=V.value)==null?void 0:g.every(N=>N==null?void 0:N.operable),Ae.value=(h=V.value)==null?void 0:h.every(N=>N==null?void 0:N.sortable);let F=(v=(u=te.getAllLeafNodes(V.value))==null?void 0:u.filter(N=>(N==null?void 0:N.type)!=="operate"))==null?void 0:v.map((N,b)=>({prop:(N==null?void 0:N.prop)??"a"+b,column:N.label}));$e.value=F;let _=[];ll.value===""?_=f==null?void 0:f[0]:_=(f==null?void 0:f.find(N=>(N==null?void 0:N.selectLabel)==="("+ll.value+")"))??(f==null?void 0:f.find(N=>!(N!=null&&N.selectLabel)));let ve=Array.isArray((P=_==null?void 0:_.contents)==null?void 0:P[0])&&((E=_==null?void 0:_.contents)!=null&&E[0].every(N=>Array.isArray(N)))?(G=_==null?void 0:_.contents)==null?void 0:G[0]:_==null?void 0:_.contents;T!=null&&T.contents&&((le=T==null?void 0:T.contents)==null?void 0:le.length)!==0&&(ve=(X=m.cloneDeep(ve))==null?void 0:X.map((N,b)=>{if(!Array.isArray(N)){let se={};for(let ie in N)ie!=="id"&&ie!=="index"&&(se[ie]=N[ie]);N=Object.values(se)}return N}));const me=!!((q=V.value)!=null&&q.find(N=>N.prop==="index"));ve=ba(ve,T==null?void 0:T.contents,me);const he=[];ve==null||ve.forEach((N,b)=>{var ie;let se={};if(Array.isArray(N)){let ge=[];N==null||N.filter(xe=>!(xe!=null&&xe.id)).forEach((xe,Le)=>{var yl,vl,Fe,bl,kl,ml;if((yl=F==null?void 0:F[Le])!=null&&yl.prop&&!Array.isArray(xe)){let sl={};sl[F[Le].column]=xe,ye!=null&&ye.value&&((vl=ye==null?void 0:ye.value)==null?void 0:vl.length)>0&&((Fe=ye==null?void 0:ye.value)!=null&&Fe.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl)))&&(ge=(bl=ye==null?void 0:ye.value)==null?void 0:bl.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl))),ge&&ge.length>0?se[F[Le].prop]=ge!=null&&ge.find(ze=>{var Sl;return((Sl=Object.keys(ze))==null?void 0:Sl[0])===F[Le].column})?(kl=ge==null?void 0:ge.find(ze=>{var Sl;return((Sl=Object.keys(ze))==null?void 0:Sl[0])===F[Le].column}))==null?void 0:kl[F[Le].column]:xe:se[F[Le].prop]=xe}else Array.isArray(xe)&&((ml=F[Le])!=null&&ml.prop?se[F[Le].prop]=xe:se.children=Gl(xe,F))})}else se=N;Array.isArray(N)&&N.some(ge=>ge==null?void 0:ge.id)?he.push(Object.assign(se,{id:(ie=N==null?void 0:N.find(ge=>ge.id))==null?void 0:ie.id})):se.id?he.push(se):he.push(Object.assign(se,{id:b.toString()}))}),Y.value=ca(he,r,V.value),xl.value=he,(H=xl.value)==null||H.forEach(N=>{var b;(b=Tl.value)==null||b.set(N.id,N)})}else V.value=[],Te.value=[],Y.value=[],xl.value=[],Tl.value=new Map;((w=d==null?void 0:d.contents)==null?void 0:w.length)>0?Ie.value=d==null?void 0:d.contents:Ie.value=[],((j=c==null?void 0:c.contents)==null?void 0:j.length)>0?(ol.value=c==null?void 0:c.contents,el.value=c==null?void 0:c.contents):(ol.value=[],el.value=[]),nl.value=((R=Y==null?void 0:Y.value)==null?void 0:R.length)??0,ia(Y.value),wl.value=Y.value,Pe.value&&(V.value=(z=(ae=Te.value)==null?void 0:ae.filter(p=>(p==null?void 0:p.label)!=="操作"))==null?void 0:z.map(p=>{var F;return{...p,type:"edit",optionUrl:p!=null&&p.formMenuSelect&&((F=p==null?void 0:p.formMenuSelect)==null?void 0:F.length)>0?{groupSelect:p==null?void 0:p.groupSelect,menuSelect:p==null?void 0:p.formMenuSelect,selectRelateType:"",type:p==null?void 0:p.formType}:null}}),ql())};l.watch(()=>[s.itemData,ll.value,xa.value,Ye.value,ye==null?void 0:ye.value],async()=>{var e,a,n,r,o,i;if((e=s==null?void 0:s.itemData)!=null&&e.find(d=>(d==null?void 0:d.key)==="columnPath")&&!((a=ul.value)!=null&&a.find(d=>{var c,f;return(d==null?void 0:d.key)===((f=(c=s==null?void 0:s.itemData)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="columnPath"))==null?void 0:f.contents)}))){let d=ul.value,c={key:(r=(n=s==null?void 0:s.itemData)==null?void 0:n.find(f=>(f==null?void 0:f.key)==="columnPath"))==null?void 0:r.contents,value:(i=(o=s==null?void 0:s.itemData)==null?void 0:o.find(f=>(f==null?void 0:f.key)==="columnUsingPath"))==null?void 0:i.contents};d!=null&&d.find(f=>(f==null?void 0:f.key)===(c==null?void 0:c.key))?d=d==null?void 0:d.map(f=>((f==null?void 0:f.key)===(c==null?void 0:c.key)&&(f.value=c.value),f)):d.push(c),De.setTableViewContents(d)}da(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(gl(e==null?void 0:e.form),Me.value=e==null?void 0:e.dialogTitle,Bl.value=!0,Qe.value=!0)},{immediate:!0,deep:!0});const pa=()=>{var e;(e=be.value)!=null&&e.includes("read")&&(Pe.value=!Pe.value)},hr=()=>{_l.value=!_l.value};l.watch(()=>{var e;return(e=s==null?void 0:s.config)==null?void 0:e.viewport},e=>{var a;be.value=e,(e==null?void 0:e.length)===0?Pe.value=!1:(e!=null&&e.includes("read")||(Pe.value=!0),e!=null&&e.includes("edit")||(Pe.value=!1)),de.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||Pe.value},{immediate:!0}),l.watch(()=>Pe.value,e=>{var a;e?(ql("viewChange"),De.setCacheUpdatingData(null)):(ol.value=el.value,V.value=Je.value,il.value&&(De.setTableLoading(s==null?void 0:s.index),oe("change",il.value))),I.value=e,de.value=e||((a=s==null?void 0:s.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=Yl.value)==null?void 0:e.length},e=>{e===0&&(re.currentPage=1)}),l.watch(()=>s==null?void 0:s.compNames,e=>{Se.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:e||[],width:1}]},{immediate:!0}),l.ref(!1);const yr=(e,a)=>{var n;ql("createClick"),a===re.pageSize&&(re.currentPage=Math.ceil(((n=Y.value)==null?void 0:n.length)/re.pageSize))},vr=(e,a,n)=>{var r;ta(n,e,a),Ne.value=m.cloneDeep(e),Ge.value=e==null?void 0:e.id,nl.value=(r=Y.value)==null?void 0:r.length,Me.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",hl(!1)},Be=e=>{var f,k,t,T,M,y,B,A,S,K;const{row:a,column:n,item:r,slotData:o}=e;let i=a!=null&&a[n==null?void 0:n.prop]||(a==null?void 0:a[n==null?void 0:n.prop])===0?((k=(f=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:f[0])==null?void 0:k.contents)??((a==null?void 0:a[n==null?void 0:n.prop])===0?"0":a==null?void 0:a[n==null?void 0:n.prop]):((T=(t=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:t[0])==null?void 0:T.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((y=(M=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:M[0])==null?void 0:y.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((S=(A=a==null?void 0:a[(B=r==null?void 0:r.child)==null?void 0:B.prop])==null?void 0:A[0])==null?void 0:S.contents)??(a==null?void 0:a[(K=r==null?void 0:r.child)==null?void 0:K.prop]),c=Array.isArray(i)&&!(i!=null&&i.every(x=>typeof x=="string"||typeof x=="number"))?"查看":i;return c=Array.isArray(c)?c.join(","):c,c},br=e=>{var k,t,T,M,y,B,A,S,K,x;const{row:a,column:n,item:r,slotData:o}=e;let i=a!=null&&a[n==null?void 0:n.prop]?((t=(k=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:k[0])==null?void 0:t.contents)??(a==null?void 0:a[n==null?void 0:n.prop]):((M=(T=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:T[0])==null?void 0:M.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((B=(y=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:y[0])==null?void 0:B.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((K=(S=a==null?void 0:a[(A=r==null?void 0:r.child)==null?void 0:A.prop])==null?void 0:S[0])==null?void 0:K.contents)??(a==null?void 0:a[(x=r==null?void 0:r.child)==null?void 0:x.prop]);const c=Array.isArray(i)&&!(i!=null&&i.every(L=>typeof L=="string"||typeof L=="number")),f=Array.isArray(i)&&(i==null?void 0:i.find(L=>L==null?void 0:L.url));return c&&f},kr=(e,a)=>e.find(n=>Object.values(n).some(r=>r===a));return l.watch(()=>Ee.value,async e=>{if(e){fe.setContentLoading(!0),await l.nextTick();const a=kr(Y.value,e==null?void 0:e.data);if(!a)return fe.setContentLoading(!1);await ea(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),fe.setContentLoading(!1)}},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.cacheNewData,e=>{var a;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(s==null?void 0:s.index)&&(Y.value=(a=Y.value)==null?void 0:a.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,a)=>{var k,t,T,M;const n=l.resolveComponent("svg-icon"),r=l.resolveComponent("el-popover"),o=l.resolveComponent("el-switch"),i=l.resolveComponent("el-checkbox"),d=l.resolveComponent("el-checkbox-group"),c=l.resolveComponent("el-button"),f=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",Qr,[Xl.value?(l.openBlock(),l.createBlock(Re.ssTable,{id:"excel-table",pageObj:re,showIndex:de.value,isTree:(k=O.compItem)==null?void 0:k.isTree,summaryInfo:ne,columns:V.value,defaultSort:Ce,isCardViewport:_l.value,checkedColumns:Q.value,key:$l.value+JSON.stringify(V.value),tableData:Yl.value,isEditViewport:Pe.value,isShowPagination:Ql.value,isShowEdit:!1,isShowDelete:!1,allowSelect:I.value,onDbClickRow:Ha,extraButton:ol.value,rowButton:Ie.value,cacheExtraButtons:el.value,isClearSelection:((t=Ke.value)==null?void 0:t.length)===0,onDoCurrentChange:Aa,onDoSizeChange:_a,onContentClick:ea,onRowClick:Xa,onSelectChange:$a,onCellChange:vr,onChange:ta,onPreview:Zl,onSubmitEditingTable:Ma,onHandleColEditChange:Va,onHandleColTypeChange:ja,onClickButton:Vl},l.createSlots({headerButton:l.withCtx(y=>{var B,A;return[O.showHeader?(l.openBlock(),l.createBlock(Mr,{key:0,pageLayout:O.pageLayout,lockingPage:l.unref(Dl)===l.unref(W),filterValues:Il.value,selectNums:(B=Ke.value)==null?void 0:B.length,dataNums:(A=Y.value)==null?void 0:A.length,compName:O.compName,isDevMode:O.isDevMode,buttons:y.buttons,onButtonClick:a[0]||(a[0]=S=>Vl(S,"",{})),columns:V.value,onFilter:Ga,onGetImportData:Oa,level:O.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var y,B,A,S;return[((y=Y.value)==null?void 0:y.length)>0&&O.allowOperate?(l.openBlock(),l.createElementBlock("div",Zr,[(B=be.value)!=null&&B.includes("read")&&((A=be.value)!=null&&A.includes("edit"))&&((S=Ie.value)!=null&&S.some(K=>(K==null?void 0:K.label)==="编辑"))&&!_l.value&&l.unref(Dl)!==l.unref(W)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:pa},[l.createVNode(n,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:hr},[l.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:y,index:B})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:A=>yr(y,B)},[l.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,Ir)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:cr},{reference:l.withCtx(()=>[l.createElementVNode("span",en,[l.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",ln,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(o,{"model-value":Ae.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=y=>Kl(y,"sortable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":_e.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=y=>Kl(y,"filterable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":ue.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=y=>Kl(y,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(d,{modelValue:Q.value,"onUpdate:modelValue":a[5]||(a[5]=y=>Q.value=y),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:U},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(pl.value,y=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:y.label},[l.createVNode(i,{value:y.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:y.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(y.label),9,an)]),_:2},1032,["value"]),l.createVNode(r,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:l.withCtx(()=>[l.createVNode(n,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:l.withCtx(()=>{var B;return[l.createElementVNode("div",rn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((B=Object.keys(y))==null?void 0:B.filter(A=>{var S;return(S=pe.value)==null?void 0:S.find(K=>(K==null?void 0:K.value)===A)}),A=>{var S,K;return l.openBlock(),l.createElementBlock("div",{key:A},[l.createVNode(o,{"model-value":y==null?void 0:y[A],"active-text":(K=(S=pe.value)==null?void 0:S.find(x=>(x==null?void 0:x.value)===A))==null?void 0:K.label,onChange:x=>Ka(x,A,y)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",nn,[l.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(y=>{var B,A,S,K,x,L,D,g,h,u,v,P,E,G,le,X,q,H;return[br(y)?(l.openBlock(),l.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:l.withCtx(()=>[l.createElementVNode("span",on,l.toDisplayString(Be(y)),1)]),default:l.withCtx(()=>{var w;return[l.createElementVNode("div",tn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(y==null?void 0:y.row[(w=y==null?void 0:y.column)==null?void 0:w.prop],j=>(l.openBlock(),l.createElementBlock("div",sn,[l.createElementVNode("div",{class:"prop-url",title:Ll(j),onClick:R=>Ra(j)},l.toDisplayString(Ll(j)),9,un),l.createElementVNode("div",{class:"prop-download",onClick:R=>qa(j)}," 下载 ",8,cn)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Be(y))&&((A=(B=Be(y))==null?void 0:B.toString())!=null&&A.includes(".txt")||(K=(S=Be(y))==null?void 0:S.toString())!=null&&K.includes(".cpt")||(L=(x=Be(y))==null?void 0:x.toString())!=null&&L.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Be(y))&&((g=(D=Be(y))==null?void 0:D.toString())!=null&&g.includes(".txt")||(u=(h=Be(y))==null?void 0:h.toString())!=null&&u.includes(".cpt")||(P=(v=Be(y))==null?void 0:v.toString())!=null&&P.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Be(y))&&((G=(E=Be(y))==null?void 0:E.toString())!=null&&G.includes(".txt")||(X=(le=Be(y))==null?void 0:le.toString())!=null&&X.includes(".cpt")||(H=(q=Be(y))==null?void 0:q.toString())!=null&&H.includes(".cyd"))?"pointer":"",marginLeft:(y==null?void 0:y.colIndex)===0?`${((y==null?void 0:y.level)??0)*20}px`:0}),onClick:w=>wa(Be(y))},l.toDisplayString(Be(y)===0?"0":Be(y)),13,dn))]}),_:2},[((T=Ie.value)==null?void 0:T.length)>0&&l.unref(Dl)!==l.unref(W)?{name:"actions",fn:l.withCtx(({item:y})=>[l.createVNode(r,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:l.withCtx(()=>[l.createVNode(n,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:l.withCtx(()=>[l.createElementVNode("div",Xr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ja(Ie.value,y),(B,A)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:A,onClick:S=>Vl(B==null?void 0:B.label,y,{extra:B})},[l.createElementVNode("div",{style:l.normalizeStyle({color:B==null?void 0:B.textColor}),class:"extra-button-label"},l.toDisplayString(B==null?void 0:B.label),5)],8,Yr))),128))])]),_:2},1024)]),key:"0"}:void 0,((M=Y.value)==null?void 0:M.length)>0?{name:"batchButton",fn:l.withCtx(y=>[l.withDirectives(l.createVNode(Pr,{lockingPage:l.unref(Dl)===l.unref(W),buttons:y.buttons,selectTableItems:Ke.value,onButtonClick:a[1]||(a[1]=B=>Vl(B,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,I.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!I.value]])]),key:"1"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):l.createCommentVNode("",!0),l.createVNode(Cl.ssDialog,{title:Me.value,visible:Qe.value,width:Ea.value,onBeforeDestroy:Fa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",pn,[l.createVNode(Re.ssForm,{rowContents:Xe.value,isEnableWrap:!1,showOperator:!1,onChange:dr,onClickTrigger:za,isEdit:El.value,onBlurChange:Pa},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[Bl.value?(l.openBlock(),l.createElementBlock("div",fn,[l.createVNode(c,{onClick:a[6]||(a[6]=y=>Qe.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[13]||(a[13]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[13]}),l.createVNode(c,{class:"ok-button",onClick:a[7]||(a[7]=y=>hl(!0)),id:"themeButton"},{default:l.withCtx(()=>a[14]||(a[14]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[14]})])):l.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),l.createVNode(Cl.ssDialog,{title:Me.value,visible:Nl.value,width:Ml.value,onBeforeDestroy:a[9]||(a[9]=y=>Nl.value=!1)},{default:l.withCtx(()=>[l.createVNode(qr)]),footer:l.withCtx(()=>[l.createElementVNode("div",gn,[l.createVNode(c,{onClick:a[8]||(a[8]=y=>Nl.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[15]||(a[15]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[15]}),l.createVNode(c,{class:"ok-button",onClick:Ya,id:"themeButton"},{default:l.withCtx(()=>a[16]||(a[16]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["title","visible","width"]),we.value?(l.openBlock(),l.createBlock(Re.ssFilePreview,{key:1,fileDataList:C.value,onDestroy:Qa},null,8,["fileDataList"])):l.createCommentVNode("",!0),qe.value?(l.openBlock(),l.createBlock(Cl.ssDialog,{key:2,visible:qe.value,onBeforeDestroy:ir,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:l.withCtx(()=>[l.createVNode(Ve.ThreeViewerHost,{"file-urls":cl.value,isThreeScene:Ue.value,isSelfWindow:!0,threeData:rl.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Cl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=y=>e.componentVisible=!1),width:Ml.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(f,{dialogItem:Ul.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(Cl.ssDialog,{title:Se.title,visible:Se.show,width:Se.width,onBeforeDestroy:ar},{default:l.withCtx(()=>[l.createElementVNode("div",hn,[l.createVNode(Re.ssForm,{rowContents:Se==null?void 0:Se.contents,formRules:Se==null?void 0:Se.formRules,showOperator:!1,buttonValue:Se.buttonValue,isEdit:El.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:rr},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},vn=jl._export_sfc(yn,[["__scopeId","data-v-82b4d06b"]]);exports.formGetOptions=Wl;exports.getSelectRow=Hl;exports.ssTable=vn;exports.useFormComp=Sa;exports.useFormToTableComp=ya;exports.useUnit=va;
1
+ "use strict";const l=require("vue"),m=require("./index-C8qRkCgn.cjs"),Jl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-K6lh7Rrj.cjs"),Re=require("./index-CKmprTMc.cjs"),Ve=require("./threeViewerHost-DULXVjvJ.cjs"),te=require("./index.vue_vue_type_style_index_1_lang-B8_elAaU.cjs");require("./index.vue_vue_type_style_index_1_lang-D2yvbyv5.cjs");const jl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Cl=require("./index-DhufphmT.cjs");require("./index-a6bC3A9D.cjs");const ga=require("./isString--eJE54G5.cjs"),Wl=O=>O.match(/\((.*)\)/)[1],ha={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(O){const Z=O,Q=l.ref(null),$=l.ref(!1),U=l.ref(null);return l.watch(()=>Z==null?void 0:Z.isVisible,()=>{$.value=Z==null?void 0:Z.isVisible},{deep:!0,immediate:!0}),l.watch(()=>U.value,()=>{l.nextTick(()=>{var s,I;(I=(s=Q.value)==null?void 0:s.updatePopper)==null||I.call(s)})},{deep:!0,immediate:!0}),(s,I)=>{const de=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(de,{visible:$.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:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:U})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},mr={key:0,class:"extra-button-content"},Sr={class:"table-operator-wrap"},Cr={class:"extra-button-filter"},Dr={class:"form-content-value"},xr={key:0,class:"extra-header"},Tr={class:"drop-menu",style:{width:"120px"}},Er={key:0},Nr={key:1},Br={key:1,class:"extra-button-content tabs-button-wrapper"},wr={class:"table-operator-wrap"},Ar={class:"extra-button-filter"},_r={class:"form-content-value"},Ur={key:0,class:"extra-header"},Or={class:"drop-menu",style:{width:"120px"}},Lr={key:0},Vr={key:1},jr={__name:"header",props:{pageLayout:{type:String,default:"vertical"},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(O,{emit:Z}){const Q=Z,$=O,U=l.ref(""),s=l.ref(!1),I=l.ref([]),de=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),be=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],pe=ne=>{const re=ne.raw;if(!re)return;const oe=new FileReader;oe.onload=V=>{try{const Ce=new Uint8Array(V.target.result),Te=Ve.readSync(Ce,{type:"array"}),qe=Te.SheetNames[0],Ue=Te.Sheets[qe],Je=Ve.utils.decode_range(Ue["!ref"]).e.c+1,we=new Array(Je).fill(""),C=[];for(const J in Ue){if(J[0]==="!")continue;const{r:W,c:ke}=Ve.utils.decode_cell(J);let Ee=Ue[J].v;if(Ue[J].t==="n"&&Ee>0&&Ee<1e6&&(Ee=new Date((Ee-25569)*86400*1e3).toISOString().split("T")[0]),(Ee==null||Ee==="")&&(Ee=""),W===0)we[ke]=Ee;else{if(!C[W-1]){C[W-1]={};for(let We=0;We<Je;We++)C[W-1][`col_${We}`]=""}C[W-1][`col_${ke}`]=Ee}}for(let J=0;J<Je;J++)we[J]===void 0&&(we[J]="");const fe=C==null?void 0:C[0];if(!(fe!=null&&fe.hasOwnProperty("col_0")))return m.ElMessage.error("导入的数据列不匹配,请检查是否错位");Q("getImportData",we,C)}catch(Ce){throw m.ElMessage.error(Ce.message),new Error(Ce.message)}},oe.readAsArrayBuffer(re)},je=ne=>{var oe;const re=(oe=I.value)==null?void 0:oe.reduce((V,Ce,Te)=>(Te===0?V[Ce.label]=ne:V[Ce.label]=Ce==null?void 0:Ce.value,V),{});Q("filter",re,ne,!0)},He=ne=>{Q("buttonClick",ne)},ee=ne=>{var re,oe;I.value=(oe=(re=te.getColumnChild(m.cloneDeep(ne)))==null?void 0:re.filter(V=>(V==null?void 0:V.label)!==""&&(V==null?void 0:V.label)!=="操作"))==null?void 0:oe.map(V=>({label:(V==null?void 0:V.label)??"",value:"",name:(V==null?void 0:V.label)??"",isFormColHidden:V==null?void 0:V.isTableColHidden,width:2}))},Ae=l.ref(!1),_e=ne=>{var re;if((ne==null?void 0:ne.buttonName)==="确认"&&(Q("filter",ne==null?void 0:ne.content),Ae.value=(ne==null?void 0:ne.content)&&Object.values(ne==null?void 0:ne.content).length>0),(ne==null?void 0:ne.buttonName)==="清空"){const oe=m.cloneDeep(ne==null?void 0:ne.content);for(const V in oe)oe[V]="";I.value=(re=I.value)==null?void 0:re.map(V=>({...V,value:""})),Q("filter",oe),Ae.value=!1}s.value=!1},ue=()=>{var re,oe;I.value=(re=I.value)==null?void 0:re.map(V=>({...V,value:""}));const ne=(oe=I.value)==null?void 0:oe.reduce((V,Ce)=>(V[Ce.label]=Ce.value,V),{});Q("filter",ne)};return l.onMounted(()=>{ee($.columns)}),l.watch(()=>$.columns,()=>{ee($.columns)},{deep:!0,immediate:!0}),(ne,re)=>{var Ue,rl,Je,we;const oe=l.resolveComponent("el-icon"),V=l.resolveComponent("svg-icon"),Ce=l.resolveComponent("el-input"),Te=l.resolveComponent("el-button"),qe=l.resolveComponent("el-upload");return O.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",mr,[l.createElementVNode("div",{class:l.normalizeClass(O.compName?"table-name-wrap":""),style:l.normalizeStyle({background:($==null?void 0:$.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:($==null?void 0:$.level)>1?"0px":"8px",fontWeight:600-(($==null?void 0:$.level)-1)*100>=400?600-(($==null?void 0:$.level)-1)*100:400,fontSize:15-($==null?void 0:$.level)>=12?15-($==null?void 0:$.level)+"px":"14px"})},l.toDisplayString(O.compName),7),l.createElementVNode("div",Sr,[l.createElementVNode("div",Cr,[l.createVNode(ha,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,fe,J,W;return[l.createVNode(Ce,{modelValue:U.value,"onUpdate:modelValue":re[1]||(re[1]=ke=>U.value=ke),style:{"min-width":"80px"},placeholder:Ae.value?(J=(fe=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:fe.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(m.search_default),clearable:"",onInput:je,disabled:((W=I.value)==null?void 0:W.length)===0},{suffix:l.withCtx(()=>{var ke,Ee;return[!U.value&&((Ee=(ke=O.filterValues)==null?void 0:ke.filter(We=>We))!=null&&Ee.join("/"))?(l.openBlock(),l.createBlock(oe,{key:0,style:{cursor:"pointer"},onClick:ue},{default:l.withCtx(()=>[l.createVNode(l.unref(m.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:re[0]||(re[0]=ke=>s.value=!s.value)},[l.createVNode(V,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Dr,[(l.openBlock(),l.createBlock(Re.ssForm,{rowContents:I.value,buttonValue:de.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:de.value,isStartJustify:!1,onOnButtonClick:_e},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Ue=O.buttons)==null?void 0:Ue.length)>0?(l.openBlock(),l.createElementBlock("div",xr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((rl=O.buttons)==null?void 0:rl.filter(C=>O.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,fe)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:fe},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":pe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!O.lockingPage},{default:l.withCtx(()=>[l.createVNode(Te,{disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Re._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Te,{key:0,disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style"])):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",Tr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,J=>(l.openBlock(),l.createBlock(Te,{key:J==null?void 0:J.label,disabled:!!O.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:W=>He(J==null?void 0:J.label)},{default:l.withCtx(()=>{var W,ke;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(W=J==null?void 0:J.label)!=null&&W.includes("选中")?(l.openBlock(),l.createElementBlock("span",Er,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Nr,"("+l.toDisplayString(O.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),C!=null&&C.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Te,{key:2,id:"themeButton",disabled:!!O.lockingPage,style:l.normalizeStyle({background:(C==null?void 0:C.background)??"var(--ssbutton-theme-bg)",color:(C==null?void 0:C.color)??"var(--ssbutton-theme-color)"}),onClick:J=>He(C==null?void 0:C.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])])):(l.openBlock(),l.createElementBlock("div",Br,[l.createElementVNode("div",wr,[l.createElementVNode("div",Ar,[l.createVNode(ha,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,fe,J,W;return[l.createVNode(Ce,{modelValue:U.value,"onUpdate:modelValue":re[3]||(re[3]=ke=>U.value=ke),style:{"min-width":"80px"},placeholder:Ae.value?(J=(fe=(C=O.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:fe.slice(0,3))==null?void 0:J.join("/"):"搜索","prefix-icon":l.unref(m.search_default),clearable:"",onInput:je,disabled:((W=I.value)==null?void 0:W.length)===0},{suffix:l.withCtx(()=>{var ke,Ee;return[!U.value&&((Ee=(ke=O.filterValues)==null?void 0:ke.filter(We=>We))!=null&&Ee.join("/"))?(l.openBlock(),l.createBlock(oe,{key:0,style:{cursor:"pointer"},onClick:ue},{default:l.withCtx(()=>[l.createVNode(l.unref(m.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:re[2]||(re[2]=ke=>s.value=!s.value)},[l.createVNode(V,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",_r,[(l.openBlock(),l.createBlock(Re.ssForm,{rowContents:I.value,buttonValue:de.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:de.value,isStartJustify:!1,onOnButtonClick:_e},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Je=O.buttons)==null?void 0:Je.length)>0?(l.openBlock(),l.createElementBlock("div",Ur,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((we=O.buttons)==null?void 0:we.filter(C=>O.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,fe)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:fe},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(qe,{key:0,class:"upload-button-wrap","on-change":pe,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(Te,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=be==null?void 0:be.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Re._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(Te,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=be==null?void 0:be.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",Or,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,J=>(l.openBlock(),l.createBlock(Te,{key:J==null?void 0:J.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:W=>He(J==null?void 0:J.label)},{default:l.withCtx(()=>{var W,ke;return[l.createTextVNode(l.toDisplayString(J==null?void 0:J.label),1),(W=J==null?void 0:J.label)!=null&&W.includes("选中")?(l.openBlock(),l.createElementBlock("span",Lr,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=J==null?void 0:J.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Vr,"("+l.toDisplayString(O.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),C!=null&&C.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Te,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(C==null?void 0:C.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:J=>He(C==null?void 0:C.label)},{icon:l.withCtx(()=>{var J;return[l.createVNode(V,{name:(J=be==null?void 0:be.find(W=>(W==null?void 0:W.label)===(C==null?void 0:C.label)))==null?void 0:J.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(C==null?void 0:C.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},Mr=jl._export_sfc(jr,[["__scopeId","data-v-b0dbf278"]]),$r=l.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(O,{emit:Z}){const Q=O,$=Z,U=I=>{$("buttonClick",I)},s=I=>{var de;return I!=null&&I.includes("删除")?((de=Q.selectTableItems)==null?void 0:de.length)>0?"warning-active-type":"warning-type":"default-type"};return(I,de)=>{const be=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(O.buttons,pe=>(l.openBlock(),l.createBlock(be,{key:pe==null?void 0:pe.label,disabled:!!O.lockingPage,class:l.normalizeClass(s(pe==null?void 0:pe.label)),onClick:je=>U(pe==null?void 0:pe.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(pe==null?void 0:pe.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Pr=jl._export_sfc($r,[["__scopeId","data-v-70b12973"]]),ya=m.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(O){this.selectArray=O},setSelectString(O){this.selectString=O}}}),Kr={class:"calculator-content"},Fr={class:"calculator-child"},zr={class:"calculator-child"},Rr=l.defineComponent({__name:"calculator",setup(O){const Z=l.ref(),Q=l.ref();return l.onMounted(()=>{Z.value=[{type:"Upload",label:"输入",name:"input"}],Q.value=[{type:"Upload",label:"输出",name:"output"}]}),($,U)=>(l.openBlock(),l.createElementBlock("div",Kr,[l.createElementVNode("div",Fr,[l.createVNode(Re.ssForm,{rowContents:Z.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",zr,[l.createVNode(Re.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),qr=jl._export_sfc(Rr,[["__scopeId","data-v-73db0fe7"]]),va=m.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(O){this.selectIndex=O},setSelectMenu(O){this.selectMenu=O},setSelectTitle(O){this.selectTitle=O}}}),Gl=(O,Z)=>{let Q=O,$=Z;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((U,s)=>{if(Array.isArray(U)){let I={};return U=U==null?void 0:U.forEach((de,be)=>{var pe;(pe=$==null?void 0:$[be])!=null&&pe.prop?I[$[be].prop]=de:Array.isArray(de)&&(I.children=Gl(de,$))}),Object.assign(I,{id:s})}else return U})),Q},ba=(O,Z,Q)=>{let $=O,U=Z;return $=$==null?void 0:$.map((s,I)=>{var de,be;return!Array.isArray(s)||!((de=U==null?void 0:U[I])!=null&&de.label)&&!Q||(s.unshift(((be=U==null?void 0:U[I])==null?void 0:be.label)??""),s.some(pe=>Array.isArray(pe))&&(s=s==null?void 0:s.map(pe=>{var je;return Array.isArray(pe)&&(pe=ba(pe,(je=U==null?void 0:U[I])==null?void 0:je.children,Q)),pe}))),s}),$},Jr=(O,Z,Q)=>{if(Z==="")return O==null?void 0:O.filter($=>($==null?void 0:$.id)!==Q);{const $=Z.split("-");return Wr(O,$,Q)}},Wr=(O,Z,Q)=>{let $=O,U=Z;return(U==null?void 0:U.length)===0?$=$==null?void 0:$.filter(s=>s.id!==Q):$=$==null?void 0:$.map(s=>(s.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),s=ka(s,U,Q)),s)),$},ka=(O,Z,Q)=>{var s,I;let $=O,U=Z;return(U==null?void 0:U.length)===0?$.children=(s=$.children)==null?void 0:s.filter(de=>de.id!==Q):$.children=(I=$.children)==null?void 0:I.map(de=>(de.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),de=ka(de,U,Q)),de)),$},Gr=(O,Z,Q)=>{if(Z==="")return Q;{const $=Z.split("-");return Hr(O,$,Q)}},Hr=(O,Z,Q)=>{let $=O,U=Z;return(U==null?void 0:U.length)===0?$=Q:$=$==null?void 0:$.map(s=>(s.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),s=ma(s,U,Q)),s)),$},ma=(O,Z,Q)=>{var s;let $=O,U=Z;return(U==null?void 0:U.length)===0?$.children=Q:$.children=(s=$.children)==null?void 0:s.map(I=>(I.id.toString()===(U==null?void 0:U[0])&&(U==null||U.shift(),I=ma(I,U,Q)),I)),$},Sa=m.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(O){this.objUrl=O},setBlobUrls(O){this.blobUrls=O}}}),Hl=async O=>{var s,I,de,be,pe,je,He;let Z=(I=(s=m.cloneDeep(O))==null?void 0:s.optionUrl)==null?void 0:I.menuSelect,Q=[];Z==null||Z.forEach(ee=>{});let $="";const U=await te.menuToParent(Z);if(U==null||U.forEach(ee=>{var Ae,_e,ue,ne;(ee==null?void 0:ee.name)===(((ne=(ue=(_e=(Ae=m.cloneDeep(O))==null?void 0:Ae.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:ue[0])==null?void 0:ne.replaceAll("'",""))??"")&&($=ee==null?void 0:ee.id)}),$!==""){const ee=(de=U==null?void 0:U.find(ue=>{var ne,re,oe,V;return(ue==null?void 0:ue.name)===(((re=(ne=O==null?void 0:O.groupSelect)==null?void 0:ne.split(":"))==null?void 0:re[0])||((V=(oe=O==null?void 0:O.optionUrl)==null?void 0:oe.groupSelect)==null?void 0:V[0]))}))==null?void 0:de.compData;let Ae=(pe=(be=ee==null?void 0:ee.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:be.contents)==null?void 0:pe.map(ue=>ue==null?void 0:ue.label),_e=(He=(je=ee==null?void 0:ee.find(ue=>(ue==null?void 0:ue.key)==="tableContents"))==null?void 0:je.contents)==null?void 0:He.map(ue=>(ue=ue==null?void 0:ue.filter(ne=>!(ne!=null&&ne.id)),ue));_e==null||_e.forEach(ue=>{Q.push(te.getValueToObjectValue(ue,Ae))})}return Q},Qr={class:"table-content"},Xr={class:"menu-config-wrap"},Yr=["onClick"],Zr={key:0,class:"viewport-wrap"},Ir=["onClick"],en={title:"选择显示列信息"},ln={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},an=["title"],rn={class:"col-operate-wrap"},nn={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},on={class:"pop-view"},tn={class:"pop-wrapper"},sn={class:"file-list-pop"},un=["title","onClick"],cn=["onClick"],dn=["onClick"],pn={class:"form-content"},fn={key:0,class:"dialog-footer"},gn={class:"dialog-footer"},hn={class:"form-content"},yn={__name:"index",props:{pageLayout:{type:String,default:"vertical"},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!1},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(O,{emit:Z}){var fa;const Q=l.ref([]),$=Sa(m.pinia),U=l.ref(null),s=O,I=l.ref(s==null?void 0:s.allowSelect),de=l.ref((fa=s==null?void 0:s.config)==null?void 0:fa.showIndex),be=l.ref(),pe=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),je=te.useOriginalState(m.pinia),{originalPath:He}=m.storeToRefs(je),ee=He.value,Ae=l.ref(!1),_e=l.ref(!1),ue=l.ref(!1),ne=l.reactive({column:{},status:!1,text:"合计"}),re=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),oe=Z,V=l.ref([]),Ce=l.reactive({prop:"",order:null}),Te=l.ref([]),qe=l.ref(!1),Ue=l.ref(!1),rl=l.ref(null);Ve.useThreeSystem();const Je=l.ref([]),we=l.ref(!1),C=l.ref(),fe=te.useMenuState(),{importLoading:J,activeMenuPath:W,contentLoading:ke,linkMenuInfo:Ee}=m.storeToRefs(fe),We=te.useTableComp(m.pinia),De=te.useModelComp(m.pinia),{extraContents:ye,cacheUpdatingData:il,tableViewContents:ul,tableLoading:bn,pageMapState:Ze,lockingPage:Dl}=m.storeToRefs(De),Y=l.ref([]),xl=l.ref([]),Tl=l.ref(new Map);l.ref(!1);const Ge=l.ref("");l.ref();const El=l.ref(!0),nl=l.ref(0),Ql=l.ref(!0),Me=l.ref(""),Qe=l.ref(!1),Ca=l.ref({label:"查看三维模型"}),Nl=l.ref(!1),Ml=l.ref(),Oe=l.ref([]),Ie=l.ref([]),Bl=l.ref(!1),cl=l.ref([]),ol=l.ref([]),el=l.ref([]),Xe=l.ref([]),$e=l.ref(),Ne=l.ref(),Da=ya(m.pinia),wl=l.ref(),$l=l.ref(0),Al=va(m.pinia),{selectIndex:xa,selectMenu:Ye,selectTitle:Pl}=m.storeToRefs(Al),{selectString:ll}=m.storeToRefs(Da),Ta=m.useLoginState(m.pinia),{loginUserInfo:ce}=m.storeToRefs(Ta),Ea=l.ref(720),Pe=l.ref(!1),_l=l.ref(!1),Ke=l.ref([]),al=l.ref(),dl=l.ref(!0),Xl=l.ref(!0),Ul=l.ref([]),Na=l.inject("contentRef");l.provide("contentRef",Na),l.watch(()=>{var e;return(e=Y.value)==null?void 0:e.length},e=>{re.total=e}),l.watch(()=>ul.value,async()=>{var i,d,c,f,k,t,T,M,y,B,A,S,K,x,L,D,g,h;if(((i=ul.value)==null?void 0:i.length)===0||!((d=s==null?void 0:s.itemData)!=null&&d.find(u=>(u==null?void 0:u.key)==="columnPath"))||!((c=s==null?void 0:s.itemData)!=null&&c.find(u=>(u==null?void 0:u.key)==="pageColumn")))return;let e=(y=(M=(T=(t=(k=(f=s==null?void 0:s.itemData)==null?void 0:f.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:k.contents)==null?void 0:t.split("["))==null?void 0:T[1])==null?void 0:M.split("]"))==null?void 0:y[0],a=((K=(S=(A=(B=s==null?void 0:s.itemData)==null?void 0:B.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:A.contents)==null?void 0:S.split("["))==null?void 0:K[0])+((L=(x=ul.value)==null?void 0:x.find(u=>(u==null?void 0:u.key)===e))==null?void 0:L.value),n=((g=(D=s==null?void 0:s.itemData)==null?void 0:D.find(u=>(u==null?void 0:u.key)==="pageGroup"))==null?void 0:g.contents)??"",r=await te.getItemData(a,sessionStorage.getItem("systemKey"),""),o=(h=r==null?void 0:r.find(u=>(u==null?void 0:u.name)===(n===""?s==null?void 0:s.compName:n)))==null?void 0:h.compData;da(o,s.allMapContents)},{deep:!0});const Ba=async(e,a)=>{var n,r,o,i,d;try{const c=await m.getInsofDataApi({id:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index)});let f;((n=c==null?void 0:c.data)==null?void 0:n.code)===200&&(f=((o=(r=c==null?void 0:c.data)==null?void 0:r.result)==null?void 0:o[0])||null);const k={type:"data",pageKey:s!=null&&s.parentTableId?(i=f==null?void 0:f.key)==null?void 0:i.pageKey:W.value,tableId:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index),systemKey:sessionStorage.getItem("systemKey")},t=a==null?void 0:a.map(y=>{const B=Object.keys(y),A={};return B.forEach((S,K)=>{A[e[K]]=y[S]}),A}),T=t==null?void 0:t.map(y=>({key:k,value:{tableData:y}})),M=await m.batchAddInsofDataApi({dataList:T});((d=M==null?void 0:M.data)==null?void 0:d.code)===200?(De.setRefreshCurStructure(!0),m.ElMessage.success("导入数据成功")):m.ElMessage.error("导入数据响应失败")}catch(c){throw m.ElMessage.error("导入数据处理失败"),new Error(c)}},wa=async e=>{var a,n;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await m.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),o=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let i=URL.createObjectURL(o);C.value=[{name:(n=e==null?void 0:e.split("/"))==null?void 0:n[((a=e==null?void 0:e.split("/"))==null?void 0:a.length)-1],blobUrl:i}],we.value=!0}};l.onBeforeUnmount(()=>{Xl.value=!1;let e=$l.value;$l.value=e+1});const Yl=l.computed(()=>{var r,o;const e=(re.currentPage-1)*re.pageSize,a=e+re.pageSize,n=(r=V.value)==null?void 0:r.find(i=>{var d;return(i==null?void 0:i.sortable)&&((d=i==null?void 0:i.label)==null?void 0:d.includes("时间"))});return n&&(Ce.order="descending",Ce.prop=n==null?void 0:n.prop),oe("getSliceContLength",re),(o=Y.value)==null?void 0:o.slice(e,a)}),Aa=e=>{re.currentPage=e,oe("getSliceContLength",re)},_a=e=>{var a;re.pageSize=e,e*re.currentPage>((a=Y.value)==null?void 0:a.length)&&(re.currentPage=1,re.pageSize=10,m.ElMessage.warning("分页无效,返回第一页")),oe("getSliceContLength",re)},Ua=(e,a)=>{var d,c;const n=(c=(d=V.value)==null?void 0:d.map(f=>f==null?void 0:f.prop))==null?void 0:c.filter(f=>f!=="operate");let r;const o=(e==null?void 0:e.length)===(n==null?void 0:n.length);if(e!=null&&e.includes("序号"))return m.ElMessage.error("导入的数据不需要包含序号列");if(r=o?e:e.slice(0,n==null?void 0:n.length),!(r==null?void 0:r.every(f=>n==null?void 0:n.find(k=>f===k))))return m.ElMessage.error("导入的数据表头不匹配");Ba(r,a)},Oa=(e,a)=>{var n;De.setRefreshCurStructure(!1),((n=V.value)==null?void 0:n.length)===0||Ua(e,a)},La=(e,a,n,r)=>{const o=[],i=[],d=k=>Object.keys(k).length;for(const k in e)if(e[k]!==void 0){const t=e[k],T=[];for(const[M,y]of Object.entries(t))T.push(y),i.length<d(t)&&i.push(M);o.push(T)}o.unshift(i);const c=Ve.utils.aoa_to_sheet(o),f=Ve.utils.book_new();Ve.utils.book_append_sheet(f,c,r),Ve.writeFileSync(f,`${a}.xlsx`),Ke.value=[]},Ol=async(e,a,n,r=!1,o)=>{var i,d,c,f,k,t,T,M;try{De.setRefreshCurStructure(!1);const y=await m.getInsofDataApi({id:s==null?void 0:s.index});if(((i=y==null?void 0:y.data)==null?void 0:i.code)===200){let B=(k=(f=(c=(d=y==null?void 0:y.data)==null?void 0:d.result)==null?void 0:c[0])==null?void 0:f.value)==null?void 0:k.pageData;r?B={...B,compData:(T=B==null?void 0:B.compData)==null?void 0:T.map(S=>{var K;return(S==null?void 0:S.key)==="header"?{...S,contents:(K=S==null?void 0:S.contents)==null?void 0:K.map(x=>({...x,[e]:n}))}:S})}:B={...B,compData:(t=B==null?void 0:B.compData)==null?void 0:t.map(S=>{var K,x;return(S==null?void 0:S.key)==="header"?{...S,contents:(K=S==null?void 0:S.contents)==null?void 0:K.map(L=>(L==null?void 0:L.prop)===(a==null?void 0:a.prop)?{...L,[e]:n}:L)}:(S==null?void 0:S.key)==="tableToForm"&&o?{...S,contents:(x=S==null?void 0:S.contents)==null?void 0:x.map(L=>(L==null?void 0:L.prop)===(a==null?void 0:a.prop)?{...L,[o]:n}:L)}:S})};const A=await m.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:B}});((M=A==null?void 0:A.data)==null?void 0:M.code)===200?(m.ElMessage.success("编辑成功"),De.setRefreshCurStructure(!0)):m.ElMessage.error("编辑响应失败")}}catch(y){m.ElMessage.error(y)}},Va=async(e,a)=>{await Ol("label",a,e)},ja=async(e,a)=>{await Ol("columnType",a,e,!1,"type")},Ma=()=>{il.value?Pe.value=!1:pa()},$a=e=>{Ke.value=e},Pa=(e,a)=>{al.value===a?dl.value=!1:dl.value=!0,al.value=a==null?void 0:a.changeProp},pl=l.computed(()=>{var n,r,o;const e=(n=V.value)==null?void 0:n.some(i=>i==null?void 0:i.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(o=(r=V.value)==null?void 0:r.filter(i=>(i==null?void 0:i.label)!=="操作"))==null?void 0:o.map(i=>({...i,filterable:!!(i!=null&&i.filterable),showSummary:!!(i!=null&&i.showSummary),operable:!!(i!=null&&i.operable)}))}),Ka=async(e,a,n)=>{const r=m.cloneDeep(V.value);await l.nextTick(),V.value=r==null?void 0:r.map(o=>(n==null?void 0:n.label)===(o==null?void 0:o.label)?{...o,[a]:e}:o),await Ol(a,n,e)},Kl=async(e,a)=>{await Ol(a,null,e,!0)},Fa=()=>{Qe.value=!1},za=e=>{oe("clickTrigger",e)},Zl=async e=>{var i,d,c,f,k,t,T,M,y,B,A,S,K,x,L;const a=e==null?void 0:e.row,n=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix;if((i=a==null?void 0:a.toString())!=null&&i.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(a.includes(",")){m.ElMessage.error("当前版本仅允许单个urdf预览!");return}cl.value=[a],Ue.value=!0,rl.value={data:m.cloneDeep(n)},qe.value=!0;return}let o=[];if((d=a==null?void 0:a.toString())!=null&&d.includes(".stl")||(c=a==null?void 0:a.toString())!=null&&c.includes(".STL")||(f=a==null?void 0:a.toString())!=null&&f.includes(".obj")||(k=a==null?void 0:a.toString())!=null&&k.includes(".mtl")){cl.value=(t=a==null?void 0:a.toString())==null?void 0:t.split(","),Ue.value=!1,qe.value=!0;return}if((T=a==null?void 0:a.toString())!=null&&T.includes(".stl")||(M=a==null?void 0:a.toString())!=null&&M.includes(".STL")||(y=a==null?void 0:a.toString())!=null&&y.includes(".obj")||(B=a==null?void 0:a.toString())!=null&&B.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let D,g=[],h={};if(Array.isArray(a)?D=a:D=a==null?void 0:a.split(","),D==null||D.forEach(u=>{u.includes(".mtl")?g.push(u):h.blob=h.blob?h.blob+","+u:u}),(g==null?void 0:g.length)>0&&(h.mtlBlobs=g),r&&(h.suffix=r),(S=(A=Object.values(h))==null?void 0:A[0])!=null&&S.includes("http:"))o.push(h);else{const u=new Blob([h.blob],{type:"application/octet-stream;charset=UTF-8"});let v=URL.createObjectURL(u),P="";(K=a==null?void 0:a.split("/"))==null||K.forEach((E,G)=>{var le;G===((le=a==null?void 0:a.split("/"))==null?void 0:le.length)-1&&(P=E)}),(x=h.blob)!=null&&x.includes(".stl")&&(P=(P==null?void 0:P.replaceAll(">",""))+".urdf"),C.value=[{name:P,blobUrl:v}],we.value=!0}}else{const D=await m.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),g=new Blob([D.data],{type:"application/octet-stream;charset=UTF-8"});let h=URL.createObjectURL(g),u="";(L=a==null?void 0:a.split("/"))==null||L.forEach((v,P)=>{var E;P===((E=a==null?void 0:a.split("/"))==null?void 0:E.length)-1&&(u=v)}),C.value=[{name:u,blobUrl:h}],we.value=!0}(o==null?void 0:o.length)>0&&$.setBlobUrls(o)},Ll=e=>{var r,o,i,d;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(d=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:d[((i=(o=e==null?void 0:e.url)==null?void 0:o.split("."))==null?void 0:i.length)-1];return(e==null?void 0:e.name)+"."+a},Ra=async e=>{let a=null,n=null,r=null;if(e!=null&&e.downloadUrl){const i=await Fl(),d=Re.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),c=await m.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:i,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{d.close()}),f=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(f),n=e==null?void 0:e.name;const k=n==null?void 0:n.lastIndexOf(".");r=n==null?void 0:n.slice(k)}else{const i=await Ve.downloadAvatarApi({url:e==null?void 0:e.url});!e.url.toUpperCase().includes(".OBJ")&&!e.url.toUpperCase().includes(".STL")&&!e.url.toUpperCase().includes(".MTL")&&!e.url.toUpperCase().includes(".URDF")?(a=URL.createObjectURL(i.data),n=Ll(e)):a=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 i={row:`${a}`,suffix:r};Zl(i);return}const o={name:n,blobUrl:a};C.value=[o],we.value=!0},qa=async e=>{let a=null,n=null;if(e!=null&&e.downloadUrl){const i=await Fl(),d=await m.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:i,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),c=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(c),n=e==null?void 0:e.name}else{const i=await Ve.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(i.data),n=Ll(e)}const r={name:n,blobUrl:a},o=document.createElement("a");o.href=r.blobUrl,o.download=r.name,o.style.display="none",document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o)},100)},Ja=(e,a)=>{var n;if(Object.values(a).length!==0)return Object.values(a).find(r=>{var o,i,d;return((o=r==null?void 0:r.toString())==null?void 0:o.includes(".txt"))||((i=r==null?void 0:r.toString())==null?void 0:i.includes(".cpt"))||((d=r==null?void 0:r.toString())==null?void 0:d.includes(".obj"))})?[...e,Ca.value]:(n=s==null?void 0:s.config)!=null&&n.allowMove?[...e,{label:"迁移"}]:e},Wa=(e,a={})=>[...e==null?void 0:e.values()].filter(n=>Object.keys(a).every(r=>{var d;const o=n[r],i=(d=a[r])==null?void 0:d.toLowerCase();return i&&o&&typeof o=="string"?o.toLowerCase().includes(i):!0})),Il=l.ref([]),Ga=async(e,a,n=!1)=>{var r;if(e){if(De.setTableLoading(!0),Il.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(o=>!o)))return Y.value=xl.value;if(n){Y.value=[...Tl.value.values()].filter(o=>Object.values(o).some(i=>typeof i=="string"?i==null?void 0:i.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}Y.value=Wa(Tl.value,e),De.setTableLoading(!1)}},Ha=async e=>{var d,c,f,k,t,T,M,y,B,A,S,K,x,L,D;const a=await m.getInsofDataApi({keyLikes:{pageKey:`loading${((d=ce.value)==null?void 0:d.account)||((c=ce.value)==null?void 0:c.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await m.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((f=ce.value)==null?void 0:f.account)||((k=ce.value)==null?void 0:k.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(T=(t=a==null?void 0:a.data)==null?void 0:t.result)==null?void 0:T.map(g=>g==null?void 0:g.id);const o=(y=(M=n==null?void 0:n.data)==null?void 0:M.result)==null?void 0:y.map(g=>g==null?void 0:g.id);r=[...m.cloneDeep(r),...o],(r==null?void 0:r.length)>0&&(r!=null&&r.every(g=>g!==null&&g))&&await m.batchDeleteInsofDataApi({ids:r});let i=await te.getItemData(W.value,sessionStorage.getItem("systemKey"),e.id);if(i=i==null?void 0:i.filter(g=>g.comp!=="methodButton"),i&&i.length>0){const g=!Array.isArray(Pl.value)&&((B=Pl.value)==null?void 0:B.key)!=="main"?[]:Pl.value;g.push({key:Ye.value===""?(A=e==null?void 0:e.id)==null?void 0:A.toString():Ye.value+"-"+((S=e==null?void 0:e.id)==null?void 0:S.toString()),value:e[(K=Object.keys(e))==null?void 0:K.filter(h=>h!=="index"&&h!=="id")[0]]}),Al.setSelectMenu(Ye.value===""?(x=e==null?void 0:e.id)==null?void 0:x.toString():Ye.value+"-"+((L=e==null?void 0:e.id)==null?void 0:L.toString())),Al.setSelectTitle(g),Al.setSelectIndex((D=e==null?void 0:e.id)==null?void 0:D.toString()),oe("pageChange",i)}},ea=async(e,a,n,r)=>{var i,d,c,f,k,t,T,M,y,B,A,S,K,x,L,D,g,h,u,v,P,E,G,le,X;if(oe("clickMainKey",n),(r==null?void 0:r.isExistChild)===!0){let q=(d=(i=V.value)==null?void 0:i.find(z=>(z==null?void 0:z.isMainKey)===!0))==null?void 0:d.prop,H=(c=r==null?void 0:r.rowContent)==null?void 0:c[q],w=(k=(f=r==null?void 0:r.columnType)==null?void 0:f.childPath)==null?void 0:k.split(ee),j=[];w==null||w.forEach((z,p)=>{(w==null?void 0:w.length)-1===p&&j.push(H),j.push(z)}),j=j.join(ee);let R=await te.getItemData(j,sessionStorage.getItem("systemKey"),""),ae=await te.getItemData((t=r==null?void 0:r.columnType)==null?void 0:t.childPath,sessionStorage.getItem("systemKey"),"");if(!R||(R==null?void 0:R.length)===0){let z=[];ae==null||ae.forEach(F=>{var me,he,N,b;let _={type:"structure",pageKey:j,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(me=ce.value)==null?void 0:me.id,parentPageKey:"",createUserLayer:((he=ce.value)==null?void 0:he.dept)||((N=ce.value)==null?void 0:N.部门名称)},ve={pageData:{comp:F==null?void 0:F.comp,compData:(b=F==null?void 0:F.compData)==null?void 0:b.filter(se=>(se==null?void 0:se.key)!=="tableContents"),name:F==null?void 0:F.name,isShow:F==null?void 0:F.isShow}};z.push({key:_,value:ve})}),(z==null?void 0:z.length)>0&&await m.batchAddInsofDataApi({dataList:z});let p=await te.getItemData(j,sessionStorage.getItem("systemKey"),"");Ul.value=p}else Ul.value=R;oe("routeUrl",Ul.value,{isEdit:!0,routerUrl:j});return}if((r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(q=>(q==null?void 0:q.url)&&(q==null?void 0:q.name)))){let q=m.cloneDeep(e);q=await((T=m.cloneDeep(q))==null?void 0:T.map(async w=>{var ae,z,p,F;const j=await Ve.downloadAvatarApi({url:w==null?void 0:w.url});let R=URL.createObjectURL(j.data);return{name:(w==null?void 0:w.name)+"."+((F=(ae=w==null?void 0:w.url)==null?void 0:ae.split("."))==null?void 0:F[((p=(z=w==null?void 0:w.url)==null?void 0:z.split("."))==null?void 0:p.length)-1]),blobUrl:R}}));let H=await Promise.all(q);C.value=H,we.value=!0}const o=m.cloneDeep(V.value);if((r==null?void 0:r.isMainKey)===!0&&(o==null?void 0:o.length)>0){(M=o==null?void 0:o[0])==null||M.prop;let q=m.cloneDeep(W).value+ee+(r==null?void 0:r.data),H=m.cloneDeep(W).value,w=(B=(y=Ze.value[q])==null?void 0:y.filter(z=>{var p,F;return((p=z==null?void 0:z.key)==null?void 0:p.type)==="structure"&&((F=z==null?void 0:z.key)==null?void 0:F.parentTable)===""}))==null?void 0:B.map(z=>{var p;return(p=z==null?void 0:z.value)==null?void 0:p.pageData}),j={};(A=V.value)==null||A.forEach(z=>{(z==null?void 0:z.label)!=="操作"&&(j[z.label]=n[z.prop]??n[z.label])});let R=(K=(S=s==null?void 0:s.itemData)==null?void 0:S.find(z=>(z==null?void 0:z.key)==="mainRouters"))==null?void 0:K.contents,ae;if((R==null?void 0:R.length)>0){let z=q==null?void 0:q.split(ee)[((x=q==null?void 0:q.split(ee))==null?void 0:x.length)-1],p=R==null?void 0:R.find(F=>(F==null?void 0:F.key)===z);ae=(p==null?void 0:p.routerContent)+ee+(p==null?void 0:p.key)}if((w==null?void 0:w.length)>0)await te.getItemData(q+ee+`updateLoading${((L=ce.value)==null?void 0:L.account)||((D=ce.value)==null?void 0:D.账号)}`,sessionStorage.getItem("systemKey"),"")||await te.loadingConstruct(q,q+ee+`updateLoading${((g=ce.value)==null?void 0:g.account)||((h=ce.value)==null?void 0:h.账号)}`,j,ae),De.setRouteToChildPath(H),fe.setActiveMenuPath(q+ee+`updateLoading${((u=ce.value)==null?void 0:u.account)||((v=ce.value)==null?void 0:v.账号)}`);else{(P=o==null?void 0:o[0])==null||P.prop;let z=m.cloneDeep(W).value+ee+(r==null?void 0:r.data),p=m.cloneDeep(W).value;await te.getItemData(p+ee,sessionStorage.getItem("systemKey"),""),await te.loadingConstruct(p+ee,z,j),await te.loadingConstruct(z,z+ee+`updateLoading${((E=ce.value)==null?void 0:E.account)||((G=ce.value)==null?void 0:G.账号)}`,j,ae),De.setRouteToChildPath(p),fe.setActiveMenuPath(z+ee+`updateLoading${((le=ce.value)==null?void 0:le.account)||((X=ce.value)==null?void 0:X.账号)}`)}}},Qa=()=>{we.value=!1},Xa=e=>{oe("rowClick",e)};l.watch(()=>s.changedContent,()=>{var n,r;if(!s.changedContent)return;let e=(n=Y.value)==null?void 0:n.map(o=>{var i;return o.id===((i=s.changedContent)==null?void 0:i.id)&&(o={...s.changedContent,id:s.changedContent.newId?s.changedContent.newId:s.changedContent.id},delete o.newId),o});const a=(r=s.itemData)==null?void 0:r.map(o=>((o==null?void 0:o.key)==="tableContents"&&(o.contents=e),o));Y.value=e,oe("contentChange",{contents:a,index:s.index}),oe("change",{content:e,index:s==null?void 0:s.index,buttonName:"",id:s==null?void 0:s.index})},{deep:!0,immediate:!0});const Ya=()=>{},Za=async()=>{const e=W.value,a=sessionStorage.getItem("systemKey"),n=await te.getItemData(e,a,""),r=n==null?void 0:n.find(c=>(c==null?void 0:c.name)==="方法明细"),o=(r==null?void 0:r.compData)||[],i=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="formContent");return i==null?void 0:i.contents},Fl=async()=>`Bearer ${m.Local.get("access-token")}`,Ia=async(e,{token:a,inputData:n}={})=>await m.axios.post(e,n,{headers:{Authorization:a}}).catch(o=>(fe.setImportLoading(!1),Promise.reject(o))),er=e=>{var r;let a={};const n=[];return a.form={},(r=m.cloneDeep(e))==null||r.forEach((o,i)=>{var d,c,f,k,t,T,M,y,B,A,S,K,x,L;if((o==null?void 0:o.comp)==="Table"){(c=(d=o==null?void 0:o.compData)==null?void 0:d.find(u=>(u==null?void 0:u.key)==="header"))==null||c.contents;let D=(t=(k=(f=o==null?void 0:o.compData)==null?void 0:f.find(u=>(u==null?void 0:u.key)==="tableContents"))==null?void 0:k.contents)==null?void 0:t.map(u=>u.slice(1));(A=(B=(y=(M=(T=o==null?void 0:o.compData)==null?void 0:T.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:M.contents)==null?void 0:y[0])==null?void 0:B[0])==null||A.label;let g=(K=(S=o==null?void 0:o.compData)==null?void 0:S.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:K.contents,h=[];D==null||D.forEach(u=>{let v=[];u==null||u.forEach((P,E)=>{var le;let G={};((le=g[E])==null?void 0:le.label)!=="操作"&&(G[g[E].label]=P,v.push(G))}),h.push(v)}),a[o.name]=h}else{const D=(L=(x=o.compData)==null?void 0:x.find(g=>(g==null?void 0:g.key)==="formContent"))==null?void 0:L.contents;D==null||D.forEach(g=>{var h,u;if(g.prop!==""){let v=g==null?void 0:g.value;Array.isArray(v)?v=((h=v==null?void 0:v[0])==null?void 0:h.oldUrl)||"http://222.92.178.198:62001/"+((u=v==null?void 0:v[0])==null?void 0:u.url):v=v.toString(),g={key:(g==null?void 0:g.prop)??(g==null?void 0:g.label),value:v},n.push(g)}})}}),a.form=te.getFormContents(n),a},lr=async(e,a,n)=>{var P,E,G,le,X,q,H,w,j,R,ae,z;fe.setImportLoading(!0);const r=await Za().catch(p=>(fe.setImportLoading(!1),Promise.reject(p))),o=r==null?void 0:r.find(p=>(p==null?void 0:p.key)==="算法体"),i=o==null?void 0:o.value;if(!i){console.log("未搜索到isMain, 缺少算法执行接口"),fe.setImportLoading(!1);return}const d=V.value||[],c=d.find(p=>(p==null?void 0:p.prop)==="输入"),f=c==null?void 0:c.prop;let k=a==null?void 0:a[f];const t=await Fl().catch(p=>(fe.setImportLoading(!1),Promise.reject(p)));let T=!1,M="";(P=V.value)==null||P.forEach(p=>{(p==null?void 0:p.prop)===f&&(T=!!(p!=null&&p.childPath),M=p==null?void 0:p.childPath)});let y="",B="";if(T){let p=(G=(E=V.value)==null?void 0:E.find(me=>(me==null?void 0:me.isMainKey)===!0))==null?void 0:G.prop;B=a==null?void 0:a[p];let F=M==null?void 0:M.split(ee),_=[];F==null||F.forEach((me,he)=>{(F==null?void 0:F.length)-1===he&&_.push(B),_.push(me)}),_=_.join(ee),y=_;let ve=await te.getItemData(_,sessionStorage.getItem("systemKey"),"");k=er(ve)}const A=await Ia(i,{token:t,inputData:k}).catch(p=>(fe.setImportLoading(!1),Promise.reject(p))),S=(le=A==null?void 0:A.data)==null?void 0:le.data,K=r==null?void 0:r.find(p=>(p==null?void 0:p.prop)==="算法名称");K==null||K.value;const x=d.find(p=>(p==null?void 0:p.prop)==="输出"),L=x==null?void 0:x.directiveLabel;y=y==null?void 0:y.replaceAll(c==null?void 0:c.directiveLabel,L);const D=(X=m.cloneDeep(y))==null?void 0:X.replaceAll(ee+B,"");let g=await te.getItemData(y,sessionStorage.getItem("systemKey"),""),h=await te.getItemData(D,sessionStorage.getItem("systemKey"),"");if(g){let p=[],F=[];g==null||g.forEach(_=>{var ve,me;if((_==null?void 0:_.comp)==="Table")(ve=_==null?void 0:_.compData)==null||ve.forEach(he=>{var N;(he==null?void 0:he.key)==="tableContents"&&((N=he==null?void 0:he.contents)==null||N.forEach(b=>{var se,ie;(se=b==null?void 0:b[0])!=null&&se.id&&p.push((ie=b==null?void 0:b[0])==null?void 0:ie.id)}))});else if((_==null?void 0:_.comp)==="Form"){_.compData=(me=_==null?void 0:_.compData)==null?void 0:me.map(N=>{var b;return(N==null?void 0:N.key)==="formContent"&&(N.contents=(b=N==null?void 0:N.contents)==null?void 0:b.map(se=>{var ie,ge;return(ie=S==null?void 0:S.form)!=null&&ie[se.prop]&&(se.value=(ge=S==null?void 0:S.form)==null?void 0:ge[se.prop]),se})),N});let he={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};F.push({id:_==null?void 0:_.id,value:he})}}),(F==null?void 0:F.length)>0&&await m.batchUpdateInsofDataApi({dataList:F}),p=[...new Set(p)],(p==null?void 0:p.length)>0&&await m.batchDeleteInsofDataApi({ids:p})}else{let p=[];if(S!=null&&S.table){let F={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:y,parentTable:"",createUserId:(q=ce.value)==null?void 0:q.id,createUserOrg:((H=ce.value)==null?void 0:H.dept)||((w=ce.value)==null?void 0:w.部门名称)};h==null||h.forEach(_=>{let me={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};p.push({key:F,value:me})})}if(S!=null&&S.form){let F={type:"structure",pageKey:y,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(j=ce.value)==null?void 0:j.id,parentPageKey:"",createUserLayer:((R=ce.value)==null?void 0:R.dept)||((ae=ce.value)==null?void 0:ae.部门名称)};h==null||h.forEach(_=>{var N;let ve=(N=_==null?void 0:_.compData)==null?void 0:N.map(b=>{var se;return(b==null?void 0:b.key)==="formContent"&&(b.contents=(se=b.contents)==null?void 0:se.map(ie=>{var ge,xe;return(ge=S==null?void 0:S.form)!=null&&ge[ie.prop]&&(ie.value=(xe=S==null?void 0:S.form)==null?void 0:xe[ie.prop]),ie})),b}),he={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:ve}};p.push({key:F,value:he})})}(p==null?void 0:p.length)>0&&await m.batchAddInsofDataApi({dataList:p})}let u=await te.getItemData(y,sessionStorage.getItem("systemKey"),""),v=[];S!=null&&S.table&&((z=S==null?void 0:S.table)==null||z.forEach(p=>{var ve,me,he,N;let F={type:"data",pageKey:y,tableId:(ve=u==null?void 0:u[0])==null?void 0:ve.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(me=ce.value)==null?void 0:me.id,createUserOrg:((he=ce.value)==null?void 0:he.dept)||((N=ce.value)==null?void 0:N.部门名称)},_={tableData:p};v.push({key:F,value:_})})),(v==null?void 0:v.length)>0&&await m.batchAddInsofDataApi({dataList:v}),hl(!0),fe.setImportLoading(!1)},la=(e,a)=>(e=e==null?void 0:e.map(n=>{var r,o;return n!=null&&n.children&&((r=n.children)!=null&&r.find(i=>i.id===(a==null?void 0:a.id))?n.children=(o=n.children)==null?void 0:o.filter(i=>(i==null?void 0:i.id)!==(a==null?void 0:a.id)):n.children=la(n.children,a)),n}),e),Se=l.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:s==null?void 0:s.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(e,a,n)=>{a===(s==null?void 0:s.index)?n(new Error("选择源不能和目标源一致")):n()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),ar=()=>{Se.show=!1},rr=e=>{var a,n;if((e==null?void 0:e.buttonName)==="取消")return Se.show=!1;Se.to=e==null?void 0:e.content,!(!(s!=null&&s.index)||!((a=Se.to)!=null&&a.groupName))&&(s==null?void 0:s.index)!==((n=Se.to)==null?void 0:n.groupName)&&(oe("change",{buttonName:"迁移",value:{from:Se.from,to:Se.to,data:Se.selectRow}}),Se.show=!1)},Vl=async(e,a,n)=>{var r,o,i,d,c,f,k,t,T,M,y,B,A,S,K;if(Ge.value="",Bl.value=!0,El.value=!0,oe("onButtonClick",e,a),e==="删除")te.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,L;(x=Y.value)!=null&&x.find(D=>(D==null?void 0:D.id)===(a==null?void 0:a.id))?Y.value=(L=m.cloneDeep(Y.value))==null?void 0:L.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)):Y.value=la(m.cloneDeep(Y.value),a),Jr(wl.value,Ye.value,a==null?void 0:a.id),De.setTableLoading(s==null?void 0:s.index),oe("change",{content:Y.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:V.value})});else if(e==="批量删除"){if(((r=Ke.value)==null?void 0:r.length)===0)return m.ElMessage.warning("请先勾选操作的数据");te.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var L,D;const x=(L=Ke.value)==null?void 0:L.map(g=>g.id);Y.value=(D=m.cloneDeep(Y.value))==null?void 0:D.filter(g=>!(x!=null&&x.includes(g.id))),De.setTableLoading(s==null?void 0:s.index),oe("change",{content:Y.value,singleContent:null,selectItems:Ke.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:V.value})})}else if(e==="复制新增"){Me.value="新增";const x=m.cloneDeep(a),L=(o=V.value)==null?void 0:o.find(h=>h==null?void 0:h.isMainKey),D=L||((i=V.value)==null?void 0:i[0]),g=(d=el.value)==null?void 0:d.find(h=>(h==null?void 0:h.label)==="新建");await ra(!0,g,{data:x,firstCol:D})}else if(e==="新增")Me.value="新增",gl(""),Qe.value=!0;else if(e==="编辑")Me.value="编辑",gl(a),Qe.value=!0;else if(e==="查看")Me.value="查看",gl(a),Bl.value=!1,El.value=!1,Qe.value=!0;else if(e==="查看三维模型"){const x={};for(let D in a)D!=="id"&&(x[D]=a[D]);let L=(c=Object.values(x))==null?void 0:c[1];We.setTableShowThree(L)}else if(((f=n==null?void 0:n.extra)==null?void 0:f.type)==="modelExample")Me.value=e,Nl.value=!0;else if(e==="新建"){let x=Ze.value,L=[];for(let v in x)v!=null&&v.includes(`loading${((k=ce.value)==null?void 0:k.account)||((t=ce.value)==null?void 0:t.账号)}`)&&(L=[...L,...v]);let D=[];for(let v in x)v!=null&&v.includes(`updateLoading${((T=ce.value)==null?void 0:T.account)||((M=ce.value)==null?void 0:M.账号)}`)&&(D=[...D,...v]);let g=L==null?void 0:L.map(v=>v==null?void 0:v.id);const h=D==null?void 0:D.map(v=>v==null?void 0:v.id);g=[...m.cloneDeep(g),...h],(g==null?void 0:g.length)>0&&(g!=null&&g.every(v=>v!==null&&v))&&await m.batchDeleteInsofDataApi({ids:g});const u=(y=el.value)==null?void 0:y.find(v=>(v==null?void 0:v.label)==="新建");await ra(!1,u)}else if(e==="修改模板"){let x=m.cloneDeep(W).value;De.setRouteToChildPath(x),fe.setActiveMenuPath(x+ee)}else if(e==="执行")lr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((B=Ke.value)==null?void 0:B.length)===0)return m.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((A=Y.value)==null?void 0:A.length)===0)return m.ElMessage.warning("暂无数据导出");const x=(K=(S=V.value)==null?void 0:S.map(D=>D==null?void 0:D.label))==null?void 0:K.filter(D=>D!=="操作"),L=e==="导出全部"?m.cloneDeep(Y.value):m.cloneDeep(Ke.value);L==null||L.forEach(D=>{D==null||delete D.id}),La(L,s==null?void 0:s.compName,x,s==null?void 0:s.compName)}else e==="迁移"&&(Se.selectRow=a,Se.show=!0)},nr=async e=>{var n,r,o,i,d,c;const a=await m.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((n=a==null?void 0:a.data)==null?void 0:n.code)===200)return Array.isArray((r=a==null?void 0:a.data)==null?void 0:r.result)&&((i=(o=a==null?void 0:a.data)==null?void 0:o.result)==null?void 0:i.length)>0?(c=(d=a==null?void 0:a.data)==null?void 0:d.result)==null?void 0:c.map(f=>{var k;return{id:f==null?void 0:f.id,...(k=f==null?void 0:f.value)==null?void 0:k.pageData}}):[]},or=async(e,a)=>{var n,r,o,i,d,c,f,k,t,T,M,y,B,A,S,K,x,L,D,g;try{let h,u;const v=(n=Ze.value[W.value+ee])==null?void 0:n.filter(w=>{var j;return((j=w==null?void 0:w.key)==null?void 0:j.type)==="structureMethod"}),P=(r=Ze.value[W.value+ee])==null?void 0:r.filter(w=>{var j;return((j=w==null?void 0:w.key)==null?void 0:j.type)==="structure"}),E=v==null?void 0:v.find(w=>{var j,R;return((R=(j=w==null?void 0:w.value)==null?void 0:j.pageData)==null?void 0:R.method)==="保存"});if(!E)return;const G=(c=(d=Ze.value[(i=(o=E==null?void 0:E.value)==null?void 0:o.pageData)==null?void 0:i.path])==null?void 0:d.filter(w=>{var j;return((j=w==null?void 0:w.key)==null?void 0:j.type)==="data"}))==null?void 0:c.find(w=>{var j,R,ae,z;return((R=(j=w==null?void 0:w.value)==null?void 0:j.tableData)==null?void 0:R.算法名称)===((z=(ae=E==null?void 0:E.value)==null?void 0:ae.pageData)==null?void 0:z.method)});if(!G)return;const le={buttonName:(k=(f=E==null?void 0:E.value)==null?void 0:f.pageData)==null?void 0:k.method,api:(T=(t=G==null?void 0:G.value)==null?void 0:t.tableData)==null?void 0:T.算法体,content:P==null?void 0:P.map(w=>{var j;return(j=w==null?void 0:w.value)==null?void 0:j.pageData}),extraContent:[],extraValues:(y=(M=E==null?void 0:E.value)==null?void 0:M.pageData)==null?void 0:y.data,methodName:(A=(B=E==null?void 0:E.value)==null?void 0:B.pageData)==null?void 0:A.path};if(!e)return;const X={...e,compData:(S=e==null?void 0:e.compData)==null?void 0:S.map(w=>{var j;return(w==null?void 0:w.key)==="formContent"?{...w,contents:(j=w==null?void 0:w.contents)==null?void 0:j.map(R=>(R==null?void 0:R.prop)===a?{...R,value:""}:R)}:w})},q={key:{pageKey:W.value+ee,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:X}},H=await m.axios.post(le.api,q,{headers:{"Content-Type":"application/json"}});return((K=H==null?void 0:H.data)==null?void 0:K.code)===200&&(h=(L=(x=H==null?void 0:H.data)==null?void 0:x.result)==null?void 0:L.latestReportCode,u=(g=(D=H==null?void 0:H.data)==null?void 0:D.result)==null?void 0:g.status),{newMainKeyValue:h,newStatus:u}}catch(h){throw m.ElMessage.error(h),new Error(h)}},aa=(e,a,n,r)=>{var o;oe("contentChange",{contents:(o=e==null?void 0:e.compData)==null?void 0:o.map(i=>{var d;return(i==null?void 0:i.key)==="formContent"?{...i,contents:(d=i==null?void 0:i.contents)==null?void 0:d.map(c=>(c==null?void 0:c.key)===a?{...c,value:n}:fl.value&&(c==null?void 0:c.prop)===fl.prop?{...c,value:fl.value}:c)}:i}),index:e==null?void 0:e.id},r)},fl=l.reactive({prop:"状态",value:""}),tr=l.ref(["系统自动生成信息","审批意见"]),sr=async(e,a,n)=>{var f,k;let r=e==null?void 0:e[a==null?void 0:a.prop],o=1,i,d;const c=m.cloneDeep(W).value+ee+r;if(c){fl.value="",i=(f=Ze.value[c])==null?void 0:f.filter(M=>{var y;return((y=M==null?void 0:M.key)==null?void 0:y.type)==="structure"});const t=i==null?void 0:i.find(M=>{var y,B,A;return((A=(B=(y=M==null?void 0:M.value)==null?void 0:y.pageData)==null?void 0:B.comp)==null?void 0:A.toUpperCase())==="FORM"});d={...(k=t==null?void 0:t.value)==null?void 0:k.pageData,id:t==null?void 0:t.id};const T=await or(d,a==null?void 0:a.prop);if(fl.value=T==null?void 0:T.newStatus,T!=null&&T.newMainKeyValue)return T==null?void 0:T.newMainKeyValue}if(Y.value.some(t=>(t==null?void 0:t[a==null?void 0:a.prop])===r)){const t=r;for(;Y.value.some(T=>(T==null?void 0:T[a==null?void 0:a.prop])===`${t}(${o})`);)o++;r=`${t}(${o})`}return r},ra=async(e,a,n)=>{var d,c,f,k,t,T,M,y;let r,o;const i=await sr(n==null?void 0:n.data,n==null?void 0:n.firstCol);if(e?(r=m.cloneDeep(W).value+ee+((k=n==null?void 0:n.data)==null?void 0:k[(f=n==null?void 0:n.firstCol)==null?void 0:f.prop]),o=m.cloneDeep(W).value+ee+i):(r=m.cloneDeep(W).value+ee,o=m.cloneDeep(r)+`loading${((d=ce.value)==null?void 0:d.account)||((c=ce.value)==null?void 0:c.账号)}`),a){const B=(T=(t=Ze.value[o])==null?void 0:t.filter(A=>{var S;return((S=A==null?void 0:A.key)==null?void 0:S.parentTable)===""}))==null?void 0:T.map(A=>{var S;return{id:A==null?void 0:A.id,...(S=A==null?void 0:A.value)==null?void 0:S.pageData}});if((B==null?void 0:B.length)>0)if(e){const A=B==null?void 0:B.find(S=>{var K;return((K=S==null?void 0:S.comp)==null?void 0:K.toUpperCase())==="FORM"});A&&aa(A,(M=n==null?void 0:n.firstCol)==null?void 0:M.label,i,W.value)}else De.setRouteToChildPath(m.cloneDeep(W).value),fe.setActiveMenuPath(o);else if(await te.loadingConstruct(r,o,null,null,e?tr.value:null),e){const A=await nr(o);if((A==null?void 0:A.length)>0){const S=A==null?void 0:A.find(K=>{var x;return((x=K==null?void 0:K.comp)==null?void 0:x.toUpperCase())==="FORM"});S&&aa(S,(y=n==null?void 0:n.firstCol)==null?void 0:y.label,i,W.value)}}else De.setRouteToChildPath(m.cloneDeep(W).value),fe.setActiveMenuPath(o)}else e?(Ge.value="",Ne.value=n==null?void 0:n.data,hl(!0,n==null?void 0:n.firstCol,i)):(De.setRouteToChildPath(m.cloneDeep(W).value),fe.setActiveMenuPath(o))},ir=()=>{qe.value=!1,cl.value=[],Ue.value=!1},gl=e=>{var o,i,d,c,f,k;const a=[];let n=[];for(let t in e)Array.isArray(e==null?void 0:e[t])&&n.push(t);Te.value=m.cloneDeep(V.value),(i=te.getColumnChild((o=m.cloneDeep(V.value))==null?void 0:o.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||i.forEach((t,T)=>{var M;n.find(y=>y===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((M=t==null?void 0:t.formType)==null?void 0:M.toUpperCase())==="SELECT"?a.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",name:(t==null?void 0:t.prop)??"t"+T,prop:t==null?void 0:t.prop,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??T,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled,optionUrl:{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.formMenuSelect,type:"Select",selectRelateType:t==null?void 0:t.selectRelateType}}):a.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",prop:t==null?void 0:t.prop,name:(t==null?void 0:t.prop)??"t"+T,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??T,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled}))}),e===""||!e||(Ge.value=(e==null?void 0:e.id)??"");let r=te.getColumnChild((d=m.cloneDeep(V.value))==null?void 0:d.filter(t=>(t==null?void 0:t.label)!=="操作"));Oe.value&&((c=Oe.value)==null?void 0:c.length)>0&&(Oe.value=(f=m.cloneDeep(Oe).value)==null?void 0:f.map(t=>{var M;let T=(t==null?void 0:t.prop)||((M=r==null?void 0:r.find(y=>(y==null?void 0:y.label)===(t==null?void 0:t.label)))==null?void 0:M.prop);return T&&(t.value=e[T]),t})),Xe.value=Oe.value&&((k=Oe.value)==null?void 0:k.length)>0?te.getTableFormToForm(Oe.value):a},ur=()=>{var a;const e=(a=U.value)==null?void 0:a.$el;e&&Jl.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:n=>{var d;const{oldIndex:r,newIndex:o}=n;if(r===o)return;const i=pl.value.splice(r,1)[0];pl.value.splice(o,0,i),V.value=(d=V.value)==null?void 0:d.slice().sort((c,f)=>{if(c.label==="操作")return 1;if(f.label==="操作")return-1;const k=pl.value.findIndex(T=>T.label===c.label),t=pl.value.findIndex(T=>T.label===f.label);return k-t})}})};l.onMounted(()=>{Ml.value=window.innerWidth-240*2});const cr=()=>{l.nextTick(()=>{ur()})},zl=(e,a)=>{var r;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let n;return e.children=(r=e.children)==null?void 0:r.map(o=>{var i,d;if((o==null?void 0:o.id)===Ge.value){let c={};for(let f in o){let k=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:i.label;k?c[f]=(d=Ne.value)==null?void 0:d[k]:c[f]=o[f]}o=Object.assign(c,Ne.value),n=o}else{let c=zl(o,a);o=c==null?void 0:c.contents,n=c==null?void 0:c.currentSelectContents}return o}),{contents:e,currentSelectContents:n}},na=(e,a)=>{let n,r;return e!=null&&e.find(o=>(o==null?void 0:o.id)===Ge.value)?n=e==null?void 0:e.map(o=>{var i,d;if((o==null?void 0:o.id)===Ge.value){let c={};for(let f in o){let k=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===f))==null?void 0:i.label;k?c[f]=(d=Ne.value)==null?void 0:d[k]:c[f]=o[f]}o=Object.assign(c,Ne.value),r=o}return o}):n=e==null?void 0:e.map(o=>{var i,d,c,f;if((o==null?void 0:o.id)===Ge.value){let k={};for(let t in o){let T=(i=a==null?void 0:a.find(M=>(M==null?void 0:M.prop)===t))==null?void 0:i.label;T?k[t]=(d=Ne.value)==null?void 0:d[T]:k[t]=o[t]}o=Object.assign(k,Ne.value),r=o}else o=(c=zl(o,a))==null?void 0:c.contents,r=(f=zl(o,a))==null?void 0:f.currentSelectContents;return o}),{newContents:n,currentSelectContents:r}},oa=(e,a,n)=>{var r,o;return e[a==null?void 0:a.prop]=n,typeof e.id=="number"&&(e.id=(r=e.id)==null?void 0:r.toString()),e.children&&((o=e.children)==null?void 0:o.length)>0&&(e.children=e.children.map(oa)),e},Rl=e=>{var n;const a=[];return a.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((n=e.children)==null||n.forEach(r=>{a.push(...Rl(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const o={...r};return delete o.children,o}):[]},hl=(e=!0,a,n)=>{var k,t,T,M,y,B,A,S,K;let r=te.getColumnChild((k=m.cloneDeep(V.value))==null?void 0:k.filter(x=>(x==null?void 0:x.label)!=="操作")),o,i=m.cloneDeep(Y.value);if(!Ne.value){Qe.value=!1;return}if(Ge.value===""){nl.value++;let x;a&&n?x={id:nl.value.toString(),[a==null?void 0:a.prop]:n,children:Ne.value.children}:x={id:nl.value.toString()},x!=null&&x.children&&(x={...x,children:(t=x.children)==null?void 0:t.map(L=>oa(L,a,n))}),i.push(Object.assign(Ne.value,x)),o=Object.assign(Ne.value,x)}else i=(T=na(i,r))==null?void 0:T.newContents,o=(M=na(i,r))==null?void 0:M.currentSelectContents;const d=(y=s.itemData)==null?void 0:y.filter(x=>(x==null?void 0:x.key)==="childTree")[0];if(((B=d==null?void 0:d.contents)==null?void 0:B.length)>0){Me.value="编辑";const x=[];i==null||i.forEach((L,D)=>{var h;let g={};if(Array.isArray(L)){let u=[];L==null||L.filter(v=>!(v!=null&&v.id)).forEach((v,P)=>{var E,G,le,X,q,H,w;if((G=(E=$e.value)==null?void 0:E[P])!=null&&G.prop&&!Array.isArray(v)){let j={};j[$e.value[P].column]=v,ye!=null&&ye.value&&((le=ye==null?void 0:ye.value)==null?void 0:le.length)>0&&((X=ye==null?void 0:ye.value)!=null&&X.find(R=>JSON.stringify(R==null?void 0:R[0])===JSON.stringify(j)))&&(u=(q=ye==null?void 0:ye.value)==null?void 0:q.find(R=>JSON.stringify(R==null?void 0:R[0])===JSON.stringify(j))),u&&u.length>0?g[$e.value[P].prop]=u!=null&&u.find(R=>{var ae;return((ae=Object.keys(R))==null?void 0:ae[0])===$e.value[P].column})?(H=u==null?void 0:u.find(R=>{var ae;return((ae=Object.keys(R))==null?void 0:ae[0])===$e.value[P].column}))==null?void 0:H[$e.value[P].column]:v:g[$e.value[P].prop]=v}else Array.isArray(v)&&((w=$e.value[P])!=null&&w.prop?g[$e.value[P].prop]=v:g.children=Gl(v,$e.value))})}else g=L;Array.isArray(L)&&L.some(u=>u==null?void 0:u.id)?x.push(Object.assign(g,{id:(h=L==null?void 0:L.find(u=>u.id))==null?void 0:h.id})):g.id?x.push(g):x.push(Object.assign(g,{id:D.toString()}))}),Y.value=ca(x,d,V.value)}else Y.value=i;ia(Y.value),wl.value=Y.value;const c=Gr(wl.value,Ye.value,i);let f=[];if(il.value?(f=(A=m.cloneDeep(il).value.singleContent)==null?void 0:A.filter(x=>(x==null?void 0:x.id)!==(o==null?void 0:o.id)),f.push(o)):f=[o],Pe.value){const x={content:c,singleContent:((S=d==null?void 0:d.contents)==null?void 0:S.length)>0?f==null?void 0:f.flatMap(Rl):f,index:s==null?void 0:s.index,buttonName:"编辑",column:V.value,parentTableId:s==null?void 0:s.parentTableId};De.setCacheUpdatingData(x)}if(e){const x={content:c,singleContent:((K=d==null?void 0:d.contents)==null?void 0:K.length)>0?Rl(o):o,index:s==null?void 0:s.index,buttonName:Me.value,column:V.value,parentTableId:s==null?void 0:s.parentTableId};De.setTableLoading(s==null?void 0:s.index),Qe.value=!1,Ne.value=void 0,oe("change",x)}};l.onUnmounted(()=>{V.value=[],Y.value=[],Te.value=[],Je.value=[],Oe.value=[],Ie.value=[],cl.value=[],ol.value=[],Xe.value=[],Ke.value=[],U.value=null});const ta=async(e,a,n)=>{var k,t,T,M,y,B,A,S,K,x,L;al.value=n==null?void 0:n.prop;const r=m.cloneDeep(s.itemData),o=r==null?void 0:r.map(D=>{var g;return(D==null?void 0:D.key)==="header"&&((g=D.contents)==null||g.map((h,u)=>{var v,P,E,G,le,X,q,H,w,j,R,ae,z,p,F,_,ve,me,he;return h.type=h!=null&&h.type?h.type:(G=(E=(P=(v=h==null?void 0:h.key)==null?void 0:v.split("$"))==null?void 0:P[1])==null?void 0:E.split("("))!=null&&G[0]?(X=(le=te.FormType)==null?void 0:le.find(N=>{var b,se,ie,ge;return(N==null?void 0:N.key)===((ge=(ie=(se=(b=h==null?void 0:h.key)==null?void 0:b.split("$"))==null?void 0:se[1])==null?void 0:ie.split("("))==null?void 0:ge[0])}))==null?void 0:X.value:"Input",h.options=h!=null&&h.options?h.options:((w=(H=(q=h==null?void 0:h.key)==null?void 0:q.split("$"))==null?void 0:H[1])==null?void 0:w.length)>0?(z=(ae=Wl((R=(j=h==null?void 0:h.key)==null?void 0:j.split("$"))==null?void 0:R[1]))==null?void 0:ae.split(","))==null?void 0:z.map(N=>({label:N,value:N})):[],(p=h==null?void 0:h.key)!=null&&p.includes("$")&&(h.key=(_=(F=h==null?void 0:h.key)==null?void 0:F.split("$"))==null?void 0:_[0]),h.value=(ve=Object.values(a))==null?void 0:ve[u],h.optionUrl=h!=null&&h.formMenuSelect&&((me=h==null?void 0:h.formMenuSelect)==null?void 0:me.length)>0?{groupSelect:(he=h==null?void 0:h.groupSelect)==null?void 0:he.split(/[::]/).map(N=>N.trim()),menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":"")}:null,h})),D});let i=m.cloneDeep(Xe.value),d=(t=(k=m.cloneDeep(o))==null?void 0:k.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:t.contents;i=i==null?void 0:i.map(D=>{var g;return D.value=(g=d==null?void 0:d.find((h,u)=>u===(D==null?void 0:D.id)))==null?void 0:g.value,D});let c="",f=(y=(M=(T=m.cloneDeep(o))==null?void 0:T.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:M.contents)==null?void 0:y.find((D,g)=>{var h,u,v;return(D==null?void 0:D.label)===al.value||(g==null?void 0:g.toString())===((v=(u=(h=al.value)==null?void 0:h.split("a"))==null?void 0:u[1])==null?void 0:v.toString())});if((S=(A=(B=m.cloneDeep(o))==null?void 0:B.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:A.contents)==null||S.forEach(D=>{var g,h,u,v,P;c===""&&((u=(h=(g=D==null?void 0:D.optionUrl)==null?void 0:g.groupSelect)==null?void 0:h[1])!=null&&u.includes("["))&&(c=(P=(v=D==null?void 0:D.optionUrl)==null?void 0:v.groupSelect)==null?void 0:P[1])}),(K=f==null?void 0:f.optionUrl)!=null&&K.menuSelect){let D=await Hl(f),g;if(D==null||D.forEach(h=>{var u,v,P,E,G,le,X,q,H,w;c===((v=(u=f==null?void 0:f.optionUrl)==null?void 0:u.groupSelect)==null?void 0:v[1])&&((G=(E=(P=f==null?void 0:f.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1])!=null&&G.includes("["))&&((w=m.cloneDeep(h))==null?void 0:w[(H=(q=(X=(le=f==null?void 0:f.optionUrl)==null?void 0:le.groupSelect)==null?void 0:X[1])==null?void 0:q.replaceAll("[",""))==null?void 0:H.replaceAll("]","")])===(f==null?void 0:f.value)&&(g=h)}),g){let h=m.cloneDeep(i);h=h==null?void 0:h.map(v=>{var P,E,G,le,X,q,H,w,j,R,ae;return(g!=null&&g[v==null?void 0:v.label]||g!=null&&g[(le=(G=(E=(P=v==null?void 0:v.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1])==null?void 0:G.replaceAll("[",""))==null?void 0:le.replaceAll("]","")])&&((H=(q=(X=v==null?void 0:v.optionUrl)==null?void 0:X.groupSelect)==null?void 0:q[1])!=null&&H.includes("["))&&(v.value=(g==null?void 0:g[v==null?void 0:v.label])||(g==null?void 0:g[(ae=(R=(j=(w=v==null?void 0:v.optionUrl)==null?void 0:w.groupSelect)==null?void 0:j[1])==null?void 0:R.replaceAll("[",""))==null?void 0:ae.replaceAll("]","")])),v}),Y.value=(x=m.cloneDeep(Y.value))==null?void 0:x.map(v=>{if((v==null?void 0:v.id)===(a==null?void 0:a.id)){const P={};return h==null||h.forEach(E=>{P[E.name]=E.value}),P.id=v==null?void 0:v.id,P}return v});let u=m.cloneDeep(h);u=u==null?void 0:u.map(v=>{var P,E,G,le;return(E=(P=v==null?void 0:v.optionUrl)==null?void 0:P.menuSelect)!=null&&E.some(X=>X==null?void 0:X.includes)&&(v.optionUrl.menuSelect=(le=(G=v==null?void 0:v.optionUrl)==null?void 0:G.menuSelect)==null?void 0:le.map(X=>{var q,H,w,j;if(X!=null&&X.includes("[")){let R=(H=(q=X==null?void 0:X.replaceAll("[","").replaceAll("]",""))==null?void 0:q.split(":"))==null?void 0:H[1];X=(j=(w=m.cloneDeep(h))==null?void 0:w.find(ae=>(ae==null?void 0:ae.label)===R))==null?void 0:j.value}return X})),v}),Y.value=(L=m.cloneDeep(Y.value))==null?void 0:L.map(v=>{if((v==null?void 0:v.id)===(a==null?void 0:a.id)){const P={};return u==null||u.forEach(E=>{P[E.name]=E.value}),P.id=v==null?void 0:v.id,P}return v})}}},dr=async e=>{var k,t,T,M,y,B,A,S,K,x,L,D;if(!e)return;Ne.value=e;const a=m.cloneDeep(s.itemData);let n=a==null?void 0:a.map(g=>{var h;return(g==null?void 0:g.key)==="header"&&((h=g.contents)==null||h.map((u,v)=>{var P,E,G,le,X,q,H,w,j,R,ae,z,p,F,_,ve,me,he,N;return u.type=u!=null&&u.type?u.type:(le=(G=(E=(P=u==null?void 0:u.key)==null?void 0:P.split("$"))==null?void 0:E[1])==null?void 0:G.split("("))!=null&&le[0]?(q=(X=te.FormType)==null?void 0:X.find(b=>{var se,ie,ge,xe;return(b==null?void 0:b.key)===((xe=(ge=(ie=(se=u==null?void 0:u.key)==null?void 0:se.split("$"))==null?void 0:ie[1])==null?void 0:ge.split("("))==null?void 0:xe[0])}))==null?void 0:q.value:"Input",u.options=u!=null&&u.options?u.options:((j=(w=(H=u==null?void 0:u.key)==null?void 0:H.split("$"))==null?void 0:w[1])==null?void 0:j.length)>0?(p=(z=Wl((ae=(R=u==null?void 0:u.key)==null?void 0:R.split("$"))==null?void 0:ae[1]))==null?void 0:z.split(","))==null?void 0:p.map(b=>({label:b,value:b})):[],(F=u==null?void 0:u.key)!=null&&F.includes("$")&&(u.key=(ve=(_=u==null?void 0:u.key)==null?void 0:_.split("$"))==null?void 0:ve[0]),u.value=(me=Object.values(e))==null?void 0:me[v],u.optionUrl=u!=null&&u.formMenuSelect&&((he=u==null?void 0:u.formMenuSelect)==null?void 0:he.length)>0?{groupSelect:(N=u==null?void 0:u.groupSelect)==null?void 0:N.split(/[::]/).map(b=>b.trim()),menuSelect:u==null?void 0:u.formMenuSelect,selectRelateType:"",type:(u==null?void 0:u.formType)??(u!=null&&u.groupSelect?"Select":"")}:null,u})),g}),r=Xe.value,o=(t=(k=m.cloneDeep(n))==null?void 0:k.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:t.contents;if(r=r==null?void 0:r.map(g=>{var h;return g.value=(h=o==null?void 0:o.find((u,v)=>(u==null?void 0:u.prop)===(g==null?void 0:g.name)))==null?void 0:h.value,g}),!dl.value)return;let i="",d=(y=(M=(T=m.cloneDeep(n))==null?void 0:T.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:M.contents)==null?void 0:y.find((g,h)=>{var u,v,P;return(g==null?void 0:g.label)===al.value||(h==null?void 0:h.toString())===((P=(v=(u=al.value)==null?void 0:u.split("a"))==null?void 0:v[1])==null?void 0:P.toString())}),c=(B=d==null?void 0:d.optionUrl)==null?void 0:B.menuSelect,f=!0;if((K=(S=(A=m.cloneDeep(n))==null?void 0:A.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:S.contents)==null||K.forEach(g=>{var h,u,v,P,E,G;f&&((v=(u=(h=g==null?void 0:g.optionUrl)==null?void 0:h.groupSelect)==null?void 0:u[1])!=null&&v.includes("["))&&(i=(E=(P=g==null?void 0:g.optionUrl)==null?void 0:P.groupSelect)==null?void 0:E[1],JSON.stringify(c)===JSON.stringify((G=g==null?void 0:g.optionUrl)==null?void 0:G.menuSelect)&&(f=!1))}),(x=d==null?void 0:d.optionUrl)!=null&&x.menuSelect&&dl.value){let g=await Hl(d),h;if((L=d==null?void 0:d.optionUrl)==null||L.menuSelect,g==null||g.forEach(u=>{var v,P,E,G,le,X,q,H,w,j;i===((P=(v=d==null?void 0:d.optionUrl)==null?void 0:v.groupSelect)==null?void 0:P[1])&&((le=(G=(E=d==null?void 0:d.optionUrl)==null?void 0:E.groupSelect)==null?void 0:G[1])!=null&&le.includes("["))&&((j=m.cloneDeep(u))==null?void 0:j[(w=(H=(q=(X=d==null?void 0:d.optionUrl)==null?void 0:X.groupSelect)==null?void 0:q[1])==null?void 0:H.replaceAll("[",""))==null?void 0:w.replaceAll("]","")])===(d==null?void 0:d.value)&&(h=u)}),h){let u=m.cloneDeep(r);u=u==null?void 0:u.map(E=>{var G,le,X,q,H,w,j,R,ae,z,p;return(h!=null&&h[E==null?void 0:E.label]||h!=null&&h[(q=(X=(le=(G=E==null?void 0:E.optionUrl)==null?void 0:G.groupSelect)==null?void 0:le[1])==null?void 0:X.replaceAll("[",""))==null?void 0:q.replaceAll("]","")])&&((j=(w=(H=E==null?void 0:E.optionUrl)==null?void 0:H.groupSelect)==null?void 0:w[1])!=null&&j.includes("["))&&(E.value=(h==null?void 0:h[E==null?void 0:E.label])||(h==null?void 0:h[(p=(z=(ae=(R=E==null?void 0:E.optionUrl)==null?void 0:R.groupSelect)==null?void 0:ae[1])==null?void 0:z.replaceAll("[",""))==null?void 0:p.replaceAll("]","")])),E}),Xe.value=m.cloneDeep(u);let v=m.cloneDeep(u);v=v==null?void 0:v.map(E=>{var G,le,X,q,H,w;return(le=(G=E==null?void 0:E.optionUrl)==null?void 0:G.menuSelect)!=null&&le.some(j=>j==null?void 0:j.includes("["))&&(E.optionUrl.oldMenuSelect=(q=(X=m.cloneDeep(E))==null?void 0:X.optionUrl)==null?void 0:q.menuSelect,E.optionUrl.menuSelect=(w=(H=E==null?void 0:E.optionUrl)==null?void 0:H.menuSelect)==null?void 0:w.map(j=>{var R,ae,z,p;if(j!=null&&j.includes("[")){let F=(ae=(R=j==null?void 0:j.replaceAll("[","").replaceAll("]",""))==null?void 0:R.split(":"))==null?void 0:ae[1];j=(p=(z=m.cloneDeep(u))==null?void 0:z.find(_=>(_==null?void 0:_.label)===F))==null?void 0:p.value}return j})),E}),Xe.value=v;let P={};(D=Xe.value)==null||D.forEach(E=>{P[E.prop]=E==null?void 0:E.value}),Ne.value=P}}dl.value=!1},pr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",fr=e=>{var i,d;const a=(d=(i=Oe.value)==null?void 0:i.find(c=>(c==null?void 0:c.label)===(e==null?void 0:e.label)))==null?void 0:d.multiple,n=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;Y.value.forEach(c=>{const f=c==null?void 0:c[n];a&&ga.isString(f)&&(c[n]=[f]),!a&&!ga.isString(f)&&(c[n]="")})},sa=(e,a)=>{var n;return a==null||a.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=>sa(r,a))),e},ql=e=>{var n,r,o,i,d,c;gl("");const a=(n=Xe.value)==null?void 0:n.reduce((f,k)=>(f[k.name]=k.value,f),{});if(((r=Object.keys(a))==null?void 0:r.length)>0){Ne.value=a,Ge.value="",nl.value=(o=Y.value)==null?void 0:o.length,ol.value=(i=el.value)==null?void 0:i.filter(k=>(k==null?void 0:k.label)!=="新增");const f=(c=(d=Te.value)==null?void 0:d.filter(k=>(k==null?void 0:k.label)!=="操作"))==null?void 0:c.map(k=>{var T,M,y;const t=(M=(T=Oe.value)==null?void 0:T.find(B=>(B==null?void 0:B.label)===(k==null?void 0:k.label)))==null?void 0:M.multiple;return fr(k),{...k,contents:(k==null?void 0:k.options)??[],optionUrl:k!=null&&k.formMenuSelect&&((y=k==null?void 0:k.formMenuSelect)==null?void 0:y.length)>0?{groupSelect:k==null?void 0:k.groupSelect,menuSelect:k==null?void 0:k.formMenuSelect,selectRelateType:"",type:k==null?void 0:k.formType,multiple:t}:null}});V.value=f==null?void 0:f.map(k=>sa(k,[{prop:"type",value:"edit"},{prop:"columnType",value:pr(k==null?void 0:k.formType)||(k==null?void 0:k.columnType)}])),e==="createClick"&&hl(!1)}},tl={START:"开始时间",END:"结束时间",HOURS:"工时"},gr=(e,a)=>Number(Jl.dayjs(a).diff(Jl.dayjs(e),"day",!0).toFixed(1)),ia=e=>{var i;const a=s.itemData,n=(i=a==null?void 0:a.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:i.contents,r=new Map;return n==null||n.forEach((d,c)=>{const{label:f}=d;r.set(f,c)}),!r.has(tl.START)||!r.has(tl.END)||!r.has(tl.HOURS)?e:e==null?void 0:e.map(d=>{const c=d==null?void 0:d[tl.START],f=d==null?void 0:d[tl.END],k=gr(c,f);return c&&f&&(d[tl.HOURS]=`${k}天`),d})},ua=(e,a,n=0)=>{if(n>((a==null?void 0:a.length)??""))return e;const r=a==null?void 0:a[n],o=new Map;for(const d of e){const c=d[r];o.has(c)||o.set(c,[]),o.get(c)&&o.get(c).push(d)}const i=[];for(const[d,c]of o){const[f,...k]=c,t={...f};n+1===((a==null?void 0:a.length)??"")?t.children=c==null?void 0:c.map(T=>(T.level=m.cloneDeep(n)+1,T)).filter((T,M)=>M!==0):k.length>0&&(t.children=ua(k,a,n+1)),t.level=n,i.push(t)}return i},ca=(e,a,n)=>{var o;if(!(a!=null&&a.contents)||((o=a==null?void 0:a.contents)==null?void 0:o.length)===0)return e;let r=[];return r=ua(e,a==null?void 0:a.contents,0),r},da=(e,a)=>{var M,y,B,A,S,K,x,L,D,g,h,u,v,P,E,G,le,X,q,H,w,j,R,ae,z;const n=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="header");e==null||e.filter(p=>(p==null?void 0:p.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="childTree")[0];let o=a;const i=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="page"),d=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="rowButton"),c=e==null?void 0:e.find(p=>(p==null?void 0:p.key)==="extraButton"),f=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableContents"),k=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableIndex");Oe.value=(y=(M=e==null?void 0:e.filter(p=>(p==null?void 0:p.key)==="tableToForm"))==null?void 0:M[0])==null?void 0:y.contents,Ql.value=(i==null?void 0:i.contents)??!0;let t=[];ll.value===""?t=n==null?void 0:n[0]:t=(n==null?void 0:n.find(p=>(p==null?void 0:p.selectLabel)==="("+ll.value+")"))??(n==null?void 0:n.find(p=>!(p!=null&&p.selectLabel)));let T=[];if(ll.value===""?T=k==null?void 0:k[0]:T=(k==null?void 0:k.find(p=>(p==null?void 0:p.selectLabel)==="("+ll.value+")"))??(k==null?void 0:k.find(p=>!(p!=null&&p.selectLabel))),((B=t==null?void 0:t.contents)==null?void 0:B.length)>0){let p=[];if(t!=null&&t.contents.some(N=>Array.isArray(N)&&(N==null?void 0:N.find(b=>b.children))))Ye.value===""?p=(S=(A=te.getGradeColumns(t==null?void 0:t.contents))==null?void 0:A[0])==null?void 0:S.filter(N=>!Array.isArray(N)):(Ye.value.split("-"),p=(K=te.getGradeColumns(t==null?void 0:t.contents))==null?void 0:K[0]);else{let N=t!=null&&t.contents.some(b=>Array.isArray(b))?(x=t==null?void 0:t.contents)==null?void 0:x[0]:t==null?void 0:t.contents;N==null||N.forEach((b,se)=>{var xe,Le,yl,vl;let ie="";(Le=(xe=W.value)==null?void 0:xe.split("/"))==null||Le.forEach(Fe=>{var bl,kl,ml;if(Fe!==""){let sl=(ml=(kl=(bl=Fe==null?void 0:Fe.split(ee+"updateLoading"))==null?void 0:bl[0])==null?void 0:kl.split(ee+"loading"))==null?void 0:ml[0];ie=ie===""?ie+sl:ie+"/"+sl}}),ie=ie+ee+(b==null?void 0:b.directiveLabel);const ge=(yl=Oe.value)==null?void 0:yl.find(Fe=>(Fe==null?void 0:Fe.prop)===(b==null?void 0:b.prop));p.push({label:(b==null?void 0:b.label)??"",prop:(b==null?void 0:b.label)==="操作"?"operate":(b==null?void 0:b.prop)??"a"+se,width:b!=null&&b.width?parseInt(b.width):"",fixed:(b==null?void 0:b.fixed)??void 0,sortable:(b==null?void 0:b.sortable)??!1,filterable:(b==null?void 0:b.filterable)??!1,operable:(b==null?void 0:b.operable)??!1,showSummary:(b==null?void 0:b.showSummary)??!1,align:(b==null?void 0:b.align)??"left",showOverflowTooltip:(b==null?void 0:b.showOverflowTooltip)??!0,isNotDrag:(b==null?void 0:b.isNotDrag)??!1,isEditCol:(b==null?void 0:b.isEditCol)??!1,isOperate:(b==null?void 0:b.isOperate)??!1,id:(b==null?void 0:b.id)??se,type:(b==null?void 0:b.label)==="操作"?"operate":void 0,formType:(b==null?void 0:b.formType)??(b!=null&&b.groupSelect?"Select":""),isTableColHidden:b==null?void 0:b.isTableColHidden,isFormColHidden:b==null?void 0:b.isFormColHidden,disabled:b==null?void 0:b.disabled,options:(b==null?void 0:b.options)??[],value:(b==null?void 0:b.value)??"",formMenuSelect:(b==null?void 0:b.formMenuSelect)??[],isRoute:(b==null?void 0:b.isRoute)??!1,groupSelect:b!=null&&b.groupSelect?(vl=b==null?void 0:b.groupSelect)==null?void 0:vl.replaceAll('"',"").split(":"):[],isMainKey:(b==null?void 0:b.isMainKey)||(b==null?void 0:b.directiveLabel)&&!o[ie],columnType:(ge==null?void 0:ge.type)||(b==null?void 0:b.columnType)||"TEXTAREA",directiveLabel:b==null?void 0:b.directiveLabel,isExistChild:!!(b!=null&&b.directiveLabel&&o[ie]),childPath:ie})})}V.value=te.getNewColumnChild(p),Je.value=te.getNewColumnChild(p),Q.value=(L=V.value)==null?void 0:L.map(N=>N==null?void 0:N.label),_e.value=(D=V.value)==null?void 0:D.every(N=>N==null?void 0:N.filterable),ue.value=(g=V.value)==null?void 0:g.every(N=>N==null?void 0:N.operable),Ae.value=(h=V.value)==null?void 0:h.every(N=>N==null?void 0:N.sortable);let F=(v=(u=te.getAllLeafNodes(V.value))==null?void 0:u.filter(N=>(N==null?void 0:N.type)!=="operate"))==null?void 0:v.map((N,b)=>({prop:(N==null?void 0:N.prop)??"a"+b,column:N.label}));$e.value=F;let _=[];ll.value===""?_=f==null?void 0:f[0]:_=(f==null?void 0:f.find(N=>(N==null?void 0:N.selectLabel)==="("+ll.value+")"))??(f==null?void 0:f.find(N=>!(N!=null&&N.selectLabel)));let ve=Array.isArray((P=_==null?void 0:_.contents)==null?void 0:P[0])&&((E=_==null?void 0:_.contents)!=null&&E[0].every(N=>Array.isArray(N)))?(G=_==null?void 0:_.contents)==null?void 0:G[0]:_==null?void 0:_.contents;T!=null&&T.contents&&((le=T==null?void 0:T.contents)==null?void 0:le.length)!==0&&(ve=(X=m.cloneDeep(ve))==null?void 0:X.map((N,b)=>{if(!Array.isArray(N)){let se={};for(let ie in N)ie!=="id"&&ie!=="index"&&(se[ie]=N[ie]);N=Object.values(se)}return N}));const me=!!((q=V.value)!=null&&q.find(N=>N.prop==="index"));ve=ba(ve,T==null?void 0:T.contents,me);const he=[];ve==null||ve.forEach((N,b)=>{var ie;let se={};if(Array.isArray(N)){let ge=[];N==null||N.filter(xe=>!(xe!=null&&xe.id)).forEach((xe,Le)=>{var yl,vl,Fe,bl,kl,ml;if((yl=F==null?void 0:F[Le])!=null&&yl.prop&&!Array.isArray(xe)){let sl={};sl[F[Le].column]=xe,ye!=null&&ye.value&&((vl=ye==null?void 0:ye.value)==null?void 0:vl.length)>0&&((Fe=ye==null?void 0:ye.value)!=null&&Fe.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl)))&&(ge=(bl=ye==null?void 0:ye.value)==null?void 0:bl.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl))),ge&&ge.length>0?se[F[Le].prop]=ge!=null&&ge.find(ze=>{var Sl;return((Sl=Object.keys(ze))==null?void 0:Sl[0])===F[Le].column})?(kl=ge==null?void 0:ge.find(ze=>{var Sl;return((Sl=Object.keys(ze))==null?void 0:Sl[0])===F[Le].column}))==null?void 0:kl[F[Le].column]:xe:se[F[Le].prop]=xe}else Array.isArray(xe)&&((ml=F[Le])!=null&&ml.prop?se[F[Le].prop]=xe:se.children=Gl(xe,F))})}else se=N;Array.isArray(N)&&N.some(ge=>ge==null?void 0:ge.id)?he.push(Object.assign(se,{id:(ie=N==null?void 0:N.find(ge=>ge.id))==null?void 0:ie.id})):se.id?he.push(se):he.push(Object.assign(se,{id:b.toString()}))}),Y.value=ca(he,r,V.value),xl.value=he,(H=xl.value)==null||H.forEach(N=>{var b;(b=Tl.value)==null||b.set(N.id,N)})}else V.value=[],Te.value=[],Y.value=[],xl.value=[],Tl.value=new Map;((w=d==null?void 0:d.contents)==null?void 0:w.length)>0?Ie.value=d==null?void 0:d.contents:Ie.value=[],((j=c==null?void 0:c.contents)==null?void 0:j.length)>0?(ol.value=c==null?void 0:c.contents,el.value=c==null?void 0:c.contents):(ol.value=[],el.value=[]),nl.value=((R=Y==null?void 0:Y.value)==null?void 0:R.length)??0,ia(Y.value),wl.value=Y.value,Pe.value&&(V.value=(z=(ae=Te.value)==null?void 0:ae.filter(p=>(p==null?void 0:p.label)!=="操作"))==null?void 0:z.map(p=>{var F;return{...p,type:"edit",optionUrl:p!=null&&p.formMenuSelect&&((F=p==null?void 0:p.formMenuSelect)==null?void 0:F.length)>0?{groupSelect:p==null?void 0:p.groupSelect,menuSelect:p==null?void 0:p.formMenuSelect,selectRelateType:"",type:p==null?void 0:p.formType}:null}}),ql())};l.watch(()=>[s.itemData,ll.value,xa.value,Ye.value,ye==null?void 0:ye.value],async()=>{var e,a,n,r,o,i;if((e=s==null?void 0:s.itemData)!=null&&e.find(d=>(d==null?void 0:d.key)==="columnPath")&&!((a=ul.value)!=null&&a.find(d=>{var c,f;return(d==null?void 0:d.key)===((f=(c=s==null?void 0:s.itemData)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="columnPath"))==null?void 0:f.contents)}))){let d=ul.value,c={key:(r=(n=s==null?void 0:s.itemData)==null?void 0:n.find(f=>(f==null?void 0:f.key)==="columnPath"))==null?void 0:r.contents,value:(i=(o=s==null?void 0:s.itemData)==null?void 0:o.find(f=>(f==null?void 0:f.key)==="columnUsingPath"))==null?void 0:i.contents};d!=null&&d.find(f=>(f==null?void 0:f.key)===(c==null?void 0:c.key))?d=d==null?void 0:d.map(f=>((f==null?void 0:f.key)===(c==null?void 0:c.key)&&(f.value=c.value),f)):d.push(c),De.setTableViewContents(d)}da(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(gl(e==null?void 0:e.form),Me.value=e==null?void 0:e.dialogTitle,Bl.value=!0,Qe.value=!0)},{immediate:!0,deep:!0});const pa=()=>{var e;(e=be.value)!=null&&e.includes("read")&&(Pe.value=!Pe.value)},hr=()=>{_l.value=!_l.value};l.watch(()=>{var e;return(e=s==null?void 0:s.config)==null?void 0:e.viewport},e=>{var a;be.value=e,(e==null?void 0:e.length)===0?Pe.value=!1:(e!=null&&e.includes("read")||(Pe.value=!0),e!=null&&e.includes("edit")||(Pe.value=!1)),de.value=((a=s==null?void 0:s.config)==null?void 0:a.showIndex)||Pe.value},{immediate:!0}),l.watch(()=>Pe.value,e=>{var a;e?(ql("viewChange"),De.setCacheUpdatingData(null)):(ol.value=el.value,V.value=Je.value,il.value&&(De.setTableLoading(s==null?void 0:s.index),oe("change",il.value))),I.value=e,de.value=e||((a=s==null?void 0:s.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=Yl.value)==null?void 0:e.length},e=>{e===0&&(re.currentPage=1)}),l.watch(()=>s==null?void 0:s.compNames,e=>{Se.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:e||[],width:1}]},{immediate:!0}),l.ref(!1);const yr=(e,a)=>{var n;ql("createClick"),a===re.pageSize&&(re.currentPage=Math.ceil(((n=Y.value)==null?void 0:n.length)/re.pageSize))},vr=(e,a,n)=>{var r;ta(n,e,a),Ne.value=m.cloneDeep(e),Ge.value=e==null?void 0:e.id,nl.value=(r=Y.value)==null?void 0:r.length,Me.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",hl(!1)},Be=e=>{var f,k,t,T,M,y,B,A,S,K;const{row:a,column:n,item:r,slotData:o}=e;let i=a!=null&&a[n==null?void 0:n.prop]||(a==null?void 0:a[n==null?void 0:n.prop])===0?((k=(f=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:f[0])==null?void 0:k.contents)??((a==null?void 0:a[n==null?void 0:n.prop])===0?"0":a==null?void 0:a[n==null?void 0:n.prop]):((T=(t=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:t[0])==null?void 0:T.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((y=(M=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:M[0])==null?void 0:y.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((S=(A=a==null?void 0:a[(B=r==null?void 0:r.child)==null?void 0:B.prop])==null?void 0:A[0])==null?void 0:S.contents)??(a==null?void 0:a[(K=r==null?void 0:r.child)==null?void 0:K.prop]),c=Array.isArray(i)&&!(i!=null&&i.every(x=>typeof x=="string"||typeof x=="number"))?"查看":i;return c=Array.isArray(c)?c.join(","):c,c},br=e=>{var k,t,T,M,y,B,A,S,K,x;const{row:a,column:n,item:r,slotData:o}=e;let i=a!=null&&a[n==null?void 0:n.prop]?((t=(k=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:k[0])==null?void 0:t.contents)??(a==null?void 0:a[n==null?void 0:n.prop]):((M=(T=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:T[0])==null?void 0:M.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((B=(y=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:y[0])==null?void 0:B.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((K=(S=a==null?void 0:a[(A=r==null?void 0:r.child)==null?void 0:A.prop])==null?void 0:S[0])==null?void 0:K.contents)??(a==null?void 0:a[(x=r==null?void 0:r.child)==null?void 0:x.prop]);const c=Array.isArray(i)&&!(i!=null&&i.every(L=>typeof L=="string"||typeof L=="number")),f=Array.isArray(i)&&(i==null?void 0:i.find(L=>L==null?void 0:L.url));return c&&f},kr=(e,a)=>e.find(n=>Object.values(n).some(r=>r===a));return l.watch(()=>Ee.value,async e=>{if(e){fe.setContentLoading(!0),await l.nextTick();const a=kr(Y.value,e==null?void 0:e.data);if(!a)return fe.setContentLoading(!1);await ea(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),fe.setContentLoading(!1)}},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.cacheNewData,e=>{var a;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(s==null?void 0:s.index)&&(Y.value=(a=Y.value)==null?void 0:a.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,a)=>{var k,t,T,M;const n=l.resolveComponent("svg-icon"),r=l.resolveComponent("el-popover"),o=l.resolveComponent("el-switch"),i=l.resolveComponent("el-checkbox"),d=l.resolveComponent("el-checkbox-group"),c=l.resolveComponent("el-button"),f=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",Qr,[Xl.value?(l.openBlock(),l.createBlock(Re.ssTable,{id:"excel-table",pageObj:re,showIndex:de.value,isTree:(k=O.compItem)==null?void 0:k.isTree,summaryInfo:ne,columns:V.value,defaultSort:Ce,isCardViewport:_l.value,checkedColumns:Q.value,key:$l.value+JSON.stringify(V.value),tableData:Yl.value,isEditViewport:Pe.value,isShowPagination:Ql.value,isShowEdit:!1,isShowDelete:!1,allowSelect:I.value,onDbClickRow:Ha,extraButton:ol.value,rowButton:Ie.value,cacheExtraButtons:el.value,isClearSelection:((t=Ke.value)==null?void 0:t.length)===0,onDoCurrentChange:Aa,onDoSizeChange:_a,onContentClick:ea,onRowClick:Xa,onSelectChange:$a,onCellChange:vr,onChange:ta,onPreview:Zl,onSubmitEditingTable:Ma,onHandleColEditChange:Va,onHandleColTypeChange:ja,onClickButton:Vl},l.createSlots({headerButton:l.withCtx(y=>{var B,A;return[O.showHeader?(l.openBlock(),l.createBlock(Mr,{key:0,pageLayout:O.pageLayout,lockingPage:l.unref(Dl)===l.unref(W),filterValues:Il.value,selectNums:(B=Ke.value)==null?void 0:B.length,dataNums:(A=Y.value)==null?void 0:A.length,compName:O.compName,isDevMode:O.isDevMode,buttons:y.buttons,onButtonClick:a[0]||(a[0]=S=>Vl(S,"",{})),columns:V.value,onFilter:Ga,onGetImportData:Oa,level:O.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var y,B,A,S;return[((y=Y.value)==null?void 0:y.length)>0&&O.allowOperate?(l.openBlock(),l.createElementBlock("div",Zr,[(B=be.value)!=null&&B.includes("read")&&((A=be.value)!=null&&A.includes("edit"))&&((S=Ie.value)!=null&&S.some(K=>(K==null?void 0:K.label)==="编辑"))&&!_l.value&&l.unref(Dl)!==l.unref(W)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:pa},[l.createVNode(n,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:hr},[l.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:y,index:B})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:A=>yr(y,B)},[l.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,Ir)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:cr},{reference:l.withCtx(()=>[l.createElementVNode("span",en,[l.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",ln,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(o,{"model-value":Ae.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=y=>Kl(y,"sortable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":_e.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=y=>Kl(y,"filterable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":ue.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=y=>Kl(y,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(d,{modelValue:Q.value,"onUpdate:modelValue":a[5]||(a[5]=y=>Q.value=y),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:U},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(pl.value,y=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:y.label},[l.createVNode(i,{value:y.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:y.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(y.label),9,an)]),_:2},1032,["value"]),l.createVNode(r,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:l.withCtx(()=>[l.createVNode(n,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:l.withCtx(()=>{var B;return[l.createElementVNode("div",rn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((B=Object.keys(y))==null?void 0:B.filter(A=>{var S;return(S=pe.value)==null?void 0:S.find(K=>(K==null?void 0:K.value)===A)}),A=>{var S,K;return l.openBlock(),l.createElementBlock("div",{key:A},[l.createVNode(o,{"model-value":y==null?void 0:y[A],"active-text":(K=(S=pe.value)==null?void 0:S.find(x=>(x==null?void 0:x.value)===A))==null?void 0:K.label,onChange:x=>Ka(x,A,y)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",nn,[l.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(y=>{var B,A,S,K,x,L,D,g,h,u,v,P,E,G,le,X,q,H;return[br(y)?(l.openBlock(),l.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:l.withCtx(()=>[l.createElementVNode("span",on,l.toDisplayString(Be(y)),1)]),default:l.withCtx(()=>{var w;return[l.createElementVNode("div",tn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(y==null?void 0:y.row[(w=y==null?void 0:y.column)==null?void 0:w.prop],j=>(l.openBlock(),l.createElementBlock("div",sn,[l.createElementVNode("div",{class:"prop-url",title:Ll(j),onClick:R=>Ra(j)},l.toDisplayString(Ll(j)),9,un),l.createElementVNode("div",{class:"prop-download",onClick:R=>qa(j)}," 下载 ",8,cn)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Be(y))&&((A=(B=Be(y))==null?void 0:B.toString())!=null&&A.includes(".txt")||(K=(S=Be(y))==null?void 0:S.toString())!=null&&K.includes(".cpt")||(L=(x=Be(y))==null?void 0:x.toString())!=null&&L.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Be(y))&&((g=(D=Be(y))==null?void 0:D.toString())!=null&&g.includes(".txt")||(u=(h=Be(y))==null?void 0:h.toString())!=null&&u.includes(".cpt")||(P=(v=Be(y))==null?void 0:v.toString())!=null&&P.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Be(y))&&((G=(E=Be(y))==null?void 0:E.toString())!=null&&G.includes(".txt")||(X=(le=Be(y))==null?void 0:le.toString())!=null&&X.includes(".cpt")||(H=(q=Be(y))==null?void 0:q.toString())!=null&&H.includes(".cyd"))?"pointer":"",marginLeft:(y==null?void 0:y.colIndex)===0?`${((y==null?void 0:y.level)??0)*20}px`:0}),onClick:w=>wa(Be(y))},l.toDisplayString(Be(y)===0?"0":Be(y)),13,dn))]}),_:2},[((T=Ie.value)==null?void 0:T.length)>0&&l.unref(Dl)!==l.unref(W)?{name:"actions",fn:l.withCtx(({item:y})=>[l.createVNode(r,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:l.withCtx(()=>[l.createVNode(n,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:l.withCtx(()=>[l.createElementVNode("div",Xr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ja(Ie.value,y),(B,A)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:A,onClick:S=>Vl(B==null?void 0:B.label,y,{extra:B})},[l.createElementVNode("div",{style:l.normalizeStyle({color:B==null?void 0:B.textColor}),class:"extra-button-label"},l.toDisplayString(B==null?void 0:B.label),5)],8,Yr))),128))])]),_:2},1024)]),key:"0"}:void 0,((M=Y.value)==null?void 0:M.length)>0?{name:"batchButton",fn:l.withCtx(y=>[l.withDirectives(l.createVNode(Pr,{lockingPage:l.unref(Dl)===l.unref(W),buttons:y.buttons,selectTableItems:Ke.value,onButtonClick:a[1]||(a[1]=B=>Vl(B,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,I.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!I.value]])]),key:"1"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):l.createCommentVNode("",!0),l.createVNode(Cl.ssDialog,{title:Me.value,visible:Qe.value,width:Ea.value,onBeforeDestroy:Fa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",pn,[l.createVNode(Re.ssForm,{rowContents:Xe.value,isEnableWrap:!1,showOperator:!1,onChange:dr,onClickTrigger:za,isEdit:El.value,onBlurChange:Pa},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[Bl.value?(l.openBlock(),l.createElementBlock("div",fn,[l.createVNode(c,{onClick:a[6]||(a[6]=y=>Qe.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[13]||(a[13]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[13]}),l.createVNode(c,{class:"ok-button",onClick:a[7]||(a[7]=y=>hl(!0)),id:"themeButton"},{default:l.withCtx(()=>a[14]||(a[14]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[14]})])):l.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),l.createVNode(Cl.ssDialog,{title:Me.value,visible:Nl.value,width:Ml.value,onBeforeDestroy:a[9]||(a[9]=y=>Nl.value=!1)},{default:l.withCtx(()=>[l.createVNode(qr)]),footer:l.withCtx(()=>[l.createElementVNode("div",gn,[l.createVNode(c,{onClick:a[8]||(a[8]=y=>Nl.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[15]||(a[15]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[15]}),l.createVNode(c,{class:"ok-button",onClick:Ya,id:"themeButton"},{default:l.withCtx(()=>a[16]||(a[16]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["title","visible","width"]),we.value?(l.openBlock(),l.createBlock(Re.ssFilePreview,{key:1,fileDataList:C.value,onDestroy:Qa},null,8,["fileDataList"])):l.createCommentVNode("",!0),qe.value?(l.openBlock(),l.createBlock(Cl.ssDialog,{key:2,visible:qe.value,onBeforeDestroy:ir,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:l.withCtx(()=>[l.createVNode(Ve.ThreeViewerHost,{"file-urls":cl.value,isThreeScene:Ue.value,isSelfWindow:!0,threeData:rl.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Cl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=y=>e.componentVisible=!1),width:Ml.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(f,{dialogItem:Ul.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(Cl.ssDialog,{title:Se.title,visible:Se.show,width:Se.width,onBeforeDestroy:ar},{default:l.withCtx(()=>[l.createElementVNode("div",hn,[l.createVNode(Re.ssForm,{rowContents:Se==null?void 0:Se.contents,formRules:Se==null?void 0:Se.formRules,showOperator:!1,buttonValue:Se.buttonValue,isEdit:El.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:rr},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},vn=jl._export_sfc(yn,[["__scopeId","data-v-82b4d06b"]]);exports.formGetOptions=Wl;exports.getSelectRow=Hl;exports.ssTable=vn;exports.useFormComp=Sa;exports.useFormToTableComp=ya;exports.useUnit=va;