ss-component-new 1.3.516 → 1.3.518
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-Czjd5det.cjs → index-1j1BF_NQ.cjs} +1 -1
- package/dist/{index-PRCXQccH.js → index-B829T3zC.js} +4 -4
- package/dist/{index-R9nYt2sA.js → index-BJflRJ9U.js} +2 -2
- package/dist/{index-DS9-fNhE.cjs → index-BPKAk_F3.cjs} +1 -1
- package/dist/{index-BjVVY-n2.js → index-BY66liLa.js} +1 -1
- package/dist/{index-Dup6PpJL.js → index-Ba_Azu4R.js} +1 -1
- package/dist/{index-CABcsOir.js → index-Bf8JqO_9.js} +2 -2
- package/dist/{index-BuBSNaBP.cjs → index-Bii_vGs4.cjs} +1 -1
- package/dist/{index-1_h_dJYu.cjs → index-Bk9VGtRy.cjs} +1 -1
- package/dist/{index-DwK0ysM0.js → index-Brjo_Q27.js} +11 -11
- package/dist/{index-BLbpJXu1.cjs → index-CMRSEjTf.cjs} +1 -1
- package/dist/{index-njo_TcfO.cjs → index-CTfT0jS4.cjs} +1 -1
- package/dist/{index-CY-77qfD.js → index-CWqis7A8.js} +5 -5
- package/dist/{index-DozBxBwR.cjs → index-CX-xhB8-.cjs} +1 -1
- package/dist/{index-DgwvdJdz.cjs → index-CY84LR69.cjs} +1 -1
- package/dist/{index-Df8ZRu0v.cjs → index-Cfa5ta3B.cjs} +1 -1
- package/dist/{index-BLsO-_f6.js → index-Cg_cV1sh.js} +1 -1
- package/dist/{index-BzMppG_6.cjs → index-CmdGIa1-.cjs} +1 -1
- package/dist/{index-C68FUZfm.js → index-CncinBCe.js} +3 -3
- package/dist/{index-BKkUELoS.js → index-CpRwzP5l.js} +3 -3
- package/dist/{index-DNz_H0KU.cjs → index-CzLE4e08.cjs} +1 -1
- package/dist/{index-C-QKtLxL.js → index-DFCbDRkV.js} +1 -1
- package/dist/{index-CxzoQeyY.js → index-DTh2hfA5.js} +2 -2
- package/dist/{index-CQv14qBT.js → index-DX2TYn9C.js} +1 -1
- package/dist/{index-BraOucL9.js → index-D_DfTYUo.js} +2 -2
- package/dist/{index-CvxW_ceW.cjs → index-DdV9wIEV.cjs} +1 -1
- package/dist/{index-BrxpiC3n.cjs → index-Dm9lXfLU.cjs} +1 -1
- package/dist/{index-A4XqZRZu.js → index-Dnz1Fp17.js} +1 -1
- package/dist/{index-BUSReuzm.cjs → index-FtyCsM8J.cjs} +1 -1
- package/dist/{index-Be5Lcy8I.cjs → index-HPz4fiNC.cjs} +1 -1
- package/dist/{index-Bxb5vs2G.cjs → index-ImwWdWlH.cjs} +1 -1
- package/dist/{index-DW-rVDoW.js → index-RK0N00Vd.js} +1 -1
- package/dist/{index-3frdwmB9.cjs → index-dJX5-spW.cjs} +1 -1
- package/dist/{index-CTzUoEvv.js → index-lCOltxCV.js} +1 -1
- package/dist/{index-B9zflXtq.cjs → index-rMsfTW1X.cjs} +1 -1
- package/dist/{index-ezTUorp4.js → index-v9RPEHq4.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BHQK6kYN.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BEbojT7K.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Ot3QJhAd.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-C_R7wen6.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BdQG3k4f.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DEUapuYe.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-jd0HbTtq.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-DIGHAGm0.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_1_lang-BPOMIUDk.cjs → index.vue_vue_type_style_index_1_lang-0T3F_kRW.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-i6dNMfNe.js → index.vue_vue_type_style_index_1_lang-dAljglMe.js} +1 -1
- package/dist/{main-CRx8bQKs.js → main-Dup8MUNV.js} +2 -2
- package/dist/{main-CPBKKiau.cjs → main-aX6kRTuP.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-Dev-MOPx.js → threeModel-BtbZLp4G.js} +2 -2
- package/dist/{threeModel-D_WDk5BU.cjs → threeModel-D-udFFWH.cjs} +1 -1
- package/dist/{threeSceneView-CZNKmrgW.cjs → threeSceneView-BT3-qVGH.cjs} +1 -1
- package/dist/{threeSceneView-Dnn4OJot.js → threeSceneView-Dd_b10YG.js} +2 -2
- package/dist/threeSceneViewForCPMPIP-CZEeHC8X.js +780 -0
- package/dist/threeSceneViewForCPMPIP-FlkNC7Wb.cjs +1 -0
- package/dist/{threeTrackPathView-DxClaXlo.cjs → threeTrackPathView-B8a0xDZ8.cjs} +1 -1
- package/dist/{threeTrackPathView-Cyq-Yen5.js → threeTrackPathView-DOppTPMk.js} +1 -1
- package/dist/{threeViewerHost-y-bKaqNq.cjs → threeViewerHost-B3sZ8h3R.cjs} +1 -1
- package/dist/{threeViewerHost-CWppOVC4.js → threeViewerHost-CpZDl88r.js} +1 -1
- package/dist/{workpieceTreePanel-DDmE14Q9.js → workpieceTreePanel-DUvzpwQQ.js} +2 -2
- package/dist/{workpieceTreePanel-BgacBruE.cjs → workpieceTreePanel-VS1yrDMb.cjs} +1 -1
- package/package.json +1 -1
- package/dist/threeSceneViewForCPMPIP-37tprzOI.cjs +0 -1
- package/dist/threeSceneViewForCPMPIP-Dw0xzYCg.js +0 -779
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BPKAk_F3.cjs"),n=require("./index-DYFw1R2g.cjs"),u=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=e.ref([]),i=e.computed(()=>[{key:"extraButton",contents:[{label:"清空",background:"#f56c6c",color:"#ffffff"}]},{key:"rowButton",contents:[]},{key:"header",contents:[{label:"模块名称",prop:"module",filterable:!0},{label:"操作类型",prop:"type",filterable:!0},{label:"账号",prop:"account",filterable:!0},{label:"姓名",prop:"userName",filterable:!0},{label:"时间",prop:"timeStamp",sortable:!0}]},{key:"tableContents",contents:r.value}]),p=Object.freeze(Object.defineProperty({__proto__:null,pageData:i,tableData:r},Symbol.toStringTag,{value:"Module"})),b={class:"log-wrap"},d=e.defineComponent({__name:"index",setup(_){const t=e.reactive({...p});e.onMounted(async()=>{t.tableData=await n.getLogTableDataAsync("operate")});const c=l=>{var a;n.clickButton(l,(a=t.tableData)==null?void 0:a.map(o=>o.id),o=>{o&&(t.tableData=[])})};return(l,a)=>(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(s.ssTable,{itemData:t.pageData,allowOperate:!1,allowSelect:!1,onOnButtonClick:c},null,8,["itemData"])]))}}),f=u._export_sfc(d,[["__scopeId","data-v-3d3b471d"]]);exports.default=f;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { b as Mo, a as Lo, f as Fo, g as Ko, u as jo, s as Uo } from "./index-
|
|
1
|
+
import { b as Mo, a as Lo, f as Fo, g as Ko, u as jo, s as Uo } from "./index-CncinBCe.js";
|
|
2
2
|
import { computed as Xt, ref as fe, watch as xt, onUnmounted as No, resolveComponent as Ut, createElementBlock as et, openBlock as Ae, createVNode as Ee, createBlock as Mt, createCommentVNode as pa, withCtx as je, createElementVNode as re, Fragment as Ht, renderList as Zt, toDisplayString as ft, nextTick as qa, createTextVNode as Ot, defineComponent as wa, resolveDynamicComponent as dn, onMounted as An, unref as $t, reactive as Ka, normalizeStyle as yn, renderSlot as Sn, createSlots as Wo, mergeProps as yr, withModifiers as Rn, getCurrentInstance as Ho, inject as Sl, shallowRef as Vo, toRef as qo, onBeforeMount as mr, watchEffect as Go, onBeforeUnmount as br, normalizeClass as El, getCurrentScope as Xo, onScopeDispose as Yo, provide as Dl, toRefs as Tl, withDirectives as Jo, vShow as Qo } from "vue";
|
|
3
3
|
import { c1 as Zo, j as ni, c2 as es, bD as ts, bE as as, s as Yt, p as Gt, u as Hi, c as v, bu as Li, g as ya, b as Fi, E as Wt, f as il, bv as Tn, bt as Kn, d as pn, e as kr, c0 as ns } from "./index-CA0SFykF.js";
|
|
4
|
-
import { u as is, c as ca, a as vl, e as xr, E as wr, f as _r, d as ls, b as rs, i as Si } from "./index-
|
|
4
|
+
import { u as is, c as ca, a as vl, e as xr, E as wr, f as _r, d as ls, b as rs, i as Si } from "./index-RK0N00Vd.js";
|
|
5
5
|
import { a as On, u as jn, i as Vi, aE as os, aF as ll, au as rl, aG as Ki, aH as ol, j as ra, aI as gl, E as Ga, aJ as sl, aK as ka, aL as Ln, aM as nn, aN as Cn, aO as Qi, l as ss, aP as us, aQ as cs, aR as ds, aS as ps, aT as fs, aU as hs, aV as vs, aW as gs, aX as ys } from "./index.vue_vue_type_style_index_1_lang-DauX0cbH.js";
|
|
6
6
|
import { s as ma, _ as Il } from "./index-BgO_thJz.js";
|
|
7
|
-
import { a as Cr, T as ms, u as bs } from "./threeViewerHost-
|
|
7
|
+
import { a as Cr, T as ms, u as bs } from "./threeViewerHost-CpZDl88r.js";
|
|
8
8
|
import { aK as ks, aL as Ei, l as xs } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CyYhhHap.js";
|
|
9
9
|
import { _ as ea } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
import { i as Al } from "./isString-C_qk7R_g.js";
|
|
11
|
-
import { a as ws, s as _s } from "./index-
|
|
11
|
+
import { a as ws, s as _s } from "./index-Bf8JqO_9.js";
|
|
12
12
|
import Sr from "./index-rlStojTL.js";
|
|
13
13
|
import { s as Cs } from "./index-Ce4qoE0D.js";
|
|
14
14
|
var Ss = /\s/;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as C, reactive as k, onMounted as D, resolveComponent as B, resolveDirective as T, createElementBlock as y, openBlock as u, createElementVNode as t, withDirectives as g, createVNode as o, unref as n, toDisplayString as r, createBlock as A } from "vue";
|
|
2
2
|
import { S as I, t as x } from "./index-DlpjmZuC.js";
|
|
3
|
-
import { s as w, a as L } from "./index-
|
|
3
|
+
import { s as w, a as L } from "./index-Bf8JqO_9.js";
|
|
4
4
|
import "./index-BHtNKL1L.js";
|
|
5
5
|
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CyYhhHap.js";
|
|
6
|
-
import { d as E } from "./index-
|
|
6
|
+
import { d as E } from "./index-RK0N00Vd.js";
|
|
7
7
|
import "./index.vue_vue_type_style_index_1_lang-DauX0cbH.js";
|
|
8
8
|
import { u as N, s as U } from "./index-CA0SFykF.js";
|
|
9
9
|
import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("vue"),k=require("./index-CEwxrYB-.cjs"),Hl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DJnHA5u9.cjs"),Ue=require("./index-DozBxBwR.cjs"),Ve=require("./threeViewerHost-y-bKaqNq.cjs"),se=require("./index.vue_vue_type_style_index_1_lang-BVjtPl2M.cjs"),Br=require("./index.vue_vue_type_style_index_1_lang-BPOMIUDk.cjs"),$l=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xl=require("./index-oH9f3nVB.cjs");require("./index-BriUHLrI.cjs");const va=require("./isString-Cvx5mmsS.cjs"),Ql=L=>L.match(/\((.*)\)/)[1],ba={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(L){const ee=L,Q=l.ref(null),$=l.ref(!1),V=l.ref(null);return l.watch(()=>ee==null?void 0:ee.isVisible,()=>{$.value=ee==null?void 0:ee.isVisible},{deep:!0,immediate:!0}),l.watch(()=>V.value,()=>{l.nextTick(()=>{var s,ae;(ae=(s=Q.value)==null?void 0:s.updatePopper)==null||ae.call(s)})},{deep:!0,immediate:!0}),(s,ae)=>{const ge=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(ge,{visible:$.value,title:ee==null?void 0:ee.title,placement:ee==null?void 0:ee.placement,width:ee==null?void 0:ee.width,ref_key:"popOverRef",ref:Q},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:V})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},Ar={key:0,class:"extra-button-content"},wr={class:"table-operator-wrap"},_r={class:"extra-button-filter"},Ur={class:"form-content-value"},Or={key:0,class:"extra-header"},Lr={class:"drop-menu",style:{width:"120px"}},Vr={key:0},Mr={key:1},jr={key:1,class:"extra-button-content tabs-button-wrapper"},$r={class:"table-operator-wrap"},Pr={class:"extra-button-filter"},Kr={class:"form-content-value"},Fr={key:0,class:"extra-header"},zr={class:"drop-menu",style:{width:"120px"}},Rr={key:0},qr={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(L,{emit:ee}){const Q=ee,$=L,V=l.ref(""),s=l.ref(!1),ae=l.ref([]),ge=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),me=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],he=oe=>{const G=oe.raw;if(!G)return;const z=new FileReader;z.onload=U=>{try{const Ce=new Uint8Array(U.target.result),xe=Ve.readSync(Ce,{type:"array"}),_e=xe.SheetNames[0],Oe=xe.Sheets[_e],qe=Ve.utils.decode_range(Oe["!ref"]).e.c+1,we=new Array(qe).fill(""),C=[];for(const W in Oe){if(W[0]==="!")continue;const{r:H,c:ke}=Ve.utils.decode_cell(W);let Ne=Oe[W].v;if(Oe[W].t==="n"&&Ne>0&&Ne<1e6&&(Ne=new Date((Ne-25569)*86400*1e3).toISOString().split("T")[0]),(Ne==null||Ne==="")&&(Ne=""),H===0)we[ke]=Ne;else{if(!C[H-1]){C[H-1]={};for(let Je=0;Je<qe;Je++)C[H-1][`col_${Je}`]=""}C[H-1][`col_${ke}`]=Ne}}for(let W=0;W<qe;W++)we[W]===void 0&&(we[W]="");const de=C==null?void 0:C[0];if(!(de!=null&&de.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");Q("getImportData",we,C)}catch(Ce){throw k.ElMessage.error(Ce.message),new Error(Ce.message)}},z.readAsArrayBuffer(G)},Me=oe=>{var z;const G=(z=ae.value)==null?void 0:z.reduce((U,Ce,xe)=>(xe===0?U[Ce.label]=oe:U[Ce.label]=Ce==null?void 0:Ce.value,U),{});Q("filter",G,oe,!0)},Ge=oe=>{Q("buttonClick",oe)},ce=oe=>{var G,z;ae.value=(z=(G=se.getColumnChild(k.cloneDeep(oe)))==null?void 0:G.filter(U=>(U==null?void 0:U.label)!==""&&(U==null?void 0:U.label)!=="操作"))==null?void 0:z.map(U=>({label:(U==null?void 0:U.label)??"",value:"",name:(U==null?void 0:U.label)??"",isFormColHidden:U==null?void 0:U.isTableColHidden,width:2}))},Re=l.ref(!1),Ye=oe=>{var G;if((oe==null?void 0:oe.buttonName)==="确认"&&(Q("filter",oe==null?void 0:oe.content),Re.value=(oe==null?void 0:oe.content)&&Object.values(oe==null?void 0:oe.content).length>0),(oe==null?void 0:oe.buttonName)==="清空"){const z=k.cloneDeep(oe==null?void 0:oe.content);for(const U in z)z[U]="";ae.value=(G=ae.value)==null?void 0:G.map(U=>({...U,value:""})),Q("filter",z),Re.value=!1}s.value=!1},be=()=>{var G,z;ae.value=(G=ae.value)==null?void 0:G.map(U=>({...U,value:""}));const oe=(z=ae.value)==null?void 0:z.reduce((U,Ce)=>(U[Ce.label]=Ce.value,U),{});Q("filter",oe)};return l.onMounted(()=>{ce($.columns)}),l.watch(()=>$.columns,()=>{ce($.columns)},{deep:!0,immediate:!0}),(oe,G)=>{var Oe,rl,qe,we;const z=l.resolveComponent("el-icon"),U=l.resolveComponent("svg-icon"),Ce=l.resolveComponent("el-input"),xe=l.resolveComponent("el-button"),_e=l.resolveComponent("el-upload");return L.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",Ar,[l.createElementVNode("div",{class:l.normalizeClass(L.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(L.compName),7),l.createElementVNode("div",wr,[l.createElementVNode("div",_r,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,de,W,H;return[l.createVNode(Ce,{modelValue:V.value,"onUpdate:modelValue":G[1]||(G[1]=ke=>V.value=ke),style:{"min-width":"80px"},placeholder:Re.value?(W=(de=(C=L.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:de.slice(0,3))==null?void 0:W.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:Me,disabled:((H=ae.value)==null?void 0:H.length)===0},{suffix:l.withCtx(()=>{var ke,Ne;return[!V.value&&((Ne=(ke=L.filterValues)==null?void 0:ke.filter(Je=>Je))!=null&&Ne.join("/"))?(l.openBlock(),l.createBlock(z,{key:0,style:{cursor:"pointer"},onClick:be},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:G[0]||(G[0]=ke=>s.value=!s.value)},[l.createVNode(U,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Ur,[(l.openBlock(),l.createBlock(Ue.ssForm,{rowContents:ae.value,buttonValue:ge.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ge.value,isStartJustify:!1,onOnButtonClick:Ye},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),L.buttons&&((Oe=L.buttons)==null?void 0:Oe.length)>0?(l.openBlock(),l.createElementBlock("div",Or,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((rl=L.buttons)==null?void 0:rl.filter(C=>L.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,de)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:de},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(_e,{key:0,class:"upload-button-wrap","on-change":he,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!L.lockingPage},{default:l.withCtx(()=>[l.createVNode(xe,{disabled:!!L.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(Ue._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(xe,{key:0,disabled:!!L.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",Lr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,W=>(l.openBlock(),l.createBlock(xe,{key:W==null?void 0:W.label,disabled:!!L.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:H=>Ge(W==null?void 0:W.label)},{default:l.withCtx(()=>{var H,ke;return[l.createTextVNode(l.toDisplayString(W==null?void 0:W.label),1),(H=W==null?void 0:W.label)!=null&&H.includes("选中")?(l.openBlock(),l.createElementBlock("span",Vr,"("+l.toDisplayString(L.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=W==null?void 0:W.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Mr,"("+l.toDisplayString(L.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(xe,{key:2,id:"themeButton",disabled:!!L.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:W=>Ge(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",jr,[l.createElementVNode("div",$r,[l.createElementVNode("div",Pr,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,de,W,H;return[l.createVNode(Ce,{modelValue:V.value,"onUpdate:modelValue":G[3]||(G[3]=ke=>V.value=ke),style:{"min-width":"80px"},placeholder:Re.value?(W=(de=(C=L.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:de.slice(0,3))==null?void 0:W.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:Me,disabled:((H=ae.value)==null?void 0:H.length)===0},{suffix:l.withCtx(()=>{var ke,Ne;return[!V.value&&((Ne=(ke=L.filterValues)==null?void 0:ke.filter(Je=>Je))!=null&&Ne.join("/"))?(l.openBlock(),l.createBlock(z,{key:0,style:{cursor:"pointer"},onClick:be},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:G[2]||(G[2]=ke=>s.value=!s.value)},[l.createVNode(U,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Kr,[(l.openBlock(),l.createBlock(Ue.ssForm,{rowContents:ae.value,buttonValue:ge.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ge.value,isStartJustify:!1,onOnButtonClick:Ye},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),L.buttons&&((qe=L.buttons)==null?void 0:qe.length)>0?(l.openBlock(),l.createElementBlock("div",Fr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((we=L.buttons)==null?void 0:we.filter(C=>L.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,de)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:de},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(_e,{key:0,class:"upload-button-wrap","on-change":he,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(xe,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var W;return[l.createVNode(U,{name:(W=me==null?void 0:me.find(H=>(H==null?void 0:H.label)===(C==null?void 0:C.label)))==null?void 0:W.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(Ue._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(xe,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var W;return[l.createVNode(U,{name:(W=me==null?void 0:me.find(H=>(H==null?void 0:H.label)===(C==null?void 0:C.label)))==null?void 0:W.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",zr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,W=>(l.openBlock(),l.createBlock(xe,{key:W==null?void 0:W.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:H=>Ge(W==null?void 0:W.label)},{default:l.withCtx(()=>{var H,ke;return[l.createTextVNode(l.toDisplayString(W==null?void 0:W.label),1),(H=W==null?void 0:W.label)!=null&&H.includes("选中")?(l.openBlock(),l.createElementBlock("span",Rr,"("+l.toDisplayString(L.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=W==null?void 0:W.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",qr,"("+l.toDisplayString(L.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(xe,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(C==null?void 0:C.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:W=>Ge(C==null?void 0:C.label)},{icon:l.withCtx(()=>{var W;return[l.createVNode(U,{name:(W=me==null?void 0:me.find(H=>(H==null?void 0:H.label)===(C==null?void 0:C.label)))==null?void 0:W.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)])]))}}},Wr=$l._export_sfc(Jr,[["__scopeId","data-v-b0dbf278"]]),Gr=l.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(L,{emit:ee}){const Q=L,$=ee,V=ae=>{$("buttonClick",ae)},s=ae=>{var ge;return ae!=null&&ae.includes("删除")?((ge=Q.selectTableItems)==null?void 0:ge.length)>0?"warning-active-type":"warning-type":"default-type"};return(ae,ge)=>{const me=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(L.buttons,he=>(l.openBlock(),l.createBlock(me,{key:he==null?void 0:he.label,disabled:!!L.lockingPage,class:l.normalizeClass(s(he==null?void 0:he.label)),onClick:Me=>V(he==null?void 0:he.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(he==null?void 0:he.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Hr=$l._export_sfc(Gr,[["__scopeId","data-v-70b12973"]]),ma=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(L){this.selectArray=L},setSelectString(L){this.selectString=L}}}),Qr={class:"calculator-content"},Xr={class:"calculator-child"},Yr={class:"calculator-child"},Zr=l.defineComponent({__name:"calculator",setup(L){const ee=l.ref(),Q=l.ref();return l.onMounted(()=>{ee.value=[{type:"Upload",label:"输入",name:"input"}],Q.value=[{type:"Upload",label:"输出",name:"output"}]}),($,V)=>(l.openBlock(),l.createElementBlock("div",Qr,[l.createElementVNode("div",Xr,[l.createVNode(Ue.ssForm,{rowContents:ee.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Yr,[l.createVNode(Ue.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Ir=$l._export_sfc(Zr,[["__scopeId","data-v-73db0fe7"]]),ka=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(L){this.selectIndex=L},setSelectMenu(L){this.selectMenu=L},setSelectTitle(L){this.selectTitle=L}}}),Xl=(L,ee)=>{let Q=L,$=ee;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((V,s)=>{if(Array.isArray(V)){let ae={};return V=V==null?void 0:V.forEach((ge,me)=>{var he;(he=$==null?void 0:$[me])!=null&&he.prop?ae[$[me].prop]=ge:Array.isArray(ge)&&(ae.children=Xl(ge,$))}),Object.assign(ae,{id:s})}else return V})),Q},Sa=(L,ee,Q)=>{let $=L,V=ee;return $=$==null?void 0:$.map((s,ae)=>{var ge,me;return!Array.isArray(s)||!((ge=V==null?void 0:V[ae])!=null&&ge.label)&&!Q||(s.unshift(((me=V==null?void 0:V[ae])==null?void 0:me.label)??""),s.some(he=>Array.isArray(he))&&(s=s==null?void 0:s.map(he=>{var Me;return Array.isArray(he)&&(he=Sa(he,(Me=V==null?void 0:V[ae])==null?void 0:Me.children,Q)),he}))),s}),$},en=(L,ee,Q)=>{if(ee==="")return L==null?void 0:L.filter($=>($==null?void 0:$.id)!==Q);{const $=ee.split("-");return ln(L,$,Q)}},ln=(L,ee,Q)=>{let $=L,V=ee;return(V==null?void 0:V.length)===0?$=$==null?void 0:$.filter(s=>s.id!==Q):$=$==null?void 0:$.map(s=>(s.id.toString()===(V==null?void 0:V[0])&&(V==null||V.shift(),s=Ca(s,V,Q)),s)),$},Ca=(L,ee,Q)=>{var s,ae;let $=L,V=ee;return(V==null?void 0:V.length)===0?$.children=(s=$.children)==null?void 0:s.filter(ge=>ge.id!==Q):$.children=(ae=$.children)==null?void 0:ae.map(ge=>(ge.id.toString()===(V==null?void 0:V[0])&&(V==null||V.shift(),ge=Ca(ge,V,Q)),ge)),$},an=(L,ee,Q)=>{if(ee==="")return Q;{const $=ee.split("-");return rn(L,$,Q)}},rn=(L,ee,Q)=>{let $=L,V=ee;return(V==null?void 0:V.length)===0?$=Q:$=$==null?void 0:$.map(s=>(s.id.toString()===(V==null?void 0:V[0])&&(V==null||V.shift(),s=Da(s,V,Q)),s)),$},Da=(L,ee,Q)=>{var s;let $=L,V=ee;return(V==null?void 0:V.length)===0?$.children=Q:$.children=(s=$.children)==null?void 0:s.map(ae=>(ae.id.toString()===(V==null?void 0:V[0])&&(V==null||V.shift(),ae=Da(ae,V,Q)),ae)),$},xa=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(L){this.objUrl=L},setBlobUrls(L){this.blobUrls=L}}}),Yl=async(L,ee)=>{var ae,ge,me,he,Me,Ge,ce,Re,Ye;let Q=(ge=(ae=k.cloneDeep(L))==null?void 0:ae.optionUrl)==null?void 0:ge.menuSelect,$=[];Q==null||Q.forEach(be=>{var oe;if((be==null?void 0:be[0])==="["){let G=be;G=G==null?void 0:G.slice(1,(G==null?void 0:G.length)-1),G=(oe=ee==null?void 0:ee.find(z=>(z==null?void 0:z.prop)===G))==null?void 0:oe.value}});let V="";const s=await se.menuToParent(Q,void 0,ee);if(s==null||s.forEach(be=>{var oe,G,z,U;(be==null?void 0:be.name)===(((U=(z=(G=(oe=k.cloneDeep(L))==null?void 0:oe.optionUrl)==null?void 0:G.groupSelect)==null?void 0:z[0])==null?void 0:U.replaceAll("'",""))??"")&&(V=be==null?void 0:be.id)}),V===""&&(V=(me=s==null?void 0:s[0])==null?void 0:me.id),V!==""){let be=(he=s==null?void 0:s.find(z=>{var U,Ce,xe,_e;return(z==null?void 0:z.name)===(((Ce=(U=L==null?void 0:L.groupSelect)==null?void 0:U.split(":"))==null?void 0:Ce[0])||((_e=(xe=L==null?void 0:L.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:_e[0]))}))==null?void 0:he.compData;be||(be=(Me=s==null?void 0:s[0])==null?void 0:Me.compData);let oe=(ce=(Ge=be==null?void 0:be.find(z=>(z==null?void 0:z.key)==="header"))==null?void 0:Ge.contents)==null?void 0:ce.map(z=>z==null?void 0:z.label),G=(Ye=(Re=be==null?void 0:be.find(z=>(z==null?void 0:z.key)==="tableContents"))==null?void 0:Re.contents)==null?void 0:Ye.map(z=>(z=z==null?void 0:z.filter(U=>!(U!=null&&U.id)),z));G==null||G.forEach(z=>{$.push(se.getValueToObjectValue(z,oe))})}return $},nn={class:"table-content"},on={class:"menu-config-wrap"},tn=["onClick"],sn=["onClick"],un={key:0,class:"viewport-wrap"},cn=["onClick"],dn={title:"选择显示列信息"},pn={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},fn=["title"],gn={class:"col-operate-wrap"},hn={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},yn={class:"pop-view"},vn={class:"pop-wrapper"},bn={class:"file-list-pop"},mn=["title","onClick"],kn=["onClick"],Sn=["onClick"],Cn={class:"form-content"},Dn={key:0,class:"dialog-footer"},xn={class:"dialog-footer"},Tn={class:"form-content"},En={__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(L,{emit:ee}){var ya;const Q=l.ref([]),$=xa(k.pinia),V=l.ref(null),s=L,ae=l.ref(s==null?void 0:s.allowSelect),ge=l.ref((ya=s==null?void 0:s.config)==null?void 0:ya.showIndex),me=l.ref(),he=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),Me=se.useOriginalState(k.pinia),{originalPath:Ge}=k.storeToRefs(Me),ce=Ge.value,Re=l.ref(!1),Ye=l.ref(!1),be=l.ref(!1),oe=l.reactive({column:{},status:!1,text:"合计"}),G=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),z=ee,U=l.ref([]),Ce=l.reactive({prop:"",order:null}),xe=l.ref([]),_e=l.ref(!1),Oe=l.ref(!1),rl=l.ref(null);Ve.useThreeSystem();const qe=l.ref([]),we=l.ref(!1),C=l.ref(),de=se.useMenuState(),{importLoading:W,activeMenuPath:H,contentLoading:ke,linkMenuInfo:Ne}=k.storeToRefs(de),Je=se.useTableComp(k.pinia),Ee=se.useModelComp(k.pinia),{extraContents:ve,cacheUpdatingData:il,tableViewContents:ul,tableLoading:Bn,pageMapState:Ze,lockingPage:Tl}=k.storeToRefs(Ee),I=l.ref([]),El=l.ref([]),Nl=l.ref(new Map);l.ref(!1);const We=l.ref("");l.ref();const Bl=l.ref(!0),nl=l.ref(0),Zl=l.ref(!0),je=l.ref(""),He=l.ref(!1),Ta=l.ref({label:"查看三维模型"}),Al=l.ref(!1),Pl=l.ref(),Le=l.ref([]),Ie=l.ref([]),wl=l.ref(!1),cl=l.ref([]),ol=l.ref([]),el=l.ref([]),Qe=l.ref([]),$e=l.ref(),Be=l.ref(),Ea=ma(k.pinia),_l=l.ref(),Kl=l.ref(0),Ul=ka(k.pinia),{selectIndex:Na,selectMenu:Xe,selectTitle:Fl}=k.storeToRefs(Ul),{selectString:ll}=k.storeToRefs(Ea),Ba=k.useLoginState(k.pinia),{loginUserInfo:fe}=k.storeToRefs(Ba),Aa=l.ref(720),Pe=l.ref(!1),Ol=l.ref(!1),Ke=l.ref([]),al=l.ref(),dl=l.ref(!0),Il=l.ref(!0),Ll=l.ref([]),wa=l.inject("contentRef");l.provide("contentRef",wa),l.watch(()=>{var e;return(e=I.value)==null?void 0:e.length},e=>{G.total=e}),l.watch(()=>ul.value,async()=>{var i,p,d,g,m,t,N,j,v,O,T,S,K,x,A,D,f,h;if(((i=ul.value)==null?void 0:i.length)===0||!((p=s==null?void 0:s.itemData)!=null&&p.find(u=>(u==null?void 0:u.key)==="columnPath"))||!((d=s==null?void 0:s.itemData)!=null&&d.find(u=>(u==null?void 0:u.key)==="pageColumn")))return;let e=(v=(j=(N=(t=(m=(g=s==null?void 0:s.itemData)==null?void 0:g.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:m.contents)==null?void 0:t.split("["))==null?void 0:N[1])==null?void 0:j.split("]"))==null?void 0:v[0],a=((K=(S=(T=(O=s==null?void 0:s.itemData)==null?void 0:O.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:T.contents)==null?void 0:S.split("["))==null?void 0:K[0])+((A=(x=ul.value)==null?void 0:x.find(u=>(u==null?void 0:u.key)===e))==null?void 0:A.value),n=((f=(D=s==null?void 0:s.itemData)==null?void 0:D.find(u=>(u==null?void 0:u.key)==="pageGroup"))==null?void 0:f.contents)??"",r=await se.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;ga(o,s.allMapContents)},{deep:!0});const _a=async(e,a)=>{var n,r,o,i,p;try{const d=await k.getInsofDataApi({id:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index)});let g;((n=d==null?void 0:d.data)==null?void 0:n.code)===200&&(g=((o=(r=d==null?void 0:d.data)==null?void 0:r.result)==null?void 0:o[0])||null);const m={type:"data",pageKey:s!=null&&s.parentTableId?(i=g==null?void 0:g.key)==null?void 0:i.pageKey:H.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(v=>{const O=Object.keys(v),T={};return O.forEach((S,K)=>{T[e[K]]=v[S]}),T}),N=t==null?void 0:t.map(v=>({key:m,value:{tableData:v}})),j=await k.batchAddInsofDataApi({dataList:N});((p=j==null?void 0:j.data)==null?void 0:p.code)===200?(Ee.setRefreshCurStructure(!0),k.ElMessage.success("导入数据成功")):k.ElMessage.error("导入数据响应失败")}catch(d){throw k.ElMessage.error("导入数据处理失败"),new Error(d)}},Ua=async e=>{var a,n;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await k.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),o=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let 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(()=>{Il.value=!1;let e=Kl.value;Kl.value=e+1});const ea=l.computed(()=>{var r,o;const e=(G.currentPage-1)*G.pageSize,a=e+G.pageSize,n=(r=U.value)==null?void 0:r.find(i=>{var p;return(i==null?void 0:i.sortable)&&((p=i==null?void 0:i.label)==null?void 0:p.includes("时间"))});return n&&(Ce.order="descending",Ce.prop=n==null?void 0:n.prop),z("getSliceContLength",G),(o=I.value)==null?void 0:o.slice(e,a)}),Oa=e=>{G.currentPage=e,z("getSliceContLength",G)},La=e=>{var a;G.pageSize=e,e*G.currentPage>((a=I.value)==null?void 0:a.length)&&(G.currentPage=1,G.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),z("getSliceContLength",G)},Va=(e,a)=>{var p,d;const n=(d=(p=U.value)==null?void 0:p.map(g=>g==null?void 0:g.prop))==null?void 0:d.filter(g=>g!=="operate");let r;const o=(e==null?void 0:e.length)===(n==null?void 0:n.length);if(e!=null&&e.includes("序号"))return k.ElMessage.error("导入的数据不需要包含序号列");if(r=o?e:e.slice(0,n==null?void 0:n.length),!(r==null?void 0:r.every(g=>n==null?void 0:n.find(m=>g===m))))return k.ElMessage.error("导入的数据表头不匹配");_a(r,a)},Ma=(e,a)=>{var n;Ee.setRefreshCurStructure(!1),((n=U.value)==null?void 0:n.length)===0||Va(e,a)},ja=(e,a,n,r)=>{const o=[],i=[],p=m=>Object.keys(m).length;for(const m in e)if(e[m]!==void 0){const t=e[m],N=[];for(const[j,v]of Object.entries(t))N.push(v),i.length<p(t)&&i.push(j);o.push(N)}o.unshift(i);const d=Ve.utils.aoa_to_sheet(o),g=Ve.utils.book_new();Ve.utils.book_append_sheet(g,d,r),Ve.writeFileSync(g,`${a}.xlsx`),Ke.value=[]},Vl=async(e,a,n,r=!1,o)=>{var i,p,d,g,m,t,N,j;try{Ee.setRefreshCurStructure(!1);const v=await k.getInsofDataApi({id:s==null?void 0:s.index});if(((i=v==null?void 0:v.data)==null?void 0:i.code)===200){let O=(m=(g=(d=(p=v==null?void 0:v.data)==null?void 0:p.result)==null?void 0:d[0])==null?void 0:g.value)==null?void 0:m.pageData;r?O={...O,compData:(N=O==null?void 0:O.compData)==null?void 0:N.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})}:O={...O,compData:(t=O==null?void 0:O.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(A=>(A==null?void 0:A.prop)===(a==null?void 0:a.prop)?{...A,[e]:n}:A)}:(S==null?void 0:S.key)==="tableToForm"&&o?{...S,contents:(x=S==null?void 0:S.contents)==null?void 0:x.map(A=>(A==null?void 0:A.prop)===(a==null?void 0:a.prop)?{...A,[o]:n}:A)}:S})};const T=await k.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:O}});((j=T==null?void 0:T.data)==null?void 0:j.code)===200?(k.ElMessage.success("编辑成功"),Ee.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(v){k.ElMessage.error(v)}},$a=async(e,a)=>{await Vl("label",a,e)},Pa=async(e,a)=>{await Vl("columnType",a,e,!1,"type")},Ka=()=>{il.value?Pe.value=!1:ha()},Fa=e=>{Ke.value=e},za=(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=U.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=U.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)}))}),Ra=async(e,a,n)=>{const r=k.cloneDeep(U.value);await l.nextTick(),U.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 Vl(a,n,e)},zl=async(e,a)=>{await Vl(a,null,e,!0)},qa=()=>{He.value=!1},Ja=e=>{z("clickTrigger",e)},Rl=async e=>{var i,p,d,g,m,t,N,j,v,O,T,S,K,x;let a,n,r;if(typeof e=="string"?(a=e,n=null,r=null):(a=e==null?void 0:e.row,n=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix),(i=a==null?void 0:a.toString())!=null&&i.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(a.includes(",")){k.ElMessage.error("当前版本仅允许单个urdf预览!");return}cl.value=[a],Oe.value=!0,rl.value={data:k.cloneDeep(n)},_e.value=!0;return}let o=[];if((p=a==null?void 0:a.toString())!=null&&p.includes(".stl")||(d=a==null?void 0:a.toString())!=null&&d.includes(".STL")||(g=a==null?void 0:a.toString())!=null&&g.includes(".obj")||(m=a==null?void 0:a.toString())!=null&&m.includes(".mtl")){cl.value=(t=a==null?void 0:a.toString())==null?void 0:t.split(","),Oe.value=!1,_e.value=!0;return}if((N=a==null?void 0:a.toString())!=null&&N.includes(".stl")||(j=a==null?void 0:a.toString())!=null&&j.includes(".STL")||(v=a==null?void 0:a.toString())!=null&&v.includes(".obj")||(O=a==null?void 0:a.toString())!=null&&O.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let A,D=[],f={};if(Array.isArray(a)?A=a:A=a==null?void 0:a.split(","),A==null||A.forEach(h=>{h.includes(".mtl")?D.push(h):f.blob=f.blob?f.blob+","+h:h}),(D==null?void 0:D.length)>0&&(f.mtlBlobs=D),r&&(f.suffix=r),(S=(T=Object.values(f))==null?void 0:T[0])!=null&&S.includes("http:"))o.push(f);else{const h=new Blob([f.blob],{type:"application/octet-stream;charset=UTF-8"});let u=URL.createObjectURL(h),y="";(K=a==null?void 0:a.split("/"))==null||K.forEach((R,B)=>{var X;B===((X=a==null?void 0:a.split("/"))==null?void 0:X.length)-1&&(y=R)}),(x=f.blob)!=null&&x.includes(".stl")&&(y=(y==null?void 0:y.replaceAll(">",""))+".urdf"),C.value=[{name:y,blobUrl:u}],we.value=!0}}else{try{de.setImportLoading(!0);const A=new Br.ChunkDownloader(a,2*1024*1024),D=await A.downloadAll(y=>{console.log(`下载进度: ${y.percent}%`)}),f=new Blob([D],{type:"application/octet-stream"}),h=URL.createObjectURL(f),u=a.split("/").pop();C.value=[{name:u,blobUrl:h,size:A.totalSize}],de.setImportLoading(!1)}catch(A){console.error("NC文件加载失败:",A)}we.value=!0}(o==null?void 0:o.length)>0&&$.setBlobUrls(o)},Ml=e=>{var r,o,i,p;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(p=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:p[((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},Wa=async e=>{let a=null,n=null,r=null;if(e!=null&&e.downloadUrl){const i=await ql(),p=Ue.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),d=await k.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(()=>{p.close()}),g=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(g),n=e==null?void 0:e.name;const m=n==null?void 0:n.lastIndexOf(".");r=n==null?void 0:n.slice(m)}else{const 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=Ml(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};Rl(i);return}const o={name:n,blobUrl:a};C.value=[o],we.value=!0},Ga=async e=>{let a=null,n=null;if(e!=null&&e.downloadUrl){const i=await ql(),p=await k.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"}}),d=new Blob([p.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(d),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=Ml(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)},Ha=(e,a)=>{var n;if(Object.values(a).length!==0)return Object.values(a).find(r=>{var o,i,p;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"))||((p=r==null?void 0:r.toString())==null?void 0:p.includes(".obj"))})?[...e,Ta.value]:(n=s==null?void 0:s.config)!=null&&n.allowMove?[...e,{label:"迁移"}]:e},Qa=(e,a={})=>[...e==null?void 0:e.values()].filter(n=>Object.keys(a).every(r=>{var p;const o=n[r],i=(p=a[r])==null?void 0:p.toLowerCase();return i&&o&&typeof o=="string"?o.toLowerCase().includes(i):!0})),la=l.ref([]),Xa=async(e,a,n=!1)=>{var r;if(e){if(Ee.setTableLoading(!0),la.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(o=>!o)))return I.value=El.value;if(n){I.value=[...Nl.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}I.value=Qa(Nl.value,e),Ee.setTableLoading(!1)}},Ya=async e=>{var p,d,g,m,t,N,j,v,O,T,S,K,x,A,D;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((p=fe.value)==null?void 0:p.account)||((d=fe.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((g=fe.value)==null?void 0:g.account)||((m=fe.value)==null?void 0:m.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(N=(t=a==null?void 0:a.data)==null?void 0:t.result)==null?void 0:N.map(f=>f==null?void 0:f.id);const o=(v=(j=n==null?void 0:n.data)==null?void 0:j.result)==null?void 0:v.map(f=>f==null?void 0:f.id);r=[...k.cloneDeep(r),...o],(r==null?void 0:r.length)>0&&(r!=null&&r.every(f=>f!==null&&f))&&await k.batchDeleteInsofDataApi({ids:r});let i=await se.getItemData(H.value,sessionStorage.getItem("systemKey"),e.id);if(i=i==null?void 0:i.filter(f=>f.comp!=="methodButton"),i&&i.length>0){const f=!Array.isArray(Fl.value)&&((O=Fl.value)==null?void 0:O.key)!=="main"?[]:Fl.value;f.push({key:Xe.value===""?(T=e==null?void 0:e.id)==null?void 0:T.toString():Xe.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]]}),Ul.setSelectMenu(Xe.value===""?(x=e==null?void 0:e.id)==null?void 0:x.toString():Xe.value+"-"+((A=e==null?void 0:e.id)==null?void 0:A.toString())),Ul.setSelectTitle(f),Ul.setSelectIndex((D=e==null?void 0:e.id)==null?void 0:D.toString()),z("pageChange",i)}},aa=async(e,a,n,r)=>{var i,p,d,g,m,t,N,j,v,O,T,S,K,x,A,D,f,h,u,y,R,B,X,re,Z;if(z("clickMainKey",n),(r==null?void 0:r.isExistChild)===!0){let J=(p=(i=U.value)==null?void 0:i.find(q=>(q==null?void 0:q.isMainKey)===!0))==null?void 0:p.prop,Y=(d=r==null?void 0:r.rowContent)==null?void 0:d[J],w=(m=(g=r==null?void 0:r.columnType)==null?void 0:g.childPath)==null?void 0:m.split(ce),M=[];w==null||w.forEach((q,c)=>{(w==null?void 0:w.length)-1===c&&M.push(Y),M.push(q)}),M=M.join(ce);let F=await se.getItemData(M,sessionStorage.getItem("systemKey"),""),le=await se.getItemData((t=r==null?void 0:r.columnType)==null?void 0:t.childPath,sessionStorage.getItem("systemKey"),"");if(!F||(F==null?void 0:F.length)===0){let q=[];le==null||le.forEach(P=>{var ye,ue,E,b;let _={type:"structure",pageKey:M,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(ye=fe.value)==null?void 0:ye.id,parentPageKey:"",createUserLayer:((ue=fe.value)==null?void 0:ue.dept)||((E=fe.value)==null?void 0:E.部门名称)},ne={pageData:{comp:P==null?void 0:P.comp,compData:(b=P==null?void 0:P.compData)==null?void 0:b.filter(te=>(te==null?void 0:te.key)!=="tableContents"),name:P==null?void 0:P.name,isShow:P==null?void 0:P.isShow}};q.push({key:_,value:ne})}),(q==null?void 0:q.length)>0&&await k.batchAddInsofDataApi({dataList:q});let c=await se.getItemData(M,sessionStorage.getItem("systemKey"),"");Ll.value=c}else{let q=le==null?void 0:le.map(c=>{var P,_;return(c==null?void 0:c.comp)==="Form"?c.compData=(P=c.compData)==null?void 0:P.map(ne=>{var ye;return(ne==null?void 0:ne.key)==="formContent"&&(ne.contents=(ye=ne==null?void 0:ne.contents)==null?void 0:ye.map(ue=>{var b,te,ie,pe,De;let E=(De=(pe=(ie=(te=(b=F==null?void 0:F.find(Se=>(Se==null?void 0:Se.name)===(c==null?void 0:c.name)))==null?void 0:b.compData)==null?void 0:te.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:ie.contents)==null?void 0:pe.find(Se=>(Se==null?void 0:Se.prop)===(ue==null?void 0:ue.prop)))==null?void 0:De.value;return ue.value=E,ue})),ne}):c=F==null?void 0:F.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)),c.id=(_=F==null?void 0:F.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)))==null?void 0:_.id,c});Ll.value=q}z("routeUrl",Ll.value,{isEdit:!0,routerUrl:M});return}if((r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(J=>(J==null?void 0:J.url)&&(J==null?void 0:J.name)))){let J=k.cloneDeep(e);J=await((N=k.cloneDeep(J))==null?void 0:N.map(async w=>{var le,q,c,P;const M=await Ve.downloadAvatarApi({url:w==null?void 0:w.url});let F=URL.createObjectURL(M.data);return{name:(w==null?void 0:w.name)+"."+((P=(le=w==null?void 0:w.url)==null?void 0:le.split("."))==null?void 0:P[((c=(q=w==null?void 0:w.url)==null?void 0:q.split("."))==null?void 0:c.length)-1]),blobUrl:F}}));let Y=await Promise.all(J);C.value=Y,we.value=!0}const o=k.cloneDeep(U.value);if((r==null?void 0:r.isMainKey)===!0&&(o==null?void 0:o.length)>0){(j=o==null?void 0:o[0])==null||j.prop;let J=k.cloneDeep(H).value+ce+(r==null?void 0:r.data),Y=k.cloneDeep(H).value,w=(O=(v=Ze.value[J])==null?void 0:v.filter(q=>{var c,P;return((c=q==null?void 0:q.key)==null?void 0:c.type)==="structure"&&((P=q==null?void 0:q.key)==null?void 0:P.parentTable)===""}))==null?void 0:O.map(q=>{var c;return(c=q==null?void 0:q.value)==null?void 0:c.pageData}),M={};(T=U.value)==null||T.forEach(q=>{(q==null?void 0:q.label)!=="操作"&&(M[q.label]=n[q.prop]??n[q.label])});let F=(K=(S=s==null?void 0:s.itemData)==null?void 0:S.find(q=>(q==null?void 0:q.key)==="mainRouters"))==null?void 0:K.contents,le;if((F==null?void 0:F.length)>0){let q=J==null?void 0:J.split(ce)[((x=J==null?void 0:J.split(ce))==null?void 0:x.length)-1],c=F==null?void 0:F.find(P=>(P==null?void 0:P.key)===q);le=(c==null?void 0:c.routerContent)+ce+(c==null?void 0:c.key)}if((w==null?void 0:w.length)>0)await se.getItemData(J+ce+`updateLoading${((A=fe.value)==null?void 0:A.account)||((D=fe.value)==null?void 0:D.账号)}`,sessionStorage.getItem("systemKey"),"")||await se.loadingConstruct(J,J+ce+`updateLoading${((f=fe.value)==null?void 0:f.account)||((h=fe.value)==null?void 0:h.账号)}`,M,le),Ee.setRouteToChildPath(Y),de.setActiveMenuPath(J+ce+`updateLoading${((u=fe.value)==null?void 0:u.account)||((y=fe.value)==null?void 0:y.账号)}`);else{(R=o==null?void 0:o[0])==null||R.prop;let q=k.cloneDeep(H).value+ce+(r==null?void 0:r.data),c=k.cloneDeep(H).value;await se.getItemData(c+ce,sessionStorage.getItem("systemKey"),""),await se.loadingConstruct(c+ce,q,M),await se.loadingConstruct(q,q+ce+`updateLoading${((B=fe.value)==null?void 0:B.account)||((X=fe.value)==null?void 0:X.账号)}`,M,le),Ee.setRouteToChildPath(c),de.setActiveMenuPath(q+ce+`updateLoading${((re=fe.value)==null?void 0:re.account)||((Z=fe.value)==null?void 0:Z.账号)}`)}}},Za=()=>{we.value=!1},Ia=e=>{z("rowClick",e)};l.watch(()=>s.changedContent,()=>{var n,r;if(!s.changedContent)return;let e=(n=I.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));I.value=e,z("contentChange",{contents:a,index:s.index}),z("change",{content:e,index:s==null?void 0:s.index,buttonName:"",id:s==null?void 0:s.index})},{deep:!0,immediate:!0});const er=()=>{},lr=async()=>{const e=H.value,a=sessionStorage.getItem("systemKey"),n=await se.getItemData(e,a,""),r=n==null?void 0:n.find(d=>(d==null?void 0:d.name)==="方法明细"),o=(r==null?void 0:r.compData)||[],i=o==null?void 0:o.find(d=>(d==null?void 0:d.key)==="formContent");return i==null?void 0:i.contents},ql=async()=>`Bearer ${k.Local.get("access-token")}`,ar=async(e,{token:a,inputData:n}={})=>await k.axios.post(e,n,{headers:{Authorization:a}}).catch(o=>(de.setImportLoading(!1),Promise.reject(o))),rr=e=>{var r;let a={};const n=[];return a.form={},(r=k.cloneDeep(e))==null||r.forEach((o,i)=>{var p,d,g,m,t,N,j,v,O,T,S,K,x,A;if((o==null?void 0:o.comp)==="Table"){(d=(p=o==null?void 0:o.compData)==null?void 0:p.find(u=>(u==null?void 0:u.key)==="header"))==null||d.contents;let D=(t=(m=(g=o==null?void 0:o.compData)==null?void 0:g.find(u=>(u==null?void 0:u.key)==="tableContents"))==null?void 0:m.contents)==null?void 0:t.map(u=>u.slice(1));(T=(O=(v=(j=(N=o==null?void 0:o.compData)==null?void 0:N.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:j.contents)==null?void 0:v[0])==null?void 0:O[0])==null||T.label;let f=(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 y=[];u==null||u.forEach((R,B)=>{var re;let X={};((re=f[B])==null?void 0:re.label)!=="操作"&&(X[f[B].label]=R,y.push(X))}),h.push(y)}),a[o.name]=h}else{const D=(A=(x=o.compData)==null?void 0:x.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:A.contents;D==null||D.forEach(f=>{var h,u;if(f.prop!==""){let y=f==null?void 0:f.value;Array.isArray(y)?y=((h=y==null?void 0:y[0])==null?void 0:h.oldUrl)||(y??"http://222.92.178.198:62001/"+((u=y==null?void 0:y[0])==null?void 0:u.url)):y=y.toString(),f={key:(f==null?void 0:f.prop)??(f==null?void 0:f.label),value:y},n.push(f)}})}}),a.form=se.getFormContents(n),a};let jl=null;const nr=()=>{de.setLoadingPercent(0)},ra=()=>{clearInterval(jl),jl=null},or=()=>{ra(),nr()},fl=()=>{de.setImportLoading(!1),or()},tr=()=>{jl=setInterval(()=>{const e=de.getLoadingPercent();if(e==99){ra();return}de.setLoadingPercent(e+1)},100)},sr=async(e,a,n)=>{var R,B,X,re,Z,J,Y,w,M,F,le,q;de.setImportLoading(!0,se.loadingTypeConstants.PROGRESS),jl||tr();const r=await lr().catch(c=>(fl(),Promise.reject(c))),o=r==null?void 0:r.find(c=>(c==null?void 0:c.key)==="算法体"),i=o==null?void 0:o.value;if(!i){console.log("未搜索到isMain, 缺少算法执行接口"),fl();return}const p=U.value||[],d=p.find(c=>(c==null?void 0:c.prop)==="输入"),g=d==null?void 0:d.prop;let m=a==null?void 0:a[g];const t=await ql().catch(c=>(fl(),Promise.reject(c)));let N=!1,j="";(R=U.value)==null||R.forEach(c=>{(c==null?void 0:c.prop)===g&&(N=!!(c!=null&&c.childPath),j=c==null?void 0:c.childPath)});let v="",O="";if(N){let c=(X=(B=U.value)==null?void 0:B.find(ye=>(ye==null?void 0:ye.isMainKey)===!0))==null?void 0:X.prop;O=a==null?void 0:a[c];let P=j==null?void 0:j.split(ce),_=[];P==null||P.forEach((ye,ue)=>{(P==null?void 0:P.length)-1===ue&&_.push(O),_.push(ye)}),_=_.join(ce),v=_;let ne=await se.getItemData(_,sessionStorage.getItem("systemKey"),"");m=rr(ne)}const T=await ar(i,{token:t,inputData:m}).catch(c=>(fl(),Promise.reject(c))),S=(re=T==null?void 0:T.data)==null?void 0:re.data,K=r==null?void 0:r.find(c=>(c==null?void 0:c.prop)==="算法名称");K==null||K.value;const x=p.find(c=>(c==null?void 0:c.prop)==="输出"),A=x==null?void 0:x.directiveLabel;v=v==null?void 0:v.replaceAll(d==null?void 0:d.directiveLabel,A);const D=(Z=k.cloneDeep(v))==null?void 0:Z.replaceAll(ce+O,"");let f=await se.getItemData(v,sessionStorage.getItem("systemKey"),""),h=await se.getItemData(D,sessionStorage.getItem("systemKey"),"");if(f){let c=[],P=[];f==null||f.forEach(_=>{var ne,ye;if((_==null?void 0:_.comp)==="Table")(ne=_==null?void 0:_.compData)==null||ne.forEach(ue=>{var E;(ue==null?void 0:ue.key)==="tableContents"&&((E=ue==null?void 0:ue.contents)==null||E.forEach(b=>{var te,ie;(te=b==null?void 0:b[0])!=null&&te.id&&c.push((ie=b==null?void 0:b[0])==null?void 0:ie.id)}))});else if((_==null?void 0:_.comp)==="Form"){_.compData=(ye=_==null?void 0:_.compData)==null?void 0:ye.map(E=>{var b;return(E==null?void 0:E.key)==="formContent"&&(E.contents=(b=E==null?void 0:E.contents)==null?void 0:b.map(te=>{var ie,pe;return(ie=S==null?void 0:S.form)!=null&&ie[te.prop]&&(te.value=(pe=S==null?void 0:S.form)==null?void 0:pe[te.prop]),te})),E});let ue={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};P.push({id:_==null?void 0:_.id,value:ue})}}),(P==null?void 0:P.length)>0&&await k.batchUpdateInsofDataApi({dataList:P}),c=[...new Set(c)],(c==null?void 0:c.length)>0&&await k.batchDeleteInsofDataApi({ids:c})}else{let c=[];if(S!=null&&S.table){let P={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:v,parentTable:"",createUserId:(J=fe.value)==null?void 0:J.id,createUserOrg:((Y=fe.value)==null?void 0:Y.dept)||((w=fe.value)==null?void 0:w.部门名称)};h==null||h.forEach(_=>{let ye={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};c.push({key:P,value:ye})})}if(S!=null&&S.form){let P={type:"structure",pageKey:v,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(M=fe.value)==null?void 0:M.id,parentPageKey:"",createUserLayer:((F=fe.value)==null?void 0:F.dept)||((le=fe.value)==null?void 0:le.部门名称)};h==null||h.forEach(_=>{var E;let ne=(E=_==null?void 0:_.compData)==null?void 0:E.map(b=>{var te;return(b==null?void 0:b.key)==="formContent"&&(b.contents=(te=b.contents)==null?void 0:te.map(ie=>{var pe,De;return(pe=S==null?void 0:S.form)!=null&&pe[ie.prop]&&(ie.value=(De=S==null?void 0:S.form)==null?void 0:De[ie.prop]),ie})),b}),ue={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:ne}};c.push({key:P,value:ue})})}(c==null?void 0:c.length)>0&&await k.batchAddInsofDataApi({dataList:c})}let u=await se.getItemData(v,sessionStorage.getItem("systemKey"),""),y=[];S!=null&&S.table&&((q=S==null?void 0:S.table)==null||q.forEach(c=>{var ne,ye,ue,E;let P={type:"data",pageKey:v,tableId:(ne=u==null?void 0:u[0])==null?void 0:ne.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ye=fe.value)==null?void 0:ye.id,createUserOrg:((ue=fe.value)==null?void 0:ue.dept)||((E=fe.value)==null?void 0:E.部门名称)},_={tableData:c};y.push({key:P,value:_})})),(y==null?void 0:y.length)>0&&await k.batchAddInsofDataApi({dataList:y}),vl(!0),fl()},na=(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=na(n.children,a)),n}),e),Te=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)"}]}),ir=()=>{Te.show=!1},ur=e=>{var a,n;if((e==null?void 0:e.buttonName)==="取消")return Te.show=!1;Te.to=e==null?void 0:e.content,!(!(s!=null&&s.index)||!((a=Te.to)!=null&&a.groupName))&&(s==null?void 0:s.index)!==((n=Te.to)==null?void 0:n.groupName)&&(z("change",{buttonName:"迁移",value:{from:Te.from,to:Te.to,data:Te.selectRow}}),Te.show=!1)},cr=l.computed(()=>s.compName===Ue.tableSign),dr=async e=>{de.setImportLoading(!0),await Ue.initUpdateCAMTargetData(e).finally(()=>{de.setImportLoading(!1)}),k.ElMessage({type:"success",message:"应用成功"})},gl=async(e,a,n)=>{var r,o,i,p,d,g,m,t,N,j,v,O,T,S,K;if(We.value="",wl.value=!0,Bl.value=!0,z("onButtonClick",e,a),e==="删除")se.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,A;(x=I.value)!=null&&x.find(D=>(D==null?void 0:D.id)===(a==null?void 0:a.id))?I.value=(A=k.cloneDeep(I.value))==null?void 0:A.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)):I.value=na(k.cloneDeep(I.value),a),en(_l.value,Xe.value,a==null?void 0:a.id),Ee.setTableLoading(s==null?void 0:s.index),z("change",{content:I.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:U.value})});else if(e==="批量删除"){if(((r=Ke.value)==null?void 0:r.length)===0)return k.ElMessage.warning("请先勾选操作的数据");se.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,D;const x=(A=Ke.value)==null?void 0:A.map(f=>f.id);I.value=(D=k.cloneDeep(I.value))==null?void 0:D.filter(f=>!(x!=null&&x.includes(f.id))),Ee.setTableLoading(s==null?void 0:s.index),z("change",{content:I.value,singleContent:null,selectItems:Ke.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:U.value})})}else if(e==="复制新增"){je.value="新增";const x=k.cloneDeep(a),A=(o=U.value)==null?void 0:o.find(h=>h==null?void 0:h.isMainKey),D=A||((i=U.value)==null?void 0:i[0]),f=(p=el.value)==null?void 0:p.find(h=>(h==null?void 0:h.label)==="新建");await ta(!0,f,{data:x,firstCol:D})}else if(e==="新增")je.value="新增",yl(""),He.value=!0;else if(e==="编辑")je.value="编辑",yl(a),He.value=!0;else if(e==="查看")je.value="查看",yl(a),wl.value=!1,Bl.value=!1,He.value=!0;else if(e==="查看三维模型"){const x={};for(let D in a)D!=="id"&&(x[D]=a[D]);let A=(d=Object.values(x))==null?void 0:d[1];Je.setTableShowThree(A)}else if(((g=n==null?void 0:n.extra)==null?void 0:g.type)==="modelExample")je.value=e,Al.value=!0;else if(e==="新建"){let x=Ze.value,A=[];for(let y in x)y!=null&&y.includes(`loading${((m=fe.value)==null?void 0:m.account)||((t=fe.value)==null?void 0:t.账号)}`)&&(A=[...A,...y]);let D=[];for(let y in x)y!=null&&y.includes(`updateLoading${((N=fe.value)==null?void 0:N.account)||((j=fe.value)==null?void 0:j.账号)}`)&&(D=[...D,...y]);let f=A==null?void 0:A.map(y=>y==null?void 0:y.id);const h=D==null?void 0:D.map(y=>y==null?void 0:y.id);f=[...k.cloneDeep(f),...h],(f==null?void 0:f.length)>0&&(f!=null&&f.every(y=>y!==null&&y))&&await k.batchDeleteInsofDataApi({ids:f});const u=(v=el.value)==null?void 0:v.find(y=>(y==null?void 0:y.label)==="新建");await ta(!1,u)}else if(e==="修改模板"){let x=k.cloneDeep(H).value;Ee.setRouteToChildPath(x),de.setActiveMenuPath(x+ce)}else if(e==="执行")sr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((O=Ke.value)==null?void 0:O.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((T=I.value)==null?void 0:T.length)===0)return k.ElMessage.warning("暂无数据导出");const x=(K=(S=U.value)==null?void 0:S.map(D=>D==null?void 0:D.label))==null?void 0:K.filter(D=>D!=="操作"),A=e==="导出全部"?k.cloneDeep(I.value):k.cloneDeep(Ke.value);A==null||A.forEach(D=>{D==null||delete D.id}),ja(A,s==null?void 0:s.compName,x,s==null?void 0:s.compName)}else e==="迁移"?(Te.selectRow=a,Te.show=!0):e==="应用至流程"&&dr(a)},pr=async e=>{var n,r,o,i,p,d;const a=await k.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?(d=(p=a==null?void 0:a.data)==null?void 0:p.result)==null?void 0:d.map(g=>{var m;return{id:g==null?void 0:g.id,...(m=g==null?void 0:g.value)==null?void 0:m.pageData}}):[]},fr=async(e,a)=>{var n,r,o,i,p,d,g,m,t,N,j,v,O,T,S,K,x,A,D,f;try{let h,u;const y=(n=Ze.value[H.value+ce])==null?void 0:n.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="structureMethod"}),R=(r=Ze.value[H.value+ce])==null?void 0:r.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="structure"}),B=y==null?void 0:y.find(w=>{var M,F;return((F=(M=w==null?void 0:w.value)==null?void 0:M.pageData)==null?void 0:F.method)==="保存"});if(!B)return;const X=(d=(p=Ze.value[(i=(o=B==null?void 0:B.value)==null?void 0:o.pageData)==null?void 0:i.path])==null?void 0:p.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="data"}))==null?void 0:d.find(w=>{var M,F,le,q;return((F=(M=w==null?void 0:w.value)==null?void 0:M.tableData)==null?void 0:F.算法名称)===((q=(le=B==null?void 0:B.value)==null?void 0:le.pageData)==null?void 0:q.method)});if(!X)return;const re={buttonName:(m=(g=B==null?void 0:B.value)==null?void 0:g.pageData)==null?void 0:m.method,api:(N=(t=X==null?void 0:X.value)==null?void 0:t.tableData)==null?void 0:N.算法体,content:R==null?void 0:R.map(w=>{var M;return(M=w==null?void 0:w.value)==null?void 0:M.pageData}),extraContent:[],extraValues:(v=(j=B==null?void 0:B.value)==null?void 0:j.pageData)==null?void 0:v.data,methodName:(T=(O=B==null?void 0:B.value)==null?void 0:O.pageData)==null?void 0:T.path};if(!e)return;const Z={...e,compData:(S=e==null?void 0:e.compData)==null?void 0:S.map(w=>{var M;return(w==null?void 0:w.key)==="formContent"?{...w,contents:(M=w==null?void 0:w.contents)==null?void 0:M.map(F=>(F==null?void 0:F.prop)===a?{...F,value:""}:F)}:w})},J={key:{pageKey:H.value+ce,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:Z}},Y=await k.axios.post(re.api,J,{headers:{"Content-Type":"application/json"}});return((K=Y==null?void 0:Y.data)==null?void 0:K.code)===200&&(h=(A=(x=Y==null?void 0:Y.data)==null?void 0:x.result)==null?void 0:A.latestReportCode,u=(f=(D=Y==null?void 0:Y.data)==null?void 0:D.result)==null?void 0:f.status),{newMainKeyValue:h,newStatus:u}}catch(h){throw k.ElMessage.error(h),new Error(h)}},oa=(e,a,n,r)=>{var o;z("contentChange",{contents:(o=e==null?void 0:e.compData)==null?void 0:o.map(i=>{var p;return(i==null?void 0:i.key)==="formContent"?{...i,contents:(p=i==null?void 0:i.contents)==null?void 0:p.map(d=>(d==null?void 0:d.key)===a?{...d,value:n}:hl.value&&(d==null?void 0:d.prop)===hl.prop?{...d,value:hl.value}:d)}:i}),index:e==null?void 0:e.id},r)},hl=l.reactive({prop:"状态",value:""}),gr=l.ref(["系统自动生成信息","审批意见"]),hr=async(e,a,n)=>{var g,m;let r=e==null?void 0:e[a==null?void 0:a.prop],o=1,i,p;const d=k.cloneDeep(H).value+ce+r;if(d){hl.value="",i=(g=Ze.value[d])==null?void 0:g.filter(j=>{var v;return((v=j==null?void 0:j.key)==null?void 0:v.type)==="structure"});const t=i==null?void 0:i.find(j=>{var v,O,T;return((T=(O=(v=j==null?void 0:j.value)==null?void 0:v.pageData)==null?void 0:O.comp)==null?void 0:T.toUpperCase())==="FORM"});p={...(m=t==null?void 0:t.value)==null?void 0:m.pageData,id:t==null?void 0:t.id};const N=await fr(p,a==null?void 0:a.prop);if(hl.value=N==null?void 0:N.newStatus,N!=null&&N.newMainKeyValue)return N==null?void 0:N.newMainKeyValue}if(I.value.some(t=>(t==null?void 0:t[a==null?void 0:a.prop])===r)){const t=r;for(;I.value.some(N=>(N==null?void 0:N[a==null?void 0:a.prop])===`${t}(${o})`);)o++;r=`${t}(${o})`}return r},ta=async(e,a,n)=>{var p,d,g,m,t,N,j,v;let r,o;const i=await hr(n==null?void 0:n.data,n==null?void 0:n.firstCol);if(e?(r=k.cloneDeep(H).value+ce+((m=n==null?void 0:n.data)==null?void 0:m[(g=n==null?void 0:n.firstCol)==null?void 0:g.prop]),o=k.cloneDeep(H).value+ce+i):(r=k.cloneDeep(H).value+ce,o=k.cloneDeep(r)+`loading${((p=fe.value)==null?void 0:p.account)||((d=fe.value)==null?void 0:d.账号)}`),a){const O=(N=(t=Ze.value[o])==null?void 0:t.filter(T=>{var S;return((S=T==null?void 0:T.key)==null?void 0:S.parentTable)===""}))==null?void 0:N.map(T=>{var S;return{id:T==null?void 0:T.id,...(S=T==null?void 0:T.value)==null?void 0:S.pageData}});if((O==null?void 0:O.length)>0)if(e){const T=O==null?void 0:O.find(S=>{var K;return((K=S==null?void 0:S.comp)==null?void 0:K.toUpperCase())==="FORM"});T&&oa(T,(j=n==null?void 0:n.firstCol)==null?void 0:j.label,i,H.value)}else Ee.setRouteToChildPath(k.cloneDeep(H).value),de.setActiveMenuPath(o);else if(await se.loadingConstruct(r,o,null,null,e?gr.value:null),e){const T=await pr(o);if((T==null?void 0:T.length)>0){const S=T==null?void 0:T.find(K=>{var x;return((x=K==null?void 0:K.comp)==null?void 0:x.toUpperCase())==="FORM"});S&&oa(S,(v=n==null?void 0:n.firstCol)==null?void 0:v.label,i,H.value)}}else Ee.setRouteToChildPath(k.cloneDeep(H).value),de.setActiveMenuPath(o)}else e?(We.value="",Be.value=n==null?void 0:n.data,vl(!0,n==null?void 0:n.firstCol,i)):(Ee.setRouteToChildPath(k.cloneDeep(H).value),de.setActiveMenuPath(o))},yr=()=>{_e.value=!1,cl.value=[],Oe.value=!1},yl=e=>{var o,i,p,d,g,m;const a=[];let n=[];for(let t in e)Array.isArray(e==null?void 0:e[t])&&n.push(t);xe.value=k.cloneDeep(U.value),(i=se.getColumnChild((o=k.cloneDeep(U.value))==null?void 0:o.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||i.forEach((t,N)=>{var j;n.find(v=>v===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((j=t==null?void 0:t.formType)==null?void 0:j.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"+N,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)??N,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"+N,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)??N,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||(We.value=(e==null?void 0:e.id)??"");let r=se.getColumnChild((p=k.cloneDeep(U.value))==null?void 0:p.filter(t=>(t==null?void 0:t.label)!=="操作"));Le.value&&((d=Le.value)==null?void 0:d.length)>0&&(Le.value=(g=k.cloneDeep(Le).value)==null?void 0:g.map(t=>{var j;let N=(t==null?void 0:t.prop)||((j=r==null?void 0:r.find(v=>(v==null?void 0:v.label)===(t==null?void 0:t.label)))==null?void 0:j.prop);return N&&(t.value=e[N]),t})),Qe.value=Le.value&&((m=Le.value)==null?void 0:m.length)>0?se.getTableFormToForm(Le.value):a},vr=()=>{var a;const e=(a=V.value)==null?void 0:a.$el;e&&Hl.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:n=>{var p;const{oldIndex:r,newIndex:o}=n;if(r===o)return;const i=pl.value.splice(r,1)[0];pl.value.splice(o,0,i),U.value=(p=U.value)==null?void 0:p.slice().sort((d,g)=>{if(d.label==="操作")return 1;if(g.label==="操作")return-1;const m=pl.value.findIndex(N=>N.label===d.label),t=pl.value.findIndex(N=>N.label===g.label);return m-t})}})};l.onMounted(()=>{Pl.value=window.innerWidth-240*2});const br=()=>{l.nextTick(()=>{vr()})},Jl=(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,p;if((o==null?void 0:o.id)===We.value){let d={};for(let g in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===g))==null?void 0:i.label;m?d[g]=(p=Be.value)==null?void 0:p[m]:d[g]=o[g]}o=Object.assign(d,Be.value),n=o}else{let d=Jl(o,a);o=d==null?void 0:d.contents,n=d==null?void 0:d.currentSelectContents}return o}),{contents:e,currentSelectContents:n}},sa=(e,a)=>{let n,r;return e!=null&&e.find(o=>(o==null?void 0:o.id)===We.value)?n=e==null?void 0:e.map(o=>{var i,p;if((o==null?void 0:o.id)===We.value){let d={};for(let g in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===g))==null?void 0:i.label;m?d[g]=(p=Be.value)==null?void 0:p[m]:d[g]=o[g]}o=Object.assign(d,Be.value),r=o}return o}):n=e==null?void 0:e.map(o=>{var i,p,d,g;if((o==null?void 0:o.id)===We.value){let m={};for(let t in o){let N=(i=a==null?void 0:a.find(j=>(j==null?void 0:j.prop)===t))==null?void 0:i.label;N?m[t]=(p=Be.value)==null?void 0:p[N]:m[t]=o[t]}o=Object.assign(m,Be.value),r=o}else o=(d=Jl(o,a))==null?void 0:d.contents,r=(g=Jl(o,a))==null?void 0:g.currentSelectContents;return o}),{newContents:n,currentSelectContents:r}},ia=(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(ia)),e},Wl=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(...Wl(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const o={...r};return delete o.children,o}):[]},vl=(e=!0,a,n)=>{var m,t,N,j,v,O,T,S,K;let r=se.getColumnChild((m=k.cloneDeep(U.value))==null?void 0:m.filter(x=>(x==null?void 0:x.label)!=="操作")),o,i=k.cloneDeep(I.value);if(!Be.value){He.value=!1;return}if(We.value===""){nl.value++;let x;a&&n?x={id:nl.value.toString(),[a==null?void 0:a.prop]:n,children:Be.value.children}:x={id:nl.value.toString()},x!=null&&x.children&&(x={...x,children:(t=x.children)==null?void 0:t.map(A=>ia(A,a,n))}),i.push(Object.assign(Be.value,x)),o=Object.assign(Be.value,x)}else i=(N=sa(i,r))==null?void 0:N.newContents,o=(j=sa(i,r))==null?void 0:j.currentSelectContents;const p=(v=s.itemData)==null?void 0:v.filter(x=>(x==null?void 0:x.key)==="childTree")[0];if(((O=p==null?void 0:p.contents)==null?void 0:O.length)>0){je.value="编辑";const x=[];i==null||i.forEach((A,D)=>{var h;let f={};if(Array.isArray(A)){let u=[];A==null||A.filter(y=>!(y!=null&&y.id)).forEach((y,R)=>{var B,X,re,Z,J,Y,w;if((X=(B=$e.value)==null?void 0:B[R])!=null&&X.prop&&!Array.isArray(y)){let M={};M[$e.value[R].column]=y,ve!=null&&ve.value&&((re=ve==null?void 0:ve.value)==null?void 0:re.length)>0&&((Z=ve==null?void 0:ve.value)!=null&&Z.find(F=>JSON.stringify(F==null?void 0:F[0])===JSON.stringify(M)))&&(u=(J=ve==null?void 0:ve.value)==null?void 0:J.find(F=>JSON.stringify(F==null?void 0:F[0])===JSON.stringify(M))),u&&u.length>0?f[$e.value[R].prop]=u!=null&&u.find(F=>{var le;return((le=Object.keys(F))==null?void 0:le[0])===$e.value[R].column})?(Y=u==null?void 0:u.find(F=>{var le;return((le=Object.keys(F))==null?void 0:le[0])===$e.value[R].column}))==null?void 0:Y[$e.value[R].column]:y:f[$e.value[R].prop]=y}else Array.isArray(y)&&((w=$e.value[R])!=null&&w.prop?f[$e.value[R].prop]=y:f.children=Xl(y,$e.value))})}else f=A;Array.isArray(A)&&A.some(u=>u==null?void 0:u.id)?x.push(Object.assign(f,{id:(h=A==null?void 0:A.find(u=>u.id))==null?void 0:h.id})):f.id?x.push(f):x.push(Object.assign(f,{id:D.toString()}))}),I.value=fa(x,p,U.value)}else I.value=i;da(I.value),_l.value=I.value;const d=an(_l.value,Xe.value,i);let g=[];if(il.value?(g=(T=k.cloneDeep(il).value.singleContent)==null?void 0:T.filter(x=>(x==null?void 0:x.id)!==(o==null?void 0:o.id)),g.push(o)):g=[o],Pe.value){const x={content:d,singleContent:((S=p==null?void 0:p.contents)==null?void 0:S.length)>0?g==null?void 0:g.flatMap(Wl):g,index:s==null?void 0:s.index,buttonName:"编辑",column:U.value,parentTableId:s==null?void 0:s.parentTableId};Ee.setCacheUpdatingData(x)}if(e){const x={content:d,singleContent:((K=p==null?void 0:p.contents)==null?void 0:K.length)>0?Wl(o):o,index:s==null?void 0:s.index,buttonName:je.value,column:U.value,parentTableId:s==null?void 0:s.parentTableId};Ee.setTableLoading(s==null?void 0:s.index),He.value=!1,Be.value=void 0,z("change",x)}};l.onUnmounted(()=>{U.value=[],I.value=[],xe.value=[],qe.value=[],Le.value=[],Ie.value=[],cl.value=[],ol.value=[],Qe.value=[],Ke.value=[],V.value=null});const ua=async(e,a,n)=>{var m,t,N,j,v,O,T,S,K,x,A;al.value=n==null?void 0:n.prop;const r=k.cloneDeep(s.itemData),o=r==null?void 0:r.map(D=>{var f;return(D==null?void 0:D.key)==="header"&&((f=D.contents)==null||f.map((h,u)=>{var y,R,B,X,re,Z,J,Y,w,M,F,le,q,c,P,_,ne,ye,ue;return h.type=h!=null&&h.type?h.type:(X=(B=(R=(y=h==null?void 0:h.key)==null?void 0:y.split("$"))==null?void 0:R[1])==null?void 0:B.split("("))!=null&&X[0]?(Z=(re=se.FormType)==null?void 0:re.find(E=>{var b,te,ie,pe;return(E==null?void 0:E.key)===((pe=(ie=(te=(b=h==null?void 0:h.key)==null?void 0:b.split("$"))==null?void 0:te[1])==null?void 0:ie.split("("))==null?void 0:pe[0])}))==null?void 0:Z.value:"Input",h.options=h!=null&&h.options?h.options:((w=(Y=(J=h==null?void 0:h.key)==null?void 0:J.split("$"))==null?void 0:Y[1])==null?void 0:w.length)>0?(q=(le=Ql((F=(M=h==null?void 0:h.key)==null?void 0:M.split("$"))==null?void 0:F[1]))==null?void 0:le.split(","))==null?void 0:q.map(E=>({label:E,value:E})):[],(c=h==null?void 0:h.key)!=null&&c.includes("$")&&(h.key=(_=(P=h==null?void 0:h.key)==null?void 0:P.split("$"))==null?void 0:_[0]),h.value=(ne=Object.values(a))==null?void 0:ne[u],h.optionUrl=h!=null&&h.formMenuSelect&&((ye=h==null?void 0:h.formMenuSelect)==null?void 0:ye.length)>0?{groupSelect:(ue=h==null?void 0:h.groupSelect)==null?void 0:ue.split(/[::]/).map(E=>E.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=k.cloneDeep(Qe.value),p=(t=(m=k.cloneDeep(o))==null?void 0:m.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:t.contents;i=i==null?void 0:i.map(D=>{var f;return D.value=(f=p==null?void 0:p.find((h,u)=>u===(D==null?void 0:D.id)))==null?void 0:f.value,D});let d="",g=(v=(j=(N=k.cloneDeep(o))==null?void 0:N.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:j.contents)==null?void 0:v.find((D,f)=>{var h,u,y;return(D==null?void 0:D.label)===al.value||(f==null?void 0:f.toString())===((y=(u=(h=al.value)==null?void 0:h.split("a"))==null?void 0:u[1])==null?void 0:y.toString())});if((S=(T=(O=k.cloneDeep(o))==null?void 0:O.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:T.contents)==null||S.forEach(D=>{var f,h,u,y,R;d===""&&((u=(h=(f=D==null?void 0:D.optionUrl)==null?void 0:f.groupSelect)==null?void 0:h[1])!=null&&u.includes("["))&&(d=(R=(y=D==null?void 0:D.optionUrl)==null?void 0:y.groupSelect)==null?void 0:R[1])}),(K=g==null?void 0:g.optionUrl)!=null&&K.menuSelect){let D=await Yl(g),f;if(D==null||D.forEach(h=>{var u,y,R,B,X,re,Z,J,Y,w;d===((y=(u=g==null?void 0:g.optionUrl)==null?void 0:u.groupSelect)==null?void 0:y[1])&&((X=(B=(R=g==null?void 0:g.optionUrl)==null?void 0:R.groupSelect)==null?void 0:B[1])!=null&&X.includes("["))&&((w=k.cloneDeep(h))==null?void 0:w[(Y=(J=(Z=(re=g==null?void 0:g.optionUrl)==null?void 0:re.groupSelect)==null?void 0:Z[1])==null?void 0:J.replaceAll("[",""))==null?void 0:Y.replaceAll("]","")])===(g==null?void 0:g.value)&&(f=h)}),f){let h=k.cloneDeep(i);h=h==null?void 0:h.map(y=>{var R,B,X,re,Z,J,Y,w,M,F,le;return(f!=null&&f[y==null?void 0:y.label]||f!=null&&f[(re=(X=(B=(R=y==null?void 0:y.optionUrl)==null?void 0:R.groupSelect)==null?void 0:B[1])==null?void 0:X.replaceAll("[",""))==null?void 0:re.replaceAll("]","")])&&((Y=(J=(Z=y==null?void 0:y.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:J[1])!=null&&Y.includes("["))&&(y.value=(f==null?void 0:f[y==null?void 0:y.label])||(f==null?void 0:f[(le=(F=(M=(w=y==null?void 0:y.optionUrl)==null?void 0:w.groupSelect)==null?void 0:M[1])==null?void 0:F.replaceAll("[",""))==null?void 0:le.replaceAll("]","")])),y}),I.value=(x=k.cloneDeep(I.value))==null?void 0:x.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const R={};return h==null||h.forEach(B=>{R[B.name]=B.value}),R.id=y==null?void 0:y.id,R}return y});let u=k.cloneDeep(h);u=u==null?void 0:u.map(y=>{var R,B,X,re;return(B=(R=y==null?void 0:y.optionUrl)==null?void 0:R.menuSelect)!=null&&B.some(Z=>Z==null?void 0:Z.includes)&&(y.optionUrl.menuSelect=(re=(X=y==null?void 0:y.optionUrl)==null?void 0:X.menuSelect)==null?void 0:re.map(Z=>{var J,Y,w,M;if(Z!=null&&Z.includes("[")){let F=(Y=(J=Z==null?void 0:Z.replaceAll("[","").replaceAll("]",""))==null?void 0:J.split(":"))==null?void 0:Y[1];Z=(M=(w=k.cloneDeep(h))==null?void 0:w.find(le=>(le==null?void 0:le.label)===F))==null?void 0:M.value}return Z})),y}),I.value=(A=k.cloneDeep(I.value))==null?void 0:A.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const R={};return u==null||u.forEach(B=>{R[B.name]=B.value}),R.id=y==null?void 0:y.id,R}return y})}}},mr=async e=>{var m,t,N,j,v,O,T,S,K,x,A,D;if(!e)return;Be.value=e;const a=k.cloneDeep(s.itemData);let n=a==null?void 0:a.map(f=>{var h;return(f==null?void 0:f.key)==="header"&&((h=f.contents)==null||h.map((u,y)=>{var R,B,X,re,Z,J,Y,w,M,F,le,q,c,P,_,ne,ye,ue,E;return u.type=u!=null&&u.type?u.type:(re=(X=(B=(R=u==null?void 0:u.key)==null?void 0:R.split("$"))==null?void 0:B[1])==null?void 0:X.split("("))!=null&&re[0]?(J=(Z=se.FormType)==null?void 0:Z.find(b=>{var te,ie,pe,De;return(b==null?void 0:b.key)===((De=(pe=(ie=(te=u==null?void 0:u.key)==null?void 0:te.split("$"))==null?void 0:ie[1])==null?void 0:pe.split("("))==null?void 0:De[0])}))==null?void 0:J.value:"Input",u.options=u!=null&&u.options?u.options:((M=(w=(Y=u==null?void 0:u.key)==null?void 0:Y.split("$"))==null?void 0:w[1])==null?void 0:M.length)>0?(c=(q=Ql((le=(F=u==null?void 0:u.key)==null?void 0:F.split("$"))==null?void 0:le[1]))==null?void 0:q.split(","))==null?void 0:c.map(b=>({label:b,value:b})):[],(P=u==null?void 0:u.key)!=null&&P.includes("$")&&(u.key=(ne=(_=u==null?void 0:u.key)==null?void 0:_.split("$"))==null?void 0:ne[0]),u.value=(ye=Object.values(e))==null?void 0:ye[y],u.optionUrl=u!=null&&u.formMenuSelect&&((ue=u==null?void 0:u.formMenuSelect)==null?void 0:ue.length)>0?{groupSelect:(E=u==null?void 0:u.groupSelect)==null?void 0:E.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})),f}),r=Qe.value,o=(t=(m=k.cloneDeep(n))==null?void 0:m.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:t.contents;if(r=r==null?void 0:r.map(f=>{var h;return f.value=(h=o==null?void 0:o.find((u,y)=>(u==null?void 0:u.prop)===(f==null?void 0:f.name)))==null?void 0:h.value,f}),!dl.value)return;let i="",p=(v=(j=(N=k.cloneDeep(n))==null?void 0:N.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:j.contents)==null?void 0:v.find((f,h)=>{var u,y,R;return(f==null?void 0:f.label)===al.value||(h==null?void 0:h.toString())===((R=(y=(u=al.value)==null?void 0:u.split("a"))==null?void 0:y[1])==null?void 0:R.toString())}),d=(O=p==null?void 0:p.optionUrl)==null?void 0:O.menuSelect,g=!0;if((K=(S=(T=k.cloneDeep(n))==null?void 0:T.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:S.contents)==null||K.forEach(f=>{var h,u,y,R,B,X;g&&((y=(u=(h=f==null?void 0:f.optionUrl)==null?void 0:h.groupSelect)==null?void 0:u[1])!=null&&y.includes("["))&&(i=(B=(R=f==null?void 0:f.optionUrl)==null?void 0:R.groupSelect)==null?void 0:B[1],JSON.stringify(d)===JSON.stringify((X=f==null?void 0:f.optionUrl)==null?void 0:X.menuSelect)&&(g=!1))}),(x=p==null?void 0:p.optionUrl)!=null&&x.menuSelect&&dl.value){let f=await Yl(p),h;if((A=p==null?void 0:p.optionUrl)==null||A.menuSelect,f==null||f.forEach(u=>{var y,R,B,X,re,Z,J,Y,w,M;i===((R=(y=p==null?void 0:p.optionUrl)==null?void 0:y.groupSelect)==null?void 0:R[1])&&((re=(X=(B=p==null?void 0:p.optionUrl)==null?void 0:B.groupSelect)==null?void 0:X[1])!=null&&re.includes("["))&&((M=k.cloneDeep(u))==null?void 0:M[(w=(Y=(J=(Z=p==null?void 0:p.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:J[1])==null?void 0:Y.replaceAll("[",""))==null?void 0:w.replaceAll("]","")])===(p==null?void 0:p.value)&&(h=u)}),h){let u=k.cloneDeep(r);u=u==null?void 0:u.map(B=>{var X,re,Z,J,Y,w,M,F,le,q,c;return(h!=null&&h[B==null?void 0:B.label]||h!=null&&h[(J=(Z=(re=(X=B==null?void 0:B.optionUrl)==null?void 0:X.groupSelect)==null?void 0:re[1])==null?void 0:Z.replaceAll("[",""))==null?void 0:J.replaceAll("]","")])&&((M=(w=(Y=B==null?void 0:B.optionUrl)==null?void 0:Y.groupSelect)==null?void 0:w[1])!=null&&M.includes("["))&&(B.value=(h==null?void 0:h[B==null?void 0:B.label])||(h==null?void 0:h[(c=(q=(le=(F=B==null?void 0:B.optionUrl)==null?void 0:F.groupSelect)==null?void 0:le[1])==null?void 0:q.replaceAll("[",""))==null?void 0:c.replaceAll("]","")])),B}),Qe.value=k.cloneDeep(u);let y=k.cloneDeep(u);y=y==null?void 0:y.map(B=>{var X,re,Z,J,Y,w;return(re=(X=B==null?void 0:B.optionUrl)==null?void 0:X.menuSelect)!=null&&re.some(M=>M==null?void 0:M.includes("["))&&(B.optionUrl.oldMenuSelect=(J=(Z=k.cloneDeep(B))==null?void 0:Z.optionUrl)==null?void 0:J.menuSelect,B.optionUrl.menuSelect=(w=(Y=B==null?void 0:B.optionUrl)==null?void 0:Y.menuSelect)==null?void 0:w.map(M=>{var F,le,q,c;if(M!=null&&M.includes("[")){let P=(le=(F=M==null?void 0:M.replaceAll("[","").replaceAll("]",""))==null?void 0:F.split(":"))==null?void 0:le[1];M=(c=(q=k.cloneDeep(u))==null?void 0:q.find(_=>(_==null?void 0:_.label)===P))==null?void 0:c.value}return M})),B}),Qe.value=y;let R={};(D=Qe.value)==null||D.forEach(B=>{R[B.prop]=B==null?void 0:B.value}),Be.value=R}}dl.value=!1},kr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",Sr=e=>{var i,p;const a=(p=(i=Le.value)==null?void 0:i.find(d=>(d==null?void 0:d.label)===(e==null?void 0:e.label)))==null?void 0:p.multiple,n=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;I.value.forEach(d=>{const g=d==null?void 0:d[n];a&&va.isString(g)&&(d[n]=[g]),!a&&!va.isString(g)&&(d[n]="")})},ca=(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=>ca(r,a))),e},Gl=e=>{var n,r,o,i,p,d;yl("");const a=(n=Qe.value)==null?void 0:n.reduce((g,m)=>(g[m.name]=m.value,g),{});if(((r=Object.keys(a))==null?void 0:r.length)>0){Be.value=a,We.value="",nl.value=(o=I.value)==null?void 0:o.length,ol.value=(i=el.value)==null?void 0:i.filter(m=>(m==null?void 0:m.label)!=="新增");const g=(d=(p=xe.value)==null?void 0:p.filter(m=>(m==null?void 0:m.label)!=="操作"))==null?void 0:d.map(m=>{var N,j,v;const t=(j=(N=Le.value)==null?void 0:N.find(O=>(O==null?void 0:O.label)===(m==null?void 0:m.label)))==null?void 0:j.multiple;return Sr(m),{...m,contents:(m==null?void 0:m.options)??[],optionUrl:m!=null&&m.formMenuSelect&&((v=m==null?void 0:m.formMenuSelect)==null?void 0:v.length)>0?{groupSelect:m==null?void 0:m.groupSelect,menuSelect:m==null?void 0:m.formMenuSelect,selectRelateType:"",type:m==null?void 0:m.formType,multiple:t}:null}});U.value=g==null?void 0:g.map(m=>ca(m,[{prop:"type",value:"edit"},{prop:"columnType",value:kr(m==null?void 0:m.formType)||(m==null?void 0:m.columnType)}])),e==="createClick"&&vl(!1)}},tl={START:"开始时间",END:"结束时间",HOURS:"工时"},Cr=(e,a)=>Number(Hl.dayjs(a).diff(Hl.dayjs(e),"day",!0).toFixed(1)),da=e=>{var i;const a=s.itemData,n=(i=a==null?void 0:a.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:i.contents,r=new Map;return n==null||n.forEach((p,d)=>{const{label:g}=p;r.set(g,d)}),!r.has(tl.START)||!r.has(tl.END)||!r.has(tl.HOURS)?e:e==null?void 0:e.map(p=>{const d=p==null?void 0:p[tl.START],g=p==null?void 0:p[tl.END],m=Cr(d,g);return d&&g&&(p[tl.HOURS]=`${m}天`),p})},pa=(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 p of e){const d=p[r];o.has(d)||o.set(d,[]),o.get(d)&&o.get(d).push(p)}const i=[];for(const[p,d]of o){const[g,...m]=d,t={...g};n+1===((a==null?void 0:a.length)??"")?t.children=d==null?void 0:d.map(N=>(N.level=k.cloneDeep(n)+1,N)).filter((N,j)=>j!==0):m.length>0&&(t.children=pa(m,a,n+1)),t.level=n,i.push(t)}return i},fa=(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=pa(e,a==null?void 0:a.contents,0),r},ga=(e,a)=>{var j,v,O,T,S,K,x,A,D,f,h,u,y,R,B,X,re,Z,J,Y,w,M,F,le,q;const n=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="header");e==null||e.filter(c=>(c==null?void 0:c.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="childTree")[0];let o=a;const i=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="page"),p=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="rowButton"),d=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="extraButton"),g=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableContents"),m=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableIndex");Le.value=(v=(j=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableToForm"))==null?void 0:j[0])==null?void 0:v.contents,Zl.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(c=>(c==null?void 0:c.selectLabel)==="("+ll.value+")"))??(n==null?void 0:n.find(c=>!(c!=null&&c.selectLabel)));let N=[];if(ll.value===""?N=m==null?void 0:m[0]:N=(m==null?void 0:m.find(c=>(c==null?void 0:c.selectLabel)==="("+ll.value+")"))??(m==null?void 0:m.find(c=>!(c!=null&&c.selectLabel))),((O=t==null?void 0:t.contents)==null?void 0:O.length)>0){let c=[];if(t!=null&&t.contents.some(E=>Array.isArray(E)&&(E==null?void 0:E.find(b=>b.children))))Xe.value===""?c=(S=(T=se.getGradeColumns(t==null?void 0:t.contents))==null?void 0:T[0])==null?void 0:S.filter(E=>!Array.isArray(E)):(Xe.value.split("-"),c=(K=se.getGradeColumns(t==null?void 0:t.contents))==null?void 0:K[0]);else{let E=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;E==null||E.forEach((b,te)=>{var De,Se,bl,ml;let ie="";(Se=(De=H.value)==null?void 0:De.split("/"))==null||Se.forEach(Fe=>{var kl,Sl,Cl;if(Fe!==""){let sl=(Cl=(Sl=(kl=Fe==null?void 0:Fe.split(ce+"updateLoading"))==null?void 0:kl[0])==null?void 0:Sl.split(ce+"loading"))==null?void 0:Cl[0];ie=ie===""?ie+sl:ie+"/"+sl}}),ie=ie+ce+(b==null?void 0:b.directiveLabel);const pe=(bl=Le.value)==null?void 0:bl.find(Fe=>(Fe==null?void 0:Fe.prop)===(b==null?void 0:b.prop));c.push({label:(b==null?void 0:b.label)??"",prop:(b==null?void 0:b.label)==="操作"?"operate":(b==null?void 0:b.prop)??"a"+te,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)??te,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?(ml=b==null?void 0:b.groupSelect)==null?void 0:ml.replaceAll('"',"").split(":"):[],isMainKey:(b==null?void 0:b.isMainKey)||(b==null?void 0:b.directiveLabel)&&!o[ie],columnType:(pe==null?void 0:pe.type)||(b==null?void 0:b.columnType)||"TEXTAREA",directiveLabel:b==null?void 0:b.directiveLabel,isExistChild:!!(b!=null&&b.directiveLabel&&o[ie]),childPath:ie})})}U.value=se.getNewColumnChild(c),qe.value=se.getNewColumnChild(c),Q.value=(A=U.value)==null?void 0:A.map(E=>E==null?void 0:E.label),Ye.value=(D=U.value)==null?void 0:D.every(E=>E==null?void 0:E.filterable),be.value=(f=U.value)==null?void 0:f.every(E=>E==null?void 0:E.operable),Re.value=(h=U.value)==null?void 0:h.every(E=>E==null?void 0:E.sortable);let P=(y=(u=se.getAllLeafNodes(U.value))==null?void 0:u.filter(E=>(E==null?void 0:E.type)!=="operate"))==null?void 0:y.map((E,b)=>({prop:(E==null?void 0:E.prop)??"a"+b,column:E.label}));$e.value=P;let _=[];ll.value===""?_=g==null?void 0:g[0]:_=(g==null?void 0:g.find(E=>(E==null?void 0:E.selectLabel)==="("+ll.value+")"))??(g==null?void 0:g.find(E=>!(E!=null&&E.selectLabel)));let ne=Array.isArray((R=_==null?void 0:_.contents)==null?void 0:R[0])&&((B=_==null?void 0:_.contents)!=null&&B[0].every(E=>Array.isArray(E)))?(X=_==null?void 0:_.contents)==null?void 0:X[0]:_==null?void 0:_.contents;N!=null&&N.contents&&((re=N==null?void 0:N.contents)==null?void 0:re.length)!==0&&(ne=(Z=k.cloneDeep(ne))==null?void 0:Z.map((E,b)=>{if(!Array.isArray(E)){let te={};for(let ie in E)ie!=="id"&&ie!=="index"&&(te[ie]=E[ie]);E=Object.values(te)}return E}));const ye=!!((J=U.value)!=null&&J.find(E=>E.prop==="index"));ne=Sa(ne,N==null?void 0:N.contents,ye);const ue=[];ne==null||ne.forEach((E,b)=>{var ie;let te={};if(Array.isArray(E)){let pe=[];E==null||E.filter(De=>!(De!=null&&De.id)).forEach((De,Se)=>{var bl,ml,Fe,kl,Sl,Cl;if((bl=P==null?void 0:P[Se])!=null&&bl.prop&&!Array.isArray(De)){let sl={};sl[P[Se].column]=De,ve!=null&&ve.value&&((ml=ve==null?void 0:ve.value)==null?void 0:ml.length)>0&&((Fe=ve==null?void 0:ve.value)!=null&&Fe.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl)))&&(pe=(kl=ve==null?void 0:ve.value)==null?void 0:kl.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl))),pe&&pe.length>0?te[P[Se].prop]=pe!=null&&pe.find(ze=>{var Dl;return((Dl=Object.keys(ze))==null?void 0:Dl[0])===P[Se].column})?(Sl=pe==null?void 0:pe.find(ze=>{var Dl;return((Dl=Object.keys(ze))==null?void 0:Dl[0])===P[Se].column}))==null?void 0:Sl[P[Se].column]:De:te[P[Se].prop]=De}else Array.isArray(De)&&((Cl=P[Se])!=null&&Cl.prop?te[P[Se].prop]=De:te.children=Xl(De,P))})}else te=E;Array.isArray(E)&&E.some(pe=>pe==null?void 0:pe.id)?ue.push(Object.assign(te,{id:(ie=E==null?void 0:E.find(pe=>pe.id))==null?void 0:ie.id})):te.id?ue.push(te):ue.push(Object.assign(te,{id:b.toString()}))}),I.value=fa(ue,r,U.value),El.value=ue,(Y=El.value)==null||Y.forEach(E=>{var b;(b=Nl.value)==null||b.set(E.id,E)})}else U.value=[],xe.value=[],I.value=[],El.value=[],Nl.value=new Map;((w=p==null?void 0:p.contents)==null?void 0:w.length)>0?Ie.value=p==null?void 0:p.contents:Ie.value=[],((M=d==null?void 0:d.contents)==null?void 0:M.length)>0?(ol.value=d==null?void 0:d.contents,el.value=d==null?void 0:d.contents):(ol.value=[],el.value=[]),nl.value=((F=I==null?void 0:I.value)==null?void 0:F.length)??0,da(I.value),_l.value=I.value,Pe.value&&(U.value=(q=(le=xe.value)==null?void 0:le.filter(c=>(c==null?void 0:c.label)!=="操作"))==null?void 0:q.map(c=>{var P;return{...c,type:"edit",optionUrl:c!=null&&c.formMenuSelect&&((P=c==null?void 0:c.formMenuSelect)==null?void 0:P.length)>0?{groupSelect:c==null?void 0:c.groupSelect,menuSelect:c==null?void 0:c.formMenuSelect,selectRelateType:"",type:c==null?void 0:c.formType}:null}}),Gl())};l.watch(()=>[s.itemData,ll.value,Na.value,Xe.value,ve==null?void 0:ve.value],async()=>{var e,a,n,r,o,i;if((e=s==null?void 0:s.itemData)!=null&&e.find(p=>(p==null?void 0:p.key)==="columnPath")&&!((a=ul.value)!=null&&a.find(p=>{var d,g;return(p==null?void 0:p.key)===((g=(d=s==null?void 0:s.itemData)==null?void 0:d.find(m=>(m==null?void 0:m.key)==="columnPath"))==null?void 0:g.contents)}))){let p=ul.value,d={key:(r=(n=s==null?void 0:s.itemData)==null?void 0:n.find(g=>(g==null?void 0:g.key)==="columnPath"))==null?void 0:r.contents,value:(i=(o=s==null?void 0:s.itemData)==null?void 0:o.find(g=>(g==null?void 0:g.key)==="columnUsingPath"))==null?void 0:i.contents};p!=null&&p.find(g=>(g==null?void 0:g.key)===(d==null?void 0:d.key))?p=p==null?void 0:p.map(g=>((g==null?void 0:g.key)===(d==null?void 0:d.key)&&(g.value=d.value),g)):p.push(d),Ee.setTableViewContents(p)}ga(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(yl(e==null?void 0:e.form),je.value=e==null?void 0:e.dialogTitle,wl.value=!0,He.value=!0)},{immediate:!0,deep:!0});const ha=()=>{var e;(e=me.value)!=null&&e.includes("read")&&(Pe.value=!Pe.value)},Dr=()=>{Ol.value=!Ol.value};l.watch(()=>{var e;return(e=s==null?void 0:s.config)==null?void 0:e.viewport},e=>{var a;me.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)),ge.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?(Gl("viewChange"),Ee.setCacheUpdatingData(null)):(ol.value=el.value,U.value=qe.value,il.value&&(Ee.setTableLoading(s==null?void 0:s.index),z("change",il.value))),ae.value=e,ge.value=e||((a=s==null?void 0:s.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=ea.value)==null?void 0:e.length},e=>{e===0&&(G.currentPage=1)}),l.watch(()=>s==null?void 0:s.compNames,e=>{Te.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:e||[],width:1}]},{immediate:!0}),l.ref(!1);const xr=(e,a)=>{var n;Gl("createClick"),a===G.pageSize&&(G.currentPage=Math.ceil(((n=I.value)==null?void 0:n.length)/G.pageSize))},Tr=(e,a,n)=>{var r;ua(n,e,a),Be.value=k.cloneDeep(e),We.value=e==null?void 0:e.id,nl.value=(r=I.value)==null?void 0:r.length,je.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",vl(!1)},Ae=e=>{var g,m,t,N,j,v,O,T,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?((m=(g=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:g[0])==null?void 0:m.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]):((N=(t=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:t[0])==null?void 0:N.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((v=(j=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:j[0])==null?void 0:v.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((S=(T=a==null?void 0:a[(O=r==null?void 0:r.child)==null?void 0:O.prop])==null?void 0:T[0])==null?void 0:S.contents)??(a==null?void 0:a[(K=r==null?void 0:r.child)==null?void 0:K.prop]),d=Array.isArray(i)&&!(i!=null&&i.every(x=>typeof x=="string"||typeof x=="number"))?"查看":i;return d=Array.isArray(d)?d.join(","):d,d},Er=e=>{var m,t,N,j,v,O,T,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=(m=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:m[0])==null?void 0:t.contents)??(a==null?void 0:a[n==null?void 0:n.prop]):((j=(N=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:N[0])==null?void 0:j.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((O=(v=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:v[0])==null?void 0:O.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((K=(S=a==null?void 0:a[(T=r==null?void 0:r.child)==null?void 0:T.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 d=Array.isArray(i)&&!(i!=null&&i.every(A=>typeof A=="string"||typeof A=="number")),g=Array.isArray(i)&&(i==null?void 0:i.find(A=>A==null?void 0:A.url));return d&&g},Nr=(e,a)=>e.find(n=>Object.values(n).some(r=>r===a));return l.watch(()=>Ne.value,async e=>{if(e){de.setContentLoading(!0),await l.nextTick();const a=Nr(I.value,e==null?void 0:e.data);if(!a)return de.setContentLoading(!1);await aa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),de.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)&&(I.value=(a=I.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 m,t,N,j;const n=l.resolveComponent("svg-icon"),r=l.resolveComponent("el-popover"),o=l.resolveComponent("el-switch"),i=l.resolveComponent("el-checkbox"),p=l.resolveComponent("el-checkbox-group"),d=l.resolveComponent("el-button"),g=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",nn,[Il.value?(l.openBlock(),l.createBlock(Ue.ssTable,{id:"excel-table",pageObj:G,showIndex:ge.value,isTree:(m=L.compItem)==null?void 0:m.isTree,summaryInfo:oe,columns:U.value,defaultSort:Ce,isCardViewport:Ol.value,checkedColumns:Q.value,key:Kl.value+JSON.stringify(U.value),tableData:ea.value,isEditViewport:Pe.value,isShowPagination:Zl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ae.value,onDbClickRow:Ya,extraButton:ol.value,rowButton:Ie.value,cacheExtraButtons:el.value,isClearSelection:((t=Ke.value)==null?void 0:t.length)===0,onDoCurrentChange:Oa,onDoSizeChange:La,onContentClick:aa,onRowClick:Ia,onSelectChange:Fa,onCellChange:Tr,onChange:ua,onPreview:Rl,onSubmitEditingTable:Ka,onHandleColEditChange:$a,onHandleColTypeChange:Pa,onClickButton:gl},l.createSlots({headerButton:l.withCtx(v=>{var O,T;return[L.showHeader?(l.openBlock(),l.createBlock(Wr,{key:0,pageLayout:L.pageLayout,lockingPage:l.unref(Tl)===l.unref(H),filterValues:la.value,selectNums:(O=Ke.value)==null?void 0:O.length,dataNums:(T=I.value)==null?void 0:T.length,compName:L.compName,isDevMode:L.isDevMode,buttons:v.buttons,onButtonClick:a[0]||(a[0]=S=>gl(S,"",{})),columns:U.value,onFilter:Xa,onGetImportData:Ma,level:L.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var v,O,T,S;return[((v=I.value)==null?void 0:v.length)>0&&L.allowOperate?(l.openBlock(),l.createElementBlock("div",un,[(O=me.value)!=null&&O.includes("read")&&((T=me.value)!=null&&T.includes("edit"))&&((S=Ie.value)!=null&&S.some(K=>(K==null?void 0:K.label)==="编辑"))&&!Ol.value&&l.unref(Tl)!==l.unref(H)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:ha},[l.createVNode(n,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:Dr},[l.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:v,index:O})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:T=>xr(v,O)},[l.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,cn)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:br},{reference:l.withCtx(()=>[l.createElementVNode("span",dn,[l.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",pn,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(o,{"model-value":Re.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=v=>zl(v,"sortable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":Ye.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=v=>zl(v,"filterable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":be.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=v=>zl(v,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(p,{modelValue:Q.value,"onUpdate:modelValue":a[5]||(a[5]=v=>Q.value=v),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:V},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(pl.value,v=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:v.label},[l.createVNode(i,{value:v.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:v.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(v.label),9,fn)]),_: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 O;return[l.createElementVNode("div",gn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((O=Object.keys(v))==null?void 0:O.filter(T=>{var S;return(S=he.value)==null?void 0:S.find(K=>(K==null?void 0:K.value)===T)}),T=>{var S,K;return l.openBlock(),l.createElementBlock("div",{key:T},[l.createVNode(o,{"model-value":v==null?void 0:v[T],"active-text":(K=(S=he.value)==null?void 0:S.find(x=>(x==null?void 0:x.value)===T))==null?void 0:K.label,onChange:x=>Ra(x,T,v)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",hn,[l.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(v=>{var O,T,S,K,x,A,D,f,h,u,y,R,B,X,re,Z,J,Y;return[Er(v)?(l.openBlock(),l.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:l.withCtx(()=>[l.createElementVNode("span",yn,l.toDisplayString(Ae(v)),1)]),default:l.withCtx(()=>{var w;return[l.createElementVNode("div",vn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v==null?void 0:v.row[(w=v==null?void 0:v.column)==null?void 0:w.prop],M=>(l.openBlock(),l.createElementBlock("div",bn,[l.createElementVNode("div",{class:"prop-url",title:Ml(M),onClick:F=>Wa(M)},l.toDisplayString(Ml(M)),9,mn),l.createElementVNode("div",{class:"prop-download",onClick:F=>Ga(M)}," 下载 ",8,kn)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Ae(v))&&((T=(O=Ae(v))==null?void 0:O.toString())!=null&&T.includes(".txt")||(K=(S=Ae(v))==null?void 0:S.toString())!=null&&K.includes(".cpt")||(A=(x=Ae(v))==null?void 0:x.toString())!=null&&A.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ae(v))&&((f=(D=Ae(v))==null?void 0:D.toString())!=null&&f.includes(".txt")||(u=(h=Ae(v))==null?void 0:h.toString())!=null&&u.includes(".cpt")||(R=(y=Ae(v))==null?void 0:y.toString())!=null&&R.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ae(v))&&((X=(B=Ae(v))==null?void 0:B.toString())!=null&&X.includes(".txt")||(Z=(re=Ae(v))==null?void 0:re.toString())!=null&&Z.includes(".cpt")||(Y=(J=Ae(v))==null?void 0:J.toString())!=null&&Y.includes(".cyd"))?"pointer":"",marginLeft:(v==null?void 0:v.colIndex)===0?`${((v==null?void 0:v.level)??0)*20}px`:0}),onClick:w=>Ua(Ae(v))},l.toDisplayString(Ae(v)===0?"0":Ae(v)),13,Sn))]}),_:2},[((N=Ie.value)==null?void 0:N.length)>0&&l.unref(Tl)!==l.unref(H)?{name:"actions",fn:l.withCtx(({item:v})=>[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(()=>{var O;return[l.createElementVNode("div",on,[cr.value?(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:L.index,onClick:T=>gl("应用至流程",v,{extra:e.content})},[l.createElementVNode("div",{style:l.normalizeStyle({color:(O=e.content)==null?void 0:O.textColor}),class:"extra-button-label"}," 应用至流程 ",4)],8,tn)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ha(Ie.value,v),(T,S)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:S,onClick:K=>gl(T==null?void 0:T.label,v,{extra:T})},[l.createElementVNode("div",{style:l.normalizeStyle({color:T==null?void 0:T.textColor}),class:"extra-button-label"},l.toDisplayString(T==null?void 0:T.label),5)],8,sn))),128))])]}),_:2},1024)]),key:"0"}:void 0,((j=I.value)==null?void 0:j.length)>0?{name:"batchButton",fn:l.withCtx(v=>[l.withDirectives(l.createVNode(Hr,{lockingPage:l.unref(Tl)===l.unref(H),buttons:v.buttons,selectTableItems:Ke.value,onButtonClick:a[1]||(a[1]=O=>gl(O,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,ae.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!ae.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(xl.ssDialog,{title:je.value,visible:He.value,width:Aa.value,onBeforeDestroy:qa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",Cn,[l.createVNode(Ue.ssForm,{rowContents:Qe.value,isEnableWrap:!1,showOperator:!1,onChange:mr,onClickTrigger:Ja,isEdit:Bl.value,onBlurChange:za,onPreview:Rl},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[wl.value?(l.openBlock(),l.createElementBlock("div",Dn,[l.createVNode(d,{onClick:a[6]||(a[6]=v=>He.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[13]||(a[13]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[13]}),l.createVNode(d,{class:"ok-button",onClick:a[7]||(a[7]=v=>vl(!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(xl.ssDialog,{title:je.value,visible:Al.value,width:Pl.value,onBeforeDestroy:a[9]||(a[9]=v=>Al.value=!1)},{default:l.withCtx(()=>[l.createVNode(Ir)]),footer:l.withCtx(()=>[l.createElementVNode("div",xn,[l.createVNode(d,{onClick:a[8]||(a[8]=v=>Al.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[15]||(a[15]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[15]}),l.createVNode(d,{class:"ok-button",onClick:er,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(Ue.ssFilePreview,{key:1,fileDataList:C.value,onDestroy:Za},null,8,["fileDataList"])):l.createCommentVNode("",!0),_e.value?(l.openBlock(),l.createBlock(xl.ssDialog,{key:2,visible:_e.value,onBeforeDestroy:yr,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:Oe.value,isSelfWindow:!0,threeData:rl.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(xl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=v=>e.componentVisible=!1),width:Pl.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(g,{dialogItem:Ll.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(xl.ssDialog,{title:Te.title,visible:Te.show,width:Te.width,onBeforeDestroy:ir},{default:l.withCtx(()=>[l.createElementVNode("div",Tn,[l.createVNode(Ue.ssForm,{rowContents:Te==null?void 0:Te.contents,formRules:Te==null?void 0:Te.formRules,showOperator:!1,buttonValue:Te.buttonValue,isEdit:Bl.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:ur},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},Nn=$l._export_sfc(En,[["__scopeId","data-v-9b8983ff"]]);exports.formGetOptions=Ql;exports.getSelectRow=Yl;exports.ssTable=Nn;exports.useFormComp=xa;exports.useFormToTableComp=ma;exports.useUnit=ka;
|
|
1
|
+
"use strict";const l=require("vue"),k=require("./index-CEwxrYB-.cjs"),Hl=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DJnHA5u9.cjs"),Ue=require("./index-CX-xhB8-.cjs"),Ve=require("./threeViewerHost-B3sZ8h3R.cjs"),se=require("./index.vue_vue_type_style_index_1_lang-BVjtPl2M.cjs"),Br=require("./index.vue_vue_type_style_index_1_lang-0T3F_kRW.cjs"),$l=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xl=require("./index-oH9f3nVB.cjs");require("./index-BriUHLrI.cjs");const va=require("./isString-Cvx5mmsS.cjs"),Ql=L=>L.match(/\((.*)\)/)[1],ba={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(L){const ee=L,Q=l.ref(null),$=l.ref(!1),V=l.ref(null);return l.watch(()=>ee==null?void 0:ee.isVisible,()=>{$.value=ee==null?void 0:ee.isVisible},{deep:!0,immediate:!0}),l.watch(()=>V.value,()=>{l.nextTick(()=>{var s,ae;(ae=(s=Q.value)==null?void 0:s.updatePopper)==null||ae.call(s)})},{deep:!0,immediate:!0}),(s,ae)=>{const ge=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(ge,{visible:$.value,title:ee==null?void 0:ee.title,placement:ee==null?void 0:ee.placement,width:ee==null?void 0:ee.width,ref_key:"popOverRef",ref:Q},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:V})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},Ar={key:0,class:"extra-button-content"},wr={class:"table-operator-wrap"},_r={class:"extra-button-filter"},Ur={class:"form-content-value"},Or={key:0,class:"extra-header"},Lr={class:"drop-menu",style:{width:"120px"}},Vr={key:0},Mr={key:1},jr={key:1,class:"extra-button-content tabs-button-wrapper"},$r={class:"table-operator-wrap"},Pr={class:"extra-button-filter"},Kr={class:"form-content-value"},Fr={key:0,class:"extra-header"},zr={class:"drop-menu",style:{width:"120px"}},Rr={key:0},qr={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(L,{emit:ee}){const Q=ee,$=L,V=l.ref(""),s=l.ref(!1),ae=l.ref([]),ge=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),me=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],he=oe=>{const G=oe.raw;if(!G)return;const z=new FileReader;z.onload=U=>{try{const Ce=new Uint8Array(U.target.result),xe=Ve.readSync(Ce,{type:"array"}),_e=xe.SheetNames[0],Oe=xe.Sheets[_e],qe=Ve.utils.decode_range(Oe["!ref"]).e.c+1,we=new Array(qe).fill(""),C=[];for(const W in Oe){if(W[0]==="!")continue;const{r:H,c:ke}=Ve.utils.decode_cell(W);let Ne=Oe[W].v;if(Oe[W].t==="n"&&Ne>0&&Ne<1e6&&(Ne=new Date((Ne-25569)*86400*1e3).toISOString().split("T")[0]),(Ne==null||Ne==="")&&(Ne=""),H===0)we[ke]=Ne;else{if(!C[H-1]){C[H-1]={};for(let Je=0;Je<qe;Je++)C[H-1][`col_${Je}`]=""}C[H-1][`col_${ke}`]=Ne}}for(let W=0;W<qe;W++)we[W]===void 0&&(we[W]="");const de=C==null?void 0:C[0];if(!(de!=null&&de.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");Q("getImportData",we,C)}catch(Ce){throw k.ElMessage.error(Ce.message),new Error(Ce.message)}},z.readAsArrayBuffer(G)},Me=oe=>{var z;const G=(z=ae.value)==null?void 0:z.reduce((U,Ce,xe)=>(xe===0?U[Ce.label]=oe:U[Ce.label]=Ce==null?void 0:Ce.value,U),{});Q("filter",G,oe,!0)},Ge=oe=>{Q("buttonClick",oe)},ce=oe=>{var G,z;ae.value=(z=(G=se.getColumnChild(k.cloneDeep(oe)))==null?void 0:G.filter(U=>(U==null?void 0:U.label)!==""&&(U==null?void 0:U.label)!=="操作"))==null?void 0:z.map(U=>({label:(U==null?void 0:U.label)??"",value:"",name:(U==null?void 0:U.label)??"",isFormColHidden:U==null?void 0:U.isTableColHidden,width:2}))},Re=l.ref(!1),Ye=oe=>{var G;if((oe==null?void 0:oe.buttonName)==="确认"&&(Q("filter",oe==null?void 0:oe.content),Re.value=(oe==null?void 0:oe.content)&&Object.values(oe==null?void 0:oe.content).length>0),(oe==null?void 0:oe.buttonName)==="清空"){const z=k.cloneDeep(oe==null?void 0:oe.content);for(const U in z)z[U]="";ae.value=(G=ae.value)==null?void 0:G.map(U=>({...U,value:""})),Q("filter",z),Re.value=!1}s.value=!1},be=()=>{var G,z;ae.value=(G=ae.value)==null?void 0:G.map(U=>({...U,value:""}));const oe=(z=ae.value)==null?void 0:z.reduce((U,Ce)=>(U[Ce.label]=Ce.value,U),{});Q("filter",oe)};return l.onMounted(()=>{ce($.columns)}),l.watch(()=>$.columns,()=>{ce($.columns)},{deep:!0,immediate:!0}),(oe,G)=>{var Oe,rl,qe,we;const z=l.resolveComponent("el-icon"),U=l.resolveComponent("svg-icon"),Ce=l.resolveComponent("el-input"),xe=l.resolveComponent("el-button"),_e=l.resolveComponent("el-upload");return L.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",Ar,[l.createElementVNode("div",{class:l.normalizeClass(L.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(L.compName),7),l.createElementVNode("div",wr,[l.createElementVNode("div",_r,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,de,W,H;return[l.createVNode(Ce,{modelValue:V.value,"onUpdate:modelValue":G[1]||(G[1]=ke=>V.value=ke),style:{"min-width":"80px"},placeholder:Re.value?(W=(de=(C=L.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:de.slice(0,3))==null?void 0:W.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:Me,disabled:((H=ae.value)==null?void 0:H.length)===0},{suffix:l.withCtx(()=>{var ke,Ne;return[!V.value&&((Ne=(ke=L.filterValues)==null?void 0:ke.filter(Je=>Je))!=null&&Ne.join("/"))?(l.openBlock(),l.createBlock(z,{key:0,style:{cursor:"pointer"},onClick:be},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:G[0]||(G[0]=ke=>s.value=!s.value)},[l.createVNode(U,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Ur,[(l.openBlock(),l.createBlock(Ue.ssForm,{rowContents:ae.value,buttonValue:ge.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ge.value,isStartJustify:!1,onOnButtonClick:Ye},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),L.buttons&&((Oe=L.buttons)==null?void 0:Oe.length)>0?(l.openBlock(),l.createElementBlock("div",Or,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((rl=L.buttons)==null?void 0:rl.filter(C=>L.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,de)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:de},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(_e,{key:0,class:"upload-button-wrap","on-change":he,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!L.lockingPage},{default:l.withCtx(()=>[l.createVNode(xe,{disabled:!!L.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(Ue._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(xe,{key:0,disabled:!!L.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",Lr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,W=>(l.openBlock(),l.createBlock(xe,{key:W==null?void 0:W.label,disabled:!!L.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:H=>Ge(W==null?void 0:W.label)},{default:l.withCtx(()=>{var H,ke;return[l.createTextVNode(l.toDisplayString(W==null?void 0:W.label),1),(H=W==null?void 0:W.label)!=null&&H.includes("选中")?(l.openBlock(),l.createElementBlock("span",Vr,"("+l.toDisplayString(L.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=W==null?void 0:W.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Mr,"("+l.toDisplayString(L.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(xe,{key:2,id:"themeButton",disabled:!!L.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:W=>Ge(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",jr,[l.createElementVNode("div",$r,[l.createElementVNode("div",Pr,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:s.value},{reference:l.withCtx(()=>{var C,de,W,H;return[l.createVNode(Ce,{modelValue:V.value,"onUpdate:modelValue":G[3]||(G[3]=ke=>V.value=ke),style:{"min-width":"80px"},placeholder:Re.value?(W=(de=(C=L.filterValues)==null?void 0:C.filter(ke=>ke))==null?void 0:de.slice(0,3))==null?void 0:W.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:Me,disabled:((H=ae.value)==null?void 0:H.length)===0},{suffix:l.withCtx(()=>{var ke,Ne;return[!V.value&&((Ne=(ke=L.filterValues)==null?void 0:ke.filter(Je=>Je))!=null&&Ne.join("/"))?(l.openBlock(),l.createBlock(z,{key:0,style:{cursor:"pointer"},onClick:be},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:G[2]||(G[2]=ke=>s.value=!s.value)},[l.createVNode(U,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Kr,[(l.openBlock(),l.createBlock(Ue.ssForm,{rowContents:ae.value,buttonValue:ge.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ge.value,isStartJustify:!1,onOnButtonClick:Ye},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),L.buttons&&((qe=L.buttons)==null?void 0:qe.length)>0?(l.openBlock(),l.createElementBlock("div",Fr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((we=L.buttons)==null?void 0:we.filter(C=>L.isDevMode||(C==null?void 0:C.label)!=="修改模板"),(C,de)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:de},[(C==null?void 0:C.type)==="upload"?(l.openBlock(),l.createBlock(_e,{key:0,class:"upload-button-wrap","on-change":he,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(xe,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var W;return[l.createVNode(U,{name:(W=me==null?void 0:me.find(H=>(H==null?void 0:H.label)===(C==null?void 0:C.label)))==null?void 0:W.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(Ue._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(C==null?void 0:C.type)==="popover"?(l.openBlock(),l.createBlock(xe,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var W;return[l.createVNode(U,{name:(W=me==null?void 0:me.find(H=>(H==null?void 0:H.label)===(C==null?void 0:C.label)))==null?void 0:W.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",zr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C==null?void 0:C.contents,W=>(l.openBlock(),l.createBlock(xe,{key:W==null?void 0:W.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:H=>Ge(W==null?void 0:W.label)},{default:l.withCtx(()=>{var H,ke;return[l.createTextVNode(l.toDisplayString(W==null?void 0:W.label),1),(H=W==null?void 0:W.label)!=null&&H.includes("选中")?(l.openBlock(),l.createElementBlock("span",Rr,"("+l.toDisplayString(L.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=W==null?void 0:W.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",qr,"("+l.toDisplayString(L.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(xe,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(C==null?void 0:C.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:W=>Ge(C==null?void 0:C.label)},{icon:l.withCtx(()=>{var W;return[l.createVNode(U,{name:(W=me==null?void 0:me.find(H=>(H==null?void 0:H.label)===(C==null?void 0:C.label)))==null?void 0:W.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)])]))}}},Wr=$l._export_sfc(Jr,[["__scopeId","data-v-b0dbf278"]]),Gr=l.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(L,{emit:ee}){const Q=L,$=ee,V=ae=>{$("buttonClick",ae)},s=ae=>{var ge;return ae!=null&&ae.includes("删除")?((ge=Q.selectTableItems)==null?void 0:ge.length)>0?"warning-active-type":"warning-type":"default-type"};return(ae,ge)=>{const me=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(L.buttons,he=>(l.openBlock(),l.createBlock(me,{key:he==null?void 0:he.label,disabled:!!L.lockingPage,class:l.normalizeClass(s(he==null?void 0:he.label)),onClick:Me=>V(he==null?void 0:he.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(he==null?void 0:he.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Hr=$l._export_sfc(Gr,[["__scopeId","data-v-70b12973"]]),ma=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(L){this.selectArray=L},setSelectString(L){this.selectString=L}}}),Qr={class:"calculator-content"},Xr={class:"calculator-child"},Yr={class:"calculator-child"},Zr=l.defineComponent({__name:"calculator",setup(L){const ee=l.ref(),Q=l.ref();return l.onMounted(()=>{ee.value=[{type:"Upload",label:"输入",name:"input"}],Q.value=[{type:"Upload",label:"输出",name:"output"}]}),($,V)=>(l.openBlock(),l.createElementBlock("div",Qr,[l.createElementVNode("div",Xr,[l.createVNode(Ue.ssForm,{rowContents:ee.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Yr,[l.createVNode(Ue.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Ir=$l._export_sfc(Zr,[["__scopeId","data-v-73db0fe7"]]),ka=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(L){this.selectIndex=L},setSelectMenu(L){this.selectMenu=L},setSelectTitle(L){this.selectTitle=L}}}),Xl=(L,ee)=>{let Q=L,$=ee;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((V,s)=>{if(Array.isArray(V)){let ae={};return V=V==null?void 0:V.forEach((ge,me)=>{var he;(he=$==null?void 0:$[me])!=null&&he.prop?ae[$[me].prop]=ge:Array.isArray(ge)&&(ae.children=Xl(ge,$))}),Object.assign(ae,{id:s})}else return V})),Q},Sa=(L,ee,Q)=>{let $=L,V=ee;return $=$==null?void 0:$.map((s,ae)=>{var ge,me;return!Array.isArray(s)||!((ge=V==null?void 0:V[ae])!=null&&ge.label)&&!Q||(s.unshift(((me=V==null?void 0:V[ae])==null?void 0:me.label)??""),s.some(he=>Array.isArray(he))&&(s=s==null?void 0:s.map(he=>{var Me;return Array.isArray(he)&&(he=Sa(he,(Me=V==null?void 0:V[ae])==null?void 0:Me.children,Q)),he}))),s}),$},en=(L,ee,Q)=>{if(ee==="")return L==null?void 0:L.filter($=>($==null?void 0:$.id)!==Q);{const $=ee.split("-");return ln(L,$,Q)}},ln=(L,ee,Q)=>{let $=L,V=ee;return(V==null?void 0:V.length)===0?$=$==null?void 0:$.filter(s=>s.id!==Q):$=$==null?void 0:$.map(s=>(s.id.toString()===(V==null?void 0:V[0])&&(V==null||V.shift(),s=Ca(s,V,Q)),s)),$},Ca=(L,ee,Q)=>{var s,ae;let $=L,V=ee;return(V==null?void 0:V.length)===0?$.children=(s=$.children)==null?void 0:s.filter(ge=>ge.id!==Q):$.children=(ae=$.children)==null?void 0:ae.map(ge=>(ge.id.toString()===(V==null?void 0:V[0])&&(V==null||V.shift(),ge=Ca(ge,V,Q)),ge)),$},an=(L,ee,Q)=>{if(ee==="")return Q;{const $=ee.split("-");return rn(L,$,Q)}},rn=(L,ee,Q)=>{let $=L,V=ee;return(V==null?void 0:V.length)===0?$=Q:$=$==null?void 0:$.map(s=>(s.id.toString()===(V==null?void 0:V[0])&&(V==null||V.shift(),s=Da(s,V,Q)),s)),$},Da=(L,ee,Q)=>{var s;let $=L,V=ee;return(V==null?void 0:V.length)===0?$.children=Q:$.children=(s=$.children)==null?void 0:s.map(ae=>(ae.id.toString()===(V==null?void 0:V[0])&&(V==null||V.shift(),ae=Da(ae,V,Q)),ae)),$},xa=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(L){this.objUrl=L},setBlobUrls(L){this.blobUrls=L}}}),Yl=async(L,ee)=>{var ae,ge,me,he,Me,Ge,ce,Re,Ye;let Q=(ge=(ae=k.cloneDeep(L))==null?void 0:ae.optionUrl)==null?void 0:ge.menuSelect,$=[];Q==null||Q.forEach(be=>{var oe;if((be==null?void 0:be[0])==="["){let G=be;G=G==null?void 0:G.slice(1,(G==null?void 0:G.length)-1),G=(oe=ee==null?void 0:ee.find(z=>(z==null?void 0:z.prop)===G))==null?void 0:oe.value}});let V="";const s=await se.menuToParent(Q,void 0,ee);if(s==null||s.forEach(be=>{var oe,G,z,U;(be==null?void 0:be.name)===(((U=(z=(G=(oe=k.cloneDeep(L))==null?void 0:oe.optionUrl)==null?void 0:G.groupSelect)==null?void 0:z[0])==null?void 0:U.replaceAll("'",""))??"")&&(V=be==null?void 0:be.id)}),V===""&&(V=(me=s==null?void 0:s[0])==null?void 0:me.id),V!==""){let be=(he=s==null?void 0:s.find(z=>{var U,Ce,xe,_e;return(z==null?void 0:z.name)===(((Ce=(U=L==null?void 0:L.groupSelect)==null?void 0:U.split(":"))==null?void 0:Ce[0])||((_e=(xe=L==null?void 0:L.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:_e[0]))}))==null?void 0:he.compData;be||(be=(Me=s==null?void 0:s[0])==null?void 0:Me.compData);let oe=(ce=(Ge=be==null?void 0:be.find(z=>(z==null?void 0:z.key)==="header"))==null?void 0:Ge.contents)==null?void 0:ce.map(z=>z==null?void 0:z.label),G=(Ye=(Re=be==null?void 0:be.find(z=>(z==null?void 0:z.key)==="tableContents"))==null?void 0:Re.contents)==null?void 0:Ye.map(z=>(z=z==null?void 0:z.filter(U=>!(U!=null&&U.id)),z));G==null||G.forEach(z=>{$.push(se.getValueToObjectValue(z,oe))})}return $},nn={class:"table-content"},on={class:"menu-config-wrap"},tn=["onClick"],sn=["onClick"],un={key:0,class:"viewport-wrap"},cn=["onClick"],dn={title:"选择显示列信息"},pn={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},fn=["title"],gn={class:"col-operate-wrap"},hn={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},yn={class:"pop-view"},vn={class:"pop-wrapper"},bn={class:"file-list-pop"},mn=["title","onClick"],kn=["onClick"],Sn=["onClick"],Cn={class:"form-content"},Dn={key:0,class:"dialog-footer"},xn={class:"dialog-footer"},Tn={class:"form-content"},En={__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(L,{emit:ee}){var ya;const Q=l.ref([]),$=xa(k.pinia),V=l.ref(null),s=L,ae=l.ref(s==null?void 0:s.allowSelect),ge=l.ref((ya=s==null?void 0:s.config)==null?void 0:ya.showIndex),me=l.ref(),he=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),Me=se.useOriginalState(k.pinia),{originalPath:Ge}=k.storeToRefs(Me),ce=Ge.value,Re=l.ref(!1),Ye=l.ref(!1),be=l.ref(!1),oe=l.reactive({column:{},status:!1,text:"合计"}),G=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),z=ee,U=l.ref([]),Ce=l.reactive({prop:"",order:null}),xe=l.ref([]),_e=l.ref(!1),Oe=l.ref(!1),rl=l.ref(null);Ve.useThreeSystem();const qe=l.ref([]),we=l.ref(!1),C=l.ref(),de=se.useMenuState(),{importLoading:W,activeMenuPath:H,contentLoading:ke,linkMenuInfo:Ne}=k.storeToRefs(de),Je=se.useTableComp(k.pinia),Ee=se.useModelComp(k.pinia),{extraContents:ve,cacheUpdatingData:il,tableViewContents:ul,tableLoading:Bn,pageMapState:Ze,lockingPage:Tl}=k.storeToRefs(Ee),I=l.ref([]),El=l.ref([]),Nl=l.ref(new Map);l.ref(!1);const We=l.ref("");l.ref();const Bl=l.ref(!0),nl=l.ref(0),Zl=l.ref(!0),je=l.ref(""),He=l.ref(!1),Ta=l.ref({label:"查看三维模型"}),Al=l.ref(!1),Pl=l.ref(),Le=l.ref([]),Ie=l.ref([]),wl=l.ref(!1),cl=l.ref([]),ol=l.ref([]),el=l.ref([]),Qe=l.ref([]),$e=l.ref(),Be=l.ref(),Ea=ma(k.pinia),_l=l.ref(),Kl=l.ref(0),Ul=ka(k.pinia),{selectIndex:Na,selectMenu:Xe,selectTitle:Fl}=k.storeToRefs(Ul),{selectString:ll}=k.storeToRefs(Ea),Ba=k.useLoginState(k.pinia),{loginUserInfo:fe}=k.storeToRefs(Ba),Aa=l.ref(720),Pe=l.ref(!1),Ol=l.ref(!1),Ke=l.ref([]),al=l.ref(),dl=l.ref(!0),Il=l.ref(!0),Ll=l.ref([]),wa=l.inject("contentRef");l.provide("contentRef",wa),l.watch(()=>{var e;return(e=I.value)==null?void 0:e.length},e=>{G.total=e}),l.watch(()=>ul.value,async()=>{var i,p,d,g,m,t,N,j,v,O,T,S,K,x,A,D,f,h;if(((i=ul.value)==null?void 0:i.length)===0||!((p=s==null?void 0:s.itemData)!=null&&p.find(u=>(u==null?void 0:u.key)==="columnPath"))||!((d=s==null?void 0:s.itemData)!=null&&d.find(u=>(u==null?void 0:u.key)==="pageColumn")))return;let e=(v=(j=(N=(t=(m=(g=s==null?void 0:s.itemData)==null?void 0:g.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:m.contents)==null?void 0:t.split("["))==null?void 0:N[1])==null?void 0:j.split("]"))==null?void 0:v[0],a=((K=(S=(T=(O=s==null?void 0:s.itemData)==null?void 0:O.find(u=>(u==null?void 0:u.key)==="pageColumn"))==null?void 0:T.contents)==null?void 0:S.split("["))==null?void 0:K[0])+((A=(x=ul.value)==null?void 0:x.find(u=>(u==null?void 0:u.key)===e))==null?void 0:A.value),n=((f=(D=s==null?void 0:s.itemData)==null?void 0:D.find(u=>(u==null?void 0:u.key)==="pageGroup"))==null?void 0:f.contents)??"",r=await se.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;ga(o,s.allMapContents)},{deep:!0});const _a=async(e,a)=>{var n,r,o,i,p;try{const d=await k.getInsofDataApi({id:(s==null?void 0:s.parentTableId)||(s==null?void 0:s.index)});let g;((n=d==null?void 0:d.data)==null?void 0:n.code)===200&&(g=((o=(r=d==null?void 0:d.data)==null?void 0:r.result)==null?void 0:o[0])||null);const m={type:"data",pageKey:s!=null&&s.parentTableId?(i=g==null?void 0:g.key)==null?void 0:i.pageKey:H.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(v=>{const O=Object.keys(v),T={};return O.forEach((S,K)=>{T[e[K]]=v[S]}),T}),N=t==null?void 0:t.map(v=>({key:m,value:{tableData:v}})),j=await k.batchAddInsofDataApi({dataList:N});((p=j==null?void 0:j.data)==null?void 0:p.code)===200?(Ee.setRefreshCurStructure(!0),k.ElMessage.success("导入数据成功")):k.ElMessage.error("导入数据响应失败")}catch(d){throw k.ElMessage.error("导入数据处理失败"),new Error(d)}},Ua=async e=>{var a,n;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const r=await k.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),o=new Blob([r.data],{type:"application/octet-stream;charset=UTF-8"});let 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(()=>{Il.value=!1;let e=Kl.value;Kl.value=e+1});const ea=l.computed(()=>{var r,o;const e=(G.currentPage-1)*G.pageSize,a=e+G.pageSize,n=(r=U.value)==null?void 0:r.find(i=>{var p;return(i==null?void 0:i.sortable)&&((p=i==null?void 0:i.label)==null?void 0:p.includes("时间"))});return n&&(Ce.order="descending",Ce.prop=n==null?void 0:n.prop),z("getSliceContLength",G),(o=I.value)==null?void 0:o.slice(e,a)}),Oa=e=>{G.currentPage=e,z("getSliceContLength",G)},La=e=>{var a;G.pageSize=e,e*G.currentPage>((a=I.value)==null?void 0:a.length)&&(G.currentPage=1,G.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),z("getSliceContLength",G)},Va=(e,a)=>{var p,d;const n=(d=(p=U.value)==null?void 0:p.map(g=>g==null?void 0:g.prop))==null?void 0:d.filter(g=>g!=="operate");let r;const o=(e==null?void 0:e.length)===(n==null?void 0:n.length);if(e!=null&&e.includes("序号"))return k.ElMessage.error("导入的数据不需要包含序号列");if(r=o?e:e.slice(0,n==null?void 0:n.length),!(r==null?void 0:r.every(g=>n==null?void 0:n.find(m=>g===m))))return k.ElMessage.error("导入的数据表头不匹配");_a(r,a)},Ma=(e,a)=>{var n;Ee.setRefreshCurStructure(!1),((n=U.value)==null?void 0:n.length)===0||Va(e,a)},ja=(e,a,n,r)=>{const o=[],i=[],p=m=>Object.keys(m).length;for(const m in e)if(e[m]!==void 0){const t=e[m],N=[];for(const[j,v]of Object.entries(t))N.push(v),i.length<p(t)&&i.push(j);o.push(N)}o.unshift(i);const d=Ve.utils.aoa_to_sheet(o),g=Ve.utils.book_new();Ve.utils.book_append_sheet(g,d,r),Ve.writeFileSync(g,`${a}.xlsx`),Ke.value=[]},Vl=async(e,a,n,r=!1,o)=>{var i,p,d,g,m,t,N,j;try{Ee.setRefreshCurStructure(!1);const v=await k.getInsofDataApi({id:s==null?void 0:s.index});if(((i=v==null?void 0:v.data)==null?void 0:i.code)===200){let O=(m=(g=(d=(p=v==null?void 0:v.data)==null?void 0:p.result)==null?void 0:d[0])==null?void 0:g.value)==null?void 0:m.pageData;r?O={...O,compData:(N=O==null?void 0:O.compData)==null?void 0:N.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})}:O={...O,compData:(t=O==null?void 0:O.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(A=>(A==null?void 0:A.prop)===(a==null?void 0:a.prop)?{...A,[e]:n}:A)}:(S==null?void 0:S.key)==="tableToForm"&&o?{...S,contents:(x=S==null?void 0:S.contents)==null?void 0:x.map(A=>(A==null?void 0:A.prop)===(a==null?void 0:a.prop)?{...A,[o]:n}:A)}:S})};const T=await k.updateInsofDataApi({id:s==null?void 0:s.index,value:{pageData:O}});((j=T==null?void 0:T.data)==null?void 0:j.code)===200?(k.ElMessage.success("编辑成功"),Ee.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(v){k.ElMessage.error(v)}},$a=async(e,a)=>{await Vl("label",a,e)},Pa=async(e,a)=>{await Vl("columnType",a,e,!1,"type")},Ka=()=>{il.value?Pe.value=!1:ha()},Fa=e=>{Ke.value=e},za=(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=U.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=U.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)}))}),Ra=async(e,a,n)=>{const r=k.cloneDeep(U.value);await l.nextTick(),U.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 Vl(a,n,e)},zl=async(e,a)=>{await Vl(a,null,e,!0)},qa=()=>{He.value=!1},Ja=e=>{z("clickTrigger",e)},Rl=async e=>{var i,p,d,g,m,t,N,j,v,O,T,S,K,x;let a,n,r;if(typeof e=="string"?(a=e,n=null,r=null):(a=e==null?void 0:e.row,n=e==null?void 0:e.rowData,r=e==null?void 0:e.suffix),(i=a==null?void 0:a.toString())!=null&&i.includes(".urdf")||e!=null&&e.isUrdf||r!=null&&r.includes(".urdf")){if(a.includes(",")){k.ElMessage.error("当前版本仅允许单个urdf预览!");return}cl.value=[a],Oe.value=!0,rl.value={data:k.cloneDeep(n)},_e.value=!0;return}let o=[];if((p=a==null?void 0:a.toString())!=null&&p.includes(".stl")||(d=a==null?void 0:a.toString())!=null&&d.includes(".STL")||(g=a==null?void 0:a.toString())!=null&&g.includes(".obj")||(m=a==null?void 0:a.toString())!=null&&m.includes(".mtl")){cl.value=(t=a==null?void 0:a.toString())==null?void 0:t.split(","),Oe.value=!1,_e.value=!0;return}if((N=a==null?void 0:a.toString())!=null&&N.includes(".stl")||(j=a==null?void 0:a.toString())!=null&&j.includes(".STL")||(v=a==null?void 0:a.toString())!=null&&v.includes(".obj")||(O=a==null?void 0:a.toString())!=null&&O.includes(".mtl")||r!=null&&r.includes(".stl")||r!=null&&r.includes(".STL")||r!=null&&r.includes(".obj")||r!=null&&r.includes(".mtl")){let A,D=[],f={};if(Array.isArray(a)?A=a:A=a==null?void 0:a.split(","),A==null||A.forEach(h=>{h.includes(".mtl")?D.push(h):f.blob=f.blob?f.blob+","+h:h}),(D==null?void 0:D.length)>0&&(f.mtlBlobs=D),r&&(f.suffix=r),(S=(T=Object.values(f))==null?void 0:T[0])!=null&&S.includes("http:"))o.push(f);else{const h=new Blob([f.blob],{type:"application/octet-stream;charset=UTF-8"});let u=URL.createObjectURL(h),y="";(K=a==null?void 0:a.split("/"))==null||K.forEach((R,B)=>{var X;B===((X=a==null?void 0:a.split("/"))==null?void 0:X.length)-1&&(y=R)}),(x=f.blob)!=null&&x.includes(".stl")&&(y=(y==null?void 0:y.replaceAll(">",""))+".urdf"),C.value=[{name:y,blobUrl:u}],we.value=!0}}else{try{de.setImportLoading(!0);const A=new Br.ChunkDownloader(a,2*1024*1024),D=await A.downloadAll(y=>{console.log(`下载进度: ${y.percent}%`)}),f=new Blob([D],{type:"application/octet-stream"}),h=URL.createObjectURL(f),u=a.split("/").pop();C.value=[{name:u,blobUrl:h,size:A.totalSize}],de.setImportLoading(!1)}catch(A){console.error("NC文件加载失败:",A)}we.value=!0}(o==null?void 0:o.length)>0&&$.setBlobUrls(o)},Ml=e=>{var r,o,i,p;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(p=(r=e==null?void 0:e.url)==null?void 0:r.split("."))==null?void 0:p[((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},Wa=async e=>{let a=null,n=null,r=null;if(e!=null&&e.downloadUrl){const i=await ql(),p=Ue.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),d=await k.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(()=>{p.close()}),g=new Blob([d.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(g),n=e==null?void 0:e.name;const m=n==null?void 0:n.lastIndexOf(".");r=n==null?void 0:n.slice(m)}else{const 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=Ml(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};Rl(i);return}const o={name:n,blobUrl:a};C.value=[o],we.value=!0},Ga=async e=>{let a=null,n=null;if(e!=null&&e.downloadUrl){const i=await ql(),p=await k.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"}}),d=new Blob([p.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(d),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=Ml(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)},Ha=(e,a)=>{var n;if(Object.values(a).length!==0)return Object.values(a).find(r=>{var o,i,p;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"))||((p=r==null?void 0:r.toString())==null?void 0:p.includes(".obj"))})?[...e,Ta.value]:(n=s==null?void 0:s.config)!=null&&n.allowMove?[...e,{label:"迁移"}]:e},Qa=(e,a={})=>[...e==null?void 0:e.values()].filter(n=>Object.keys(a).every(r=>{var p;const o=n[r],i=(p=a[r])==null?void 0:p.toLowerCase();return i&&o&&typeof o=="string"?o.toLowerCase().includes(i):!0})),la=l.ref([]),Xa=async(e,a,n=!1)=>{var r;if(e){if(Ee.setTableLoading(!0),la.value=Object.values(e),e&&((r=Object.values(e))!=null&&r.every(o=>!o)))return I.value=El.value;if(n){I.value=[...Nl.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}I.value=Qa(Nl.value,e),Ee.setTableLoading(!1)}},Ya=async e=>{var p,d,g,m,t,N,j,v,O,T,S,K,x,A,D;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((p=fe.value)==null?void 0:p.account)||((d=fe.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),n=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((g=fe.value)==null?void 0:g.account)||((m=fe.value)==null?void 0:m.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let r=(N=(t=a==null?void 0:a.data)==null?void 0:t.result)==null?void 0:N.map(f=>f==null?void 0:f.id);const o=(v=(j=n==null?void 0:n.data)==null?void 0:j.result)==null?void 0:v.map(f=>f==null?void 0:f.id);r=[...k.cloneDeep(r),...o],(r==null?void 0:r.length)>0&&(r!=null&&r.every(f=>f!==null&&f))&&await k.batchDeleteInsofDataApi({ids:r});let i=await se.getItemData(H.value,sessionStorage.getItem("systemKey"),e.id);if(i=i==null?void 0:i.filter(f=>f.comp!=="methodButton"),i&&i.length>0){const f=!Array.isArray(Fl.value)&&((O=Fl.value)==null?void 0:O.key)!=="main"?[]:Fl.value;f.push({key:Xe.value===""?(T=e==null?void 0:e.id)==null?void 0:T.toString():Xe.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]]}),Ul.setSelectMenu(Xe.value===""?(x=e==null?void 0:e.id)==null?void 0:x.toString():Xe.value+"-"+((A=e==null?void 0:e.id)==null?void 0:A.toString())),Ul.setSelectTitle(f),Ul.setSelectIndex((D=e==null?void 0:e.id)==null?void 0:D.toString()),z("pageChange",i)}},aa=async(e,a,n,r)=>{var i,p,d,g,m,t,N,j,v,O,T,S,K,x,A,D,f,h,u,y,R,B,X,re,Z;if(z("clickMainKey",n),(r==null?void 0:r.isExistChild)===!0){let J=(p=(i=U.value)==null?void 0:i.find(q=>(q==null?void 0:q.isMainKey)===!0))==null?void 0:p.prop,Y=(d=r==null?void 0:r.rowContent)==null?void 0:d[J],w=(m=(g=r==null?void 0:r.columnType)==null?void 0:g.childPath)==null?void 0:m.split(ce),M=[];w==null||w.forEach((q,c)=>{(w==null?void 0:w.length)-1===c&&M.push(Y),M.push(q)}),M=M.join(ce);let F=await se.getItemData(M,sessionStorage.getItem("systemKey"),""),le=await se.getItemData((t=r==null?void 0:r.columnType)==null?void 0:t.childPath,sessionStorage.getItem("systemKey"),"");if(!F||(F==null?void 0:F.length)===0){let q=[];le==null||le.forEach(P=>{var ye,ue,E,b;let _={type:"structure",pageKey:M,version:1,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(ye=fe.value)==null?void 0:ye.id,parentPageKey:"",createUserLayer:((ue=fe.value)==null?void 0:ue.dept)||((E=fe.value)==null?void 0:E.部门名称)},ne={pageData:{comp:P==null?void 0:P.comp,compData:(b=P==null?void 0:P.compData)==null?void 0:b.filter(te=>(te==null?void 0:te.key)!=="tableContents"),name:P==null?void 0:P.name,isShow:P==null?void 0:P.isShow}};q.push({key:_,value:ne})}),(q==null?void 0:q.length)>0&&await k.batchAddInsofDataApi({dataList:q});let c=await se.getItemData(M,sessionStorage.getItem("systemKey"),"");Ll.value=c}else{let q=le==null?void 0:le.map(c=>{var P,_;return(c==null?void 0:c.comp)==="Form"?c.compData=(P=c.compData)==null?void 0:P.map(ne=>{var ye;return(ne==null?void 0:ne.key)==="formContent"&&(ne.contents=(ye=ne==null?void 0:ne.contents)==null?void 0:ye.map(ue=>{var b,te,ie,pe,De;let E=(De=(pe=(ie=(te=(b=F==null?void 0:F.find(Se=>(Se==null?void 0:Se.name)===(c==null?void 0:c.name)))==null?void 0:b.compData)==null?void 0:te.find(Se=>(Se==null?void 0:Se.key)==="formContent"))==null?void 0:ie.contents)==null?void 0:pe.find(Se=>(Se==null?void 0:Se.prop)===(ue==null?void 0:ue.prop)))==null?void 0:De.value;return ue.value=E,ue})),ne}):c=F==null?void 0:F.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)),c.id=(_=F==null?void 0:F.find(ne=>(ne==null?void 0:ne.name)===(c==null?void 0:c.name)))==null?void 0:_.id,c});Ll.value=q}z("routeUrl",Ll.value,{isEdit:!0,routerUrl:M});return}if((r==null?void 0:r.data)==="查看"&&(e!=null&&e.every(J=>(J==null?void 0:J.url)&&(J==null?void 0:J.name)))){let J=k.cloneDeep(e);J=await((N=k.cloneDeep(J))==null?void 0:N.map(async w=>{var le,q,c,P;const M=await Ve.downloadAvatarApi({url:w==null?void 0:w.url});let F=URL.createObjectURL(M.data);return{name:(w==null?void 0:w.name)+"."+((P=(le=w==null?void 0:w.url)==null?void 0:le.split("."))==null?void 0:P[((c=(q=w==null?void 0:w.url)==null?void 0:q.split("."))==null?void 0:c.length)-1]),blobUrl:F}}));let Y=await Promise.all(J);C.value=Y,we.value=!0}const o=k.cloneDeep(U.value);if((r==null?void 0:r.isMainKey)===!0&&(o==null?void 0:o.length)>0){(j=o==null?void 0:o[0])==null||j.prop;let J=k.cloneDeep(H).value+ce+(r==null?void 0:r.data),Y=k.cloneDeep(H).value,w=(O=(v=Ze.value[J])==null?void 0:v.filter(q=>{var c,P;return((c=q==null?void 0:q.key)==null?void 0:c.type)==="structure"&&((P=q==null?void 0:q.key)==null?void 0:P.parentTable)===""}))==null?void 0:O.map(q=>{var c;return(c=q==null?void 0:q.value)==null?void 0:c.pageData}),M={};(T=U.value)==null||T.forEach(q=>{(q==null?void 0:q.label)!=="操作"&&(M[q.label]=n[q.prop]??n[q.label])});let F=(K=(S=s==null?void 0:s.itemData)==null?void 0:S.find(q=>(q==null?void 0:q.key)==="mainRouters"))==null?void 0:K.contents,le;if((F==null?void 0:F.length)>0){let q=J==null?void 0:J.split(ce)[((x=J==null?void 0:J.split(ce))==null?void 0:x.length)-1],c=F==null?void 0:F.find(P=>(P==null?void 0:P.key)===q);le=(c==null?void 0:c.routerContent)+ce+(c==null?void 0:c.key)}if((w==null?void 0:w.length)>0)await se.getItemData(J+ce+`updateLoading${((A=fe.value)==null?void 0:A.account)||((D=fe.value)==null?void 0:D.账号)}`,sessionStorage.getItem("systemKey"),"")||await se.loadingConstruct(J,J+ce+`updateLoading${((f=fe.value)==null?void 0:f.account)||((h=fe.value)==null?void 0:h.账号)}`,M,le),Ee.setRouteToChildPath(Y),de.setActiveMenuPath(J+ce+`updateLoading${((u=fe.value)==null?void 0:u.account)||((y=fe.value)==null?void 0:y.账号)}`);else{(R=o==null?void 0:o[0])==null||R.prop;let q=k.cloneDeep(H).value+ce+(r==null?void 0:r.data),c=k.cloneDeep(H).value;await se.getItemData(c+ce,sessionStorage.getItem("systemKey"),""),await se.loadingConstruct(c+ce,q,M),await se.loadingConstruct(q,q+ce+`updateLoading${((B=fe.value)==null?void 0:B.account)||((X=fe.value)==null?void 0:X.账号)}`,M,le),Ee.setRouteToChildPath(c),de.setActiveMenuPath(q+ce+`updateLoading${((re=fe.value)==null?void 0:re.account)||((Z=fe.value)==null?void 0:Z.账号)}`)}}},Za=()=>{we.value=!1},Ia=e=>{z("rowClick",e)};l.watch(()=>s.changedContent,()=>{var n,r;if(!s.changedContent)return;let e=(n=I.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));I.value=e,z("contentChange",{contents:a,index:s.index}),z("change",{content:e,index:s==null?void 0:s.index,buttonName:"",id:s==null?void 0:s.index})},{deep:!0,immediate:!0});const er=()=>{},lr=async()=>{const e=H.value,a=sessionStorage.getItem("systemKey"),n=await se.getItemData(e,a,""),r=n==null?void 0:n.find(d=>(d==null?void 0:d.name)==="方法明细"),o=(r==null?void 0:r.compData)||[],i=o==null?void 0:o.find(d=>(d==null?void 0:d.key)==="formContent");return i==null?void 0:i.contents},ql=async()=>`Bearer ${k.Local.get("access-token")}`,ar=async(e,{token:a,inputData:n}={})=>await k.axios.post(e,n,{headers:{Authorization:a}}).catch(o=>(de.setImportLoading(!1),Promise.reject(o))),rr=e=>{var r;let a={};const n=[];return a.form={},(r=k.cloneDeep(e))==null||r.forEach((o,i)=>{var p,d,g,m,t,N,j,v,O,T,S,K,x,A;if((o==null?void 0:o.comp)==="Table"){(d=(p=o==null?void 0:o.compData)==null?void 0:p.find(u=>(u==null?void 0:u.key)==="header"))==null||d.contents;let D=(t=(m=(g=o==null?void 0:o.compData)==null?void 0:g.find(u=>(u==null?void 0:u.key)==="tableContents"))==null?void 0:m.contents)==null?void 0:t.map(u=>u.slice(1));(T=(O=(v=(j=(N=o==null?void 0:o.compData)==null?void 0:N.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:j.contents)==null?void 0:v[0])==null?void 0:O[0])==null||T.label;let f=(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 y=[];u==null||u.forEach((R,B)=>{var re;let X={};((re=f[B])==null?void 0:re.label)!=="操作"&&(X[f[B].label]=R,y.push(X))}),h.push(y)}),a[o.name]=h}else{const D=(A=(x=o.compData)==null?void 0:x.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:A.contents;D==null||D.forEach(f=>{var h,u;if(f.prop!==""){let y=f==null?void 0:f.value;Array.isArray(y)?y=((h=y==null?void 0:y[0])==null?void 0:h.oldUrl)||(y??"http://222.92.178.198:62001/"+((u=y==null?void 0:y[0])==null?void 0:u.url)):y=y.toString(),f={key:(f==null?void 0:f.prop)??(f==null?void 0:f.label),value:y},n.push(f)}})}}),a.form=se.getFormContents(n),a};let jl=null;const nr=()=>{de.setLoadingPercent(0)},ra=()=>{clearInterval(jl),jl=null},or=()=>{ra(),nr()},fl=()=>{de.setImportLoading(!1),or()},tr=()=>{jl=setInterval(()=>{const e=de.getLoadingPercent();if(e==99){ra();return}de.setLoadingPercent(e+1)},100)},sr=async(e,a,n)=>{var R,B,X,re,Z,J,Y,w,M,F,le,q;de.setImportLoading(!0,se.loadingTypeConstants.PROGRESS),jl||tr();const r=await lr().catch(c=>(fl(),Promise.reject(c))),o=r==null?void 0:r.find(c=>(c==null?void 0:c.key)==="算法体"),i=o==null?void 0:o.value;if(!i){console.log("未搜索到isMain, 缺少算法执行接口"),fl();return}const p=U.value||[],d=p.find(c=>(c==null?void 0:c.prop)==="输入"),g=d==null?void 0:d.prop;let m=a==null?void 0:a[g];const t=await ql().catch(c=>(fl(),Promise.reject(c)));let N=!1,j="";(R=U.value)==null||R.forEach(c=>{(c==null?void 0:c.prop)===g&&(N=!!(c!=null&&c.childPath),j=c==null?void 0:c.childPath)});let v="",O="";if(N){let c=(X=(B=U.value)==null?void 0:B.find(ye=>(ye==null?void 0:ye.isMainKey)===!0))==null?void 0:X.prop;O=a==null?void 0:a[c];let P=j==null?void 0:j.split(ce),_=[];P==null||P.forEach((ye,ue)=>{(P==null?void 0:P.length)-1===ue&&_.push(O),_.push(ye)}),_=_.join(ce),v=_;let ne=await se.getItemData(_,sessionStorage.getItem("systemKey"),"");m=rr(ne)}const T=await ar(i,{token:t,inputData:m}).catch(c=>(fl(),Promise.reject(c))),S=(re=T==null?void 0:T.data)==null?void 0:re.data,K=r==null?void 0:r.find(c=>(c==null?void 0:c.prop)==="算法名称");K==null||K.value;const x=p.find(c=>(c==null?void 0:c.prop)==="输出"),A=x==null?void 0:x.directiveLabel;v=v==null?void 0:v.replaceAll(d==null?void 0:d.directiveLabel,A);const D=(Z=k.cloneDeep(v))==null?void 0:Z.replaceAll(ce+O,"");let f=await se.getItemData(v,sessionStorage.getItem("systemKey"),""),h=await se.getItemData(D,sessionStorage.getItem("systemKey"),"");if(f){let c=[],P=[];f==null||f.forEach(_=>{var ne,ye;if((_==null?void 0:_.comp)==="Table")(ne=_==null?void 0:_.compData)==null||ne.forEach(ue=>{var E;(ue==null?void 0:ue.key)==="tableContents"&&((E=ue==null?void 0:ue.contents)==null||E.forEach(b=>{var te,ie;(te=b==null?void 0:b[0])!=null&&te.id&&c.push((ie=b==null?void 0:b[0])==null?void 0:ie.id)}))});else if((_==null?void 0:_.comp)==="Form"){_.compData=(ye=_==null?void 0:_.compData)==null?void 0:ye.map(E=>{var b;return(E==null?void 0:E.key)==="formContent"&&(E.contents=(b=E==null?void 0:E.contents)==null?void 0:b.map(te=>{var ie,pe;return(ie=S==null?void 0:S.form)!=null&&ie[te.prop]&&(te.value=(pe=S==null?void 0:S.form)==null?void 0:pe[te.prop]),te})),E});let ue={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};P.push({id:_==null?void 0:_.id,value:ue})}}),(P==null?void 0:P.length)>0&&await k.batchUpdateInsofDataApi({dataList:P}),c=[...new Set(c)],(c==null?void 0:c.length)>0&&await k.batchDeleteInsofDataApi({ids:c})}else{let c=[];if(S!=null&&S.table){let P={type:"structure",systemKey:sessionStorage.getItem("systemKey"),pageKey:v,parentTable:"",createUserId:(J=fe.value)==null?void 0:J.id,createUserOrg:((Y=fe.value)==null?void 0:Y.dept)||((w=fe.value)==null?void 0:w.部门名称)};h==null||h.forEach(_=>{let ye={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:_==null?void 0:_.compData}};c.push({key:P,value:ye})})}if(S!=null&&S.form){let P={type:"structure",pageKey:v,systemKey:sessionStorage.getItem("systemKey"),parentTable:"",createUserId:(M=fe.value)==null?void 0:M.id,parentPageKey:"",createUserLayer:((F=fe.value)==null?void 0:F.dept)||((le=fe.value)==null?void 0:le.部门名称)};h==null||h.forEach(_=>{var E;let ne=(E=_==null?void 0:_.compData)==null?void 0:E.map(b=>{var te;return(b==null?void 0:b.key)==="formContent"&&(b.contents=(te=b.contents)==null?void 0:te.map(ie=>{var pe,De;return(pe=S==null?void 0:S.form)!=null&&pe[ie.prop]&&(ie.value=(De=S==null?void 0:S.form)==null?void 0:De[ie.prop]),ie})),b}),ue={pageData:{comp:_==null?void 0:_.comp,name:_==null?void 0:_.name,isShow:_==null?void 0:_.isShow,compData:ne}};c.push({key:P,value:ue})})}(c==null?void 0:c.length)>0&&await k.batchAddInsofDataApi({dataList:c})}let u=await se.getItemData(v,sessionStorage.getItem("systemKey"),""),y=[];S!=null&&S.table&&((q=S==null?void 0:S.table)==null||q.forEach(c=>{var ne,ye,ue,E;let P={type:"data",pageKey:v,tableId:(ne=u==null?void 0:u[0])==null?void 0:ne.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ye=fe.value)==null?void 0:ye.id,createUserOrg:((ue=fe.value)==null?void 0:ue.dept)||((E=fe.value)==null?void 0:E.部门名称)},_={tableData:c};y.push({key:P,value:_})})),(y==null?void 0:y.length)>0&&await k.batchAddInsofDataApi({dataList:y}),vl(!0),fl()},na=(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=na(n.children,a)),n}),e),Te=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)"}]}),ir=()=>{Te.show=!1},ur=e=>{var a,n;if((e==null?void 0:e.buttonName)==="取消")return Te.show=!1;Te.to=e==null?void 0:e.content,!(!(s!=null&&s.index)||!((a=Te.to)!=null&&a.groupName))&&(s==null?void 0:s.index)!==((n=Te.to)==null?void 0:n.groupName)&&(z("change",{buttonName:"迁移",value:{from:Te.from,to:Te.to,data:Te.selectRow}}),Te.show=!1)},cr=l.computed(()=>s.compName===Ue.tableSign),dr=async e=>{de.setImportLoading(!0),await Ue.initUpdateCAMTargetData(e).finally(()=>{de.setImportLoading(!1)}),k.ElMessage({type:"success",message:"应用成功"})},gl=async(e,a,n)=>{var r,o,i,p,d,g,m,t,N,j,v,O,T,S,K;if(We.value="",wl.value=!0,Bl.value=!0,z("onButtonClick",e,a),e==="删除")se.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,A;(x=I.value)!=null&&x.find(D=>(D==null?void 0:D.id)===(a==null?void 0:a.id))?I.value=(A=k.cloneDeep(I.value))==null?void 0:A.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)):I.value=na(k.cloneDeep(I.value),a),en(_l.value,Xe.value,a==null?void 0:a.id),Ee.setTableLoading(s==null?void 0:s.index),z("change",{content:I.value,singleContent:a,index:s==null?void 0:s.index,type:"delete",buttonName:e,column:U.value})});else if(e==="批量删除"){if(((r=Ke.value)==null?void 0:r.length)===0)return k.ElMessage.warning("请先勾选操作的数据");se.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var A,D;const x=(A=Ke.value)==null?void 0:A.map(f=>f.id);I.value=(D=k.cloneDeep(I.value))==null?void 0:D.filter(f=>!(x!=null&&x.includes(f.id))),Ee.setTableLoading(s==null?void 0:s.index),z("change",{content:I.value,singleContent:null,selectItems:Ke.value,index:s==null?void 0:s.index,type:"batchDelete",buttonName:e,column:U.value})})}else if(e==="复制新增"){je.value="新增";const x=k.cloneDeep(a),A=(o=U.value)==null?void 0:o.find(h=>h==null?void 0:h.isMainKey),D=A||((i=U.value)==null?void 0:i[0]),f=(p=el.value)==null?void 0:p.find(h=>(h==null?void 0:h.label)==="新建");await ta(!0,f,{data:x,firstCol:D})}else if(e==="新增")je.value="新增",yl(""),He.value=!0;else if(e==="编辑")je.value="编辑",yl(a),He.value=!0;else if(e==="查看")je.value="查看",yl(a),wl.value=!1,Bl.value=!1,He.value=!0;else if(e==="查看三维模型"){const x={};for(let D in a)D!=="id"&&(x[D]=a[D]);let A=(d=Object.values(x))==null?void 0:d[1];Je.setTableShowThree(A)}else if(((g=n==null?void 0:n.extra)==null?void 0:g.type)==="modelExample")je.value=e,Al.value=!0;else if(e==="新建"){let x=Ze.value,A=[];for(let y in x)y!=null&&y.includes(`loading${((m=fe.value)==null?void 0:m.account)||((t=fe.value)==null?void 0:t.账号)}`)&&(A=[...A,...y]);let D=[];for(let y in x)y!=null&&y.includes(`updateLoading${((N=fe.value)==null?void 0:N.account)||((j=fe.value)==null?void 0:j.账号)}`)&&(D=[...D,...y]);let f=A==null?void 0:A.map(y=>y==null?void 0:y.id);const h=D==null?void 0:D.map(y=>y==null?void 0:y.id);f=[...k.cloneDeep(f),...h],(f==null?void 0:f.length)>0&&(f!=null&&f.every(y=>y!==null&&y))&&await k.batchDeleteInsofDataApi({ids:f});const u=(v=el.value)==null?void 0:v.find(y=>(y==null?void 0:y.label)==="新建");await ta(!1,u)}else if(e==="修改模板"){let x=k.cloneDeep(H).value;Ee.setRouteToChildPath(x),de.setActiveMenuPath(x+ce)}else if(e==="执行")sr(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((O=Ke.value)==null?void 0:O.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((T=I.value)==null?void 0:T.length)===0)return k.ElMessage.warning("暂无数据导出");const x=(K=(S=U.value)==null?void 0:S.map(D=>D==null?void 0:D.label))==null?void 0:K.filter(D=>D!=="操作"),A=e==="导出全部"?k.cloneDeep(I.value):k.cloneDeep(Ke.value);A==null||A.forEach(D=>{D==null||delete D.id}),ja(A,s==null?void 0:s.compName,x,s==null?void 0:s.compName)}else e==="迁移"?(Te.selectRow=a,Te.show=!0):e==="应用至流程"&&dr(a)},pr=async e=>{var n,r,o,i,p,d;const a=await k.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?(d=(p=a==null?void 0:a.data)==null?void 0:p.result)==null?void 0:d.map(g=>{var m;return{id:g==null?void 0:g.id,...(m=g==null?void 0:g.value)==null?void 0:m.pageData}}):[]},fr=async(e,a)=>{var n,r,o,i,p,d,g,m,t,N,j,v,O,T,S,K,x,A,D,f;try{let h,u;const y=(n=Ze.value[H.value+ce])==null?void 0:n.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="structureMethod"}),R=(r=Ze.value[H.value+ce])==null?void 0:r.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="structure"}),B=y==null?void 0:y.find(w=>{var M,F;return((F=(M=w==null?void 0:w.value)==null?void 0:M.pageData)==null?void 0:F.method)==="保存"});if(!B)return;const X=(d=(p=Ze.value[(i=(o=B==null?void 0:B.value)==null?void 0:o.pageData)==null?void 0:i.path])==null?void 0:p.filter(w=>{var M;return((M=w==null?void 0:w.key)==null?void 0:M.type)==="data"}))==null?void 0:d.find(w=>{var M,F,le,q;return((F=(M=w==null?void 0:w.value)==null?void 0:M.tableData)==null?void 0:F.算法名称)===((q=(le=B==null?void 0:B.value)==null?void 0:le.pageData)==null?void 0:q.method)});if(!X)return;const re={buttonName:(m=(g=B==null?void 0:B.value)==null?void 0:g.pageData)==null?void 0:m.method,api:(N=(t=X==null?void 0:X.value)==null?void 0:t.tableData)==null?void 0:N.算法体,content:R==null?void 0:R.map(w=>{var M;return(M=w==null?void 0:w.value)==null?void 0:M.pageData}),extraContent:[],extraValues:(v=(j=B==null?void 0:B.value)==null?void 0:j.pageData)==null?void 0:v.data,methodName:(T=(O=B==null?void 0:B.value)==null?void 0:O.pageData)==null?void 0:T.path};if(!e)return;const Z={...e,compData:(S=e==null?void 0:e.compData)==null?void 0:S.map(w=>{var M;return(w==null?void 0:w.key)==="formContent"?{...w,contents:(M=w==null?void 0:w.contents)==null?void 0:M.map(F=>(F==null?void 0:F.prop)===a?{...F,value:""}:F)}:w})},J={key:{pageKey:H.value+ce,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:Z}},Y=await k.axios.post(re.api,J,{headers:{"Content-Type":"application/json"}});return((K=Y==null?void 0:Y.data)==null?void 0:K.code)===200&&(h=(A=(x=Y==null?void 0:Y.data)==null?void 0:x.result)==null?void 0:A.latestReportCode,u=(f=(D=Y==null?void 0:Y.data)==null?void 0:D.result)==null?void 0:f.status),{newMainKeyValue:h,newStatus:u}}catch(h){throw k.ElMessage.error(h),new Error(h)}},oa=(e,a,n,r)=>{var o;z("contentChange",{contents:(o=e==null?void 0:e.compData)==null?void 0:o.map(i=>{var p;return(i==null?void 0:i.key)==="formContent"?{...i,contents:(p=i==null?void 0:i.contents)==null?void 0:p.map(d=>(d==null?void 0:d.key)===a?{...d,value:n}:hl.value&&(d==null?void 0:d.prop)===hl.prop?{...d,value:hl.value}:d)}:i}),index:e==null?void 0:e.id},r)},hl=l.reactive({prop:"状态",value:""}),gr=l.ref(["系统自动生成信息","审批意见"]),hr=async(e,a,n)=>{var g,m;let r=e==null?void 0:e[a==null?void 0:a.prop],o=1,i,p;const d=k.cloneDeep(H).value+ce+r;if(d){hl.value="",i=(g=Ze.value[d])==null?void 0:g.filter(j=>{var v;return((v=j==null?void 0:j.key)==null?void 0:v.type)==="structure"});const t=i==null?void 0:i.find(j=>{var v,O,T;return((T=(O=(v=j==null?void 0:j.value)==null?void 0:v.pageData)==null?void 0:O.comp)==null?void 0:T.toUpperCase())==="FORM"});p={...(m=t==null?void 0:t.value)==null?void 0:m.pageData,id:t==null?void 0:t.id};const N=await fr(p,a==null?void 0:a.prop);if(hl.value=N==null?void 0:N.newStatus,N!=null&&N.newMainKeyValue)return N==null?void 0:N.newMainKeyValue}if(I.value.some(t=>(t==null?void 0:t[a==null?void 0:a.prop])===r)){const t=r;for(;I.value.some(N=>(N==null?void 0:N[a==null?void 0:a.prop])===`${t}(${o})`);)o++;r=`${t}(${o})`}return r},ta=async(e,a,n)=>{var p,d,g,m,t,N,j,v;let r,o;const i=await hr(n==null?void 0:n.data,n==null?void 0:n.firstCol);if(e?(r=k.cloneDeep(H).value+ce+((m=n==null?void 0:n.data)==null?void 0:m[(g=n==null?void 0:n.firstCol)==null?void 0:g.prop]),o=k.cloneDeep(H).value+ce+i):(r=k.cloneDeep(H).value+ce,o=k.cloneDeep(r)+`loading${((p=fe.value)==null?void 0:p.account)||((d=fe.value)==null?void 0:d.账号)}`),a){const O=(N=(t=Ze.value[o])==null?void 0:t.filter(T=>{var S;return((S=T==null?void 0:T.key)==null?void 0:S.parentTable)===""}))==null?void 0:N.map(T=>{var S;return{id:T==null?void 0:T.id,...(S=T==null?void 0:T.value)==null?void 0:S.pageData}});if((O==null?void 0:O.length)>0)if(e){const T=O==null?void 0:O.find(S=>{var K;return((K=S==null?void 0:S.comp)==null?void 0:K.toUpperCase())==="FORM"});T&&oa(T,(j=n==null?void 0:n.firstCol)==null?void 0:j.label,i,H.value)}else Ee.setRouteToChildPath(k.cloneDeep(H).value),de.setActiveMenuPath(o);else if(await se.loadingConstruct(r,o,null,null,e?gr.value:null),e){const T=await pr(o);if((T==null?void 0:T.length)>0){const S=T==null?void 0:T.find(K=>{var x;return((x=K==null?void 0:K.comp)==null?void 0:x.toUpperCase())==="FORM"});S&&oa(S,(v=n==null?void 0:n.firstCol)==null?void 0:v.label,i,H.value)}}else Ee.setRouteToChildPath(k.cloneDeep(H).value),de.setActiveMenuPath(o)}else e?(We.value="",Be.value=n==null?void 0:n.data,vl(!0,n==null?void 0:n.firstCol,i)):(Ee.setRouteToChildPath(k.cloneDeep(H).value),de.setActiveMenuPath(o))},yr=()=>{_e.value=!1,cl.value=[],Oe.value=!1},yl=e=>{var o,i,p,d,g,m;const a=[];let n=[];for(let t in e)Array.isArray(e==null?void 0:e[t])&&n.push(t);xe.value=k.cloneDeep(U.value),(i=se.getColumnChild((o=k.cloneDeep(U.value))==null?void 0:o.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||i.forEach((t,N)=>{var j;n.find(v=>v===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((j=t==null?void 0:t.formType)==null?void 0:j.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"+N,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)??N,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"+N,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)??N,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||(We.value=(e==null?void 0:e.id)??"");let r=se.getColumnChild((p=k.cloneDeep(U.value))==null?void 0:p.filter(t=>(t==null?void 0:t.label)!=="操作"));Le.value&&((d=Le.value)==null?void 0:d.length)>0&&(Le.value=(g=k.cloneDeep(Le).value)==null?void 0:g.map(t=>{var j;let N=(t==null?void 0:t.prop)||((j=r==null?void 0:r.find(v=>(v==null?void 0:v.label)===(t==null?void 0:t.label)))==null?void 0:j.prop);return N&&(t.value=e[N]),t})),Qe.value=Le.value&&((m=Le.value)==null?void 0:m.length)>0?se.getTableFormToForm(Le.value):a},vr=()=>{var a;const e=(a=V.value)==null?void 0:a.$el;e&&Hl.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:n=>{var p;const{oldIndex:r,newIndex:o}=n;if(r===o)return;const i=pl.value.splice(r,1)[0];pl.value.splice(o,0,i),U.value=(p=U.value)==null?void 0:p.slice().sort((d,g)=>{if(d.label==="操作")return 1;if(g.label==="操作")return-1;const m=pl.value.findIndex(N=>N.label===d.label),t=pl.value.findIndex(N=>N.label===g.label);return m-t})}})};l.onMounted(()=>{Pl.value=window.innerWidth-240*2});const br=()=>{l.nextTick(()=>{vr()})},Jl=(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,p;if((o==null?void 0:o.id)===We.value){let d={};for(let g in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===g))==null?void 0:i.label;m?d[g]=(p=Be.value)==null?void 0:p[m]:d[g]=o[g]}o=Object.assign(d,Be.value),n=o}else{let d=Jl(o,a);o=d==null?void 0:d.contents,n=d==null?void 0:d.currentSelectContents}return o}),{contents:e,currentSelectContents:n}},sa=(e,a)=>{let n,r;return e!=null&&e.find(o=>(o==null?void 0:o.id)===We.value)?n=e==null?void 0:e.map(o=>{var i,p;if((o==null?void 0:o.id)===We.value){let d={};for(let g in o){let m=(i=a==null?void 0:a.find(t=>(t==null?void 0:t.prop)===g))==null?void 0:i.label;m?d[g]=(p=Be.value)==null?void 0:p[m]:d[g]=o[g]}o=Object.assign(d,Be.value),r=o}return o}):n=e==null?void 0:e.map(o=>{var i,p,d,g;if((o==null?void 0:o.id)===We.value){let m={};for(let t in o){let N=(i=a==null?void 0:a.find(j=>(j==null?void 0:j.prop)===t))==null?void 0:i.label;N?m[t]=(p=Be.value)==null?void 0:p[N]:m[t]=o[t]}o=Object.assign(m,Be.value),r=o}else o=(d=Jl(o,a))==null?void 0:d.contents,r=(g=Jl(o,a))==null?void 0:g.currentSelectContents;return o}),{newContents:n,currentSelectContents:r}},ia=(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(ia)),e},Wl=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(...Wl(r))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(r=>{const o={...r};return delete o.children,o}):[]},vl=(e=!0,a,n)=>{var m,t,N,j,v,O,T,S,K;let r=se.getColumnChild((m=k.cloneDeep(U.value))==null?void 0:m.filter(x=>(x==null?void 0:x.label)!=="操作")),o,i=k.cloneDeep(I.value);if(!Be.value){He.value=!1;return}if(We.value===""){nl.value++;let x;a&&n?x={id:nl.value.toString(),[a==null?void 0:a.prop]:n,children:Be.value.children}:x={id:nl.value.toString()},x!=null&&x.children&&(x={...x,children:(t=x.children)==null?void 0:t.map(A=>ia(A,a,n))}),i.push(Object.assign(Be.value,x)),o=Object.assign(Be.value,x)}else i=(N=sa(i,r))==null?void 0:N.newContents,o=(j=sa(i,r))==null?void 0:j.currentSelectContents;const p=(v=s.itemData)==null?void 0:v.filter(x=>(x==null?void 0:x.key)==="childTree")[0];if(((O=p==null?void 0:p.contents)==null?void 0:O.length)>0){je.value="编辑";const x=[];i==null||i.forEach((A,D)=>{var h;let f={};if(Array.isArray(A)){let u=[];A==null||A.filter(y=>!(y!=null&&y.id)).forEach((y,R)=>{var B,X,re,Z,J,Y,w;if((X=(B=$e.value)==null?void 0:B[R])!=null&&X.prop&&!Array.isArray(y)){let M={};M[$e.value[R].column]=y,ve!=null&&ve.value&&((re=ve==null?void 0:ve.value)==null?void 0:re.length)>0&&((Z=ve==null?void 0:ve.value)!=null&&Z.find(F=>JSON.stringify(F==null?void 0:F[0])===JSON.stringify(M)))&&(u=(J=ve==null?void 0:ve.value)==null?void 0:J.find(F=>JSON.stringify(F==null?void 0:F[0])===JSON.stringify(M))),u&&u.length>0?f[$e.value[R].prop]=u!=null&&u.find(F=>{var le;return((le=Object.keys(F))==null?void 0:le[0])===$e.value[R].column})?(Y=u==null?void 0:u.find(F=>{var le;return((le=Object.keys(F))==null?void 0:le[0])===$e.value[R].column}))==null?void 0:Y[$e.value[R].column]:y:f[$e.value[R].prop]=y}else Array.isArray(y)&&((w=$e.value[R])!=null&&w.prop?f[$e.value[R].prop]=y:f.children=Xl(y,$e.value))})}else f=A;Array.isArray(A)&&A.some(u=>u==null?void 0:u.id)?x.push(Object.assign(f,{id:(h=A==null?void 0:A.find(u=>u.id))==null?void 0:h.id})):f.id?x.push(f):x.push(Object.assign(f,{id:D.toString()}))}),I.value=fa(x,p,U.value)}else I.value=i;da(I.value),_l.value=I.value;const d=an(_l.value,Xe.value,i);let g=[];if(il.value?(g=(T=k.cloneDeep(il).value.singleContent)==null?void 0:T.filter(x=>(x==null?void 0:x.id)!==(o==null?void 0:o.id)),g.push(o)):g=[o],Pe.value){const x={content:d,singleContent:((S=p==null?void 0:p.contents)==null?void 0:S.length)>0?g==null?void 0:g.flatMap(Wl):g,index:s==null?void 0:s.index,buttonName:"编辑",column:U.value,parentTableId:s==null?void 0:s.parentTableId};Ee.setCacheUpdatingData(x)}if(e){const x={content:d,singleContent:((K=p==null?void 0:p.contents)==null?void 0:K.length)>0?Wl(o):o,index:s==null?void 0:s.index,buttonName:je.value,column:U.value,parentTableId:s==null?void 0:s.parentTableId};Ee.setTableLoading(s==null?void 0:s.index),He.value=!1,Be.value=void 0,z("change",x)}};l.onUnmounted(()=>{U.value=[],I.value=[],xe.value=[],qe.value=[],Le.value=[],Ie.value=[],cl.value=[],ol.value=[],Qe.value=[],Ke.value=[],V.value=null});const ua=async(e,a,n)=>{var m,t,N,j,v,O,T,S,K,x,A;al.value=n==null?void 0:n.prop;const r=k.cloneDeep(s.itemData),o=r==null?void 0:r.map(D=>{var f;return(D==null?void 0:D.key)==="header"&&((f=D.contents)==null||f.map((h,u)=>{var y,R,B,X,re,Z,J,Y,w,M,F,le,q,c,P,_,ne,ye,ue;return h.type=h!=null&&h.type?h.type:(X=(B=(R=(y=h==null?void 0:h.key)==null?void 0:y.split("$"))==null?void 0:R[1])==null?void 0:B.split("("))!=null&&X[0]?(Z=(re=se.FormType)==null?void 0:re.find(E=>{var b,te,ie,pe;return(E==null?void 0:E.key)===((pe=(ie=(te=(b=h==null?void 0:h.key)==null?void 0:b.split("$"))==null?void 0:te[1])==null?void 0:ie.split("("))==null?void 0:pe[0])}))==null?void 0:Z.value:"Input",h.options=h!=null&&h.options?h.options:((w=(Y=(J=h==null?void 0:h.key)==null?void 0:J.split("$"))==null?void 0:Y[1])==null?void 0:w.length)>0?(q=(le=Ql((F=(M=h==null?void 0:h.key)==null?void 0:M.split("$"))==null?void 0:F[1]))==null?void 0:le.split(","))==null?void 0:q.map(E=>({label:E,value:E})):[],(c=h==null?void 0:h.key)!=null&&c.includes("$")&&(h.key=(_=(P=h==null?void 0:h.key)==null?void 0:P.split("$"))==null?void 0:_[0]),h.value=(ne=Object.values(a))==null?void 0:ne[u],h.optionUrl=h!=null&&h.formMenuSelect&&((ye=h==null?void 0:h.formMenuSelect)==null?void 0:ye.length)>0?{groupSelect:(ue=h==null?void 0:h.groupSelect)==null?void 0:ue.split(/[::]/).map(E=>E.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=k.cloneDeep(Qe.value),p=(t=(m=k.cloneDeep(o))==null?void 0:m.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:t.contents;i=i==null?void 0:i.map(D=>{var f;return D.value=(f=p==null?void 0:p.find((h,u)=>u===(D==null?void 0:D.id)))==null?void 0:f.value,D});let d="",g=(v=(j=(N=k.cloneDeep(o))==null?void 0:N.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:j.contents)==null?void 0:v.find((D,f)=>{var h,u,y;return(D==null?void 0:D.label)===al.value||(f==null?void 0:f.toString())===((y=(u=(h=al.value)==null?void 0:h.split("a"))==null?void 0:u[1])==null?void 0:y.toString())});if((S=(T=(O=k.cloneDeep(o))==null?void 0:O.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:T.contents)==null||S.forEach(D=>{var f,h,u,y,R;d===""&&((u=(h=(f=D==null?void 0:D.optionUrl)==null?void 0:f.groupSelect)==null?void 0:h[1])!=null&&u.includes("["))&&(d=(R=(y=D==null?void 0:D.optionUrl)==null?void 0:y.groupSelect)==null?void 0:R[1])}),(K=g==null?void 0:g.optionUrl)!=null&&K.menuSelect){let D=await Yl(g),f;if(D==null||D.forEach(h=>{var u,y,R,B,X,re,Z,J,Y,w;d===((y=(u=g==null?void 0:g.optionUrl)==null?void 0:u.groupSelect)==null?void 0:y[1])&&((X=(B=(R=g==null?void 0:g.optionUrl)==null?void 0:R.groupSelect)==null?void 0:B[1])!=null&&X.includes("["))&&((w=k.cloneDeep(h))==null?void 0:w[(Y=(J=(Z=(re=g==null?void 0:g.optionUrl)==null?void 0:re.groupSelect)==null?void 0:Z[1])==null?void 0:J.replaceAll("[",""))==null?void 0:Y.replaceAll("]","")])===(g==null?void 0:g.value)&&(f=h)}),f){let h=k.cloneDeep(i);h=h==null?void 0:h.map(y=>{var R,B,X,re,Z,J,Y,w,M,F,le;return(f!=null&&f[y==null?void 0:y.label]||f!=null&&f[(re=(X=(B=(R=y==null?void 0:y.optionUrl)==null?void 0:R.groupSelect)==null?void 0:B[1])==null?void 0:X.replaceAll("[",""))==null?void 0:re.replaceAll("]","")])&&((Y=(J=(Z=y==null?void 0:y.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:J[1])!=null&&Y.includes("["))&&(y.value=(f==null?void 0:f[y==null?void 0:y.label])||(f==null?void 0:f[(le=(F=(M=(w=y==null?void 0:y.optionUrl)==null?void 0:w.groupSelect)==null?void 0:M[1])==null?void 0:F.replaceAll("[",""))==null?void 0:le.replaceAll("]","")])),y}),I.value=(x=k.cloneDeep(I.value))==null?void 0:x.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const R={};return h==null||h.forEach(B=>{R[B.name]=B.value}),R.id=y==null?void 0:y.id,R}return y});let u=k.cloneDeep(h);u=u==null?void 0:u.map(y=>{var R,B,X,re;return(B=(R=y==null?void 0:y.optionUrl)==null?void 0:R.menuSelect)!=null&&B.some(Z=>Z==null?void 0:Z.includes)&&(y.optionUrl.menuSelect=(re=(X=y==null?void 0:y.optionUrl)==null?void 0:X.menuSelect)==null?void 0:re.map(Z=>{var J,Y,w,M;if(Z!=null&&Z.includes("[")){let F=(Y=(J=Z==null?void 0:Z.replaceAll("[","").replaceAll("]",""))==null?void 0:J.split(":"))==null?void 0:Y[1];Z=(M=(w=k.cloneDeep(h))==null?void 0:w.find(le=>(le==null?void 0:le.label)===F))==null?void 0:M.value}return Z})),y}),I.value=(A=k.cloneDeep(I.value))==null?void 0:A.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const R={};return u==null||u.forEach(B=>{R[B.name]=B.value}),R.id=y==null?void 0:y.id,R}return y})}}},mr=async e=>{var m,t,N,j,v,O,T,S,K,x,A,D;if(!e)return;Be.value=e;const a=k.cloneDeep(s.itemData);let n=a==null?void 0:a.map(f=>{var h;return(f==null?void 0:f.key)==="header"&&((h=f.contents)==null||h.map((u,y)=>{var R,B,X,re,Z,J,Y,w,M,F,le,q,c,P,_,ne,ye,ue,E;return u.type=u!=null&&u.type?u.type:(re=(X=(B=(R=u==null?void 0:u.key)==null?void 0:R.split("$"))==null?void 0:B[1])==null?void 0:X.split("("))!=null&&re[0]?(J=(Z=se.FormType)==null?void 0:Z.find(b=>{var te,ie,pe,De;return(b==null?void 0:b.key)===((De=(pe=(ie=(te=u==null?void 0:u.key)==null?void 0:te.split("$"))==null?void 0:ie[1])==null?void 0:pe.split("("))==null?void 0:De[0])}))==null?void 0:J.value:"Input",u.options=u!=null&&u.options?u.options:((M=(w=(Y=u==null?void 0:u.key)==null?void 0:Y.split("$"))==null?void 0:w[1])==null?void 0:M.length)>0?(c=(q=Ql((le=(F=u==null?void 0:u.key)==null?void 0:F.split("$"))==null?void 0:le[1]))==null?void 0:q.split(","))==null?void 0:c.map(b=>({label:b,value:b})):[],(P=u==null?void 0:u.key)!=null&&P.includes("$")&&(u.key=(ne=(_=u==null?void 0:u.key)==null?void 0:_.split("$"))==null?void 0:ne[0]),u.value=(ye=Object.values(e))==null?void 0:ye[y],u.optionUrl=u!=null&&u.formMenuSelect&&((ue=u==null?void 0:u.formMenuSelect)==null?void 0:ue.length)>0?{groupSelect:(E=u==null?void 0:u.groupSelect)==null?void 0:E.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})),f}),r=Qe.value,o=(t=(m=k.cloneDeep(n))==null?void 0:m.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:t.contents;if(r=r==null?void 0:r.map(f=>{var h;return f.value=(h=o==null?void 0:o.find((u,y)=>(u==null?void 0:u.prop)===(f==null?void 0:f.name)))==null?void 0:h.value,f}),!dl.value)return;let i="",p=(v=(j=(N=k.cloneDeep(n))==null?void 0:N.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:j.contents)==null?void 0:v.find((f,h)=>{var u,y,R;return(f==null?void 0:f.label)===al.value||(h==null?void 0:h.toString())===((R=(y=(u=al.value)==null?void 0:u.split("a"))==null?void 0:y[1])==null?void 0:R.toString())}),d=(O=p==null?void 0:p.optionUrl)==null?void 0:O.menuSelect,g=!0;if((K=(S=(T=k.cloneDeep(n))==null?void 0:T.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:S.contents)==null||K.forEach(f=>{var h,u,y,R,B,X;g&&((y=(u=(h=f==null?void 0:f.optionUrl)==null?void 0:h.groupSelect)==null?void 0:u[1])!=null&&y.includes("["))&&(i=(B=(R=f==null?void 0:f.optionUrl)==null?void 0:R.groupSelect)==null?void 0:B[1],JSON.stringify(d)===JSON.stringify((X=f==null?void 0:f.optionUrl)==null?void 0:X.menuSelect)&&(g=!1))}),(x=p==null?void 0:p.optionUrl)!=null&&x.menuSelect&&dl.value){let f=await Yl(p),h;if((A=p==null?void 0:p.optionUrl)==null||A.menuSelect,f==null||f.forEach(u=>{var y,R,B,X,re,Z,J,Y,w,M;i===((R=(y=p==null?void 0:p.optionUrl)==null?void 0:y.groupSelect)==null?void 0:R[1])&&((re=(X=(B=p==null?void 0:p.optionUrl)==null?void 0:B.groupSelect)==null?void 0:X[1])!=null&&re.includes("["))&&((M=k.cloneDeep(u))==null?void 0:M[(w=(Y=(J=(Z=p==null?void 0:p.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:J[1])==null?void 0:Y.replaceAll("[",""))==null?void 0:w.replaceAll("]","")])===(p==null?void 0:p.value)&&(h=u)}),h){let u=k.cloneDeep(r);u=u==null?void 0:u.map(B=>{var X,re,Z,J,Y,w,M,F,le,q,c;return(h!=null&&h[B==null?void 0:B.label]||h!=null&&h[(J=(Z=(re=(X=B==null?void 0:B.optionUrl)==null?void 0:X.groupSelect)==null?void 0:re[1])==null?void 0:Z.replaceAll("[",""))==null?void 0:J.replaceAll("]","")])&&((M=(w=(Y=B==null?void 0:B.optionUrl)==null?void 0:Y.groupSelect)==null?void 0:w[1])!=null&&M.includes("["))&&(B.value=(h==null?void 0:h[B==null?void 0:B.label])||(h==null?void 0:h[(c=(q=(le=(F=B==null?void 0:B.optionUrl)==null?void 0:F.groupSelect)==null?void 0:le[1])==null?void 0:q.replaceAll("[",""))==null?void 0:c.replaceAll("]","")])),B}),Qe.value=k.cloneDeep(u);let y=k.cloneDeep(u);y=y==null?void 0:y.map(B=>{var X,re,Z,J,Y,w;return(re=(X=B==null?void 0:B.optionUrl)==null?void 0:X.menuSelect)!=null&&re.some(M=>M==null?void 0:M.includes("["))&&(B.optionUrl.oldMenuSelect=(J=(Z=k.cloneDeep(B))==null?void 0:Z.optionUrl)==null?void 0:J.menuSelect,B.optionUrl.menuSelect=(w=(Y=B==null?void 0:B.optionUrl)==null?void 0:Y.menuSelect)==null?void 0:w.map(M=>{var F,le,q,c;if(M!=null&&M.includes("[")){let P=(le=(F=M==null?void 0:M.replaceAll("[","").replaceAll("]",""))==null?void 0:F.split(":"))==null?void 0:le[1];M=(c=(q=k.cloneDeep(u))==null?void 0:q.find(_=>(_==null?void 0:_.label)===P))==null?void 0:c.value}return M})),B}),Qe.value=y;let R={};(D=Qe.value)==null||D.forEach(B=>{R[B.prop]=B==null?void 0:B.value}),Be.value=R}}dl.value=!1},kr=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",Sr=e=>{var i,p;const a=(p=(i=Le.value)==null?void 0:i.find(d=>(d==null?void 0:d.label)===(e==null?void 0:e.label)))==null?void 0:p.multiple,n=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;I.value.forEach(d=>{const g=d==null?void 0:d[n];a&&va.isString(g)&&(d[n]=[g]),!a&&!va.isString(g)&&(d[n]="")})},ca=(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=>ca(r,a))),e},Gl=e=>{var n,r,o,i,p,d;yl("");const a=(n=Qe.value)==null?void 0:n.reduce((g,m)=>(g[m.name]=m.value,g),{});if(((r=Object.keys(a))==null?void 0:r.length)>0){Be.value=a,We.value="",nl.value=(o=I.value)==null?void 0:o.length,ol.value=(i=el.value)==null?void 0:i.filter(m=>(m==null?void 0:m.label)!=="新增");const g=(d=(p=xe.value)==null?void 0:p.filter(m=>(m==null?void 0:m.label)!=="操作"))==null?void 0:d.map(m=>{var N,j,v;const t=(j=(N=Le.value)==null?void 0:N.find(O=>(O==null?void 0:O.label)===(m==null?void 0:m.label)))==null?void 0:j.multiple;return Sr(m),{...m,contents:(m==null?void 0:m.options)??[],optionUrl:m!=null&&m.formMenuSelect&&((v=m==null?void 0:m.formMenuSelect)==null?void 0:v.length)>0?{groupSelect:m==null?void 0:m.groupSelect,menuSelect:m==null?void 0:m.formMenuSelect,selectRelateType:"",type:m==null?void 0:m.formType,multiple:t}:null}});U.value=g==null?void 0:g.map(m=>ca(m,[{prop:"type",value:"edit"},{prop:"columnType",value:kr(m==null?void 0:m.formType)||(m==null?void 0:m.columnType)}])),e==="createClick"&&vl(!1)}},tl={START:"开始时间",END:"结束时间",HOURS:"工时"},Cr=(e,a)=>Number(Hl.dayjs(a).diff(Hl.dayjs(e),"day",!0).toFixed(1)),da=e=>{var i;const a=s.itemData,n=(i=a==null?void 0:a.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:i.contents,r=new Map;return n==null||n.forEach((p,d)=>{const{label:g}=p;r.set(g,d)}),!r.has(tl.START)||!r.has(tl.END)||!r.has(tl.HOURS)?e:e==null?void 0:e.map(p=>{const d=p==null?void 0:p[tl.START],g=p==null?void 0:p[tl.END],m=Cr(d,g);return d&&g&&(p[tl.HOURS]=`${m}天`),p})},pa=(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 p of e){const d=p[r];o.has(d)||o.set(d,[]),o.get(d)&&o.get(d).push(p)}const i=[];for(const[p,d]of o){const[g,...m]=d,t={...g};n+1===((a==null?void 0:a.length)??"")?t.children=d==null?void 0:d.map(N=>(N.level=k.cloneDeep(n)+1,N)).filter((N,j)=>j!==0):m.length>0&&(t.children=pa(m,a,n+1)),t.level=n,i.push(t)}return i},fa=(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=pa(e,a==null?void 0:a.contents,0),r},ga=(e,a)=>{var j,v,O,T,S,K,x,A,D,f,h,u,y,R,B,X,re,Z,J,Y,w,M,F,le,q;const n=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="header");e==null||e.filter(c=>(c==null?void 0:c.key)==="tableIndexColumn")[0];const r=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="childTree")[0];let o=a;const i=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="page"),p=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="rowButton"),d=e==null?void 0:e.find(c=>(c==null?void 0:c.key)==="extraButton"),g=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableContents"),m=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableIndex");Le.value=(v=(j=e==null?void 0:e.filter(c=>(c==null?void 0:c.key)==="tableToForm"))==null?void 0:j[0])==null?void 0:v.contents,Zl.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(c=>(c==null?void 0:c.selectLabel)==="("+ll.value+")"))??(n==null?void 0:n.find(c=>!(c!=null&&c.selectLabel)));let N=[];if(ll.value===""?N=m==null?void 0:m[0]:N=(m==null?void 0:m.find(c=>(c==null?void 0:c.selectLabel)==="("+ll.value+")"))??(m==null?void 0:m.find(c=>!(c!=null&&c.selectLabel))),((O=t==null?void 0:t.contents)==null?void 0:O.length)>0){let c=[];if(t!=null&&t.contents.some(E=>Array.isArray(E)&&(E==null?void 0:E.find(b=>b.children))))Xe.value===""?c=(S=(T=se.getGradeColumns(t==null?void 0:t.contents))==null?void 0:T[0])==null?void 0:S.filter(E=>!Array.isArray(E)):(Xe.value.split("-"),c=(K=se.getGradeColumns(t==null?void 0:t.contents))==null?void 0:K[0]);else{let E=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;E==null||E.forEach((b,te)=>{var De,Se,bl,ml;let ie="";(Se=(De=H.value)==null?void 0:De.split("/"))==null||Se.forEach(Fe=>{var kl,Sl,Cl;if(Fe!==""){let sl=(Cl=(Sl=(kl=Fe==null?void 0:Fe.split(ce+"updateLoading"))==null?void 0:kl[0])==null?void 0:Sl.split(ce+"loading"))==null?void 0:Cl[0];ie=ie===""?ie+sl:ie+"/"+sl}}),ie=ie+ce+(b==null?void 0:b.directiveLabel);const pe=(bl=Le.value)==null?void 0:bl.find(Fe=>(Fe==null?void 0:Fe.prop)===(b==null?void 0:b.prop));c.push({label:(b==null?void 0:b.label)??"",prop:(b==null?void 0:b.label)==="操作"?"operate":(b==null?void 0:b.prop)??"a"+te,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)??te,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?(ml=b==null?void 0:b.groupSelect)==null?void 0:ml.replaceAll('"',"").split(":"):[],isMainKey:(b==null?void 0:b.isMainKey)||(b==null?void 0:b.directiveLabel)&&!o[ie],columnType:(pe==null?void 0:pe.type)||(b==null?void 0:b.columnType)||"TEXTAREA",directiveLabel:b==null?void 0:b.directiveLabel,isExistChild:!!(b!=null&&b.directiveLabel&&o[ie]),childPath:ie})})}U.value=se.getNewColumnChild(c),qe.value=se.getNewColumnChild(c),Q.value=(A=U.value)==null?void 0:A.map(E=>E==null?void 0:E.label),Ye.value=(D=U.value)==null?void 0:D.every(E=>E==null?void 0:E.filterable),be.value=(f=U.value)==null?void 0:f.every(E=>E==null?void 0:E.operable),Re.value=(h=U.value)==null?void 0:h.every(E=>E==null?void 0:E.sortable);let P=(y=(u=se.getAllLeafNodes(U.value))==null?void 0:u.filter(E=>(E==null?void 0:E.type)!=="operate"))==null?void 0:y.map((E,b)=>({prop:(E==null?void 0:E.prop)??"a"+b,column:E.label}));$e.value=P;let _=[];ll.value===""?_=g==null?void 0:g[0]:_=(g==null?void 0:g.find(E=>(E==null?void 0:E.selectLabel)==="("+ll.value+")"))??(g==null?void 0:g.find(E=>!(E!=null&&E.selectLabel)));let ne=Array.isArray((R=_==null?void 0:_.contents)==null?void 0:R[0])&&((B=_==null?void 0:_.contents)!=null&&B[0].every(E=>Array.isArray(E)))?(X=_==null?void 0:_.contents)==null?void 0:X[0]:_==null?void 0:_.contents;N!=null&&N.contents&&((re=N==null?void 0:N.contents)==null?void 0:re.length)!==0&&(ne=(Z=k.cloneDeep(ne))==null?void 0:Z.map((E,b)=>{if(!Array.isArray(E)){let te={};for(let ie in E)ie!=="id"&&ie!=="index"&&(te[ie]=E[ie]);E=Object.values(te)}return E}));const ye=!!((J=U.value)!=null&&J.find(E=>E.prop==="index"));ne=Sa(ne,N==null?void 0:N.contents,ye);const ue=[];ne==null||ne.forEach((E,b)=>{var ie;let te={};if(Array.isArray(E)){let pe=[];E==null||E.filter(De=>!(De!=null&&De.id)).forEach((De,Se)=>{var bl,ml,Fe,kl,Sl,Cl;if((bl=P==null?void 0:P[Se])!=null&&bl.prop&&!Array.isArray(De)){let sl={};sl[P[Se].column]=De,ve!=null&&ve.value&&((ml=ve==null?void 0:ve.value)==null?void 0:ml.length)>0&&((Fe=ve==null?void 0:ve.value)!=null&&Fe.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl)))&&(pe=(kl=ve==null?void 0:ve.value)==null?void 0:kl.find(ze=>JSON.stringify(ze==null?void 0:ze[0])===JSON.stringify(sl))),pe&&pe.length>0?te[P[Se].prop]=pe!=null&&pe.find(ze=>{var Dl;return((Dl=Object.keys(ze))==null?void 0:Dl[0])===P[Se].column})?(Sl=pe==null?void 0:pe.find(ze=>{var Dl;return((Dl=Object.keys(ze))==null?void 0:Dl[0])===P[Se].column}))==null?void 0:Sl[P[Se].column]:De:te[P[Se].prop]=De}else Array.isArray(De)&&((Cl=P[Se])!=null&&Cl.prop?te[P[Se].prop]=De:te.children=Xl(De,P))})}else te=E;Array.isArray(E)&&E.some(pe=>pe==null?void 0:pe.id)?ue.push(Object.assign(te,{id:(ie=E==null?void 0:E.find(pe=>pe.id))==null?void 0:ie.id})):te.id?ue.push(te):ue.push(Object.assign(te,{id:b.toString()}))}),I.value=fa(ue,r,U.value),El.value=ue,(Y=El.value)==null||Y.forEach(E=>{var b;(b=Nl.value)==null||b.set(E.id,E)})}else U.value=[],xe.value=[],I.value=[],El.value=[],Nl.value=new Map;((w=p==null?void 0:p.contents)==null?void 0:w.length)>0?Ie.value=p==null?void 0:p.contents:Ie.value=[],((M=d==null?void 0:d.contents)==null?void 0:M.length)>0?(ol.value=d==null?void 0:d.contents,el.value=d==null?void 0:d.contents):(ol.value=[],el.value=[]),nl.value=((F=I==null?void 0:I.value)==null?void 0:F.length)??0,da(I.value),_l.value=I.value,Pe.value&&(U.value=(q=(le=xe.value)==null?void 0:le.filter(c=>(c==null?void 0:c.label)!=="操作"))==null?void 0:q.map(c=>{var P;return{...c,type:"edit",optionUrl:c!=null&&c.formMenuSelect&&((P=c==null?void 0:c.formMenuSelect)==null?void 0:P.length)>0?{groupSelect:c==null?void 0:c.groupSelect,menuSelect:c==null?void 0:c.formMenuSelect,selectRelateType:"",type:c==null?void 0:c.formType}:null}}),Gl())};l.watch(()=>[s.itemData,ll.value,Na.value,Xe.value,ve==null?void 0:ve.value],async()=>{var e,a,n,r,o,i;if((e=s==null?void 0:s.itemData)!=null&&e.find(p=>(p==null?void 0:p.key)==="columnPath")&&!((a=ul.value)!=null&&a.find(p=>{var d,g;return(p==null?void 0:p.key)===((g=(d=s==null?void 0:s.itemData)==null?void 0:d.find(m=>(m==null?void 0:m.key)==="columnPath"))==null?void 0:g.contents)}))){let p=ul.value,d={key:(r=(n=s==null?void 0:s.itemData)==null?void 0:n.find(g=>(g==null?void 0:g.key)==="columnPath"))==null?void 0:r.contents,value:(i=(o=s==null?void 0:s.itemData)==null?void 0:o.find(g=>(g==null?void 0:g.key)==="columnUsingPath"))==null?void 0:i.contents};p!=null&&p.find(g=>(g==null?void 0:g.key)===(d==null?void 0:d.key))?p=p==null?void 0:p.map(g=>((g==null?void 0:g.key)===(d==null?void 0:d.key)&&(g.value=d.value),g)):p.push(d),Ee.setTableViewContents(p)}ga(s.itemData,s.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>s==null?void 0:s.operatingForm,e=>{e!=null&&e.form&&(yl(e==null?void 0:e.form),je.value=e==null?void 0:e.dialogTitle,wl.value=!0,He.value=!0)},{immediate:!0,deep:!0});const ha=()=>{var e;(e=me.value)!=null&&e.includes("read")&&(Pe.value=!Pe.value)},Dr=()=>{Ol.value=!Ol.value};l.watch(()=>{var e;return(e=s==null?void 0:s.config)==null?void 0:e.viewport},e=>{var a;me.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)),ge.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?(Gl("viewChange"),Ee.setCacheUpdatingData(null)):(ol.value=el.value,U.value=qe.value,il.value&&(Ee.setTableLoading(s==null?void 0:s.index),z("change",il.value))),ae.value=e,ge.value=e||((a=s==null?void 0:s.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=ea.value)==null?void 0:e.length},e=>{e===0&&(G.currentPage=1)}),l.watch(()=>s==null?void 0:s.compNames,e=>{Te.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:e||[],width:1}]},{immediate:!0}),l.ref(!1);const xr=(e,a)=>{var n;Gl("createClick"),a===G.pageSize&&(G.currentPage=Math.ceil(((n=I.value)==null?void 0:n.length)/G.pageSize))},Tr=(e,a,n)=>{var r;ua(n,e,a),Be.value=k.cloneDeep(e),We.value=e==null?void 0:e.id,nl.value=(r=I.value)==null?void 0:r.length,je.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",vl(!1)},Ae=e=>{var g,m,t,N,j,v,O,T,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?((m=(g=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:g[0])==null?void 0:m.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]):((N=(t=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:t[0])==null?void 0:N.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((v=(j=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:j[0])==null?void 0:v.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((S=(T=a==null?void 0:a[(O=r==null?void 0:r.child)==null?void 0:O.prop])==null?void 0:T[0])==null?void 0:S.contents)??(a==null?void 0:a[(K=r==null?void 0:r.child)==null?void 0:K.prop]),d=Array.isArray(i)&&!(i!=null&&i.every(x=>typeof x=="string"||typeof x=="number"))?"查看":i;return d=Array.isArray(d)?d.join(","):d,d},Er=e=>{var m,t,N,j,v,O,T,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=(m=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:m[0])==null?void 0:t.contents)??(a==null?void 0:a[n==null?void 0:n.prop]):((j=(N=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:N[0])==null?void 0:j.contents)??(a==null?void 0:a[r==null?void 0:r.prop])??((O=(v=o==null?void 0:o[r==null?void 0:r.prop])==null?void 0:v[0])==null?void 0:O.contents)??(o==null?void 0:o[r==null?void 0:r.prop])??((K=(S=a==null?void 0:a[(T=r==null?void 0:r.child)==null?void 0:T.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 d=Array.isArray(i)&&!(i!=null&&i.every(A=>typeof A=="string"||typeof A=="number")),g=Array.isArray(i)&&(i==null?void 0:i.find(A=>A==null?void 0:A.url));return d&&g},Nr=(e,a)=>e.find(n=>Object.values(n).some(r=>r===a));return l.watch(()=>Ne.value,async e=>{if(e){de.setContentLoading(!0),await l.nextTick();const a=Nr(I.value,e==null?void 0:e.data);if(!a)return de.setContentLoading(!1);await aa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),de.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)&&(I.value=(a=I.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 m,t,N,j;const n=l.resolveComponent("svg-icon"),r=l.resolveComponent("el-popover"),o=l.resolveComponent("el-switch"),i=l.resolveComponent("el-checkbox"),p=l.resolveComponent("el-checkbox-group"),d=l.resolveComponent("el-button"),g=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",nn,[Il.value?(l.openBlock(),l.createBlock(Ue.ssTable,{id:"excel-table",pageObj:G,showIndex:ge.value,isTree:(m=L.compItem)==null?void 0:m.isTree,summaryInfo:oe,columns:U.value,defaultSort:Ce,isCardViewport:Ol.value,checkedColumns:Q.value,key:Kl.value+JSON.stringify(U.value),tableData:ea.value,isEditViewport:Pe.value,isShowPagination:Zl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ae.value,onDbClickRow:Ya,extraButton:ol.value,rowButton:Ie.value,cacheExtraButtons:el.value,isClearSelection:((t=Ke.value)==null?void 0:t.length)===0,onDoCurrentChange:Oa,onDoSizeChange:La,onContentClick:aa,onRowClick:Ia,onSelectChange:Fa,onCellChange:Tr,onChange:ua,onPreview:Rl,onSubmitEditingTable:Ka,onHandleColEditChange:$a,onHandleColTypeChange:Pa,onClickButton:gl},l.createSlots({headerButton:l.withCtx(v=>{var O,T;return[L.showHeader?(l.openBlock(),l.createBlock(Wr,{key:0,pageLayout:L.pageLayout,lockingPage:l.unref(Tl)===l.unref(H),filterValues:la.value,selectNums:(O=Ke.value)==null?void 0:O.length,dataNums:(T=I.value)==null?void 0:T.length,compName:L.compName,isDevMode:L.isDevMode,buttons:v.buttons,onButtonClick:a[0]||(a[0]=S=>gl(S,"",{})),columns:U.value,onFilter:Xa,onGetImportData:Ma,level:L.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var v,O,T,S;return[((v=I.value)==null?void 0:v.length)>0&&L.allowOperate?(l.openBlock(),l.createElementBlock("div",un,[(O=me.value)!=null&&O.includes("read")&&((T=me.value)!=null&&T.includes("edit"))&&((S=Ie.value)!=null&&S.some(K=>(K==null?void 0:K.label)==="编辑"))&&!Ol.value&&l.unref(Tl)!==l.unref(H)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:ha},[l.createVNode(n,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:Dr},[l.createVNode(n,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:v,index:O})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:T=>xr(v,O)},[l.createVNode(n,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,cn)]),operateCol:l.withCtx(()=>[l.createVNode(r,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:br},{reference:l.withCtx(()=>[l.createElementVNode("span",dn,[l.createVNode(n,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",pn,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(o,{"model-value":Re.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=v=>zl(v,"sortable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":Ye.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=v=>zl(v,"filterable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":be.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=v=>zl(v,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(p,{modelValue:Q.value,"onUpdate:modelValue":a[5]||(a[5]=v=>Q.value=v),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:V},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(pl.value,v=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:v.label},[l.createVNode(i,{value:v.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:v.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(v.label),9,fn)]),_: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 O;return[l.createElementVNode("div",gn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((O=Object.keys(v))==null?void 0:O.filter(T=>{var S;return(S=he.value)==null?void 0:S.find(K=>(K==null?void 0:K.value)===T)}),T=>{var S,K;return l.openBlock(),l.createElementBlock("div",{key:T},[l.createVNode(o,{"model-value":v==null?void 0:v[T],"active-text":(K=(S=he.value)==null?void 0:S.find(x=>(x==null?void 0:x.value)===T))==null?void 0:K.label,onChange:x=>Ra(x,T,v)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",hn,[l.createVNode(n,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(v=>{var O,T,S,K,x,A,D,f,h,u,y,R,B,X,re,Z,J,Y;return[Er(v)?(l.openBlock(),l.createBlock(r,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:l.withCtx(()=>[l.createElementVNode("span",yn,l.toDisplayString(Ae(v)),1)]),default:l.withCtx(()=>{var w;return[l.createElementVNode("div",vn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v==null?void 0:v.row[(w=v==null?void 0:v.column)==null?void 0:w.prop],M=>(l.openBlock(),l.createElementBlock("div",bn,[l.createElementVNode("div",{class:"prop-url",title:Ml(M),onClick:F=>Wa(M)},l.toDisplayString(Ml(M)),9,mn),l.createElementVNode("div",{class:"prop-download",onClick:F=>Ga(M)}," 下载 ",8,kn)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Ae(v))&&((T=(O=Ae(v))==null?void 0:O.toString())!=null&&T.includes(".txt")||(K=(S=Ae(v))==null?void 0:S.toString())!=null&&K.includes(".cpt")||(A=(x=Ae(v))==null?void 0:x.toString())!=null&&A.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ae(v))&&((f=(D=Ae(v))==null?void 0:D.toString())!=null&&f.includes(".txt")||(u=(h=Ae(v))==null?void 0:h.toString())!=null&&u.includes(".cpt")||(R=(y=Ae(v))==null?void 0:y.toString())!=null&&R.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ae(v))&&((X=(B=Ae(v))==null?void 0:B.toString())!=null&&X.includes(".txt")||(Z=(re=Ae(v))==null?void 0:re.toString())!=null&&Z.includes(".cpt")||(Y=(J=Ae(v))==null?void 0:J.toString())!=null&&Y.includes(".cyd"))?"pointer":"",marginLeft:(v==null?void 0:v.colIndex)===0?`${((v==null?void 0:v.level)??0)*20}px`:0}),onClick:w=>Ua(Ae(v))},l.toDisplayString(Ae(v)===0?"0":Ae(v)),13,Sn))]}),_:2},[((N=Ie.value)==null?void 0:N.length)>0&&l.unref(Tl)!==l.unref(H)?{name:"actions",fn:l.withCtx(({item:v})=>[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(()=>{var O;return[l.createElementVNode("div",on,[cr.value?(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:L.index,onClick:T=>gl("应用至流程",v,{extra:e.content})},[l.createElementVNode("div",{style:l.normalizeStyle({color:(O=e.content)==null?void 0:O.textColor}),class:"extra-button-label"}," 应用至流程 ",4)],8,tn)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Ha(Ie.value,v),(T,S)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:S,onClick:K=>gl(T==null?void 0:T.label,v,{extra:T})},[l.createElementVNode("div",{style:l.normalizeStyle({color:T==null?void 0:T.textColor}),class:"extra-button-label"},l.toDisplayString(T==null?void 0:T.label),5)],8,sn))),128))])]}),_:2},1024)]),key:"0"}:void 0,((j=I.value)==null?void 0:j.length)>0?{name:"batchButton",fn:l.withCtx(v=>[l.withDirectives(l.createVNode(Hr,{lockingPage:l.unref(Tl)===l.unref(H),buttons:v.buttons,selectTableItems:Ke.value,onButtonClick:a[1]||(a[1]=O=>gl(O,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,ae.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!ae.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(xl.ssDialog,{title:je.value,visible:He.value,width:Aa.value,onBeforeDestroy:qa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",Cn,[l.createVNode(Ue.ssForm,{rowContents:Qe.value,isEnableWrap:!1,showOperator:!1,onChange:mr,onClickTrigger:Ja,isEdit:Bl.value,onBlurChange:za,onPreview:Rl},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[wl.value?(l.openBlock(),l.createElementBlock("div",Dn,[l.createVNode(d,{onClick:a[6]||(a[6]=v=>He.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[13]||(a[13]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[13]}),l.createVNode(d,{class:"ok-button",onClick:a[7]||(a[7]=v=>vl(!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(xl.ssDialog,{title:je.value,visible:Al.value,width:Pl.value,onBeforeDestroy:a[9]||(a[9]=v=>Al.value=!1)},{default:l.withCtx(()=>[l.createVNode(Ir)]),footer:l.withCtx(()=>[l.createElementVNode("div",xn,[l.createVNode(d,{onClick:a[8]||(a[8]=v=>Al.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[15]||(a[15]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[15]}),l.createVNode(d,{class:"ok-button",onClick:er,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(Ue.ssFilePreview,{key:1,fileDataList:C.value,onDestroy:Za},null,8,["fileDataList"])):l.createCommentVNode("",!0),_e.value?(l.openBlock(),l.createBlock(xl.ssDialog,{key:2,visible:_e.value,onBeforeDestroy:yr,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:Oe.value,isSelfWindow:!0,threeData:rl.value},null,8,["file-urls","isThreeScene","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(xl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=v=>e.componentVisible=!1),width:Pl.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(g,{dialogItem:Ll.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(xl.ssDialog,{title:Te.title,visible:Te.show,width:Te.width,onBeforeDestroy:ir},{default:l.withCtx(()=>[l.createElementVNode("div",Tn,[l.createVNode(Ue.ssForm,{rowContents:Te==null?void 0:Te.contents,formRules:Te==null?void 0:Te.formRules,showOperator:!1,buttonValue:Te.buttonValue,isEdit:Bl.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:ur},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},Nn=$l._export_sfc(En,[["__scopeId","data-v-9b8983ff"]]);exports.formGetOptions=Ql;exports.getSelectRow=Yl;exports.ssTable=Nn;exports.useFormComp=xa;exports.useFormToTableComp=ma;exports.useUnit=ka;
|