ss-component-new 1.2.239 → 1.2.240

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/{MTLLoader-Dty52Kos.cjs → MTLLoader-BK7sCOKw.cjs} +1 -1
  2. package/dist/{MTLLoader-ZOJJ-Zca.js → MTLLoader-UTEzRiYH.js} +1 -1
  3. package/dist/{OrbitControls-fz1Q5z4o.js → OrbitControls-C4wOEoH5.js} +1 -1
  4. package/dist/{OrbitControls-B0AMmpiE.cjs → OrbitControls-DmVBM-Ud.cjs} +1 -1
  5. package/dist/{URDFLoader-Ancz7QVZ.cjs → URDFLoader-77AvV0WM.cjs} +1 -1
  6. package/dist/{URDFLoader-C3_kHBTh.js → URDFLoader-BAxsZiFV.js} +2 -2
  7. package/dist/{animationData-JHXk_SMb.js → animationData-DsDrgxIs.js} +1 -1
  8. package/dist/{animationData-D7z6SN34.cjs → animationData-DxQeR3lW.cjs} +1 -1
  9. package/dist/{array-B8jfTWdr.js → array-_9dR-jfG.js} +1 -1
  10. package/dist/{array-mOhrKMKc.cjs → array-gHdd6OE5.cjs} +1 -1
  11. package/dist/{iconfont-DeLrM3NF.js → iconfont-CCjP-T1w.js} +2 -2
  12. package/dist/{iconfont-Qm8bQNiI.cjs → iconfont-D4hZ8lQB.cjs} +1 -1
  13. package/dist/{index-mPCjoZzL.cjs → index-3a_FFP1r.cjs} +1 -1
  14. package/dist/{index-6cQWf9lg.cjs → index-B-ill49l.cjs} +1 -1
  15. package/dist/{index-DXc6VP0-.js → index-B4NaFshT.js} +1 -1
  16. package/dist/{index-DXahvDht.cjs → index-BGkKKMYM.cjs} +1 -1
  17. package/dist/{index-D9uP-j_f.js → index-BHB8_puL.js} +1 -1
  18. package/dist/{index-VXn4QQ6h.cjs → index-BHWo4qfG.cjs} +1 -1
  19. package/dist/{index-BLrtNHJw.cjs → index-BKj0fzZy.cjs} +1 -1
  20. package/dist/{index-BYyAqV5J.cjs → index-BOUCjrkn.cjs} +1 -1
  21. package/dist/{index-DW06_6Us.js → index-Bj_A0R0A.js} +3 -3
  22. package/dist/{index-DjD-V1yP.js → index-Bp-OGSaz.js} +7 -7
  23. package/dist/{index-CSoBuWPq.js → index-BpVqG5KK.js} +3 -3
  24. package/dist/{index-CaQkGd4w.cjs → index-ByAwqXPJ.cjs} +1 -1
  25. package/dist/{index-Cun2oG5e.js → index-C0EnW_nv.js} +4 -4
  26. package/dist/{index-Bt7zboia.js → index-CCBlxpGn.js} +1 -1
  27. package/dist/{index-C-GYH2e-.cjs → index-CEJrI-Nt.cjs} +1 -1
  28. package/dist/{index-CLIohYt2.cjs → index-COT_roXg.cjs} +1 -1
  29. package/dist/index-CQ52Awk5.js +4276 -0
  30. package/dist/{index-XAZJKL25.cjs → index-C_2bhy1j.cjs} +1 -1
  31. package/dist/{index-305au7cl.cjs → index-CjQ-w88j.cjs} +1 -1
  32. package/dist/{index-TnYAZpgF.js → index-CkKef9Xg.js} +2 -2
  33. package/dist/{index-DIv-wtkN.js → index-CmOyLg9f.js} +8 -8
  34. package/dist/{index--9gCNgdE.js → index-CqjjUEYP.js} +1 -1
  35. package/dist/{index-Ds4CAs9m.js → index-Csu4kumc.js} +4 -4
  36. package/dist/index-Cth3DRog.cjs +13 -0
  37. package/dist/{index-RBfbRP89.js → index-D-WFV7eu.js} +1 -1
  38. package/dist/{index-CB9123Ca.cjs → index-D5-t4UZk.cjs} +1 -1
  39. package/dist/{index-B7dQMnVH.js → index-D9L82EwE.js} +2 -2
  40. package/dist/{index-C_fnYWIg.cjs → index-DC2dPfGE.cjs} +1 -1
  41. package/dist/{index-BAahUD8z.cjs → index-DCCxsNGw.cjs} +1 -1
  42. package/dist/{index-DSmWhHh1.js → index-DFSBb_Up.js} +1 -1
  43. package/dist/{index-Y-qD2EKj.js → index-DNZm-g41.js} +1 -1
  44. package/dist/{index-B_R-9InB.cjs → index-DhWSyYn_.cjs} +1 -1
  45. package/dist/{index-CRoEK_jP.cjs → index-DrKyipWO.cjs} +1 -1
  46. package/dist/{index-CF8aoT7d.js → index-GCsmhk7R.js} +1 -1
  47. package/dist/{index-FjrBXhOF.js → index-IV9zWUQN.js} +1 -1
  48. package/dist/{index-DOCcOmco.js → index-JVlLPF3o.js} +1 -1
  49. package/dist/{index-D7CfJNBg.cjs → index-LSc_D7Br.cjs} +1 -1
  50. package/dist/{index-BwoWLLrS.cjs → index-QrPmlKwo.cjs} +1 -1
  51. package/dist/{index-cVN315Aw.cjs → index-Rsl-9SHE.cjs} +1 -1
  52. package/dist/{index-CL_SJFfm.js → index-WUwZkGTy.js} +4 -4
  53. package/dist/{index-BGQxV1Z0.js → index-YClaEzon.js} +1 -1
  54. package/dist/{index-BO9Xirjz.js → index-cajHEMXA.js} +16 -16
  55. package/dist/{index-CqcIJB7l.cjs → index-dP_btubw.cjs} +1 -1
  56. package/dist/{index-CIkvZBU9.cjs → index-frLe3S9h.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B--yNtf1.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DQlBopIf.js} +6 -6
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Ceu3XjdH.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-FomZb4vY.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D1EZRqgB.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B_ZyoH-c.cjs} +40 -40
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-oA5S09l2.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6Ct13p6.js} +1008 -1013
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-BmGjawag.js → index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-BzowNu9E.js} +4 -4
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-DNL_YdS9.cjs → index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-DZHKXyL_.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_1_lang-CDkVExU4.cjs → index.vue_vue_type_style_index_1_lang-CcCJPXIe.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_1_lang-CmRU0NlU.js → index.vue_vue_type_style_index_1_lang-DZE35KJA.js} +3 -3
  65. package/dist/{main-B7qUb3OO.js → main-BZ1jv6xE.js} +3 -3
  66. package/dist/{main-CzJfiOuQ.cjs → main-CWD_I3fY.cjs} +1 -1
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.css +1 -1
  69. package/dist/ss-component.js +9 -9
  70. package/dist/ss-component2.cjs +1 -1
  71. package/dist/ss-component2.js +10 -10
  72. package/dist/{threeModel-B-WiRZsP.js → threeModel-CgO4hMA7.js} +4 -4
  73. package/dist/{threeModel-9244RH82.cjs → threeModel-DQL1qjlJ.cjs} +1 -1
  74. package/dist/{threePreview-CDVWPPqC.js → threePreview-NRT3zSEh.js} +3 -3
  75. package/dist/{threePreview-Cs-fXU15.cjs → threePreview-tIv-KGBG.cjs} +1 -1
  76. package/dist/{threeSceneView-D-QgnVtZ.cjs → threeSceneView-B1nFHsgF.cjs} +1 -1
  77. package/dist/{threeSceneView-BIVFCX44.js → threeSceneView-ftUAfAK7.js} +8 -8
  78. package/dist/{threeSceneViewForCPMPIP-CP4Z7-ku.cjs → threeSceneViewForCPMPIP-8ezFd1ZK.cjs} +1 -1
  79. package/dist/{threeSceneViewForCPMPIP-l_jYJCJ1.js → threeSceneViewForCPMPIP-CwJWPro2.js} +7 -7
  80. package/dist/{threeTrackPathView-DMTFKySx.cjs → threeTrackPathView-DmKEVnaj.cjs} +1 -1
  81. package/dist/{threeTrackPathView-CMTtFQwo.js → threeTrackPathView-SF7nRPxQ.js} +3 -3
  82. package/dist/{threeViewerHost-AibV8TLI.cjs → threeViewerHost-BQ2Nydiz.cjs} +1 -1
  83. package/dist/{threeViewerHost-CSfITlTw.js → threeViewerHost-EYzWF2vO.js} +2 -2
  84. package/dist/{urdfTree-Bg_hGuBV.js → urdfTree-2wTWJ6Bj.js} +1 -1
  85. package/dist/{urdfTree-C5RSefmZ.cjs → urdfTree-Dboa3l9g.cjs} +1 -1
  86. package/dist/{workpieceTreePanel-DxjKBScf.js → workpieceTreePanel-BGGioqup.js} +4 -4
  87. package/dist/{workpieceTreePanel-CGYnW5xz.cjs → workpieceTreePanel-DM1pjPI1.cjs} +1 -1
  88. package/package.json +1 -1
  89. package/dist/index-BnD8y-0W.cjs +0 -1
  90. package/dist/index-C-X7YmVi.js +0 -3722
  91. package/dist/obj/model.mtl +0 -42
  92. package/dist/obj/model.obj +0 -26110
  93. package/public/obj/model.mtl +0 -42
  94. package/public/obj/model.obj +0 -26110
@@ -1,5 +1,5 @@
1
- import { _ as I } from "./index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-BmGjawag.js";
2
- import { a as W, d as X, f as Y, s as Z } from "./index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-BmGjawag.js";
1
+ import { _ as I } from "./index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-BzowNu9E.js";
2
+ import { a as W, d as X, f as Y, s as Z } from "./index.vue_vue_type_style_index_0_scoped_3d3811e8_lang-BzowNu9E.js";
3
3
  import { resolveComponent as r, createElementBlock as l, openBlock as n, Fragment as g, createVNode as s, createCommentVNode as d, withCtx as i, normalizeStyle as E, toDisplayString as c, createElementVNode as p, renderList as _, createTextVNode as M, createBlock as S, resolveDynamicComponent as L } from "vue";
4
4
  import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const $ = ["title"], N = {
@@ -1,17 +1,17 @@
1
- import { a as Pr, u as $r, f as Fr, g as Kr, s as jr } from "./index-C-X7YmVi.js";
1
+ import { a as Pr, u as $r, f as Fr, g as Kr, s as jr } from "./index-CQ52Awk5.js";
2
2
  import { computed as Ua, ref as ue, watch as _a, onUnmounted as Nr, resolveComponent as Ma, createElementBlock as na, openBlock as Ie, createVNode as Oe, createBlock as Ta, createCommentVNode as dt, withCtx as je, createElementVNode as re, Fragment as Ha, renderList as Ya, toDisplayString as ha, nextTick as Kt, createTextVNode as za, defineComponent as gt, resolveDynamicComponent as Nt, onMounted as on, unref as Oa, reactive as Bt, renderSlot as zn, createSlots as Ur, mergeProps as vo, normalizeStyle as tn, withModifiers as jn, defineAsyncComponent as Wr, defineProps as Hr, getCurrentInstance as Vr, inject as xl, shallowRef as qr, toRef as Gr, onBeforeMount as ho, watchEffect as Xr, onBeforeUnmount as go, normalizeClass as _l, getCurrentScope as Yr, onScopeDispose as Jr, provide as Cl, toRefs as Sl, withDirectives as Zr, vShow as Qr } from "vue";
3
3
  import { bz as es, k as li, bA as as, bB as ts, bC as ns, s as Qa, p as Ja, u as Oi, c as K, E as Ga, b as Vi, g as nt, e as yn, bu as oi, bv as Ln, f as qt, bt as zi, h as Bi, bD as is, bE as ls, by as os } from "./index-7MBVUN82.js";
4
- import { d as ct, a as ol, e as yo, E as mo, f as bo, h as rs, b as ko, i as Zn } from "./index-Cun2oG5e.js";
5
- import { a as rl, X as ss, Y as qi, I as us, g as Fa, Z as cs, _ as sl, $ as Gi, a0 as ht, a1 as Un, a2 as Vt, a3 as On, a4 as Fi, a5 as ds, o as fs, T as Ki, a6 as ps, a7 as Dl, a8 as vs, a9 as gi, b as El, W as wo, aa as ui, ab as hs, ac as gs, ad as ys, ae as Ei, af as ms, u as bs, r as ks } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-oA5S09l2.js";
6
- import { s as pt } from "./index--9gCNgdE.js";
7
- import { a as ws, T as xs } from "./threeViewerHost-CSfITlTw.js";
4
+ import { d as ct, a as ol, e as yo, E as mo, f as bo, h as rs, b as ko, i as Zn } from "./index-C0EnW_nv.js";
5
+ import { a as rl, X as ss, Y as qi, I as us, g as Fa, Z as cs, _ as sl, $ as Gi, a0 as ht, a1 as Un, a2 as Vt, a3 as On, a4 as Fi, a5 as ds, o as fs, T as Ki, a6 as ps, a7 as Dl, a8 as vs, a9 as gi, b as El, W as wo, aa as ui, ab as hs, ac as gs, ad as ys, ae as Ei, af as ms, u as bs, r as ks } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6Ct13p6.js";
6
+ import { s as pt } from "./index-CqjjUEYP.js";
7
+ import { a as ws, T as xs } from "./threeViewerHost-EYzWF2vO.js";
8
8
  import { a as Mn, u as Hn, E as jt, ae as _s } from "./index-3oQGURYh.js";
9
9
  import { _ as Za } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  import { i as Tl } from "./isString-D70CzuJZ.js";
11
11
  import { _ as Il } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
12
- import { a as Cs, s as Ss } from "./index-DW06_6Us.js";
12
+ import { a as Cs, s as Ss } from "./index-Bj_A0R0A.js";
13
13
  import xo from "./index-rlStojTL.js";
14
- import { s as Ds } from "./index-DOCcOmco.js";
14
+ import { s as Ds } from "./index-JVlLPF3o.js";
15
15
  import { S as Es } from "./index-BHtNKL1L.js";
16
16
  import { useRouter as Ts } from "vue-router";
17
17
  import { a as Is, e as As, f as Os, g as zs, h as Bs } from "./index-CAPx0_D4.js";
@@ -6727,7 +6727,7 @@ function $f() {
6727
6727
  }(xi)), xi.exports;
6728
6728
  }
6729
6729
  $f();
6730
- const Xi = Wr(() => import("./index-Cun2oG5e.js").then((t) => t.k));
6730
+ const Xi = Wr(() => import("./index-C0EnW_nv.js").then((t) => t.k));
6731
6731
  Xi.install = (t) => {
6732
6732
  t.component("ssMenu", Xi);
6733
6733
  };
@@ -1,5 +1,5 @@
1
1
  import { ref as f, watch as m, resolveComponent as y, createBlock as g, openBlock as h, normalizeStyle as b, withCtx as a, renderSlot as n, createElementVNode as B, toDisplayString as C } from "vue";
2
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-oA5S09l2.js";
2
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6Ct13p6.js";
3
3
  import { _ as v } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const w = { class: "dialog-title" }, S = {
5
5
  __name: "index",
@@ -1,12 +1,12 @@
1
1
  import { ref as V, computed as Z, resolveComponent as K, createElementBlock as w, openBlock as r, Fragment as ee, renderList as ae, createElementVNode as g, toDisplayString as Q, createVNode as C, watch as ue, createBlock as A, resolveDynamicComponent as X, unref as h, withCtx as D, isRef as ze, createTextVNode as te, createCommentVNode as G, normalizeStyle as Xe, withModifiers as ne, normalizeClass as Ge, nextTick as Ke } from "vue";
2
- import { J as ve, g as Ye, D as je, B as Qe, C as He, b as Ze } from "./index-DIv-wtkN.js";
2
+ import { J as ve, g as Ye, D as je, B as Qe, C as He, b as Ze } from "./index-CmOyLg9f.js";
3
3
  import { p as ie, s as le, c as R, E as ea } from "./index-7MBVUN82.js";
4
4
  import { a as me, u as qe, E as aa } from "./index-3oQGURYh.js";
5
- import { s as W, h as We, o as Je, b as ta, c as he, d as na, f as ce, g as la, i as oa, j as Pe, k as sa, l as fe, m as re, n as ca, t as ra, p as ua } from "./array-B8jfTWdr.js";
5
+ import { s as W, h as We, o as Je, b as ta, c as he, d as na, f as ce, g as la, i as oa, j as Pe, k as sa, l as fe, m as re, n as ca, t as ra, p as ua } from "./array-_9dR-jfG.js";
6
6
  import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  import ia from "./index-rlStojTL.js";
8
- import { a as da, b as pa } from "./index-Cun2oG5e.js";
9
- import { s as va } from "./index--9gCNgdE.js";
8
+ import { a as da, b as pa } from "./index-C0EnW_nv.js";
9
+ import { s as va } from "./index-CqjjUEYP.js";
10
10
  const ha = { class: "type-select" }, fa = { class: "group-label" }, ma = { class: "group-items" }, ga = ["onDragstart"], _a = {
11
11
  __name: "index",
12
12
  props: {
@@ -0,0 +1,13 @@
1
+ "use strict";var tn=Object.defineProperty;var un=(O,j,_)=>j in O?tn(O,j,{enumerable:!0,configurable:!0,writable:!0,value:_}):O[j]=_;var xl=(O,j,_)=>un(O,typeof j!="symbol"?j+"":j,_);const e=require("vue"),N=require("./index-DOItJqcJ.cjs"),he=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B_ZyoH-c.cjs"),Nl=require("./index-BHWo4qfG.cjs"),Er=require("./threeViewerHost-BQ2Nydiz.cjs"),Ta=require("./index-CXC0u8pm.cjs"),cn=require("./index.vue_vue_type_style_index_1_lang-CcCJPXIe.cjs"),ma=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Yl=require("./index-dP_btubw.cjs");require("./index-KaxOq1_-.cjs");const Tr=require("./isString-Do5yyRUw.cjs"),Ba=O=>O.match(/\((.*)\)/)[1],Br={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(O){const j=O,_=e.ref(null),A=e.ref(!1),C=e.ref(null);return e.watch(()=>j==null?void 0:j.isVisible,()=>{A.value=j==null?void 0:j.isVisible},{deep:!0,immediate:!0}),e.watch(()=>C.value,()=>{e.nextTick(()=>{var i,Y;(Y=(i=_.value)==null?void 0:i.updatePopper)==null||Y.call(i)})},{deep:!0,immediate:!0}),(i,Y)=>{const ue=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(ue,{visible:A.value,title:j==null?void 0:j.title,placement:j==null?void 0:j.placement,width:j==null?void 0:j.width,ref_key:"popOverRef",ref:_},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(i.$slots,"reference",{ref_key:"referenceRef",ref:C})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(i.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},dn={key:0,class:"extra-button-content"},pn={class:"table-operator-wrap"},fn={key:0,class:"extra-button-filter"},hn={class:"form-content-value"},yn={key:1,class:"extra-header"},vn={class:"drop-menu",style:{width:"120px"}},gn={key:0},bn={key:1},mn={key:1,class:"extra-button-content tabs-button-wrapper"},kn={class:"table-operator-wrap"},Cn={class:"extra-button-filter"},Sn={class:"form-content-value"},xn={key:0,class:"extra-header"},Nn={class:"drop-menu",style:{width:"120px"}},_n={key:0},wn={key:1},An={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(O,{emit:j}){const _=j,A=O,C=e.ref(""),i=e.ref(!1),Y=e.ref([]),ue=e.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),ye=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"},{label:"OCR识别",icon:"ocr"}],Se=ce=>{const Me=ce.raw;if(!Me)return;const Je=new FileReader;Je.onload=de=>{try{const oe=new Uint8Array(de.target.result),re=he.readSync(oe,{type:"array"}),De=re.SheetNames[0],F=re.Sheets[De],Qe=he.utils.decode_range(F["!ref"]).e.c+1,Z=new Array(Qe).fill(""),T=[];for(const ee in F){if(ee[0]==="!")continue;const{r:Ne,c:Re}=he.utils.decode_cell(ee);let yl=F[ee].v;if(F[ee].t==="n"&&yl>0&&yl<1e6&&(yl=new Date((yl-25569)*86400*1e3).toISOString().split("T")[0]),(yl==null||yl==="")&&(yl=""),Ne===0)Z[Re]=yl;else{if(!T[Ne-1]){T[Ne-1]={};for(let Ll=0;Ll<Qe;Ll++)T[Ne-1][`col_${Ll}`]=""}T[Ne-1][`col_${Re}`]=yl}}for(let ee=0;ee<Qe;ee++)Z[ee]===void 0&&(Z[ee]="");const Ge=T==null?void 0:T[0];if(!(Ge!=null&&Ge.hasOwnProperty("col_0")))return N.ElMessage.error("导入的数据列不匹配,请检查是否错位");_("getImportData",Z,T)}catch(oe){throw N.ElMessage.error(oe.message),new Error(oe.message)}},Je.readAsArrayBuffer(Me)},We=ce=>{var Je;const Me=(Je=Y.value)==null?void 0:Je.reduce((de,oe,re)=>(re===0?de[oe.label]=ce:de[oe.label]=oe==null?void 0:oe.value,de),{});_("filter",Me,ce,!0)},Ie=ce=>{_("buttonClick",ce)},Ze=ce=>{var Me,Je;Y.value=(Je=(Me=he.getColumnChild(N.cloneDeep(ce)))==null?void 0:Me.filter(de=>(de==null?void 0:de.label)!==""&&(de==null?void 0:de.label)!=="操作"))==null?void 0:Je.map(de=>({label:(de==null?void 0:de.label)??"",value:"",name:(de==null?void 0:de.label)??"",isFormColHidden:de==null?void 0:de.isTableColHidden,width:2}))},Ye=e.ref(!1),vl=ce=>{var Me;if((ce==null?void 0:ce.buttonName)==="确认"&&(_("filter",ce==null?void 0:ce.content),Ye.value=(ce==null?void 0:ce.content)&&Object.values(ce==null?void 0:ce.content).length>0),(ce==null?void 0:ce.buttonName)==="清空"){const Je=N.cloneDeep(ce==null?void 0:ce.content);for(const de in Je)Je[de]="";Y.value=(Me=Y.value)==null?void 0:Me.map(de=>({...de,value:""})),_("filter",Je),Ye.value=!1}i.value=!1},gl=()=>{var Me,Je;Y.value=(Me=Y.value)==null?void 0:Me.map(de=>({...de,value:""}));const ce=(Je=Y.value)==null?void 0:Je.reduce((de,oe)=>(de[oe.label]=oe.value,de),{});_("filter",ce)};return e.onMounted(()=>{Ze(A.columns)}),e.watch(()=>A.columns,()=>{Ze(A.columns)},{deep:!0,immediate:!0}),(ce,Me)=>{var F,ul,Qe,Z;const Je=e.resolveComponent("el-icon"),de=e.resolveComponent("svg-icon"),oe=e.resolveComponent("el-input"),re=e.resolveComponent("el-button"),De=e.resolveComponent("el-upload");return O.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",dn,[e.createElementVNode("div",{class:e.normalizeClass(O.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(A==null?void 0:A.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((A==null?void 0:A.level)-1)*12+"px",fontWeight:600-((A==null?void 0:A.level)-1)*100>=400?600-((A==null?void 0:A.level)-1)*100:400,fontSize:17-(A==null?void 0:A.level)>=14?17-(A==null?void 0:A.level)+"px":"14px"})},e.toDisplayString(O.compName),7),e.createElementVNode("div",pn,[A!=null&&A.filterShow?(e.openBlock(),e.createElementBlock("div",fn,[e.createVNode(Br,{title:"",width:800,placement:"bottom-start",isVisible:i.value},{reference:e.withCtx(()=>{var T,Ge,ee,Ne;return[e.createVNode(oe,{modelValue:C.value,"onUpdate:modelValue":Me[1]||(Me[1]=Re=>C.value=Re),style:{"min-width":"80px"},placeholder:Ye.value?(ee=(Ge=(T=O.filterValues)==null?void 0:T.filter(Re=>Re))==null?void 0:Ge.slice(0,3))==null?void 0:ee.join("/"):"搜索","prefix-icon":e.unref(N.search_default),clearable:"",onInput:We,disabled:((Ne=Y.value)==null?void 0:Ne.length)===0},{suffix:e.withCtx(()=>{var Re,yl;return[!C.value&&((yl=(Re=O.filterValues)==null?void 0:Re.filter(Ll=>Ll))!=null&&yl.join("/"))?(e.openBlock(),e.createBlock(Je,{key:0,style:{cursor:"pointer"},onClick:gl},{default:e.withCtx(()=>[e.createVNode(e.unref(N.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:Me[0]||(Me[0]=Re=>i.value=!i.value)},[e.createVNode(de,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:e.withCtx(()=>[e.createElementVNode("div",hn,[(e.openBlock(),e.createBlock(Nl.ssForm,{rowContents:Y.value,buttonValue:ue.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ue.value,isStartJustify:!1,onOnButtonClick:vl},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])])):e.createCommentVNode("",!0),O.buttons&&((F=O.buttons)==null?void 0:F.length)>0?(e.openBlock(),e.createElementBlock("div",yn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ul=O.buttons)==null?void 0:ul.filter(T=>O.isDevMode||(T==null?void 0:T.label)!=="修改模板"),(T,Ge)=>(e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:Ge},[(T==null?void 0:T.type)==="upload"?(e.openBlock(),e.createBlock(De,{key:0,class:"upload-button-wrap","on-change":Se,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!O.lockingPage},{default:e.withCtx(()=>[e.createVNode(re,{disabled:!!O.lockingPage,style:e.normalizeStyle({background:(T==null?void 0:T.background)??"var(--ssbutton-theme-bg)",color:(T==null?void 0:T.color)??"var(--ssbutton-theme-color)"})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T==null?void 0:T.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(T==null?void 0:T.type)==="popover"?(e.openBlock(),e.createBlock(Nl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(T==null?void 0:T.type)==="popover"?(e.openBlock(),e.createBlock(re,{key:0,disabled:!!O.lockingPage,style:e.normalizeStyle({background:(T==null?void 0:T.background)??"var(--ssbutton-theme-bg)",color:(T==null?void 0:T.color)??"var(--ssbutton-theme-color)"})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T==null?void 0:T.label),1)]),_:2},1032,["disabled","style"])):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T==null?void 0:T.contents,ee=>(e.openBlock(),e.createBlock(re,{key:ee==null?void 0:ee.label,disabled:!!O.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Ne=>Ie(ee==null?void 0:ee.label)},{default:e.withCtx(()=>{var Ne,Re;return[e.createTextVNode(e.toDisplayString(ee==null?void 0:ee.label),1),(Ne=ee==null?void 0:ee.label)!=null&&Ne.includes("选中")?(e.openBlock(),e.createElementBlock("span",gn,"("+e.toDisplayString(O.selectNums)+")",1)):e.createCommentVNode("",!0),(Re=ee==null?void 0:ee.label)!=null&&Re.includes("全部")?(e.openBlock(),e.createElementBlock("span",bn,"("+e.toDisplayString(O.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),T!=null&&T.type?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re,{key:2,id:"themeButton",disabled:!!O.lockingPage,style:e.normalizeStyle({background:(T==null?void 0:T.background)??"var(--ssbutton-theme-bg)",color:(T==null?void 0:T.color)??"var(--ssbutton-theme-color)"}),onClick:ee=>Ie(T==null?void 0:T.label)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T==null?void 0:T.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",mn,[e.createElementVNode("div",kn,[e.createElementVNode("div",Cn,[e.createVNode(Br,{title:"",width:800,placement:"bottom-start",isVisible:i.value},{reference:e.withCtx(()=>{var T,Ge,ee,Ne;return[e.createVNode(oe,{modelValue:C.value,"onUpdate:modelValue":Me[3]||(Me[3]=Re=>C.value=Re),style:{"min-width":"80px"},placeholder:Ye.value?(ee=(Ge=(T=O.filterValues)==null?void 0:T.filter(Re=>Re))==null?void 0:Ge.slice(0,3))==null?void 0:ee.join("/"):"搜索","prefix-icon":e.unref(N.search_default),clearable:"",onInput:We,disabled:((Ne=Y.value)==null?void 0:Ne.length)===0},{suffix:e.withCtx(()=>{var Re,yl;return[!C.value&&((yl=(Re=O.filterValues)==null?void 0:Re.filter(Ll=>Ll))!=null&&yl.join("/"))?(e.openBlock(),e.createBlock(Je,{key:0,style:{cursor:"pointer"},onClick:gl},{default:e.withCtx(()=>[e.createVNode(e.unref(N.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:Me[2]||(Me[2]=Re=>i.value=!i.value)},[e.createVNode(de,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:e.withCtx(()=>[e.createElementVNode("div",Sn,[(e.openBlock(),e.createBlock(Nl.ssForm,{rowContents:Y.value,buttonValue:ue.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:ue.value,isStartJustify:!1,onOnButtonClick:vl},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Qe=O.buttons)==null?void 0:Qe.length)>0?(e.openBlock(),e.createElementBlock("div",xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Z=O.buttons)==null?void 0:Z.filter(T=>O.isDevMode||(T==null?void 0:T.label)!=="修改模板"),(T,Ge)=>(e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:Ge},[(T==null?void 0:T.type)==="upload"?(e.openBlock(),e.createBlock(De,{key:0,class:"upload-button-wrap","on-change":Se,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>[e.createVNode(re,{style:{background:"transparent",color:"#666666"}},{icon:e.withCtx(()=>{var ee;return[e.createVNode(de,{name:(ee=ye==null?void 0:ye.find(Ne=>(Ne==null?void 0:Ne.label)===(T==null?void 0:T.label)))==null?void 0:ee.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(T==null?void 0:T.label),1)]),_:2},1024)]),_:2},1024)):e.createCommentVNode("",!0),(T==null?void 0:T.type)==="popover"?(e.openBlock(),e.createBlock(Nl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(T==null?void 0:T.type)==="popover"?(e.openBlock(),e.createBlock(re,{key:0,style:{background:"transparent",color:"#666666"}},{icon:e.withCtx(()=>{var ee;return[e.createVNode(de,{name:(ee=ye==null?void 0:ye.find(Ne=>(Ne==null?void 0:Ne.label)===(T==null?void 0:T.label)))==null?void 0:ee.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(T==null?void 0:T.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T==null?void 0:T.contents,ee=>(e.openBlock(),e.createBlock(re,{key:ee==null?void 0:ee.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Ne=>Ie(ee==null?void 0:ee.label)},{default:e.withCtx(()=>{var Ne,Re;return[e.createTextVNode(e.toDisplayString(ee==null?void 0:ee.label),1),(Ne=ee==null?void 0:ee.label)!=null&&Ne.includes("选中")?(e.openBlock(),e.createElementBlock("span",_n,"("+e.toDisplayString(O.selectNums)+")",1)):e.createCommentVNode("",!0),(Re=ee==null?void 0:ee.label)!=null&&Re.includes("全部")?(e.openBlock(),e.createElementBlock("span",wn,"("+e.toDisplayString(O.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),T!=null&&T.type?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re,{key:2,id:"themeButton",style:e.normalizeStyle({background:"transparent",color:(T==null?void 0:T.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:ee=>Ie(T==null?void 0:T.label)},{icon:e.withCtx(()=>{var ee;return[e.createVNode(de,{name:(ee=ye==null?void 0:ye.find(Ne=>(Ne==null?void 0:Ne.label)===(T==null?void 0:T.label)))==null?void 0:ee.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(T==null?void 0:T.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):e.createCommentVNode("",!0)])]))}}},Dn=ma._export_sfc(An,[["__scopeId","data-v-03b0d8fa"]]),En=e.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(O,{emit:j}){const _=O,A=j,C=Y=>{A("buttonClick",Y)},i=Y=>{var ue;return Y!=null&&Y.includes("删除")?((ue=_.selectTableItems)==null?void 0:ue.length)>0?"warning-active-type":"warning-type":"default-type"};return(Y,ue)=>{const ye=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.buttons,Se=>(e.openBlock(),e.createBlock(ye,{key:Se==null?void 0:Se.label,disabled:!!O.lockingPage,class:e.normalizeClass(i(Se==null?void 0:Se.label)),onClick:We=>C(Se==null?void 0:Se.label)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Se==null?void 0:Se.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Tn=ma._export_sfc(En,[["__scopeId","data-v-70b12973"]]),Ur=N.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(O){this.selectArray=O},setSelectString(O){this.selectString=O}}}),Bn={class:"calculator-content"},On={class:"calculator-child"},Un={class:"calculator-child"},Ln=e.defineComponent({__name:"calculator",setup(O){const j=e.ref(),_=e.ref();return e.onMounted(()=>{j.value=[{type:"Upload",label:"输入",name:"input"}],_.value=[{type:"Upload",label:"输出",name:"output"}]}),(A,C)=>(e.openBlock(),e.createElementBlock("div",Bn,[e.createElementVNode("div",On,[e.createVNode(Nl.ssForm,{rowContents:j.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",Un,[e.createVNode(Nl.ssForm,{rowContents:_.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),jn=ma._export_sfc(Ln,[["__scopeId","data-v-73db0fe7"]]),Ia=(O,j)=>{let _=O,A=j;return Array.isArray(_)&&(_=_==null?void 0:_.map((C,i)=>{if(Array.isArray(C)){let Y={};return C=C==null?void 0:C.forEach((ue,ye)=>{var Se;(Se=A==null?void 0:A[ye])!=null&&Se.prop?Y[A[ye].prop]=ue:Array.isArray(ue)&&(Y.children=Ia(ue,A))}),Object.assign(Y,{id:i})}else return C})),_},Lr=(O,j,_)=>{let A=O,C=j;return A=A==null?void 0:A.map((i,Y)=>{var ue,ye;return!Array.isArray(i)||!((ue=C==null?void 0:C[Y])!=null&&ue.label)&&!_||(i.unshift(((ye=C==null?void 0:C[Y])==null?void 0:ye.label)??""),i.some(Se=>Array.isArray(Se))&&(i=i==null?void 0:i.map(Se=>{var We;return Array.isArray(Se)&&(Se=Lr(Se,(We=C==null?void 0:C[Y])==null?void 0:We.children,_)),Se}))),i}),A},$n=(O,j,_)=>{if(j==="")return O==null?void 0:O.filter(A=>(A==null?void 0:A.id)!==_);{const A=j.split("-");return Pn(O,A,_)}},Pn=(O,j,_)=>{let A=O,C=j;return(C==null?void 0:C.length)===0?A=A==null?void 0:A.filter(i=>i.id!==_):A=A==null?void 0:A.map(i=>(i.id.toString()===(C==null?void 0:C[0])&&(C==null||C.shift(),i=jr(i,C,_)),i)),A},jr=(O,j,_)=>{var i,Y;let A=O,C=j;return(C==null?void 0:C.length)===0?A.children=(i=A.children)==null?void 0:i.filter(ue=>ue.id!==_):A.children=(Y=A.children)==null?void 0:Y.map(ue=>(ue.id.toString()===(C==null?void 0:C[0])&&(C==null||C.shift(),ue=jr(ue,C,_)),ue)),A},Mn=(O,j,_)=>{if(j==="")return _;{const A=j.split("-");return Rn(O,A,_)}},Rn=(O,j,_)=>{let A=O,C=j;return(C==null?void 0:C.length)===0?A=_:A=A==null?void 0:A.map(i=>(i.id.toString()===(C==null?void 0:C[0])&&(C==null||C.shift(),i=$r(i,C,_)),i)),A},$r=(O,j,_)=>{var i;let A=O,C=j;return(C==null?void 0:C.length)===0?A.children=_:A.children=(i=A.children)==null?void 0:i.map(Y=>(Y.id.toString()===(C==null?void 0:C[0])&&(C==null||C.shift(),Y=$r(Y,C,_)),Y)),A};class Fn{constructor(j={}){xl(this,"url");xl(this,"heartbeatInterval");xl(this,"socket",null);xl(this,"isConnected",!1);xl(this,"heartTimer",null);xl(this,"canvas",null);xl(this,"ctx",null);xl(this,"mainCamCutMode",0);xl(this,"pMainShowStartX",0);xl(this,"pMainShowStartY",0);xl(this,"onLog");xl(this,"onDevCount");xl(this,"onCameraStatus");xl(this,"onPhoto");this.url=j.url??"ws://127.0.0.1:22225",this.heartbeatInterval=j.heartbeatInterval??3e3}init(j,_,A){var Y;(Y=this.canvas)!=null&&Y.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const C=document.createElement("canvas");C.style.border="solid 1px #A0A0A0",C.id="MainCamCanvas",C.width=_,C.height=A;const i=C.getContext("2d");if(!i)throw new Error("无法获取 CanvasRenderingContext2D");j.appendChild(C),this.canvas=C,this.ctx=i}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((j,_)=>{const A=new WebSocket(this.url);A.binaryType="arraybuffer",A.onopen=()=>{this.socket=A,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),j()},A.onerror=C=>{this.isConnected=!1,this.log("socket.onerror"),_(C)},A.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},A.onmessage=C=>{this.handleMessage(C)}})}destroy(){var j;this.stopHeartbeat();try{this.closeCamera()}catch{}if(this.socket){try{this.socket.onmessage=null}catch{}try{this.socket.onopen=null}catch{}try{this.socket.onerror=null}catch{}try{this.socket.onclose=null}catch{}try{this.socket.close()}catch{}this.socket=null}this.isConnected=!1,(j=this.canvas)!=null&&j.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}openCamera(j=0,_=1280,A=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const C=new Uint8Array(12);C[0]=119,C[1]=136,C[2]=1,C[3]=j,C[4]=this.canvas.width>>8&255,C[5]=this.canvas.width&255,C[6]=this.canvas.height>>8&255,C[7]=this.canvas.height&255,C[8]=_>>8&255,C[9]=_&255,C[10]=A>>8&255,C[11]=A&255,this.sendBytes(C)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const C=new Uint8Array(12);C[0]=119,C[1]=136,C[2]=16,C[3]=0,C[4]=0,C[5]=0,C[6]=0,C[7]=0,C[8]=1,C[9]=0,C[10]=0,C[11]=0,this.sendBytes(C)}bestSize(){this.sendBytes(new Uint8Array([119,136,5,0]))}rotateLeft(){this.sendBytes(new Uint8Array([119,136,7,0]))}rotateRight(){this.sendBytes(new Uint8Array([119,136,8,0]))}focus(){this.sendBytes(new Uint8Array([119,136,48,0]))}log(j){var _;(_=this.onLog)==null||_.call(this,j)}sendBytes(j){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(j.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(j){var C,i,Y,ue,ye;const _=new Uint8Array(j.data);if(_.length<=0)return;if(_[0]===17&&_[1]===17&&_[2]===17){this.log("heart socket!!!!");return}if(_[0]!==85||_[1]!==102)return;const A=_[2];if(A===80){const Se=_[3],We=_.length-4,Ie=new Uint8Array(We);for(let vl=0;vl<We;vl++)Ie[vl]=_[4+vl];const Ye=decodeURIComponent(this.byteToString(Ie)).split("|");(C=this.onDevCount)==null||C.call(this,Se,Ye);return}if(A===1){_[3]===1&&((i=this.onCameraStatus)==null||i.call(this,"opened")),_[3]===3&&((Y=this.onCameraStatus)==null||Y.call(this,"closed"));return}if(A===16){if(_[3]===1){const We=_[4]*256+_[5],Ie=_[6]*65536+_[7]*256+_[8];let Ze="";if(We>0){const gl=new Uint8Array(We);for(let ce=0;ce<We;ce++)gl[ce]=_[9+ce];Ze=decodeURIComponent(this.byteToString(gl))}const Ye=new Uint8Array(Ie);for(let gl=0;gl<Ie;gl++)Ye[gl]=_[9+We+gl];const vl=this.uint8ArrayToString(Ye);(ue=this.onPhoto)==null||ue.call(this,{flag:0,imgPath:Ze,base64:vl})}_[3]===2&&((ye=this.onPhoto)==null||ye.call(this,{flag:2,imgPath:"",base64:""}));return}if(A===204){if(!this.canvas||!this.ctx)return;const Se=_[3]*256+_[4],We=_[5]*256+_[6];this.pMainShowStartX=_[7]*256+_[8],this.pMainShowStartY=_[9]*256+_[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const Ie=this.ctx.createImageData(Se,We);let Ze=11;for(let Ye=0;Ye<Ie.data.length;Ye+=4)Ie.data[Ye+0]=_[Ze],Ie.data[Ye+1]=_[Ze+1],Ie.data[Ye+2]=_[Ze+2],Ie.data[Ye+3]=255,Ze+=3;this.ctx.putImageData(Ie,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(j){let _="";for(let A=0;A<j.length;A++)_+=String.fromCharCode(j[A]);return _}byteToString(j){let _="";for(let A=0;A<j.length;A++)_+=String.fromCharCode(j[A]);return _}}const Vn={style:{display:"flex",gap:"16px",height:"100%"}},Kn={key:0,style:{color:"var(--el-text-color-secondary)"}},zn={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},qn={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},Wn={ref:"pictureBox",style:{height:"220px",border:"1px dashed var(--el-border-color)","border-radius":"4px",display:"flex","align-items":"center","justify-content":"center",background:"var(--el-fill-color-lighter)",position:"relative",overflow:"hidden"}},Jn={key:0,style:{color:"var(--el-text-color-secondary)"}},Gn=["src"],Hn={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},In={class:"dialog-footer"},Xn=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(O,{emit:j}){const _=O,A=j,C=e.ref(null),i=e.ref(!1),Y=e.ref(""),ue=e.ref(""),ye=new Fn({url:"ws://127.0.0.1:22225"});function Se(oe,re){var T;const De=oe.split(","),F=((T=De[0].match(/:(.*?);/))==null?void 0:T[1])??"image/jpeg",ul=atob(De[1]);let Qe=ul.length;const Z=new Uint8Array(Qe);for(;Qe--;)Z[Qe]=ul.charCodeAt(Qe);return new File([Z],re,{type:F})}function We(){ye.onLog=oe=>{console.log("[GPY]",oe)},ye.onDevCount=(oe,re)=>{if(ue.value+=`设备数量=${oe},设备=${re.join(",")}
2
+ `,oe>0){ue.value+=`检测到设备,正在打开摄像头...
3
+ `;try{ye.openCamera(0,1280,720)}catch(De){ue.value+=`打开摄像头失败:${(De==null?void 0:De.message)??De}
4
+ `}}else ue.value+=`未检测到高拍仪设备!
5
+ `},ye.onCameraStatus=oe=>{oe==="opened"?(i.value=!0,ue.value+=`摄像头已打开
6
+ `):(i.value=!1,ue.value+=`摄像头已关闭
7
+ `)},ye.onPhoto=oe=>{oe.flag===0&&oe.base64?(Y.value=`data:image/jpeg;base64,${oe.base64}`,ue.value+=`拍照完成,已接收图片
8
+ `):ue.value+=`拍照失败 flag=${oe.flag}
9
+ `}}const Ie=async()=>{if(await e.nextTick(),!C.value)return;Ze(),We();const oe=C.value.getBoundingClientRect();ye.init(C.value,Math.floor(oe.width),Math.floor(oe.height)),ue.value+=`正在连接设备服务...
10
+ `,await ye.connect(),ue.value+=`正在获取设备数量...
11
+ `,ye.getDevCount()},Ze=()=>{try{ye.destroy()}catch(oe){console.error(oe)}i.value=!1,Y.value="",ue.value=""};e.watch(()=>_.visible,oe=>{oe?Ie():Ze()});const Ye=()=>{try{ye.bestSize()}catch(oe){console.error(oe)}},vl=()=>{try{ye.rotateLeft()}catch(oe){console.error(oe)}},gl=()=>{try{ye.rotateRight()}catch(oe){console.error(oe)}},ce=()=>{try{ye.focus()}catch(oe){console.error(oe)}},Me=()=>{ue.value+=`正在拍照...
12
+ `;try{ye.photo()}catch(oe){ue.value+=`拍照调用失败:${(oe==null?void 0:oe.message)??oe}
13
+ `}},Je=()=>{if(Y.value){const oe=Se(Y.value,"gpy-capture.jpg");A("confirm",oe)}else A("confirm",null)},de=()=>{Ze(),A("cancel")};return(oe,re)=>{const De=e.resolveComponent("el-input"),F=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(Yl.ssDialog,{title:"扫描录入",visible:_.visible,onBeforeDestroy:de,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Vn,[e.createElementVNode("div",{ref_key:"cameraBox",ref:C,style:{flex:"1","min-width":"0",border:"1px solid var(--el-border-color)","border-radius":"4px",position:"relative",overflow:"hidden",display:"flex","align-items":"center","justify-content":"center",background:"var(--el-fill-color-lighter)"}},[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Kn,"初始化摄像头..."))],512),e.createElementVNode("div",zn,[e.createElementVNode("div",qn,[re[0]||(re[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",Wn,[Y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Jn,"暂无图片")),Y.value?(e.openBlock(),e.createElementBlock("img",{key:1,src:Y.value,style:{"max-width":"100%","max-height":"100%","object-fit":"contain"},alt:"captured image"},null,8,Gn)):e.createCommentVNode("",!0)],512)]),e.createElementVNode("div",Hn,[re[1]||(re[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(De,{type:"textarea",value:ue.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",In,[e.createVNode(F,{onClick:Ye,disabled:!i.value,id:"themeBorderButton"},{default:e.withCtx(()=>re[2]||(re[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(F,{onClick:vl,disabled:!i.value,id:"themeBorderButton"},{default:e.withCtx(()=>re[3]||(re[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(F,{onClick:gl,disabled:!i.value,id:"themeBorderButton"},{default:e.withCtx(()=>re[4]||(re[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(F,{onClick:ce,disabled:!i.value,id:"themeBorderButton"},{default:e.withCtx(()=>re[5]||(re[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(F,{onClick:Me,disabled:!i.value,id:"themeButton"},{default:e.withCtx(()=>re[6]||(re[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),re[9]||(re[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(F,{onClick:Je,disabled:!Y.value,id:"themeButton"},{default:e.withCtx(()=>re[7]||(re[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(F,{onClick:de,id:"themeBorderButton"},{default:e.withCtx(()=>re[8]||(re[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"])}}}),Yn=ma._export_sfc(Xn,[["__scopeId","data-v-cfe79109"]]),Pr=N.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(O){this.objUrl=O},setBlobUrls(O){this.blobUrls=O}}}),Oa=async(O,j)=>{var Y,ue,ye,Se,We,Ie,Ze,Ye,vl,gl,ce,Me,Je,de,oe,re,De;let _=(ue=(Y=N.cloneDeep(O))==null?void 0:Y.optionUrl)==null?void 0:ue.menuSelect,A=[];_==null||_.forEach(F=>{});let C="",i=await he.menuToParent(_);if(i==null||i.forEach(F=>{var ul,Qe,Z,T;(F==null?void 0:F.name)===(((T=(Z=(Qe=(ul=N.cloneDeep(O))==null?void 0:ul.optionUrl)==null?void 0:Qe.groupSelect)==null?void 0:Z[0])==null?void 0:T.replaceAll("'",""))??"")&&(C=F==null?void 0:F.id)}),j){C=j;const F=await N.getInsofDataApi({id:C}),ul=(Ie=(We=(Se=(ye=F==null?void 0:F.data)==null?void 0:ye.result)==null?void 0:Se[0])==null?void 0:We.key)==null?void 0:Ie.pageKey;i=await he.getItemData(ul,sessionStorage.getItem("systemKey"),"")}if(C!==""){let F;j?F=(Ze=i==null?void 0:i.find(Z=>(Z==null?void 0:Z.id)===j))==null?void 0:Ze.compData:F=(Ye=i==null?void 0:i.find(Z=>{var T,Ge,ee,Ne;return(Z==null?void 0:Z.name)===(((Ge=(T=O==null?void 0:O.groupSelect)==null?void 0:T.split(":"))==null?void 0:Ge[0])||((Ne=(ee=O==null?void 0:O.optionUrl)==null?void 0:ee.groupSelect)==null?void 0:Ne[0]))}))==null?void 0:Ye.compData;let ul=(gl=(vl=F==null?void 0:F.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:vl.contents)==null?void 0:gl.map(Z=>Z==null?void 0:Z.label);(Me=(ce=F==null?void 0:F.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:ce.contents)!=null&&Me.every(Z=>Array.isArray(Z))&&(ul=(oe=he.getColumnChild((de=(Je=F==null?void 0:F.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:Je.contents)==null?void 0:de[0]))==null?void 0:oe.map(Z=>Z==null?void 0:Z.prop));let Qe=(De=(re=F==null?void 0:F.find(Z=>(Z==null?void 0:Z.key)==="tableContents"))==null?void 0:re.contents)==null?void 0:De.map(Z=>{if(Array.isArray(Z))Z=Z==null?void 0:Z.filter(T=>!(T!=null&&T.id));else{let T={};for(let Ge in Z)Ge!=="id"&&(T[Ge]=Z==null?void 0:Z[Ge]);Z=T}return Z});Qe==null||Qe.forEach(Z=>{Array.isArray(Z)?A.push(he.getValueToObjectValue(Z,ul)):A.push(Z)})}return A},Qn="col-operate",Xa=O=>`${Qn}-${O}`,Zn=(O,j)=>{const _=new Map;return O.forEach(A=>{const{prop:C}=A;_.set(C,A)}),j.forEach(A=>{const{prop:C}=A,i=_.get(C);return ei(i,A)}),j},ei=(O,j)=>(O&&(j.sortable=O==null?void 0:O.sortable,j.filterable=O==null?void 0:O.filterable,j.showSummary=O==null?void 0:O.showSummary,j.operable=O==null?void 0:O.operable,j.fixed=O==null?void 0:O.fixed),j),li=(O,j)=>{const{sortable:_=!1,filterable:A=!1,showSummary:C=!1,operable:i=!1,fixed:Y=!1}=j||{};return{prop:O,sortable:_,filterable:A,showSummary:C,operable:i,fixed:Y}},ai=async O=>{var i,Y;if(!O)return;const j=Xa(O),_=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:j}}),A=(i=_==null?void 0:_.data)==null?void 0:i.code,C=(Y=_==null?void 0:_.data)==null?void 0:Y.result;if(A==200)return C==null?void 0:C[0]},ri=async O=>{var i,Y,ue,ye;if(!O)return;const j=Xa(O),_=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:j}}),A=(i=_==null?void 0:_.data)==null?void 0:i.code,C=(Y=_==null?void 0:_.data)==null?void 0:Y.result;return A==200?(ye=(ue=C==null?void 0:C[0])==null?void 0:ue.value)==null?void 0:ye.columns:[]},oi=async(O,j)=>{if(!O||!j)return;const _=Xa(O);return await N.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:_},value:{columns:j}})},ni=async(O,j)=>!O||!j?void 0:await N.updateInsofDataApi({id:O,value:{columns:j}}),Or=async(O,j)=>{const _=sessionStorage.getItem("systemKey");if(!O||!j||!_)return;const A=await ai(O);return A?await ni(A==null?void 0:A.id,j):await oi(O,j)},ii={class:"table-content"},si={class:"menu-config-wrap"},ti=["onClick"],ui={key:0,class:"viewport-wrap"},ci=["onClick"],di={title:"选择显示列信息"},pi={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},fi=["title"],hi={class:"col-operate-wrap"},yi={key:0,class:"col-operate-radio-wrapper"},vi={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},gi={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},bi={class:"pop-view"},mi={class:"pop-wrapper"},ki={class:"file-list-pop"},Ci=["title","onClick"],Si=["onClick"],xi=["onClick"],Ni={class:"form-content"},_i={key:0,class:"dialog-footer"},wi={class:"dialog-footer"},Ai={"element-loading-text":"正在识别中 请稍后"},Di={style:{display:"flex","justify-content":"space-between",width:"100%","align-items":"center"}},Ei=["title"],Ti={class:"icon",style:{display:"flex",gap:"8px"}},Bi={class:"dialog-footer"},Oi={class:"ocr-preview-content"},Ui={class:"ocr-preview-tip"},Li={class:"ocr-preview-table"},ji={style:{display:"flex","align-items":"center",gap:"8px"}},$i={class:"dialog-footer"},Pi={class:"form-content"},Mi={__name:"index",props:{pageLayout:{type:String,default:"vertical"},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!1},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(O,{emit:j}){var Sr;const _=e.ref([]),A=Pr(N.pinia),C=e.ref(null),i=O,Y=e.ref(i==null?void 0:i.allowSelect),ue=e.ref((Sr=i==null?void 0:i.config)==null?void 0:Sr.showIndex),ye=e.ref(),Se=e.ref(!0),We=e.ref(!1),Ie={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},Ze=e.ref([{label:"排序",value:"sortable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{type:"radio",label:"固定",value:"fixed",checked:"",options:[{label:"无",value:!1},{label:"左",value:"left"},{label:"右",value:"right"}]}]),Ye=he.useOriginalState(N.pinia);let vl="$R";const{originalPath:gl}=N.storeToRefs(Ye),ce=gl.value,Me=e.computed(()=>{var a;return(a=F.value)==null?void 0:a.every(r=>r==null?void 0:r.sortable)});e.computed(()=>{var a;return(a=F.value)==null?void 0:a.every(r=>r==null?void 0:r.filterable)}),e.computed(()=>{var a;return(a=F.value)==null?void 0:a.every(r=>r==null?void 0:r.operable)});const Je=e.ref(!0),de=e.ref([]),oe=e.reactive({column:{},status:!1,text:"合计"}),re=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),De=j,F=e.ref([]),ul=e.ref([]),Qe=e.ref([]),Z=e.reactive({prop:"",order:null}),T=e.ref([]),Ge=e.ref(!1),ee=e.ref(!1),Ne=e.ref(null),{isUseBackdrop:Re,initTrackFileType:yl,getFileExtension:Ll,setData:Ua,getFileInfo:Ya,getFilesInfo:Mr}=Er.useThreeSystem(),La=e.ref([]),Ql=e.ref(!1),la=e.ref(),cl=Ta.useMenuState(),{importLoading:Fi,activeMenuPath:Ve,contentLoading:Vi,linkMenuInfo:Rr}=N.storeToRefs(cl),Fr=he.useTableComp(N.pinia),el=Ta.useModelComp(N.pinia),{extraContents:ze,cacheUpdatingData:sa,tableViewContents:ta,tableLoading:Ki,pageMapState:aa,lockingPage:ka}=N.storeToRefs(el),le=e.ref([]),Fl=e.ref([]),Dl=e.ref(new Map);e.ref(!1);const Vl=e.ref("");e.ref();const Ca=e.ref(!0),ra=e.ref(0),Qa=e.ref(!0),_l=e.ref(""),Kl=e.ref(!1),Vr=e.ref({label:"查看三维模型"}),Sa=e.ref(!1),ja=e.ref(),Ol=e.ref([]),Hl=e.ref([]),xa=e.ref(!1),ua=e.ref([]),El=e.ref([]),Tl=e.ref([]),xe=e.ref([]),Na=e.ref(!1),Il=e.ref(!1),zl=e.ref([]),Kr=e.ref(null),_a=e.ref(!1),wa=e.ref([]),Za=e.ref(""),$a=e.ref(""),Pa=e.ref(!1),oa=e.ref([]),Ma=e.ref([]),Ra=e.ref([]),Fa=e.ref(null),ql=e.ref([]),ca=cn.createOCRService(),zr=e.computed(()=>ca.getConfig()),jl=e.ref(),kl=e.ref(),qr=Ur(N.pinia),da=e.ref(),Va=e.ref(0),Wr=he.useUnit(N.pinia),{selectIndex:Jr,selectMenu:pa,selectTitle:zi}=N.storeToRefs(Wr),{selectString:Zl}=N.storeToRefs(qr),Gr=N.useLoginState(N.pinia),{loginUserInfo:na}=N.storeToRefs(Gr),Hr=e.ref(720),$l=e.ref(!1),Aa=e.ref(!1),Pl=e.ref([]),Ml=e.ref(),fa=e.ref(!0),er=e.ref(!0),ea=e.ref([]),Ir=e.inject("contentRef");e.provide("contentRef",Ir),e.watch(()=>{var l;return(l=le.value)==null?void 0:l.length},l=>{re.total=l}),e.watch(()=>ta.value,async()=>{var u,c,s,f,m,D,g,E,M,V,K,S,z,W,$,x,L,t;if(((u=ta.value)==null?void 0:u.length)===0||!((c=i==null?void 0:i.itemData)!=null&&c.find(v=>(v==null?void 0:v.key)==="columnPath"))||!((s=i==null?void 0:i.itemData)!=null&&s.find(v=>(v==null?void 0:v.key)==="pageColumn")))return;let l=(M=(E=(g=(D=(m=(f=i==null?void 0:i.itemData)==null?void 0:f.find(v=>(v==null?void 0:v.key)==="pageColumn"))==null?void 0:m.contents)==null?void 0:D.split("["))==null?void 0:g[1])==null?void 0:E.split("]"))==null?void 0:M[0],a=((z=(S=(K=(V=i==null?void 0:i.itemData)==null?void 0:V.find(v=>(v==null?void 0:v.key)==="pageColumn"))==null?void 0:K.contents)==null?void 0:S.split("["))==null?void 0:z[0])+(($=(W=ta.value)==null?void 0:W.find(v=>(v==null?void 0:v.key)===l))==null?void 0:$.value),r=((L=(x=i==null?void 0:i.itemData)==null?void 0:x.find(v=>(v==null?void 0:v.key)==="pageGroup"))==null?void 0:L.contents)??"",o=await he.getItemData(a,sessionStorage.getItem("systemKey"),""),n=(t=o==null?void 0:o.find(v=>(v==null?void 0:v.name)===(r===""?i==null?void 0:i.compName:r)))==null?void 0:t.compData;kr(n,i.allMapContents)},{deep:!0});const Xr=async(l,a)=>{var r,o,n,u,c;try{const s=await N.getInsofDataApi({id:(i==null?void 0:i.parentTableId)||(i==null?void 0:i.index)});let f;((r=s==null?void 0:s.data)==null?void 0:r.code)===200&&(f=((n=(o=s==null?void 0:s.data)==null?void 0:o.result)==null?void 0:n[0])||null);const m={type:"data",pageKey:i!=null&&i.parentTableId?(u=f==null?void 0:f.key)==null?void 0:u.pageKey:Ve.value,tableId:(i==null?void 0:i.parentTableId)||(i==null?void 0:i.index),systemKey:sessionStorage.getItem("systemKey")},D=a==null?void 0:a.map(M=>{const V=Object.keys(M),K={};return V.forEach((S,z)=>{K[l[z]]=M[S]}),K}),g=D==null?void 0:D.map(M=>({key:m,value:{tableData:M}})),E=await N.batchAddInsofDataApi({dataList:g});((c=E==null?void 0:E.data)==null?void 0:c.code)===200?(el.setRefreshCurStructure(!0),N.ElMessage.success("导入数据成功")):N.ElMessage.error("导入数据响应失败")}catch(s){throw N.ElMessage.error("导入数据处理失败"),new Error(s)}},Yr=async l=>{var u,c,s,f,m,D,g;let a=Qe.value;a!=null&&a.find(E=>(l==null?void 0:l.key)===(E==null?void 0:E.key))&&(a=a==null?void 0:a.filter(E=>(l==null?void 0:l.key)!==(E==null?void 0:E.key))),a.push({key:l==null?void 0:l.key,value:[(c=l==null?void 0:l.value)==null?void 0:c[((u=l==null?void 0:l.value)==null?void 0:u.length)-1]]});let r=xe.value;r=r==null?void 0:r.map(E=>{var M,V;return(E==null?void 0:E.type)==="Select"&&(l==null?void 0:l.key)===(E==null?void 0:E.prop)&&Array.isArray(E.value)&&(M=E.value)!=null&&M.every(K=>typeof K=="string")&&(E.selectValue=(V=a==null?void 0:a.find(K=>(K==null?void 0:K.key)===(E==null?void 0:E.prop)))==null?void 0:V.value),E});let o=(f=(s=r==null?void 0:r.find(E=>(E==null?void 0:E.prop)===(l==null?void 0:l.key)))==null?void 0:s.optionUrl)==null?void 0:f.menuId,n=r==null?void 0:r.find(E=>(E==null?void 0:E.prop)===(l==null?void 0:l.key));if(o){let E=await Oa(n==null?void 0:n.optionUrl,o),M,V=de.value,K=(g=(D=(m=xe.value)==null?void 0:m.find(S=>{var z;return(z=n==null?void 0:n.optionUrl)==null?void 0:z.menuId}))==null?void 0:D.selectValue)==null?void 0:g[0];if(E==null||E.forEach(S=>{var z,W,$,x,L,t,v,y,G,P;if(o){let H=(W=(z=xe.value)==null?void 0:z.find(U=>{var pe,J;return((pe=n==null?void 0:n.optionUrl)==null?void 0:pe.menuId)===((J=U==null?void 0:U.optionUrl)==null?void 0:J.menuId)}))==null?void 0:W.prop,d=(x=($=r==null?void 0:r.find(U=>(U==null?void 0:U.prop)===H))==null?void 0:$.selectValue)==null?void 0:x[0];H!=null&&H.includes("·")&&(H=(L=H==null?void 0:H.split("·"))==null?void 0:L[0],d=(G=(y=(v=l==null?void 0:l.value)==null?void 0:v[((t=l==null?void 0:l.value)==null?void 0:t.length)-1])==null?void 0:y.split(" "))==null?void 0:G[0]),V!=null&&V.find(U=>(U==null?void 0:U.value)===K)?M=(P=V==null?void 0:V.find(U=>(U==null?void 0:U.value)===K))==null?void 0:P.objectValue:S[H]===d&&(M=S)}}),M){let S=r;S=S==null?void 0:S.map(z=>{var W,$,x,L,t,v;return o&&(M!=null&&M[z==null?void 0:z.prop])&&_l.value==="新增"&&(z==null?void 0:z.prop)!==(n==null?void 0:n.prop)?z.value=(M==null?void 0:M[z==null?void 0:z.prop])||(M==null?void 0:M[(L=(x=($=(W=z==null?void 0:z.optionUrl)==null?void 0:W.groupSelect)==null?void 0:$[1])==null?void 0:x.replaceAll("[",""))==null?void 0:L.replaceAll("]","")]):z.value=(v=(t=xe.value)==null?void 0:t.find(y=>(y==null?void 0:y.prop)===(z==null?void 0:z.prop)))==null?void 0:v.value,z}),xe.value=S}}Qe.value=a},Qr=async l=>{var a,r,o,n,u;if((a=l==null?void 0:l.toString())!=null&&a.includes(".txt")||(r=l==null?void 0:l.toString())!=null&&r.includes(".cpt")||(o=l==null?void 0:l.toString())!=null&&o.includes(".cyd")){const c=await N.axios.get(l,{responseType:"blob",headers:{"Content-Type":"application/json"}}),s=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});let f=URL.createObjectURL(s);la.value=[{name:(u=l==null?void 0:l.split("/"))==null?void 0:u[((n=l==null?void 0:l.split("/"))==null?void 0:n.length)-1],blobUrl:f}],Ql.value=!0}};e.onBeforeUnmount(()=>{er.value=!1;let l=Va.value;Va.value=l+1});const lr=e.computed(()=>{var o,n;const l=(re.currentPage-1)*re.pageSize,a=l+re.pageSize,r=(o=F.value)==null?void 0:o.find(u=>{var c;return(u==null?void 0:u.sortable)&&((c=u==null?void 0:u.label)==null?void 0:c.includes("时间"))});return r&&(Z.order="descending",Z.prop=r==null?void 0:r.prop),De("getSliceContLength",re),(n=le.value)==null?void 0:n.slice(l,a)}),Zr=l=>{re.currentPage=l,De("getSliceContLength",re)},eo=l=>{var a;re.pageSize=l,l*re.currentPage>((a=le.value)==null?void 0:a.length)&&(re.currentPage=1,re.pageSize=10,N.ElMessage.warning("分页无效,返回第一页")),De("getSliceContLength",re)},lo=(l,a)=>{var c,s;const r=(s=(c=F.value)==null?void 0:c.map(f=>f==null?void 0:f.prop))==null?void 0:s.filter(f=>f!=="operate");let o;const n=(l==null?void 0:l.length)===(r==null?void 0:r.length);if(l!=null&&l.includes("序号"))return N.ElMessage.error("导入的数据不需要包含序号列");if(o=n?l:l.slice(0,r==null?void 0:r.length),!(o==null?void 0:o.every(f=>r==null?void 0:r.find(m=>f===m))))return N.ElMessage.error("导入的数据表头不匹配");Xr(o,a)},ao=(l,a)=>{var r;el.setRefreshCurStructure(!1),((r=F.value)==null?void 0:r.length)===0||lo(l,a)},ro=(l,a,r,o)=>{const n=[],u=[],c=m=>Object.keys(m).length;for(const m in l)if(l[m]!==void 0){const D=l[m],g=[];for(const[E,M]of Object.entries(D))g.push(M),u.length<c(D)&&u.push(E);n.push(g)}n.unshift(u);const s=he.utils.aoa_to_sheet(n),f=he.utils.book_new();he.utils.book_append_sheet(f,s,o),he.writeFileSync(f,`${a}.xlsx`),Pl.value=[]},ar=async(l,a,r,o=!1,n)=>{var u,c,s,f,m,D,g,E;try{el.setRefreshCurStructure(!1);const M=await N.getInsofDataApi({id:i==null?void 0:i.index});if(((u=M==null?void 0:M.data)==null?void 0:u.code)===200){let V=(m=(f=(s=(c=M==null?void 0:M.data)==null?void 0:c.result)==null?void 0:s[0])==null?void 0:f.value)==null?void 0:m.pageData;o?V={...V,compData:(g=V==null?void 0:V.compData)==null?void 0:g.map(S=>{var z;return(S==null?void 0:S.key)==="header"?{...S,contents:(z=S==null?void 0:S.contents)==null?void 0:z.map(W=>({...W,[l]:r}))}:S})}:V={...V,compData:(D=V==null?void 0:V.compData)==null?void 0:D.map(S=>{var z,W;return(S==null?void 0:S.key)==="header"?{...S,contents:(z=S==null?void 0:S.contents)==null?void 0:z.map($=>{if(Array.isArray($))$=$==null?void 0:$.map(x=>(x==null?void 0:x.prop)===(a==null?void 0:a.prop)?{...x,[l]:r}:x);else if(($==null?void 0:$.prop)===(a==null?void 0:a.prop))return{...$,[l]:r};return $})}:(S==null?void 0:S.key)==="tableToForm"&&n?{...S,contents:(W=S==null?void 0:S.contents)==null?void 0:W.map($=>($==null?void 0:$.prop)===(a==null?void 0:a.prop)?{...$,[n]:r}:$)}:S})};const K=await N.updateInsofDataApi({id:i==null?void 0:i.index,value:{pageData:V}});((E=K==null?void 0:K.data)==null?void 0:E.code)===200?(N.ElMessage.success("编辑成功"),el.setRefreshCurStructure(!0)):N.ElMessage.error("编辑响应失败")}}catch(M){N.ElMessage.error(M)}},oo=async(l,a)=>{await ar("label",a,l)},no=async(l,a)=>{await ar("columnType",a,l,!1,"type")},io=()=>{sa.value?$l.value=!1:Cr()},so=l=>{Pl.value=l},to=(l,a)=>{Ml.value===a?fa.value=!1:fa.value=!0,Ml.value=a==null?void 0:a.changeProp},uo=l=>{if(!l)return;const{item:a,value:r}=l,o=xe.value.find(n=>n.prop==a.prop);o&&o.contents.push({label:r,value:r})},ha=e.computed(()=>{var r,o,n;const l=(r=F.value)==null?void 0:r.some(u=>u==null?void 0:u.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",l?"inline-block":"none"),(n=(o=F.value)==null?void 0:o.filter(u=>(u==null?void 0:u.label)!=="操作"))==null?void 0:n.map(u=>({...u,filterable:!!(u!=null&&u.filterable),showSummary:!!(u!=null&&u.showSummary),operable:!!(u!=null&&u.operable),fixed:u==null?void 0:u.fixed}))}),rr=async(l,a,r)=>{const o=N.cloneDeep(F.value);await e.nextTick();const n=o==null?void 0:o.map(c=>(r==null?void 0:r.label)===(c==null?void 0:c.label)?{...c,[a]:l}:c),u=Ka(n);await Or(i.index,u),F.value=n,ul.value=u},Ka=l=>(l||[]).map(o=>{const{prop:n}=o;return li(n,o)}),co=async l=>{let a=await ri(i.index);a||(a=Ka(l)),ul.value=a},po=async(l,a)=>{const r=N.cloneDeep(F.value),o=r==null?void 0:r.map(u=>({...u,[a]:l})),n=Ka(o);await Or(i.index,n),F.value=o,ul.value=n},fo=()=>{Kl.value=!1},ho=l=>{De("clickTrigger",l)},or=async l=>{var u,c,s,f,m,D,g,E,M,V,K,S,z,W,$;const a=l==null?void 0:l.row,r=l==null?void 0:l.rowData,o=l==null?void 0:l.suffix;if((u=a==null?void 0:a.toString())!=null&&u.includes(".urdf")||l!=null&&l.isUrdf||o!=null&&o.includes(".urdf")){if(a.includes(",")){N.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(Re(a)){const L={files:[Ya(a)],data:{}};Ua(L);return}ua.value=[{url:a,extension:Ll(a)}],ee.value=!0,Ne.value={data:N.cloneDeep(r)},Ge.value=!0;return}let n=[];if((c=a==null?void 0:a.toString())!=null&&c.includes(".stl")||(s=a==null?void 0:a.toString())!=null&&s.includes(".STL")||(f=a==null?void 0:a.toString())!=null&&f.includes(".obj")||(m=a==null?void 0:a.toString())!=null&&m.includes(".mtl")){const x=(D=a==null?void 0:a.toString())==null?void 0:D.split(","),L=Mr(x),t=L==null?void 0:L[0];if(Re(t==null?void 0:t.extension)){Ua({files:L,data:{}});return}ua.value=L,ee.value=!1,Ge.value=!0;return}if((g=a==null?void 0:a.toString())!=null&&g.includes(".stl")||(E=a==null?void 0:a.toString())!=null&&E.includes(".STL")||(M=a==null?void 0:a.toString())!=null&&M.includes(".obj")||(V=a==null?void 0:a.toString())!=null&&V.includes(".mtl")||o!=null&&o.includes(".stl")||o!=null&&o.includes(".STL")||o!=null&&o.includes(".obj")||o!=null&&o.includes(".mtl")){let x,L=[],t={};if(Array.isArray(a)?x=a:x=a==null?void 0:a.split(","),x==null||x.forEach(v=>{v.includes(".mtl")?L.push(v):t.blob=t.blob?t.blob+","+v:v}),(L==null?void 0:L.length)>0&&(t.mtlBlobs=L),o&&(t.suffix=o),(S=(K=Object.values(t))==null?void 0:K[0])!=null&&S.includes("http:"))n.push(t);else{const v=new Blob([t.blob],{type:"application/octet-stream;charset=UTF-8"});let y=URL.createObjectURL(v),G="";(z=a==null?void 0:a.split("/"))==null||z.forEach((P,H)=>{var d;H===((d=a==null?void 0:a.split("/"))==null?void 0:d.length)-1&&(G=P)}),(W=t.blob)!=null&&W.includes(".stl")&&(G=(G==null?void 0:G.replaceAll(">",""))+".urdf"),la.value=[{name:G,blobUrl:y}],Ql.value=!0}}else{const x=await N.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),L=new Blob([x.data],{type:"application/octet-stream;charset=UTF-8"});let t=URL.createObjectURL(L),v="";if(($=a==null?void 0:a.split("/"))==null||$.forEach((y,G)=>{var P;G===((P=a==null?void 0:a.split("/"))==null?void 0:P.length)-1&&(v=y)}),Re(v)){const y=yl(v),G=Ya(a);Ua({files:[G],data:{trackFileType:y}});return}la.value=[{name:v,blobUrl:t}],Ql.value=!0}(n==null?void 0:n.length)>0&&A.setBlobUrls(n)},ya=l=>{var o,n,u,c;if(l!=null&&l.downloadUrl)return l==null?void 0:l.name;const a=(c=(o=l==null?void 0:l.url)==null?void 0:o.split("."))==null?void 0:c[((u=(n=l==null?void 0:l.url)==null?void 0:n.split("."))==null?void 0:u.length)-1];return(l==null?void 0:l.name)+"."+a},za=l=>{if(!l)return"未知文件";try{const o=ya(l);if(typeof o=="string"&&o.includes("."))return o}catch{}const a=(l==null?void 0:l.fileName)||(l==null?void 0:l.name)||"未知文件",r=(l==null?void 0:l.suffix)||"";return a.includes(".")?a:`${a}${r}`},nr=l=>{if(l==null||typeof l=="number"||typeof l!="string")return l;const a=l.match(/^(\d+)\_(\d+)$/);if(!a)return l;const r=Number(a[1]),o=Number(a[2]);return!Number.isFinite(r)||!Number.isFinite(o)?l:String(r*1e3+o)},ir=async l=>{let a=null,r=null;if(l!=null&&l.id){const n=Nl.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const u=await he.downloadAvatarApi(l);a=URL.createObjectURL(u.data),r=za(l)}finally{n.close()}}else if(l!=null&&l.downloadUrl){const n=await qa(),u=Nl.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),c=await N.axios.post(l==null?void 0:l.url,null,{responseType:"blob",headers:{Authorization:n,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{u.close()}),s=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(s),r=l==null?void 0:l.name}else{const n=await he.downloadAvatarApi({url:l==null?void 0:l.url});!l.url.toUpperCase().includes(".OBJ")&&!l.url.toUpperCase().includes(".STL")&&!l.url.toUpperCase().includes(".MTL")&&!l.url.toUpperCase().includes(".URDF")?(a=URL.createObjectURL(n.data),r=ya(l)):a=l==null?void 0:l.url}if(Re(a)){const n={row:`${a}`,suffix:Ll(r)};or(n);return}const o={name:r,blobUrl:a};la.value=[o],Ql.value=!0},yo=async l=>{let a=null,r=null;if(l!=null&&l.id){const u=await he.downloadAvatarApi(l);a=URL.createObjectURL(u.data),r=za(l)}else if(l!=null&&l.downloadUrl){const u=await qa(),c=await N.axios.post(l==null?void 0:l.url,null,{responseType:"blob",headers:{Authorization:u,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),s=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(s),r=l==null?void 0:l.name}else{const u=await he.downloadAvatarApi({url:l==null?void 0:l.url});a=URL.createObjectURL(u.data),r=ya(l)}const o={name:r,blobUrl:a},n=document.createElement("a");n.href=o.blobUrl,n.download=o.name,n.style.display="none",document.body.appendChild(n),n.click(),setTimeout(()=>{document.body.removeChild(n)},100)},vo=(l,a)=>{var o;if(Object.values(a).length===0)return;let r=l;return Object.values(a).find(n=>{var u,c,s;return((u=n==null?void 0:n.toString())==null?void 0:u.includes(".txt"))||((c=n==null?void 0:n.toString())==null?void 0:c.includes(".cpt"))||((s=n==null?void 0:n.toString())==null?void 0:s.includes(".obj"))})?r=[...l,Vr.value]:(o=i==null?void 0:i.config)!=null&&o.allowMove&&(r=[...l,{label:"迁移"}]),r},go=(l,a={})=>[...l==null?void 0:l.values()].filter(r=>Object.keys(a).every(o=>{var c;const n=r[o],u=(c=a[o])==null?void 0:c.toLowerCase();return u&&n&&typeof n=="string"?n.toLowerCase().includes(u):!0})),bo=()=>{We.value=!0},sr=e.ref([]),mo=async(l,a,r=!1)=>{var o;if(l){if(el.setTableLoading(!0),sr.value=Object.values(l),l&&((o=Object.values(l))!=null&&o.every(n=>!n)))return le.value=Fl.value;if(r){le.value=[...Dl.value.values()].filter(n=>Object.values(n).some(u=>typeof u=="string"?u==null?void 0:u.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}le.value=go(Dl.value,l),el.setTableLoading(!1)}},ko=async l=>{},tr=async(l,a,r,o)=>{var n,u,c,s,f,m,D,g,E,M,V,K,S,z,W,$,x,L,t,v;if(De("clickMainKey",r),(o==null?void 0:o.isExistChild)===!0){let y=(n=o==null?void 0:o.columnType)==null?void 0:n.prop,G=o==null?void 0:o.data;if(ea.value=await he.getItemData(Ve.value,sessionStorage.getItem("systemKey"),""),!ea.value){let H=(s=(c=(u=Ve.value)==null?void 0:u.split("/"))==null?void 0:c.filter((d,U)=>{var pe,J;return U!==((J=(pe=Ve.value)==null?void 0:pe.split("/"))==null?void 0:J.length)-1}))==null?void 0:s.join("/");ea.value=await he.getItemData(H,sessionStorage.getItem("systemKey"),"")}let P=(f=ea.value)==null?void 0:f.filter(H=>(H==null?void 0:H.name)===y);ea.value=P==null?void 0:P.map(H=>{var d;return H.compData=(d=H.compData)==null?void 0:d.map(U=>{var pe,J;return(U==null?void 0:U.key)==="tableContents"&&(pe=U==null?void 0:U.contents)!=null&&pe.every(w=>w==null?void 0:w.find(R=>R==null?void 0:R.id))&&(U.contents=(J=U==null?void 0:U.contents)==null?void 0:J.filter(w=>(w==null?void 0:w[1])===G)),U}),H}),De("routeUrl",ea.value,{isEdit:!0,routerUrl:Ve.value});return}if((o==null?void 0:o.data)==="查看"&&(l!=null&&l.every(y=>(y==null?void 0:y.url)&&(y==null?void 0:y.name)))){let y=N.cloneDeep(l);y=await((m=N.cloneDeep(y))==null?void 0:m.map(async P=>{var U,pe,J,w;const H=await he.downloadAvatarApi({url:P==null?void 0:P.url});let d=URL.createObjectURL(H.data);return{name:(P==null?void 0:P.name)+"."+((w=(U=P==null?void 0:P.url)==null?void 0:U.split("."))==null?void 0:w[((J=(pe=P==null?void 0:P.url)==null?void 0:pe.split("."))==null?void 0:J.length)-1]),blobUrl:d}}));let G=await Promise.all(y);la.value=G,Ql.value=!0}if(N.cloneDeep(F.value),(o==null?void 0:o.isMainKey)===!0){cl.setActiveMenuPath(void 0),el.setRouteToChildPath(void 0),el.setFixMenuStatus(!0);let y=(g=(D=i.itemData)==null?void 0:D.find(P=>(P==null?void 0:P.key)==="contentTableId"))==null?void 0:g.contents,G=(M=(E=i.itemData)==null?void 0:E.find(P=>(P==null?void 0:P.key)==="relatedFilter"))==null?void 0:M.index;if(G!==0){let P=(K=(V=F.value)==null?void 0:V[G])==null?void 0:K.prop;if((r==null?void 0:r[P])===(o==null?void 0:o.data)){let H=await N.getInsofDataApi({id:y}),d=($=(W=(z=(S=H==null?void 0:H.data)==null?void 0:S.result)==null?void 0:z[0])==null?void 0:W.key)==null?void 0:$.pageKey;cl.setActiveMenuPath(d+"/"+(o==null?void 0:o.data))}else{let H=await N.getInsofDataApi({key:{pageKey:N.cloneDeep(Ve).value+"/"+(o==null?void 0:o.data),systemKey:sessionStorage.getItem("systemKey")}});((L=(x=H==null?void 0:H.data)==null?void 0:x.result)==null?void 0:L.length)>0&&cl.setActiveMenuPath(N.cloneDeep(Ve).value+"/"+(o==null?void 0:o.data))}}else{let P=await N.getInsofDataApi({key:{pageKey:N.cloneDeep(Ve).value+"/"+(o==null?void 0:o.data),systemKey:sessionStorage.getItem("systemKey")}});((v=(t=P==null?void 0:P.data)==null?void 0:t.result)==null?void 0:v.length)>0&&cl.setActiveMenuPath(N.cloneDeep(Ve).value+"/"+(o==null?void 0:o.data))}}},Co=()=>{Ql.value=!1},So=l=>{De("rowClick",l)};e.watch(()=>i.changedContent,()=>{var r,o;if(!i.changedContent)return;let l=(r=le.value)==null?void 0:r.map(n=>{var u;return n.id===((u=i.changedContent)==null?void 0:u.id)&&(n={...i.changedContent,id:i.changedContent.newId?i.changedContent.newId:i.changedContent.id},delete n.newId),n});const a=(o=i.itemData)==null?void 0:o.map(n=>((n==null?void 0:n.key)==="tableContents"&&(n.contents=l),n));le.value=l,De("contentChange",{contents:a,index:i.index}),De("change",{content:l,index:i==null?void 0:i.index,buttonName:"",id:i==null?void 0:i.index})},{deep:!0,immediate:!0});const xo=()=>{},No=async()=>{const l=Ve.value,a=sessionStorage.getItem("systemKey"),r=await he.getItemData(l,a,""),o=(r==null?void 0:r.find(s=>(s==null?void 0:s.name)==="方法明细"))||(r==null?void 0:r[0]),n=(o==null?void 0:o.compData)||[],u=n==null?void 0:n.find(s=>{const f=s==null?void 0:s.key;return f==="formContent"||f==="tableContents"});return u==null?void 0:u.contents},qa=async()=>`Bearer ${N.Local.get("access-token")}`,_o=async(l,{token:a,inputData:r}={})=>await N.axios.post(l,r,{headers:{Authorization:a}}).catch(n=>(cl.setImportLoading(!1),Promise.reject(n))),wo=l=>{var o;let a={};const r=[];return a.form={},(o=N.cloneDeep(l))==null||o.forEach((n,u)=>{var c,s,f,m,D,g,E,M,V,K,S,z,W,$;if((n==null?void 0:n.comp)==="Table"){(s=(c=n==null?void 0:n.compData)==null?void 0:c.find(v=>(v==null?void 0:v.key)==="header"))==null||s.contents;let x=(D=(m=(f=n==null?void 0:n.compData)==null?void 0:f.find(v=>(v==null?void 0:v.key)==="tableContents"))==null?void 0:m.contents)==null?void 0:D.map(v=>v.slice(1));(K=(V=(M=(E=(g=n==null?void 0:n.compData)==null?void 0:g.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:E.contents)==null?void 0:M[0])==null?void 0:V[0])==null||K.label;let L=(z=(S=n==null?void 0:n.compData)==null?void 0:S.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:z.contents,t=[];x==null||x.forEach(v=>{let y=[];v==null||v.forEach((G,P)=>{var d;let H={};((d=L[P])==null?void 0:d.label)!=="操作"&&(H[L[P].label]=G,y.push(H))}),t.push(y)}),a[n.name]=t}else{const x=($=(W=n.compData)==null?void 0:W.find(L=>(L==null?void 0:L.key)==="formContent"))==null?void 0:$.contents;x==null||x.forEach(L=>{var t,v;if(L.prop!==""){let y=L==null?void 0:L.value;Array.isArray(y)?y=((t=y==null?void 0:y[0])==null?void 0:t.oldUrl)||"http://222.92.178.198:62001/"+((v=y==null?void 0:y[0])==null?void 0:v.url):y=y.toString(),L={key:(L==null?void 0:L.prop)??(L==null?void 0:L.label),value:y},r.push(L)}})}}),a.form=he.getFormContents(r),a},Ao=l=>{const a=[],r=o=>{o&&typeof o=="object"&&!Array.isArray(o)?Object.values(o).forEach(r):a.push(o)};return r(l),a},Do=async(l,a,r)=>{var L,t,v,y,G,P,H,d,U,pe,J;cl.setImportLoading(!0),el.setFreshContent(!1);let o=await No().catch(w=>(cl.setImportLoading(!1),Promise.reject(w)));o=o==null?void 0:o.filter(w=>{var R;return((R=w==null?void 0:w.find(ie=>ie==null?void 0:ie.id))==null?void 0:R.id)===(a==null?void 0:a.id)});let n=he.getEqualChild([(L=F.value)==null?void 0:L.filter(w=>(w==null?void 0:w.label)!=="操作")]);const u=(v=(t=he.tableToForm(o,n))==null?void 0:t[0])==null?void 0:v.find(w=>{const R=w==null?void 0:w.key;return R==="Interface"||R==="方法体"}),c=u==null?void 0:u.value;if(!c){console.log("未搜索到isMain, 缺少算法执行接口"),cl.setImportLoading(!1);return}const s=F.value?he.getEqualChild([F.value]):[],f=s.find(w=>{const R=w==null?void 0:w.prop;return R==="Input1"||R==="输入数据.输入1"||R==="样本输入数据"}),m=f==null?void 0:f.prop;let D=a==null?void 0:a[m];const g=await qa().catch(w=>(cl.setImportLoading(!1),Promise.reject(w)));let E=!0,M="";(y=F.value)==null||y.forEach(w=>{(w==null?void 0:w.prop)===m&&(E=!!(w!=null&&w.childPath),M=w==null?void 0:w.childPath)});let V="";if(E){let w=(P=(G=F.value)==null?void 0:G.find(me=>(me==null?void 0:me.isMainKey)===!0))==null?void 0:P.prop;V=a==null?void 0:a[w];let R=M==null?void 0:M.split(ce),ie=[];R==null||R.forEach((me,Be)=>{(R==null?void 0:R.length)-1===Be&&ie.push(V),ie.push(me)}),ie=ie==null?void 0:ie[0];let ne=await he.getItemData(ie,sessionStorage.getItem("systemKey"),""),ae=ne==null?void 0:ne.filter(me=>(me==null?void 0:me.name)===m);ae=ae==null?void 0:ae.map(me=>{var Be;return me.compData=(Be=me==null?void 0:me.compData)==null?void 0:Be.map(X=>{var te;return(X==null?void 0:X.key)==="tableContents"&&(X.contents=(te=X==null?void 0:X.contents)==null?void 0:te.filter(Pe=>(Pe==null?void 0:Pe[1])===(a==null?void 0:a[m]))),X}),me}),(!ae||(ae==null?void 0:ae.length)===0)&&(ae=ne,ae=ae==null?void 0:ae.map(me=>{var Be;return me.compData=(Be=me==null?void 0:me.compData)==null?void 0:Be.map(X=>{var te;return(X==null?void 0:X.key)==="tableContents"&&(X.contents=(te=X==null?void 0:X.contents)==null?void 0:te.filter(Pe=>{var fe,ve;return(Pe==null?void 0:Pe[1])===(a==null?void 0:a[(ve=(fe=F==null?void 0:F.value)==null?void 0:fe[0])==null?void 0:ve.prop])})),X}),me})),D=wo(ae)}const K=await _o(c,{token:g,inputData:D}).catch(w=>(cl.setImportLoading(!1),Promise.reject(w))),S=(H=K==null?void 0:K.data)==null?void 0:H.data,z=s.find(w=>(w==null?void 0:w.prop)==="Output1"),W=z==null?void 0:z.prop;let $=[],x=[];if(S&&((d=Object.values(S))==null?void 0:d.length)>0){let w=[];const R=new FormData,ie=(U=Ao(S))==null?void 0:U.map(async ae=>{var me,Be;if(!Array.isArray(ae)&&(ae!=null&&ae.includes("http"))){let X=await N.axios.get(ae,{responseType:"blob"}),te=(Be=ae==null?void 0:ae.split("/"))==null?void 0:Be[((me=ae==null?void 0:ae.split("/"))==null?void 0:me.length)-1];R.append("files",X.data,te)}else w.push(ae)});if(await Promise.all(ie),!he.isFormDataEmpty(R)){let ae=await he.uploadAmountApi(R),me=(J=(pe=ae==null?void 0:ae.data)==null?void 0:pe.result)==null?void 0:J.map(Be=>{var X,te,Pe,fe,ve,Ee;return{name:(Ee=(ve=(fe=(X=Be==null?void 0:Be.url)==null?void 0:X.split("/"))==null?void 0:fe[((Pe=(te=Be==null?void 0:Be.url)==null?void 0:te.split("/"))==null?void 0:Pe.length)-1])==null?void 0:ve.split("."))==null?void 0:Ee[0],url:Be==null?void 0:Be.url}});w=[...w,...me]}let ne={};for(let ae in a)ae!=="id"&&(ne[ae]=a[ae]);ne[W]=w,x.push({id:a==null?void 0:a.id,value:{tableData:ne}})}(x==null?void 0:x.length)>0&&await N.batchUpdateInsofDataApi({dataList:x}),($==null?void 0:$.length)>0&&await N.batchAddInsofDataApi({dataList:$}),ba(!0),cl.setImportLoading(!1),el.setFreshContent(!0)},ur=(l,a)=>(l=l==null?void 0:l.map(r=>{var o,n;return r!=null&&r.children&&((o=r.children)!=null&&o.find(u=>u.id===(a==null?void 0:a.id))?r.children=(n=r.children)==null?void 0:n.filter(u=>(u==null?void 0:u.id)!==(a==null?void 0:a.id)):r.children=ur(r.children,a)),r}),l),Da=e.ref(!1),Eo=()=>{Da.value=!0},To=l=>{if(Da.value=!1,l){const a={name:l.name||"capture.jpg",url:URL.createObjectURL(l),raw:l};zl.value.push(a)}},ll=e.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:i==null?void 0:i.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(l,a,r)=>{a===(i==null?void 0:i.index)?r(new Error("选择源不能和目标源一致")):r()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),Bo=()=>{ll.show=!1},Oo=l=>{var a,r;if((l==null?void 0:l.buttonName)==="取消")return ll.show=!1;ll.to=l==null?void 0:l.content,!(!(i!=null&&i.index)||!((a=ll.to)!=null&&a.groupName))&&(i==null?void 0:i.index)!==((r=ll.to)==null?void 0:r.groupName)&&(De("change",{buttonName:"迁移",value:{from:ll.from,to:ll.to,data:ll.selectRow}}),ll.show=!1)},Uo=l=>{if(l){if(!ca.validateFileSize(l.raw)){N.ElMessage.warning(`文件大小不能超过 ${zr.value.maxSize}MB`);return}if(!ca.validateFileType(l.raw)){N.ElMessage.warning("请上传图片文件");return}}},Lo=async()=>{var l,a;if(zl.value.length===0){N.ElMessage.warning("请先选择要上传的图片");return}Il.value=!0;try{const r=zl.value.map(async g=>{var V;const E=new FormData;E.append("file",g.raw,g.name);const M=await Nl.uploadFileApi(E);return((V=M==null?void 0:M.data)==null?void 0:V.result)||{name:g.name,url:"",fileName:g.name}}),o=await Promise.all(r),n=ca.extractTableHeaders(F.value),u=o.map(g=>({name:(g==null?void 0:g.fileName)||(g==null?void 0:g.name),url:(g==null?void 0:g.url)||""})),c=await ca.recognize(u,n),s=Array.isArray(c==null?void 0:c.result)?c.result:[];if(s.length===0){N.ElMessage.warning("OCR识别未返回有效数据"),Il.value=!1;return}const f=new Set,m=[];s.forEach((g,E)=>{const M=g!=null&&g.数据&&typeof(g==null?void 0:g.数据)=="object"?g.数据:{},V={_index:E,_certType:(g==null?void 0:g.证书类型)||"",_certNo:(g==null?void 0:g.证书编号)||""};Object.entries(M).forEach(([K,S])=>{Array.isArray(S)&&S.length>=2?(V[K]=S[0]??"",V[`${K}_accuracy`]=S[1]??0,f.add(K)):(V[K]=S??"",V[`${K}_accuracy`]=0,f.add(K))}),m.push(V)});const D=[];f.forEach(g=>{D.push({prop:g,label:g,editable:!0,minWidth:120}),D.push({prop:`${g}_accuracy`,label:`${g}准确率`,editable:!1,minWidth:100,isAccuracy:!0})}),Ma.value=D,oa.value=m,Ra.value=o,Fa.value=c,Na.value=!1,zl.value=[],Il.value=!1,Pa.value=!0}catch(r){console.error("OCR处理失败:",r),N.ElMessage.error(((a=(l=r==null?void 0:r.response)==null?void 0:l.data)==null?void 0:a.message)||"OCR识别失败,请重试"),Il.value=!1}},jo=()=>{var V,K;const l=Ra.value,a=Fa.value,r=oa.value;if(!r||r.length===0){N.ElMessage.warning("暂无数据可添加");return}const o=(V=he.getAllLeafNodes(F.value)||[])==null?void 0:V.filter(S=>(S==null?void 0:S.type)!=="operate"&&(S==null?void 0:S.label)!=="操作"&&(S==null?void 0:S.prop)!=="operate"),n=new Map,u=new Map,c=(K=o==null?void 0:o.find(S=>(S==null?void 0:S.label)==="OCR图片"))==null?void 0:K.prop;o==null||o.forEach(S=>{S!=null&&S.label&&(S!=null&&S.prop)&&(n.set(S.label,S.prop),u.set(S.prop,S.label))});const s=Date.now(),f=S=>String(s*1e3+S);let m=0,D=0;const g=[],E=[];r.forEach((S,z)=>{const W={id:f(z),_isOCRRow:!0,_ocrTableId:i==null?void 0:i.index};for(const[$,x]of n.entries())Object.prototype.hasOwnProperty.call(S,$)&&(W[x]=S[$]);if(c&&l[z]){const $=l[z];W[c]=[{...$,name:($==null?void 0:$.fileName)||($==null?void 0:$.name),url:($==null?void 0:$.url)||""}]}if(ql.value&&ql.value.length>0){const $={};let x=!1;if(ql.value.forEach(L=>{const t=n.get(L);t&&W[t]!==void 0&&W[t]!==null&&W[t]!==""&&($[t]=W[t],x=!0)}),x){const L=le.value.find(t=>Object.entries($).every(([v,y])=>{const G=t[v];return String(G)===String(y)||G===y}));if(L){for(const[v,y]of n.entries())Object.prototype.hasOwnProperty.call(W,y)&&y!=="_isOCRRow"&&y!=="_ocrTableId"&&y!=="id"&&(L[y]=W[y]);if(c&&l[z]){const v=l[z];L[c]=[{...v,name:(v==null?void 0:v.fileName)||(v==null?void 0:v.name),url:(v==null?void 0:v.url)||""}]}const t=Fl.value.find(v=>v.id===L.id);if(t){for(const[v,y]of n.entries())Object.prototype.hasOwnProperty.call(W,y)&&y!=="_isOCRRow"&&y!=="_ocrTableId"&&y!=="id"&&(t[y]=W[y]);if(c&&l[z]){const v=l[z];t[c]=[{...v,name:(v==null?void 0:v.fileName)||(v==null?void 0:v.name),url:(v==null?void 0:v.url)||""}]}}Dl.value&&Dl.value.set(L.id,L),E.push(JSON.parse(JSON.stringify(L))),m++;return}}}g.push(W),D++}),E.length>0&&(le.value=[...le.value||[]]),g.length>0&&(le.value=[...le.value||[],...g],Fl.value=[...Fl.value||[],...g],g.forEach(S=>{var z,W;return(W=(z=Dl.value)==null?void 0:z.set)==null?void 0:W.call(z,S.id,S)})),da.value=le.value;let M="";m>0&&D>0?M=`成功匹配替换 ${m} 条数据,新增 ${D} 条OCR识别数据`:m>0?M=`成功匹配替换 ${m} 条数据`:M=`成功添加 ${D} 条OCR识别数据`,N.ElMessage.success(M),E.length>0&&De("change",{buttonName:"编辑",singleContent:E,content:le.value,index:i==null?void 0:i.index,parentTableId:i==null?void 0:i.parentTableId,column:F.value}),g.length>0&&De("change",{buttonName:"OCR批量新增",content:le.value,index:i==null?void 0:i.index,parentTableId:i==null?void 0:i.parentTableId,column:F.value,ocrRows:g,uploadedFiles:l,ocrResult:a,matchedCount:m,newCount:D}),Wa()},Wa=()=>{Pa.value=!1,oa.value=[],Ma.value=[],Ra.value=[],Fa.value=null,ql.value=[]},$o=(l,a,r)=>{oa.value[l]&&(oa.value[l][a]=r)},Po=(l,a)=>{if(a)ql.value.includes(l)||ql.value.push(l);else{const r=ql.value.indexOf(l);r>-1&&ql.value.splice(r,1)}},Mo=l=>l==null||l===0?"-":`${(Number(l)*100).toFixed(1)}%`,Ro=l=>{if(l==null||l===0)return"#909399";const a=Number(l);return a>=.9?"#67c23a":a>=.7?"#e6a23c":"#f56c6c"},cr=()=>{Na.value=!1,zl.value=[],Kr.value=null},Fo=async l=>{Za.value=l==null?void 0:l.name;const a=l.raw;$a.value=URL.createObjectURL(a),wa.value=[{name:Za.value,blobUrl:$a.value}],_a.value=!0},Vo=async l=>{const a=nn(l);if(!a||a.length===0){N.ElMessage.warning("暂无图片");return}if(a.length===1){await ir(a[0]);return}try{const r=Nl.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),o=await Promise.all(a.map(async n=>{const u=await he.downloadAvatarApi(n),c=URL.createObjectURL(u.data);return{name:za(n),blobUrl:c}}));r.close(),wa.value=o,_a.value=!0}catch(r){console.error("预览图片失败:",r),N.ElMessage.error("预览图片失败,请重试")}},Ko=()=>{_a.value=!1,wa.value=[],$a.value=""},zo=l=>{zl.value=zl.value.filter((a,r)=>r!==l)},Ea=async(l,a,r)=>{var o,n,u,c,s,f,m,D,g,E,M,V,K,S,z;if(Vl.value="",xa.value=!0,Ca.value=!0,De("onButtonClick",l,a),de.value=[],l==="删除")Ta.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var W,$;(W=le.value)!=null&&W.find(x=>(x==null?void 0:x.id)===(a==null?void 0:a.id))?le.value=($=N.cloneDeep(le.value))==null?void 0:$.filter(x=>(x==null?void 0:x.id)!==(a==null?void 0:a.id)):le.value=ur(N.cloneDeep(le.value),a),$n(da.value,pa.value,a==null?void 0:a.id),el.setTableLoading(i==null?void 0:i.index),De("change",{content:le.value,singleContent:a,index:i==null?void 0:i.index,type:"delete",buttonName:l,column:F.value})});else if(l==="批量删除"){if(((o=Pl.value)==null?void 0:o.length)===0)return N.ElMessage.warning("请先勾选操作的数据");Ta.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var $,x;const W=($=Pl.value)==null?void 0:$.map(L=>L.id);le.value=(x=N.cloneDeep(le.value))==null?void 0:x.filter(L=>!(W!=null&&W.includes(L.id))),el.setTableLoading(i==null?void 0:i.index),De("change",{content:le.value,singleContent:null,selectItems:Pl.value,index:i==null?void 0:i.index,type:"batchDelete",buttonName:l,column:F.value})})}else if(l==="复制新增"){_l.value="新增";const W=N.cloneDeep(a),$=(n=F.value)==null?void 0:n.find(t=>t==null?void 0:t.isMainKey),x=$||((u=F.value)==null?void 0:u[0]),L=(c=Tl.value)==null?void 0:c.find(t=>(t==null?void 0:t.label)==="新建");await pr(!0,L,{data:W,firstCol:x})}else if(l==="新增")_l.value="新增",ga(""),Kl.value=!0;else if(l==="编辑")_l.value="编辑",ga(a),Kl.value=!0;else if(l==="查看")_l.value="查看",ga(a),xa.value=!1,Ca.value=!1,Kl.value=!0;else if(l==="查看三维模型"){const W={};for(let x in a)x!=="id"&&(W[x]=a[x]);let $=(s=Object.values(W))==null?void 0:s[1];Fr.setTableShowThree($)}else if(((f=r==null?void 0:r.extra)==null?void 0:f.type)==="modelExample")_l.value=l,Sa.value=!0;else if(l==="新建"){let W=aa.value,$=[];for(let y in W)y!=null&&y.includes(`loading${((m=na.value)==null?void 0:m.account)||((D=na.value)==null?void 0:D.账号)}`)&&($=[...$,...y]);let x=[];for(let y in W)y!=null&&y.includes(`updateLoading${((g=na.value)==null?void 0:g.account)||((E=na.value)==null?void 0:E.账号)}`)&&(x=[...x,...y]);let L=$==null?void 0:$.map(y=>y==null?void 0:y.id);const t=x==null?void 0:x.map(y=>y==null?void 0:y.id);L=[...N.cloneDeep(L),...t],(L==null?void 0:L.length)>0&&(L!=null&&L.every(y=>y!==null&&y))&&await N.batchDeleteInsofDataApi({ids:L});const v=(M=Tl.value)==null?void 0:M.find(y=>(y==null?void 0:y.label)==="新建");await pr(!1,v)}else if(l==="修改模板"){let W=N.cloneDeep(Ve).value;el.setRouteToChildPath(W),cl.setActiveMenuPath(W+ce)}else if(l==="执行")Do(l,a);else if(l!=null&&l.includes("导出")){if(l==="导出选中"&&((V=Pl.value)==null?void 0:V.length)===0)return N.ElMessage.warning(`请先勾选${l}的数据`);if(l==="导出全部"&&((K=le.value)==null?void 0:K.length)===0)return N.ElMessage.warning("暂无数据导出");const W=(z=(S=F.value)==null?void 0:S.map(x=>x==null?void 0:x.label))==null?void 0:z.filter(x=>x!=="操作"),$=l==="导出全部"?N.cloneDeep(le.value):N.cloneDeep(Pl.value);$==null||$.forEach(x=>{x==null||delete x.id}),ro($,i==null?void 0:i.compName,W,i==null?void 0:i.compName)}else l==="OCR识别"?(Na.value=!0,zl.value=[]):l==="迁移"&&(ll.selectRow=a,ll.show=!0)},qo=async l=>{var r,o,n,u,c,s;const a=await N.getInsofDataApi({key:{pageKey:l,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((r=a==null?void 0:a.data)==null?void 0:r.code)===200)return Array.isArray((o=a==null?void 0:a.data)==null?void 0:o.result)&&((u=(n=a==null?void 0:a.data)==null?void 0:n.result)==null?void 0:u.length)>0?(s=(c=a==null?void 0:a.data)==null?void 0:c.result)==null?void 0:s.map(f=>{var m;return{id:f==null?void 0:f.id,...(m=f==null?void 0:f.value)==null?void 0:m.pageData}}):[]},Wo=async(l,a)=>{var r,o,n,u,c,s,f,m,D,g,E,M,V,K,S,z,W,$,x,L;try{let t,v;const y=(r=aa.value[Ve.value+ce])==null?void 0:r.filter(w=>{var R;return((R=w==null?void 0:w.key)==null?void 0:R.type)==="structureMethod"}),G=(o=aa.value[Ve.value+ce])==null?void 0:o.filter(w=>{var R;return((R=w==null?void 0:w.key)==null?void 0:R.type)==="structure"}),P=y==null?void 0:y.find(w=>{var R,ie;return((ie=(R=w==null?void 0:w.value)==null?void 0:R.pageData)==null?void 0:ie.method)==="保存"});if(!P)return;const H=(s=(c=aa.value[(u=(n=P==null?void 0:P.value)==null?void 0:n.pageData)==null?void 0:u.path])==null?void 0:c.filter(w=>{var R;return((R=w==null?void 0:w.key)==null?void 0:R.type)==="data"}))==null?void 0:s.find(w=>{var R,ie,ne,ae;return((ie=(R=w==null?void 0:w.value)==null?void 0:R.tableData)==null?void 0:ie.算法名称)===((ae=(ne=P==null?void 0:P.value)==null?void 0:ne.pageData)==null?void 0:ae.method)});if(!H)return;const d={buttonName:(m=(f=P==null?void 0:P.value)==null?void 0:f.pageData)==null?void 0:m.method,api:(g=(D=H==null?void 0:H.value)==null?void 0:D.tableData)==null?void 0:g.算法体,content:G==null?void 0:G.map(w=>{var R;return(R=w==null?void 0:w.value)==null?void 0:R.pageData}),extraContent:[],extraValues:(M=(E=P==null?void 0:P.value)==null?void 0:E.pageData)==null?void 0:M.data,methodName:(K=(V=P==null?void 0:P.value)==null?void 0:V.pageData)==null?void 0:K.path};if(!l)return;const U={...l,compData:(S=l==null?void 0:l.compData)==null?void 0:S.map(w=>{var R;return(w==null?void 0:w.key)==="formContent"?{...w,contents:(R=w==null?void 0:w.contents)==null?void 0:R.map(ie=>(ie==null?void 0:ie.prop)===a?{...ie,value:""}:ie)}:w})},pe={key:{pageKey:Ve.value+ce,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:U}},J=await N.axios.post(d.api,pe,{headers:{"Content-Type":"application/json"}});return((z=J==null?void 0:J.data)==null?void 0:z.code)===200&&(t=($=(W=J==null?void 0:J.data)==null?void 0:W.result)==null?void 0:$.latestReportCode,v=(L=(x=J==null?void 0:J.data)==null?void 0:x.result)==null?void 0:L.status),{newMainKeyValue:t,newStatus:v}}catch(t){throw N.ElMessage.error(t),new Error(t)}},dr=(l,a,r,o)=>{var n;De("contentChange",{contents:(n=l==null?void 0:l.compData)==null?void 0:n.map(u=>{var c;return(u==null?void 0:u.key)==="formContent"?{...u,contents:(c=u==null?void 0:u.contents)==null?void 0:c.map(s=>(s==null?void 0:s.key)===a?{...s,value:r}:va.value&&(s==null?void 0:s.prop)===va.prop?{...s,value:va.value}:s)}:u}),index:l==null?void 0:l.id},o)},va=e.reactive({prop:"状态",value:""}),Jo=e.ref(["系统自动生成信息","审批意见"]),Go=async(l,a,r)=>{var f,m;let o=l==null?void 0:l[a==null?void 0:a.prop],n=1,u,c;const s=N.cloneDeep(Ve).value+ce+o;if(s){va.value="",u=(f=aa.value[s])==null?void 0:f.filter(E=>{var M;return((M=E==null?void 0:E.key)==null?void 0:M.type)==="structure"});const D=u==null?void 0:u.find(E=>{var M,V,K;return((K=(V=(M=E==null?void 0:E.value)==null?void 0:M.pageData)==null?void 0:V.comp)==null?void 0:K.toUpperCase())==="FORM"});c={...(m=D==null?void 0:D.value)==null?void 0:m.pageData,id:D==null?void 0:D.id};const g=await Wo(c,a==null?void 0:a.prop);if(va.value=g==null?void 0:g.newStatus,g!=null&&g.newMainKeyValue)return g==null?void 0:g.newMainKeyValue}if(le.value.some(D=>(D==null?void 0:D[a==null?void 0:a.prop])===o)){const D=o;for(;le.value.some(g=>(g==null?void 0:g[a==null?void 0:a.prop])===`${D}(${n})`);)n++;o=`${D}(${n})`}return o},pr=async(l,a,r)=>{var c,s,f,m,D,g,E,M;let o,n;const u=await Go(r==null?void 0:r.data,r==null?void 0:r.firstCol);if(l?(o=N.cloneDeep(Ve).value+ce+((m=r==null?void 0:r.data)==null?void 0:m[(f=r==null?void 0:r.firstCol)==null?void 0:f.prop]),n=N.cloneDeep(Ve).value+ce+u):(o=N.cloneDeep(Ve).value+ce,n=N.cloneDeep(o)+`loading${((c=na.value)==null?void 0:c.account)||((s=na.value)==null?void 0:s.账号)}`),a){const V=(g=(D=aa.value[n])==null?void 0:D.filter(K=>{var S;return((S=K==null?void 0:K.key)==null?void 0:S.parentTable)===""}))==null?void 0:g.map(K=>{var S;return{id:K==null?void 0:K.id,...(S=K==null?void 0:K.value)==null?void 0:S.pageData}});if((V==null?void 0:V.length)>0)if(l){const K=V==null?void 0:V.find(S=>{var z;return((z=S==null?void 0:S.comp)==null?void 0:z.toUpperCase())==="FORM"});K&&dr(K,(E=r==null?void 0:r.firstCol)==null?void 0:E.label,u,Ve.value)}else el.setRouteToChildPath(N.cloneDeep(Ve).value),cl.setActiveMenuPath(n);else if(await he.loadingConstruct(o,n,null,null,l?Jo.value:null),l){const K=await qo(n);if((K==null?void 0:K.length)>0){const S=K==null?void 0:K.find(z=>{var W;return((W=z==null?void 0:z.comp)==null?void 0:W.toUpperCase())==="FORM"});S&&dr(S,(M=r==null?void 0:r.firstCol)==null?void 0:M.label,u,Ve.value)}}else el.setRouteToChildPath(N.cloneDeep(Ve).value),cl.setActiveMenuPath(n)}else l?(Vl.value="",kl.value=r==null?void 0:r.data,ba(!0,r==null?void 0:r.firstCol,u)):(el.setRouteToChildPath(N.cloneDeep(Ve).value),cl.setActiveMenuPath(n))},Ho=()=>{Ge.value=!1,ua.value=[],ee.value=!1},ga=l=>{var c,s,f,m,D,g,E,M,V,K,S,z,W,$,x,L,t,v,y,G,P,H;const a=[];let r=[];for(let d in l)Array.isArray(l==null?void 0:l[d])&&r.push(d);T.value=N.cloneDeep(F.value),(s=he.getColumnChild((c=N.cloneDeep(F.value))==null?void 0:c.filter(d=>(d==null?void 0:d.label)!=="操作")))==null||s.forEach((d,U)=>{var pe,J,w;r.find(R=>R===(d==null?void 0:d.prop))||(d!=null&&d.formType&&((pe=d==null?void 0:d.formType)==null?void 0:pe.toUpperCase())==="SELECT"||d!=null&&d.menuId?a.push({label:(J=d==null?void 0:d.prop)!=null&&J.includes(".")?d==null?void 0:d.prop:(d==null?void 0:d.label)??(d==null?void 0:d.prop)??"",name:(d==null?void 0:d.prop)??"t"+U,prop:d==null?void 0:d.prop,type:"Select",value:(l==null?void 0:l[d==null?void 0:d.prop])??(d==null?void 0:d.value)??"",id:(d==null?void 0:d.id)??U,contents:(d==null?void 0:d.options)??[],width:1,isFormColHidden:d==null?void 0:d.isFormColHidden,relatedValueId:d==null?void 0:d.relatedValueId,disabled:d==null?void 0:d.disabled,optionUrl:{groupSelect:d==null?void 0:d.groupSelect,menuSelect:d==null?void 0:d.formMenuSelect,type:"Select",selectRelateType:d==null?void 0:d.selectRelateType,allSelectionContents:(d==null?void 0:d.allSelectionContents)??[],selectFilter:d==null?void 0:d.selectFilter,menuId:d==null?void 0:d.menuId,filterContent:d==null?void 0:d.filterContent}}):a.push({label:(w=d==null?void 0:d.prop)!=null&&w.includes(".")?d==null?void 0:d.prop:(d==null?void 0:d.label)??(d==null?void 0:d.prop)??"",prop:d==null?void 0:d.prop,name:(d==null?void 0:d.prop)??"t"+U,type:!(d!=null&&d.formType)||(d==null?void 0:d.formType)===""?"Input":d==null?void 0:d.formType,value:(l==null?void 0:l[d==null?void 0:d.prop])??(d==null?void 0:d.value)??"",id:(d==null?void 0:d.id)??U,contents:(d==null?void 0:d.options)??[],width:1,isFormColHidden:d==null?void 0:d.isFormColHidden,disabled:d==null?void 0:d.disabled,relatedValueId:d==null?void 0:d.relatedValueId}))}),l===""||!l||(Vl.value=(l==null?void 0:l.id)??"");let o=he.getColumnChild((f=N.cloneDeep(F.value))==null?void 0:f.filter(d=>(d==null?void 0:d.label)!=="操作"));Ol.value&&((m=Ol.value)==null?void 0:m.length)>0&&(Ol.value=(D=N.cloneDeep(Ol).value)==null?void 0:D.map(d=>{var pe;let U=(d==null?void 0:d.prop)||((pe=o==null?void 0:o.find(J=>(J==null?void 0:J.label)===(d==null?void 0:d.label)))==null?void 0:pe.prop);return U&&(d.value=l[U]),d})),xe.value=Ol.value&&((g=Ol.value)==null?void 0:g.length)>0?he.getTableFormToForm(Ol.value):a;let n=[],u=(E=i.itemData)==null?void 0:E.filter(d=>(d==null?void 0:d.key)==="filterAllType");if((u==null?void 0:u.length)>0&&(n=(u==null?void 0:u.map(U=>U==null?void 0:U.value)).flat()),(n==null?void 0:n.length)>0){let d=(V=n==null?void 0:n.filter(J=>{var w;return(w=J==null?void 0:J.content)==null?void 0:w.includes("@Type")}))==null?void 0:V[((M=n==null?void 0:n.filter(J=>{var w;return(w=J==null?void 0:J.content)==null?void 0:w.includes("@Type")}))==null?void 0:M.length)-1];if(d!=null&&d.content){let J=(z=(S=(K=d==null?void 0:d.content)==null?void 0:K.replace(":",vl))==null?void 0:S.split(vl))==null?void 0:z[1];if(((W=J==null?void 0:J.trim())==null?void 0:W.toUpperCase())==="MANUAL"){let w=(v=(t=($=i.itemData)==null?void 0:$.filter(R=>(R==null?void 0:R.key)==="contentTableId"))==null?void 0:t[((L=(x=i.itemData)==null?void 0:x.filter(R=>(R==null?void 0:R.key)==="contentTableId"))==null?void 0:L.length)-1])==null?void 0:v.contents;xe.value=(y=xe.value)==null?void 0:y.map((R,ie)=>{var ne,ae;return(ne=R==null?void 0:R.optionUrl)!=null&&ne.menuId&&(R.type="Select",(ae=R==null?void 0:R.optionUrl)!=null&&ae.menuId&&(R.optionUrl.menuId=R.optionUrl.menuId??w,R.optionUrl.menuFilter=n,_l.value==="新增"&&(R.optionUrl.multiple=!0,R.optionUrl.multipleLimit=5))),R})}}let U=(G=xe.value)==null?void 0:G.filter(J=>{var w,R;return((w=J==null?void 0:J.optionUrl)==null?void 0:w.menuId)&&((R=J==null?void 0:J.optionUrl)==null?void 0:R.menuId)!==""}),pe;if(U==null||U.forEach(J=>{var R,ie;if(pe!==void 0)return;let w=(R=J==null?void 0:J.optionUrl)==null?void 0:R.menuId;((ie=U==null?void 0:U.filter(ne=>{var ae;return((ae=ne==null?void 0:ne.optionUrl)==null?void 0:ae.menuId)===w}))==null?void 0:ie.length)>1&&(pe=w)}),U=U==null?void 0:U.filter(J=>{var w;return((w=J==null?void 0:J.optionUrl)==null?void 0:w.menuId)===pe}),(U==null?void 0:U.length)>1){let J=U==null?void 0:U.map(ne=>ne==null?void 0:ne.prop),w=U==null?void 0:U.map(ne=>ne==null?void 0:ne.label),R=U==null?void 0:U.map(ne=>ne==null?void 0:ne.value),ie=(P=N.cloneDeep(U))==null?void 0:P[0];ie.label=w==null?void 0:w.join("·"),ie.value=R==null?void 0:R.join(" "),ie.value.trim()===""&&(ie.value=""),ie.prop=J==null?void 0:J.join("·"),ie.usingType="parent",xe.value.unshift(ie),xe.value=(H=xe.value)==null?void 0:H.map(ne=>(J!=null&&J.find(ae=>ae===(ne==null?void 0:ne.prop))&&(ne.isFormColHidden=!0),ne))}}},Io=()=>{var a;const l=(a=C.value)==null?void 0:a.$el;l&&he.Sortable.create(l,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:r=>{var c;const{oldIndex:o,newIndex:n}=r;if(o===n)return;const u=ha.value.splice(o,1)[0];ha.value.splice(n,0,u),F.value=(c=F.value)==null?void 0:c.slice().sort((s,f)=>{if(s.label==="操作")return 1;if(f.label==="操作")return-1;const m=ha.value.findIndex(g=>g.label===s.label),D=ha.value.findIndex(g=>g.label===f.label);return m-D})}})};e.onMounted(()=>{ja.value=window.innerWidth-240*2});const Xo=()=>{e.nextTick(()=>{Io()})},Ja=(l,a)=>{var o;if(!l&&!(l!=null&&l.children))return{contents:l,currentSelectContents:void 0};let r;return l.children=(o=l.children)==null?void 0:o.map(n=>{var u,c;if((n==null?void 0:n.id)===Vl.value){let s={};for(let f in n){let m=(u=a==null?void 0:a.find(D=>(D==null?void 0:D.prop)===f))==null?void 0:u.label;m?s[f]=(c=kl.value)==null?void 0:c[m]:s[f]=n[f]}n=Object.assign(s,kl.value),r=n}else{let s=Ja(n,a);n=s==null?void 0:s.contents,r=s==null?void 0:s.currentSelectContents}return n}),{contents:l,currentSelectContents:r}},fr=(l,a)=>{let r,o;return l!=null&&l.find(n=>(n==null?void 0:n.id)===Vl.value)?r=l==null?void 0:l.map(n=>{var u,c;if((n==null?void 0:n.id)===Vl.value){let s={};for(let f in n){let m=(u=a==null?void 0:a.find(D=>(D==null?void 0:D.prop)===f))==null?void 0:u.label;m?s[f]=(c=kl.value)==null?void 0:c[m]:s[f]=n[f]}n=Object.assign(s,kl.value),o=n}return n}):r=l==null?void 0:l.map(n=>{var u,c,s,f;if((n==null?void 0:n.id)===Vl.value){let m={};for(let D in n){let g=(u=a==null?void 0:a.find(E=>(E==null?void 0:E.prop)===D))==null?void 0:u.label;g?m[D]=(c=kl.value)==null?void 0:c[g]:m[D]=n[D]}n=Object.assign(m,kl.value),o=n}else n=(s=Ja(n,a))==null?void 0:s.contents,o=(f=Ja(n,a))==null?void 0:f.currentSelectContents;return n}),{newContents:r,currentSelectContents:o}},hr=(l,a,r)=>{var o,n;return l[a==null?void 0:a.prop]=r,typeof l.id=="number"&&(l.id=(o=l.id)==null?void 0:o.toString()),l.children&&((n=l.children)==null?void 0:n.length)>0&&(l.children=l.children.map(hr)),l},Ga=l=>{var r;const a=[];return a.push({...l}),l!=null&&l.children&&Array.isArray(l.children)&&((r=l.children)==null||r.forEach(o=>{a.push(...Ga(o))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(o=>{const n={...o};return delete n.children,n}):[]},ba=(l=!0,a,r)=>{var m,D,g,E,M,V,K,S,z,W,$,x,L,t,v,y,G,P,H,d,U,pe,J,w,R,ie,ne,ae,me,Be;let o=he.getColumnChild((m=N.cloneDeep(F.value))==null?void 0:m.filter(X=>(X==null?void 0:X.label)!=="操作")),n,u=N.cloneDeep(le.value);if(!kl.value){Kl.value=!1;return}if(Vl.value===""){ra.value++;let X;a&&r?X={id:ra.value.toString(),[a==null?void 0:a.prop]:r,children:kl.value.children}:X={id:ra.value.toString()},X!=null&&X.children&&(X={...X,children:(D=X.children)==null?void 0:D.map(te=>hr(te,a,r))}),u.push(Object.assign(kl.value,X)),n=Object.assign(kl.value,X)}else u=(g=fr(u,o))==null?void 0:g.newContents,n=(E=fr(u,o))==null?void 0:E.currentSelectContents;const c=(M=i.itemData)==null?void 0:M.filter(X=>(X==null?void 0:X.key)==="childTree")[0];if(((V=c==null?void 0:c.contents)==null?void 0:V.length)>0){_l.value="编辑";const X=[];u==null||u.forEach((te,Pe)=>{var ve;let fe={};if(Array.isArray(te)){let Ee=[];te==null||te.filter(qe=>!(qe!=null&&qe.id)).forEach((qe,B)=>{var Q,Ke,Fe,Xe,h,se,je;if((Ke=(Q=jl.value)==null?void 0:Q[B])!=null&&Ke.prop&&!Array.isArray(qe)){let k={};k[jl.value[B].column]=qe,ze!=null&&ze.value&&((Fe=ze==null?void 0:ze.value)==null?void 0:Fe.length)>0&&((Xe=ze==null?void 0:ze.value)!=null&&Xe.find(ke=>JSON.stringify(ke==null?void 0:ke[0])===JSON.stringify(k)))&&(Ee=(h=ze==null?void 0:ze.value)==null?void 0:h.find(ke=>JSON.stringify(ke==null?void 0:ke[0])===JSON.stringify(k))),Ee&&Ee.length>0?fe[jl.value[B].prop]=Ee!=null&&Ee.find(ke=>{var $e;return(($e=Object.keys(ke))==null?void 0:$e[0])===jl.value[B].column})?(se=Ee==null?void 0:Ee.find(ke=>{var $e;return(($e=Object.keys(ke))==null?void 0:$e[0])===jl.value[B].column}))==null?void 0:se[jl.value[B].column]:qe:fe[jl.value[B].prop]=qe}else Array.isArray(qe)&&((je=jl.value[B])!=null&&je.prop?fe[jl.value[B].prop]=qe:fe.children=Ia(qe,jl.value))})}else fe=te;if(Array.isArray(te)&&te.some(Ee=>Ee==null?void 0:Ee.id)){const Ee=(ve=te==null?void 0:te.find(qe=>qe.id))==null?void 0:ve.id;X.push(Object.assign(fe,{id:nr(Ee)}))}else fe.id?X.push(fe):X.push(Object.assign(fe,{id:Pe.toString()}))}),le.value=mr(X,c,F.value)}else le.value=u;gr(le.value),da.value=le.value;const s=Mn(da.value,pa.value,u);let f=[];if(sa.value?(f=(K=N.cloneDeep(sa).value.singleContent)==null?void 0:K.filter(X=>(X==null?void 0:X.id)!==(n==null?void 0:n.id)),f.push(n)):f=[n],$l.value){const X={content:s,singleContent:((S=c==null?void 0:c.contents)==null?void 0:S.length)>0?f==null?void 0:f.flatMap(Ga):f,index:i==null?void 0:i.index,buttonName:"编辑",column:F.value,parentTableId:i==null?void 0:i.parentTableId};el.setCacheUpdatingData(X)}if(l){let X=(x=($=(W=(z=i.itemData)==null?void 0:z.find(fe=>(fe==null?void 0:fe.key)==="filterAllType"))==null?void 0:W.value)==null?void 0:$.find(fe=>(fe==null?void 0:fe.value)==="onConditionContents"))==null?void 0:x.content,te=(L=i.itemData)==null?void 0:L.filter(fe=>(fe==null?void 0:fe.key)==="filterAllType");te=Array.from(new Map(te.filter(Boolean).map((fe,ve)=>[fe.value,{...fe,_idx:ve}])).values()).sort((fe,ve)=>fe._idx-ve._idx).map(({_idx:fe,...ve})=>ve),te=(t=te==null?void 0:te[(te==null?void 0:te.length)-1])==null?void 0:t.value;const Pe={content:s,singleContent:((v=c==null?void 0:c.contents)==null?void 0:v.length)>0?Ga(n):n,index:i==null?void 0:i.index,buttonName:_l.value,column:F.value,parentTableId:i==null?void 0:i.parentTableId,filter:X,allFilter:te,pathIndex:(G=(y=i.itemData)==null?void 0:y.find(fe=>(fe==null?void 0:fe.key)==="relatedFilter"))==null?void 0:G.index,rowContents:xe.value,addArrayValues:de.value};el.setTableLoading(i==null?void 0:i.index),Kl.value=!1,kl.value=void 0,De("change",Pe)}if((d=(H=(P=xe.value)==null?void 0:P[0])==null?void 0:H.optionUrl)!=null&&d.menuId){Kl.value=!1;let X=(U=i.itemData)==null?void 0:U.filter(te=>(te==null?void 0:te.key)==="filterAllType");if((X==null?void 0:X.length)>0){let te=X==null?void 0:X.map(ve=>ve==null?void 0:ve.value),Pe=(w=(J=(pe=te.flat().find(ve=>{var Ee;return(Ee=ve==null?void 0:ve.content)==null?void 0:Ee.includes("@Num")}))==null?void 0:pe.content)==null?void 0:J.split(":"))==null?void 0:w[1];((ne=(ie=(R=te.flat().find(ve=>{var Ee;return(Ee=ve==null?void 0:ve.content)==null?void 0:Ee.includes("@Type:")}))==null?void 0:R.content)==null?void 0:ie.split(":"))==null?void 0:ne[1])!=="Manual"&&(Pe=parseInt(Pe),le.value=(Be=le.value)==null?void 0:Be.slice(((ae=le.value)==null?void 0:ae.length)-Pe,(me=le.value)==null?void 0:me.length))}}};e.onUnmounted(()=>{F.value=[],le.value=[],T.value=[],La.value=[],Ol.value=[],Hl.value=[],ua.value=[],El.value=[],xe.value=[],Pl.value=[],C.value=null});const yr=async(l,a,r)=>{var m,D,g,E,M,V,K,S,z,W,$;Ml.value=r==null?void 0:r.prop;const o=N.cloneDeep(i.itemData),n=o==null?void 0:o.map(x=>{var L;return(x==null?void 0:x.key)==="header"&&((L=x.contents)==null||L.map((t,v)=>{var y,G,P,H,d,U,pe,J,w,R,ie,ne,ae,me,Be,X,te,Pe,fe;return t.type=t!=null&&t.type?t.type:(H=(P=(G=(y=t==null?void 0:t.key)==null?void 0:y.split("$"))==null?void 0:G[1])==null?void 0:P.split("("))!=null&&H[0]?(U=(d=he.FormType)==null?void 0:d.find(ve=>{var Ee,qe,B,Q;return(ve==null?void 0:ve.key)===((Q=(B=(qe=(Ee=t==null?void 0:t.key)==null?void 0:Ee.split("$"))==null?void 0:qe[1])==null?void 0:B.split("("))==null?void 0:Q[0])}))==null?void 0:U.value:"Input",t.options=t!=null&&t.options?t.options:((w=(J=(pe=t==null?void 0:t.key)==null?void 0:pe.split("$"))==null?void 0:J[1])==null?void 0:w.length)>0?(ae=(ne=Ba((ie=(R=t==null?void 0:t.key)==null?void 0:R.split("$"))==null?void 0:ie[1]))==null?void 0:ne.split(","))==null?void 0:ae.map(ve=>({label:ve,value:ve})):[],(me=t==null?void 0:t.key)!=null&&me.includes("$")&&(t.key=(X=(Be=t==null?void 0:t.key)==null?void 0:Be.split("$"))==null?void 0:X[0]),t.value=(te=Object.values(a))==null?void 0:te[v],t.optionUrl=t!=null&&t.formMenuSelect&&((Pe=t==null?void 0:t.formMenuSelect)==null?void 0:Pe.length)>0?{groupSelect:(fe=t==null?void 0:t.groupSelect)==null?void 0:fe.split(/[::]/).map(ve=>ve.trim()),menuSelect:t==null?void 0:t.formMenuSelect,selectRelateType:"",type:(t==null?void 0:t.formType)??(t!=null&&t.groupSelect?"Select":"")}:null,t})),x});let u=N.cloneDeep(xe.value),c=(D=(m=N.cloneDeep(n))==null?void 0:m.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:D.contents;u=u==null?void 0:u.map(x=>{var L;return x.value=(L=c==null?void 0:c.find((t,v)=>v===(x==null?void 0:x.id)))==null?void 0:L.value,x});let s="",f=(M=(E=(g=N.cloneDeep(n))==null?void 0:g.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:E.contents)==null?void 0:M.find((x,L)=>{var t,v,y;return(x==null?void 0:x.label)===Ml.value||(L==null?void 0:L.toString())===((y=(v=(t=Ml.value)==null?void 0:t.split("a"))==null?void 0:v[1])==null?void 0:y.toString())});if((S=(K=(V=N.cloneDeep(n))==null?void 0:V.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:K.contents)==null||S.forEach(x=>{var L,t,v,y,G;s===""&&((v=(t=(L=x==null?void 0:x.optionUrl)==null?void 0:L.groupSelect)==null?void 0:t[1])!=null&&v.includes("["))&&(s=(G=(y=x==null?void 0:x.optionUrl)==null?void 0:y.groupSelect)==null?void 0:G[1])}),(z=f==null?void 0:f.optionUrl)!=null&&z.menuSelect){let x=await Oa(f),L;if(x==null||x.forEach(t=>{var v,y,G,P,H,d,U,pe,J,w;s===((y=(v=f==null?void 0:f.optionUrl)==null?void 0:v.groupSelect)==null?void 0:y[1])&&((H=(P=(G=f==null?void 0:f.optionUrl)==null?void 0:G.groupSelect)==null?void 0:P[1])!=null&&H.includes("["))&&((w=N.cloneDeep(t))==null?void 0:w[(J=(pe=(U=(d=f==null?void 0:f.optionUrl)==null?void 0:d.groupSelect)==null?void 0:U[1])==null?void 0:pe.replaceAll("[",""))==null?void 0:J.replaceAll("]","")])===(f==null?void 0:f.value)&&(L=t)}),L){let t=N.cloneDeep(u);t=t==null?void 0:t.map(y=>{var G,P,H,d,U,pe,J,w,R,ie,ne;return(L!=null&&L[y==null?void 0:y.label]||L!=null&&L[(d=(H=(P=(G=y==null?void 0:y.optionUrl)==null?void 0:G.groupSelect)==null?void 0:P[1])==null?void 0:H.replaceAll("[",""))==null?void 0:d.replaceAll("]","")])&&((J=(pe=(U=y==null?void 0:y.optionUrl)==null?void 0:U.groupSelect)==null?void 0:pe[1])!=null&&J.includes("["))&&(y.value=(L==null?void 0:L[y==null?void 0:y.label])||(L==null?void 0:L[(ne=(ie=(R=(w=y==null?void 0:y.optionUrl)==null?void 0:w.groupSelect)==null?void 0:R[1])==null?void 0:ie.replaceAll("[",""))==null?void 0:ne.replaceAll("]","")])),y}),le.value=(W=N.cloneDeep(le.value))==null?void 0:W.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const G={};return t==null||t.forEach(P=>{G[P.name]=P.value}),G.id=y==null?void 0:y.id,G}return y});let v=N.cloneDeep(t);v=v==null?void 0:v.map(y=>{var G,P,H,d;return(P=(G=y==null?void 0:y.optionUrl)==null?void 0:G.menuSelect)!=null&&P.some(U=>U==null?void 0:U.includes)&&(y.optionUrl.menuSelect=(d=(H=y==null?void 0:y.optionUrl)==null?void 0:H.menuSelect)==null?void 0:d.map(U=>{var pe,J,w,R;if(U!=null&&U.includes("[")){let ie=(J=(pe=U==null?void 0:U.replaceAll("[","").replaceAll("]",""))==null?void 0:pe.split(":"))==null?void 0:J[1];U=(R=(w=N.cloneDeep(t))==null?void 0:w.find(ne=>(ne==null?void 0:ne.label)===ie))==null?void 0:R.value}return U})),y}),le.value=($=N.cloneDeep(le.value))==null?void 0:$.map(y=>{if((y==null?void 0:y.id)===(a==null?void 0:a.id)){const G={};return v==null||v.forEach(P=>{G[P.name]=P.value}),G.id=y==null?void 0:y.id,G}return y})}}},Yo=async l=>{var M,V,K,S,z,W,$,x,L,t,v,y,G,P,H,d,U,pe,J,w,R,ie,ne,ae,me,Be,X,te,Pe,fe,ve,Ee,qe;if(!l)return;kl.value=l;const a=N.cloneDeep(i.itemData);let r=a==null?void 0:a.map(B=>{var Q,Ke,Fe,Xe;return(B==null?void 0:B.key)==="header"&&(Array.isArray((Q=B.contents)==null?void 0:Q[0])?B.contents=(Fe=he.getColumnChild((Ke=B.contents)==null?void 0:Ke[0]))==null?void 0:Fe.map((h,se)=>{var je,k,ke,$e,rl,ol,nl,il,sl,tl,al,_e,Le,dl,bl,b,I,Ce,He,pl,Bl,fl,wl,Sl;return h.type=h!=null&&h.type?h.type:($e=(ke=(k=(je=h==null?void 0:h.key)==null?void 0:je.split("$"))==null?void 0:k[1])==null?void 0:ke.split("("))!=null&&$e[0]?(ol=(rl=he.FormType)==null?void 0:rl.find(Oe=>{var q,p,ge,Ue;return(Oe==null?void 0:Oe.key)===((Ue=(ge=(p=(q=h==null?void 0:h.key)==null?void 0:q.split("$"))==null?void 0:p[1])==null?void 0:ge.split("("))==null?void 0:Ue[0])}))==null?void 0:ol.value:"Input",h.options=h!=null&&h.options?h.options:((sl=(il=(nl=h==null?void 0:h.key)==null?void 0:nl.split("$"))==null?void 0:il[1])==null?void 0:sl.length)>0?(Le=(_e=Ba((al=(tl=h==null?void 0:h.key)==null?void 0:tl.split("$"))==null?void 0:al[1]))==null?void 0:_e.split(","))==null?void 0:Le.map(Oe=>({label:Oe,value:Oe})):[],(dl=h==null?void 0:h.key)!=null&&dl.includes("$")&&(h.key=(b=(bl=h==null?void 0:h.key)==null?void 0:bl.split("$"))==null?void 0:b[0]),((He=(Ce=(I=xe.value)==null?void 0:I.find(Oe=>(Oe==null?void 0:Oe.prop)===(h==null?void 0:h.prop)))==null?void 0:Ce.optionUrl)==null?void 0:He.multiple)===!0&&!Array.isArray((pl=Object.values(l))==null?void 0:pl[se])?h.value=[(Bl=Object.values(l))==null?void 0:Bl[se]]:h.value=(fl=Object.values(l))==null?void 0:fl[se],h.optionUrl=h!=null&&h.formMenuSelect&&((wl=h==null?void 0:h.formMenuSelect)==null?void 0:wl.length)>0?{groupSelect:(Sl=h==null?void 0:h.groupSelect)==null?void 0:Sl.split(/[::]/).map(Oe=>Oe.trim()),menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":"")}:null,h}):B.contents=(Xe=B.contents)==null?void 0:Xe.map((h,se)=>{var je,k,ke,$e,rl,ol,nl,il,sl,tl,al,_e,Le,dl,bl,b,I,Ce,He,pl,Bl,fl,wl,Sl;return h.type=h!=null&&h.type?h.type:($e=(ke=(k=(je=h==null?void 0:h.key)==null?void 0:je.split("$"))==null?void 0:k[1])==null?void 0:ke.split("("))!=null&&$e[0]?(ol=(rl=he.FormType)==null?void 0:rl.find(Oe=>{var q,p,ge,Ue;return(Oe==null?void 0:Oe.key)===((Ue=(ge=(p=(q=h==null?void 0:h.key)==null?void 0:q.split("$"))==null?void 0:p[1])==null?void 0:ge.split("("))==null?void 0:Ue[0])}))==null?void 0:ol.value:"Input",h.options=h!=null&&h.options?h.options:((sl=(il=(nl=h==null?void 0:h.key)==null?void 0:nl.split("$"))==null?void 0:il[1])==null?void 0:sl.length)>0?(Le=(_e=Ba((al=(tl=h==null?void 0:h.key)==null?void 0:tl.split("$"))==null?void 0:al[1]))==null?void 0:_e.split(","))==null?void 0:Le.map(Oe=>({label:Oe,value:Oe})):[],(dl=h==null?void 0:h.key)!=null&&dl.includes("$")&&(h.key=(b=(bl=h==null?void 0:h.key)==null?void 0:bl.split("$"))==null?void 0:b[0]),((He=(Ce=(I=xe.value)==null?void 0:I.find(Oe=>(Oe==null?void 0:Oe.prop)===(h==null?void 0:h.prop)))==null?void 0:Ce.optionUrl)==null?void 0:He.multiple)===!0&&!Array.isArray((pl=Object.values(l))==null?void 0:pl[se])?h.value=[(Bl=Object.values(l))==null?void 0:Bl[se]]:h.value=(fl=Object.values(l))==null?void 0:fl[se],h.optionUrl=h!=null&&h.formMenuSelect&&((wl=h==null?void 0:h.formMenuSelect)==null?void 0:wl.length)>0?{groupSelect:(Sl=h==null?void 0:h.groupSelect)==null?void 0:Sl.split(/[::]/).map(Oe=>Oe.trim()),menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:(h==null?void 0:h.formType)??(h!=null&&h.groupSelect?"Select":"")}:null,h})),B}),o=xe.value,n=(V=(M=N.cloneDeep(r))==null?void 0:M.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:V.contents;if(n=n==null?void 0:n.filter(B=>(B==null?void 0:B.label)!=="操作"),n.push({label:"操作",type:"operate"}),o=o==null?void 0:o.map(B=>{var Q;return B.value=B.value??((Q=n==null?void 0:n.find((Ke,Fe)=>(Ke==null?void 0:Ke.prop)===(B==null?void 0:B.name)))==null?void 0:Q.value),B}),!fa.value)return;let u="",c=N.cloneDeep(Ml.value);(K=Ml.value)!=null&&K.includes("·")&&(Ml.value=(z=(S=Ml.value)==null?void 0:S.split("·"))==null?void 0:z[0]);let s=(x=($=(W=N.cloneDeep(r))==null?void 0:W.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:$.contents)==null?void 0:x.find((B,Q)=>{var Ke,Fe,Xe;return(B==null?void 0:B.prop)===Ml.value||(Q==null?void 0:Q.toString())===((Xe=(Fe=(Ke=Ml.value)==null?void 0:Ke.split("a"))==null?void 0:Fe[1])==null?void 0:Xe.toString())}),f=(L=s==null?void 0:s.optionUrl)==null?void 0:L.menuSelect,m=!0;(y=(v=(t=N.cloneDeep(r))==null?void 0:t.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:v.contents)==null||y.forEach(B=>{var Ke,Fe,Xe,h,se,je,k;let Q=(Fe=(Ke=B==null?void 0:B.optionUrl)==null?void 0:Ke.groupSelect)==null?void 0:Fe[1];!Q&&!Array.isArray((Xe=B==null?void 0:B.optionUrl)==null?void 0:Xe.groupSelect)&&(Q=(je=(se=(h=B==null?void 0:B.optionUrl)==null?void 0:h.groupSelect)==null?void 0:se.split(":"))==null?void 0:je[1]),m&&(Q!=null&&Q.includes("["))&&(u=Q,JSON.stringify(f)===JSON.stringify((k=B==null?void 0:B.optionUrl)==null?void 0:k.menuSelect)&&(m=!1))});let D=N.cloneDeep(o),g=Qe.value;g!=null&&g.find(B=>(s==null?void 0:s.prop)===(B==null?void 0:B.key))&&(g=g==null?void 0:g.filter(B=>(s==null?void 0:s.prop)!==(B==null?void 0:B.key))),g!=null&&g.find(B=>c===(B==null?void 0:B.key))&&(g=g==null?void 0:g.filter(B=>c!==(B==null?void 0:B.key))),D=D==null?void 0:D.map(B=>{var Q,Ke,Fe,Xe,h,se,je,k,ke;return(B==null?void 0:B.type)==="Select"&&(((Ke=(Q=B==null?void 0:B.optionUrl)==null?void 0:Q.allSelectionContents)==null?void 0:Ke.length)>0&&(B.optionUrl.contactValue=l),((s==null?void 0:s.prop)===(B==null?void 0:B.prop)||c===(B==null?void 0:B.prop))&&s&&(Array.isArray(s.value)&&((Fe=s.value)==null?void 0:Fe.length)>0&&((Xe=s.value)!=null&&Xe.every($e=>typeof $e=="string"))?(g.push({key:B==null?void 0:B.prop,value:[(se=s.value)==null?void 0:se[((h=s.value)==null?void 0:h.length)-1]]}),B.selectValue=(je=g==null?void 0:g.find($e=>($e==null?void 0:$e.key)===(B==null?void 0:B.prop)))==null?void 0:je.value):Array.isArray(s.value)&&((k=s.value)==null?void 0:k.length)===0?(g=[],B.selectValue=[],l[B==null?void 0:B.prop]=""):Array.isArray(B.value)&&g.push({key:B==null?void 0:B.prop,value:[(ke=B.value)==null?void 0:ke[(B==null?void 0:B.length)-1]]}))),B.value=l==null?void 0:l[B==null?void 0:B.prop],B}),Qe.value=g,xe.value=N.cloneDeep(D);let E=(s==null?void 0:s.menuId)??((H=(P=(G=xe.value)==null?void 0:G.find(B=>{var Q;return(Q=B==null?void 0:B.optionUrl)==null?void 0:Q.menuId}))==null?void 0:P.optionUrl)==null?void 0:H.menuId);if((d=s==null?void 0:s.optionUrl)!=null&&d.menuSelect&&fa.value||E){let B=await Oa(s,E),Q;if(B==null||B.forEach(h=>{var se,je,k,ke,$e,rl,ol,nl,il,sl,tl,al,_e,Le,dl,bl,b,I,Ce,He,pl,Bl,fl,wl,Sl,Oe,q;if(!E&&u===((je=(se=s==null?void 0:s.optionUrl)==null?void 0:se.groupSelect)==null?void 0:je[1])&&(($e=(ke=(k=s==null?void 0:s.optionUrl)==null?void 0:k.groupSelect)==null?void 0:ke[1])!=null&&$e.includes("["))&&((sl=N.cloneDeep(h))==null?void 0:sl[(il=(nl=(ol=(rl=s==null?void 0:s.optionUrl)==null?void 0:rl.groupSelect)==null?void 0:ol[1])==null?void 0:nl.replaceAll("[",""))==null?void 0:il.replaceAll("]","")])===(s==null?void 0:s.value)&&(Q=h),E){let p=(al=(tl=xe.value)==null?void 0:tl.find(be=>{var Te;return(s==null?void 0:s.menuId)===((Te=be==null?void 0:be.optionUrl)==null?void 0:Te.menuId)}))==null?void 0:al.prop,ge=l[p];if(p!=null&&p.includes("·"))if(!Array.isArray(l[p]))ge=(Le=(_e=l[p])==null?void 0:_e.split(" "))==null?void 0:Le[0],p=(dl=p==null?void 0:p.split("·"))==null?void 0:dl[0];else{p=(bl=p==null?void 0:p.split("·"))==null?void 0:bl[0];let be=(I=(b=D==null?void 0:D.find(Te=>(Te==null?void 0:Te.prop)===p))==null?void 0:b.selectValue)==null?void 0:I[0];ge=(Ce=be==null?void 0:be.split(" "))==null?void 0:Ce[0]}let Ue=(pl=(He=D==null?void 0:D.find(be=>{var Te;return(be==null?void 0:be.prop)===p||((Te=be==null?void 0:be.prop)==null?void 0:Te.includes("."+p))}))==null?void 0:He.selectValue)==null?void 0:pl[0];if(p!=null&&p.includes(".")&&!h[p]&&(p=(fl=p==null?void 0:p.split("."))==null?void 0:fl[((Bl=p==null?void 0:p.split("."))==null?void 0:Bl.length)-1]),Array.isArray(ge)&&!Ue&&(Ue=ge==null?void 0:ge[0]),h[p]===(Array.isArray(ge)?Ue:ge)&&(s==null?void 0:s.directiveLabel)==="#isMain"){if(c!=null&&c.includes("·")){let be=c==null?void 0:c.split("·"),Te=(q=(Oe=(Sl=Array.isArray(l==null?void 0:l[c])?(wl=l==null?void 0:l[c])==null?void 0:wl[0]:l==null?void 0:l[c])==null?void 0:Sl.split(" "))==null?void 0:Oe.filter(we=>we&&we!==""))==null?void 0:q.map(we=>we==null?void 0:we.trim());be==null||be.forEach((we,Ul)=>{h[we]=Te==null?void 0:Te[Ul]})}Q=h}}}),We.value&&(s==null?void 0:s.directiveLabel)==="#isMain"&&(de.value=[]),!Q){if(We.value&&(s==null?void 0:s.directiveLabel)==="#isMain")if(c!=null&&c.includes("·")){let h=l,se=(J=(pe=(U=l==null?void 0:l[c])==null?void 0:U.split(" "))==null?void 0:pe.filter(k=>k&&k!==""))==null?void 0:J.map(k=>k==null?void 0:k.trim());(w=c==null?void 0:c.split("·"))==null||w.forEach((k,ke)=>{h[k]=se[ke]});let je=(R=xe.value)==null?void 0:R.find(k=>(k==null?void 0:k.prop)===c);h[je.prop]=[je.value],Q=h}else{let h=(ie=xe.value)==null?void 0:ie.find(se=>(se==null?void 0:se.prop)===(s==null?void 0:s.prop));l[h.prop]=[h.value],Q=l}else if((s==null?void 0:s.directiveLabel)==="#isMain"){let h={};(ne=xe.value)==null||ne.forEach(se=>{var je,k;(se==null?void 0:se.prop)===c?h[se.prop]=(je=se==null?void 0:se.selectValue)!=null&&je[0]?[(k=se==null?void 0:se.selectValue)==null?void 0:k[0]]:"":h[se.prop]=""}),Q=h}}if(Q){let h=N.cloneDeep(o);h=h==null?void 0:h.map(k=>{var $e,rl,ol,nl,il,sl,tl,al,_e,Le,dl,bl,b,I,Ce,He,pl,Bl,fl,wl,Sl,Oe,q,p,ge,Ue,be,Te,we,Ul,Wl,Jl,Ae,Al,Rl,Gl,ml,Xl,xr,Nr,_r,wr,Ar,Dr;if((($e=k==null?void 0:k.prop)!=null&&$e.includes(".")&&(Q!=null&&Q[(il=(rl=k==null?void 0:k.prop)==null?void 0:rl.split("."))==null?void 0:il[((nl=(ol=k==null?void 0:k.prop)==null?void 0:ol.split("."))==null?void 0:nl.length)-1]])||Q!=null&&Q[k==null?void 0:k.prop]||Q!=null&&Q[(_e=(al=(tl=(sl=k==null?void 0:k.optionUrl)==null?void 0:sl.groupSelect)==null?void 0:tl[1])==null?void 0:al.replaceAll("[",""))==null?void 0:_e.replaceAll("]","")])&&((bl=(dl=(Le=k==null?void 0:k.optionUrl)==null?void 0:Le.groupSelect)==null?void 0:dl[1])!=null&&bl.includes("["))&&!(k!=null&&k.relatedValueId))return k.value=(Q==null?void 0:Q[k==null?void 0:k.prop])??(Q==null?void 0:Q[(He=(b=k==null?void 0:k.prop)==null?void 0:b.split("."))==null?void 0:He[((Ce=(I=k==null?void 0:k.prop)==null?void 0:I.split("."))==null?void 0:Ce.length)-1]])??(Q==null?void 0:Q[(wl=(fl=(Bl=(pl=k==null?void 0:k.optionUrl)==null?void 0:pl.groupSelect)==null?void 0:Bl[1])==null?void 0:fl.replaceAll("[",""))==null?void 0:wl.replaceAll("]","")]),k;let ke=Q==null?void 0:Q[k==null?void 0:k.prop];return(Sl=k==null?void 0:k.prop)!=null&&Sl.includes(".")&&!ke&&((q=(Oe=s==null?void 0:s.prop)==null?void 0:Oe.split("."))==null?void 0:q[0])===((ge=(p=k==null?void 0:k.prop)==null?void 0:p.split("."))==null?void 0:ge[0])&&(ke=(Q==null?void 0:Q[(we=(Ue=k==null?void 0:k.prop)==null?void 0:Ue.split("."))==null?void 0:we[((Te=(be=k==null?void 0:k.prop)==null?void 0:be.split("."))==null?void 0:Te.length)-1]])??(Q==null?void 0:Q[k==null?void 0:k.prop])),E&&(ke||ke==="")&&(k!=null&&k.relatedValueId)&&_l.value==="新增"&&((k==null?void 0:k.prop)!==(s==null?void 0:s.prop)||c!=null&&c.includes((s==null?void 0:s.prop)+"·")||c!=null&&c.includes("·"+(k==null?void 0:k.prop)))?k.value=ke??(Q==null?void 0:Q[(Ae=(Jl=(Wl=(Ul=k==null?void 0:k.optionUrl)==null?void 0:Ul.groupSelect)==null?void 0:Wl[1])==null?void 0:Jl.replaceAll("[",""))==null?void 0:Ae.replaceAll("]","")]):(c!=null&&c.includes("·"+(k==null?void 0:k.prop))||c!=null&&c.includes("."))&&(k==null?void 0:k.prop)!==(s==null?void 0:s.prop)&&!Array.isArray((Rl=(Al=xe.value)==null?void 0:Al.find(hl=>(hl==null?void 0:hl.prop)===(k==null?void 0:k.prop)))==null?void 0:Rl.value)?k.value=ke??"":((Gl=k==null?void 0:k.optionUrl)==null?void 0:Gl.multiple)===!0&&!Array.isArray((Xl=(ml=xe.value)==null?void 0:ml.find(hl=>(hl==null?void 0:hl.prop)===(k==null?void 0:k.prop)))==null?void 0:Xl.value)?k.value=((Nr=(xr=xe.value)==null?void 0:xr.find(hl=>(hl==null?void 0:hl.prop)===(k==null?void 0:k.prop)))==null?void 0:Nr.value)===""?[]:[(wr=(_r=xe.value)==null?void 0:_r.find(hl=>(hl==null?void 0:hl.prop)===(k==null?void 0:k.prop)))==null?void 0:wr.value]:k.value=(Dr=(Ar=xe.value)==null?void 0:Ar.find(hl=>(hl==null?void 0:hl.prop)===(k==null?void 0:k.prop)))==null?void 0:Dr.value,k}),xe.value=N.cloneDeep(h);let se=N.cloneDeep(h);se=se==null?void 0:se.map(k=>{var ke,$e,rl,ol,nl,il,sl,tl,al;return($e=(ke=k==null?void 0:k.optionUrl)==null?void 0:ke.menuSelect)!=null&&$e.some(_e=>_e==null?void 0:_e.includes("["))&&(k.optionUrl.oldMenuSelect=(ol=(rl=N.cloneDeep(k))==null?void 0:rl.optionUrl)==null?void 0:ol.menuSelect,k.optionUrl.menuSelect=(il=(nl=k==null?void 0:k.optionUrl)==null?void 0:nl.menuSelect)==null?void 0:il.map(_e=>{var Le,dl,bl,b;if(_e!=null&&_e.includes("[")){let I=(dl=(Le=_e==null?void 0:_e.replaceAll("[","").replaceAll("]",""))==null?void 0:Le.split(":"))==null?void 0:dl[1];_e=(b=(bl=N.cloneDeep(h))==null?void 0:bl.find(Ce=>(Ce==null?void 0:Ce.label)===I))==null?void 0:b.value}return _e})),((s==null?void 0:s.prop)===(k==null?void 0:k.prop)||c===(k==null?void 0:k.prop))&&Array.isArray(s.value)&&(sl=s.value)!=null&&sl.every(_e=>typeof _e=="string")&&(k.selectValue=((tl=g==null?void 0:g.find(_e=>(_e==null?void 0:_e.key)===(k==null?void 0:k.prop)))==null?void 0:tl.value)??((al=k.value)==null?void 0:al[0])),k}),xe.value=se;let je={};(ae=xe.value)==null||ae.forEach(k=>{je[k.prop]=k==null?void 0:k.value}),kl.value=je}let Ke=de.value,Fe={};(me=xe.value)==null||me.forEach(h=>{var se,je,k,ke,$e,rl,ol,nl,il,sl,tl;if(((h==null?void 0:h.directiveLabel)==="#isMain"||(se=h==null?void 0:h.optionUrl)!=null&&se.menuId)&&Array.isArray(h==null?void 0:h.value)){if(Fe[h.prop]||(Fe[h.prop]=(k=h.value)==null?void 0:k[((je=h.value)==null?void 0:je.length)-1]),(ke=h==null?void 0:h.prop)!=null&&ke.includes("·")){let al=(ol=(rl=($e=h==null?void 0:h.prop)==null?void 0:$e.split("·"))==null?void 0:rl.filter(Le=>Le&&Le!==""))==null?void 0:ol.map(Le=>Le==null?void 0:Le.trim()),_e=(tl=(sl=(il=(nl=h==null?void 0:h.selectValue)==null?void 0:nl[0])==null?void 0:il.split(" "))==null?void 0:sl.filter(Le=>Le&&Le!==""))==null?void 0:tl.map(Le=>Le==null?void 0:Le.trim());al==null||al.forEach((Le,dl)=>{Fe=Object.assign({},Fe,{[Le]:_e==null?void 0:_e[dl]})})}}else Fe[h.prop]=(Fe==null?void 0:Fe[h==null?void 0:h.prop])??h.value});let Xe=(Be=xe.value)==null?void 0:Be.find(h=>{var se;return(h==null?void 0:h.directiveLabel)==="#isMain"||((se=h==null?void 0:h.optionUrl)==null?void 0:se.menuId)});(s==null?void 0:s.directiveLabel)==="#isMain"&&((te=s==null?void 0:s.value)==null?void 0:te[((X=s==null?void 0:s.value)==null?void 0:X.length)-1])!==""?Ke.push({label:s==null?void 0:s.prop,value:(fe=s==null?void 0:s.value)==null?void 0:fe[((Pe=s==null?void 0:s.value)==null?void 0:Pe.length)-1],objectValue:Fe}):((ve=Xe==null?void 0:Xe.value)==null?void 0:ve.length)>0&&((qe=s==null?void 0:s.value)==null?void 0:qe[((Ee=s==null?void 0:s.value)==null?void 0:Ee.length)-1])!==""&&(Ke=Ke==null?void 0:Ke.map(h=>{var se;return(h==null?void 0:h.value)===((se=Xe==null?void 0:Xe.selectValue)==null?void 0:se[0])&&(h.objectValue=Fe),h})),de.value=Ke}fa.value=!0,We.value=!1},Qo=l=>l?(l==null?void 0:l.toUpperCase())==="INPUT"?"TEXTAREA":l:"TEXTAREA",Zo=l=>{var u,c;const a=(c=(u=Ol.value)==null?void 0:u.find(s=>(s==null?void 0:s.label)===(l==null?void 0:l.label)))==null?void 0:c.multiple,r=l==null?void 0:l.prop;if((l==null?void 0:l.formType)!="Select")return;le.value.forEach(s=>{const f=s==null?void 0:s[r];a&&Tr.isString(f)&&(s[r]=[f]),!a&&!Tr.isString(f)&&(s[r]="")})},vr=(l,a)=>{var r;return a==null||a.forEach(o=>{l[o==null?void 0:o.prop]=o==null?void 0:o.value}),l.children&&((r=l.children)==null?void 0:r.length)>0&&(l.children=l.children.map(o=>vr(o,a))),l},Ha=l=>{var r,o,n,u,c,s;ga("");const a=(r=xe.value)==null?void 0:r.reduce((f,m)=>(f[m.name]=m.value,f),{});if(((o=Object.keys(a))==null?void 0:o.length)>0){kl.value=a,Vl.value="",ra.value=(n=le.value)==null?void 0:n.length,El.value=(u=Tl.value)==null?void 0:u.filter(m=>(m==null?void 0:m.label)!=="新增");const f=(s=(c=T.value)==null?void 0:c.filter(m=>(m==null?void 0:m.label)!=="操作"))==null?void 0:s.map(m=>{var g,E,M;const D=(E=(g=Ol.value)==null?void 0:g.find(V=>(V==null?void 0:V.label)===(m==null?void 0:m.label)))==null?void 0:E.multiple;return Zo(m),{...m,contents:(m==null?void 0:m.options)??[],optionUrl:m!=null&&m.formMenuSelect&&((M=m==null?void 0:m.formMenuSelect)==null?void 0:M.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:D}:null}});F.value=f==null?void 0:f.map(m=>vr(m,[{prop:"type",value:"edit"},{prop:"columnType",value:Qo(m==null?void 0:m.formType)||(m==null?void 0:m.columnType)}])),l==="createClick"&&ba(!1)}},ia={START:"开始时间",END:"结束时间",HOURS:"工时"},en=(l,a)=>Number(he.dayjs(a).diff(he.dayjs(l),"day",!0).toFixed(1)),gr=l=>{var u;const a=i.itemData,r=(u=a==null?void 0:a.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:u.contents,o=new Map;return r==null||r.forEach((c,s)=>{const{label:f}=c;o.set(f,s)}),!o.has(ia.START)||!o.has(ia.END)||!o.has(ia.HOURS)?l:l==null?void 0:l.map(c=>{const s=c==null?void 0:c[ia.START],f=c==null?void 0:c[ia.END],m=en(s,f);return s&&f&&(c[ia.HOURS]=`${m}天`),c})},br=(l,a,r=0)=>{if(r>((a==null?void 0:a.length)??""))return l;const o=a==null?void 0:a[r],n=new Map;for(const c of l){const s=c[o];n.has(s)||n.set(s,[]),n.get(s)&&n.get(s).push(c)}const u=[];for(const[c,s]of n){const[f,...m]=s,D={...f};r+1===((a==null?void 0:a.length)??"")?D.children=s==null?void 0:s.map(g=>(g.level=N.cloneDeep(r)+1,g)).filter((g,E)=>E!==0):m.length>0&&(D.children=br(m,a,r+1)),D.level=r,u.push(D)}return u},mr=(l,a,r)=>{var n;if(!(a!=null&&a.contents)||((n=a==null?void 0:a.contents)==null?void 0:n.length)===0)return l;let o=[];return o=br(l,a==null?void 0:a.contents,0),o},kr=async(l,a)=>{var M,V,K,S,z,W,$,x,L,t,v,y,G,P,H,d,U,pe,J,w,R,ie,ne,ae,me,Be,X,te,Pe,fe,ve,Ee,qe,B,Q,Ke,Fe,Xe,h,se,je,k,ke,$e,rl,ol,nl,il,sl,tl,al,_e,Le,dl,bl;const r=l==null?void 0:l.filter(b=>(b==null?void 0:b.key)==="header");l==null||l.filter(b=>(b==null?void 0:b.key)==="tableIndexColumn")[0];const o=l==null?void 0:l.filter(b=>(b==null?void 0:b.key)==="childTree")[0];let n=!0;if((K=(V=(M=l==null?void 0:l.find(b=>(b==null?void 0:b.key)==="filterAllType"))==null?void 0:M.value)==null?void 0:V.find(b=>(b==null?void 0:b.value)==="onPamButtonContents"))!=null&&K.content){let b=(W=(z=(S=l==null?void 0:l.find(I=>(I==null?void 0:I.key)==="filterAllType"))==null?void 0:S.value)==null?void 0:z.find(I=>(I==null?void 0:I.value)==="onPamButtonContents"))==null?void 0:W.content;b=($=b==null?void 0:b.split(":"))==null?void 0:$[1],b=(x=b.slice(1,(b==null?void 0:b.length)-1))==null?void 0:x.split(","),n=!!(b!=null&&b.find(I=>I==="操作"))}let u=a;const c=l==null?void 0:l.find(b=>(b==null?void 0:b.key)==="page"),s=l==null?void 0:l.find(b=>(b==null?void 0:b.key)==="rowButton"),f=l==null?void 0:l.find(b=>(b==null?void 0:b.key)==="extraButton"),m=l==null?void 0:l.filter(b=>(b==null?void 0:b.key)==="tableContents"),D=l==null?void 0:l.filter(b=>(b==null?void 0:b.key)==="tableIndex");Ol.value=(t=(L=l==null?void 0:l.filter(b=>(b==null?void 0:b.key)==="tableToForm"))==null?void 0:L[0])==null?void 0:t.contents,Qa.value=(c==null?void 0:c.contents)??!0;let g=[];Zl.value===""?g=r==null?void 0:r[0]:g=(r==null?void 0:r.find(b=>(b==null?void 0:b.selectLabel)==="("+Zl.value+")"))??(r==null?void 0:r.find(b=>!(b!=null&&b.selectLabel)));let E=[];if(Zl.value===""?E=D==null?void 0:D[0]:E=(D==null?void 0:D.find(b=>(b==null?void 0:b.selectLabel)==="("+Zl.value+")"))??(D==null?void 0:D.find(b=>!(b!=null&&b.selectLabel))),((v=g==null?void 0:g.contents)==null?void 0:v.length)>0){let b=[];if(g!=null&&g.contents.some(q=>Array.isArray(q)&&(q==null?void 0:q.find(p=>p.children))))pa.value===""?b=(G=(y=he.getGradeColumns(g==null?void 0:g.contents,n,u))==null?void 0:y[0])==null?void 0:G.filter(q=>!Array.isArray(q)):(pa.value.split("-"),b=(P=he.getGradeColumns(g==null?void 0:g.contents,n,u))==null?void 0:P[0]);else{let q=g!=null&&g.contents.some(p=>Array.isArray(p))?(H=g==null?void 0:g.contents)==null?void 0:H[0]:g==null?void 0:g.contents;q!=null&&q.find(p=>(p==null?void 0:p.label)==="操作")||q.push({label:"操作"}),q==null||q.forEach((p,ge)=>{var Te,we,Ul,Wl,Jl;let Ue="";(we=(Te=Ve.value)==null?void 0:Te.split("/"))==null||we.forEach(Ae=>{var Al,Rl,Gl;if(Ae!==""){let ml=(Gl=(Rl=(Al=Ae==null?void 0:Ae.split(ce+"updateLoading"))==null?void 0:Al[0])==null?void 0:Rl.split(ce+"loading"))==null?void 0:Gl[0];Ue=Ue===""?Ue+ml:Ue+"/"+ml}}),Ue=Ue+"/";const be=(Ul=Ol.value)==null?void 0:Ul.find(Ae=>(Ae==null?void 0:Ae.prop)===(p==null?void 0:p.prop));b.push({label:(p==null?void 0:p.label)==="操作"?n?"操作":"":(p==null?void 0:p.label)??"",prop:(p==null?void 0:p.label)==="操作"?"operate":(p==null?void 0:p.prop)??"a"+ge,width:p!=null&&p.width?parseInt(p.width):"",fixed:(p==null?void 0:p.fixed)??void 0,sortable:(p==null?void 0:p.sortable)??!1,filterable:(p==null?void 0:p.filterable)??!1,operable:(p==null?void 0:p.operable)??!1,showSummary:(p==null?void 0:p.showSummary)??!1,align:(p==null?void 0:p.align)??"left",showOverflowTooltip:(p==null?void 0:p.showOverflowTooltip)??!0,isNotDrag:(p==null?void 0:p.isNotDrag)??!1,isEditCol:(p==null?void 0:p.isEditCol)??!1,isOperate:(p==null?void 0:p.isOperate)??!1,id:(p==null?void 0:p.id)??ge,type:(p==null?void 0:p.label)==="操作"?"operate":void 0,formType:(p==null?void 0:p.formType)??(p!=null&&p.groupSelect?"Select":""),isTableColHidden:p==null?void 0:p.isTableColHidden,isFormColHidden:p==null?void 0:p.isFormColHidden,disabled:p==null?void 0:p.disabled,options:(p==null?void 0:p.options)??[],value:(p==null?void 0:p.value)??"",formMenuSelect:(p==null?void 0:p.formMenuSelect)??[],isRoute:(p==null?void 0:p.isRoute)??!1,groupSelect:p!=null&&p.groupSelect?(Wl=p==null?void 0:p.groupSelect)==null?void 0:Wl.replaceAll('"',"").split(":"):[],isMainKey:(p==null?void 0:p.isMainKey)||(p==null?void 0:p.directiveLabel)==="#isMain",columnType:(be==null?void 0:be.type)||(p==null?void 0:p.columnType)||"TEXTAREA",directiveLabel:p==null?void 0:p.directiveLabel,directiveColor:(p==null?void 0:p.directiveColor)??!1,isExistChild:!!(p!=null&&p.directiveLabel&&(u!=null&&u[Ue])&&!((Jl=p==null?void 0:p.directiveLabel)!=null&&Jl.includes("@"))&&(p==null?void 0:p.directiveLabel)==="#isMain"),childPath:(p==null?void 0:p.directiveLabel)!=="#isMain"?Ue:void 0,allSelectionContents:(p==null?void 0:p.allSelectionContents)??[],selectFilter:p==null?void 0:p.selectFilter,menuId:p==null?void 0:p.menuId,filterContent:p==null?void 0:p.filterContent,relatedValueId:p==null?void 0:p.relatedValueId})})}const I=he.getNewColumnChild(b);await co(I),Zn(ul.value,I),F.value=I,La.value=I,_.value=(d=F.value)==null?void 0:d.map(q=>q==null?void 0:q.label);let Ce=(pe=(U=he.getAllLeafNodes(F.value))==null?void 0:U.filter(q=>(q==null?void 0:q.type)!=="operate"))==null?void 0:pe.map((q,p)=>({prop:(q==null?void 0:q.prop)??"a"+p,column:q.label}));jl.value=Ce;let He=[];Zl.value===""?He=m==null?void 0:m[0]:He=(m==null?void 0:m.find(q=>(q==null?void 0:q.selectLabel)==="("+Zl.value+")"))??(m==null?void 0:m.find(q=>!(q!=null&&q.selectLabel)));let pl=Array.isArray((J=He==null?void 0:He.contents)==null?void 0:J[0])&&((w=He==null?void 0:He.contents)!=null&&w[0].every(q=>Array.isArray(q)))?(R=He==null?void 0:He.contents)==null?void 0:R[0]:He==null?void 0:He.contents;E!=null&&E.contents&&((ie=E==null?void 0:E.contents)==null?void 0:ie.length)!==0&&(pl=(ne=N.cloneDeep(pl))==null?void 0:ne.map((q,p)=>{if(!Array.isArray(q)){let ge={};for(let Ue in q)Ue!=="id"&&Ue!=="index"&&(ge[Ue]=q[Ue]);q=Object.values(ge)}return q}));const Bl=!!((ae=F.value)!=null&&ae.find(q=>q.prop==="index"));pl=Lr(pl,E==null?void 0:E.contents,Bl);const fl=[];pl==null||pl.forEach((q,p)=>{var Ue;let ge={};if(Array.isArray(q)){let be=[];q==null||q.filter(Te=>!(Te!=null&&Te.id)).forEach((Te,we)=>{var Ul,Wl,Jl,Ae,Al,Rl;if((Ul=Ce==null?void 0:Ce[we])!=null&&Ul.prop&&!Array.isArray(Te)){let Gl={};Gl[Ce[we].column]=Te,ze!=null&&ze.value&&((Wl=ze==null?void 0:ze.value)==null?void 0:Wl.length)>0&&((Jl=ze==null?void 0:ze.value)!=null&&Jl.find(ml=>JSON.stringify(ml==null?void 0:ml[0])===JSON.stringify(Gl)))&&(be=(Ae=ze==null?void 0:ze.value)==null?void 0:Ae.find(ml=>JSON.stringify(ml==null?void 0:ml[0])===JSON.stringify(Gl))),be&&be.length>0?ge[Ce[we].prop]=be!=null&&be.find(ml=>{var Xl;return((Xl=Object.keys(ml))==null?void 0:Xl[0])===Ce[we].column})?(Al=be==null?void 0:be.find(ml=>{var Xl;return((Xl=Object.keys(ml))==null?void 0:Xl[0])===Ce[we].column}))==null?void 0:Al[Ce[we].column]:Te:ge[Ce[we].prop]=Te}else Array.isArray(Te)&&((Rl=Ce[we])!=null&&Rl.prop?ge[Ce[we].prop]=Te:ge.children=Ia(Te,Ce))})}else ge=q;if(Array.isArray(q)&&q.some(be=>be==null?void 0:be.id)){const be=(Ue=q==null?void 0:q.find(Te=>Te.id))==null?void 0:Ue.id;fl.push(Object.assign(ge,{id:nr(be)}))}else ge.id?fl.push(ge):fl.push(Object.assign(ge,{id:p.toString()}))});try{const q=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),p=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),ge=q==null?void 0:q.tableId,Ue=q==null?void 0:q.compIndex;if(ge&&Array.isArray(p)&&p.length>0&&String(ge)===String(i==null?void 0:i.parentTableId)&&String(Ue)===String(i==null?void 0:i.index)){const be=new Set(fl.map(we=>String(we==null?void 0:we.id))),Te=p.filter(we=>!be.has(String(we)));if(Te.length>0){const we=q==null?void 0:q.pageKey,Ul=we!=null&&we.startsWith("/")?we.substring(1):we;((a==null?void 0:a[we])||(a==null?void 0:a[Ul])||[]).filter(Ae=>{var Al,Rl;return((Al=Ae==null?void 0:Ae.key)==null?void 0:Al.type)==="data"&&String((Rl=Ae==null?void 0:Ae.key)==null?void 0:Rl.tableId)===String(ge)&&Te.includes(Ae==null?void 0:Ae.id)}).forEach(Ae=>{var Al;be.has(String(Ae==null?void 0:Ae.id))||(fl.push({id:Ae==null?void 0:Ae.id,...((Al=Ae==null?void 0:Ae.value)==null?void 0:Al.tableData)||{}}),be.add(String(Ae==null?void 0:Ae.id)))})}}}catch{}const wl=Array.from(((me=Dl.value)==null?void 0:me.values())||[]).filter(q=>(q==null?void 0:q._isOCRRow)&&(q==null?void 0:q._ocrTableId)===(i==null?void 0:i.index));le.value=mr(fl,o,F.value),Fl.value=fl,(Be=Fl.value)==null||Be.forEach(q=>{var p;(p=Dl.value)==null||p.set(q.id,q)});const Sl=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Oe=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(Sl&&Array.isArray(Oe)&&Oe.length>0&&String(Sl==null?void 0:Sl.compIndex)===String(i==null?void 0:i.index)){const q=new Set((Fl.value||[]).map(p=>String(p==null?void 0:p.id)));Oe.filter(p=>!q.has(String(p)))}if(wl.length>0){const q=new Set((le.value||[]).map(ge=>ge==null?void 0:ge.id)),p=wl.filter(ge=>!q.has(ge.id));p.length>0&&(le.value=[...le.value||[],...p],Fl.value=[...Fl.value||[],...p],p.forEach(ge=>{var Ue;return(Ue=Dl.value)==null?void 0:Ue.set(ge.id,ge)}))}}else F.value=[],T.value=[],le.value=[],Fl.value=[],Dl.value=new Map;if(((X=s==null?void 0:s.contents)==null?void 0:X.length)>0)if((fe=(Pe=(te=l==null?void 0:l.find(b=>(b==null?void 0:b.key)==="filterAllType"))==null?void 0:te.value)==null?void 0:Pe.find(b=>(b==null?void 0:b.value)==="onRowButtonContents"))!=null&&fe.content){let b=(qe=(Ee=(ve=l==null?void 0:l.find(I=>(I==null?void 0:I.key)==="filterAllType"))==null?void 0:ve.value)==null?void 0:Ee.find(I=>(I==null?void 0:I.value)==="onButtonContents"))==null?void 0:qe.content;b=(B=b==null?void 0:b.split(":"))==null?void 0:B[1],b=(Q=b.slice(1,(b==null?void 0:b.length)-1))==null?void 0:Q.split(","),Hl.value=(Ke=s==null?void 0:s.contents)==null?void 0:Ke.filter(I=>b==null?void 0:b.find(Ce=>Ce===(I==null?void 0:I.label)))}else Hl.value=s==null?void 0:s.contents;else Hl.value=[];if(((Fe=f==null?void 0:f.contents)==null?void 0:Fe.length)>0)if((se=(h=(Xe=l==null?void 0:l.find(b=>(b==null?void 0:b.key)==="filterAllType"))==null?void 0:Xe.value)==null?void 0:h.find(b=>(b==null?void 0:b.value)==="onButtonContents"))!=null&&se.content){let b=(ke=(k=(je=l==null?void 0:l.find(I=>(I==null?void 0:I.key)==="filterAllType"))==null?void 0:je.value)==null?void 0:k.find(I=>(I==null?void 0:I.value)==="onButtonContents"))==null?void 0:ke.content;if(b=($e=b==null?void 0:b.split(":"))==null?void 0:$e[1],b=(rl=b.slice(1,(b==null?void 0:b.length)-1))==null?void 0:rl.split(","),El.value=(ol=f==null?void 0:f.contents)==null?void 0:ol.filter(I=>b==null?void 0:b.find(Ce=>Ce===(I==null?void 0:I.label))),Tl.value=(nl=f==null?void 0:f.contents)==null?void 0:nl.filter(I=>b==null?void 0:b.find(Ce=>Ce===(I==null?void 0:I.label))),(il=f==null?void 0:f.contents)!=null&&il.some(I=>(I==null?void 0:I.label)==="OCR识别")&&!((sl=El.value)!=null&&sl.some(I=>(I==null?void 0:I.label)==="OCR识别"))){const I=(tl=f==null?void 0:f.contents)==null?void 0:tl.find(Ce=>(Ce==null?void 0:Ce.label)==="OCR识别");El.value=[...El.value,I],Tl.value=[...Tl.value,I]}Se.value=!!(b!=null&&b.find(I=>I==="搜索")),Je.value=!!(b!=null&&b.find(I=>I==="块状显示"))}else El.value=f==null?void 0:f.contents,Tl.value=f==null?void 0:f.contents;else El.value=[],Tl.value=[];(al=El.value)!=null&&al.some(b=>(b==null?void 0:b.label)==="OCR识别")||(El.value=[...El.value||[],{label:"OCR识别"}]),(_e=Tl.value)!=null&&_e.some(b=>(b==null?void 0:b.label)==="OCR识别")||(Tl.value=[...Tl.value||[],{label:"OCR识别"}]),ra.value=((Le=le==null?void 0:le.value)==null?void 0:Le.length)??0,gr(le.value),da.value=le.value,$l.value&&(F.value=(bl=(dl=T.value)==null?void 0:dl.filter(b=>(b==null?void 0:b.label)!=="操作"))==null?void 0:bl.map(b=>{var I;return{...b,type:"edit",optionUrl:b!=null&&b.formMenuSelect&&((I=b==null?void 0:b.formMenuSelect)==null?void 0:I.length)>0?{groupSelect:b==null?void 0:b.groupSelect,menuSelect:b==null?void 0:b.formMenuSelect,selectRelateType:"",type:b==null?void 0:b.formType}:null}}),Ha())};e.watch(()=>[i.itemData,Zl.value,Jr.value,pa.value,ze==null?void 0:ze.value],async()=>{var l,a,r,o,n,u;if((l=i==null?void 0:i.itemData)!=null&&l.find(c=>(c==null?void 0:c.key)==="columnPath")&&!((a=ta.value)!=null&&a.find(c=>{var s,f;return(c==null?void 0:c.key)===((f=(s=i==null?void 0:i.itemData)==null?void 0:s.find(m=>(m==null?void 0:m.key)==="columnPath"))==null?void 0:f.contents)}))){let c=ta.value,s={key:(o=(r=i==null?void 0:i.itemData)==null?void 0:r.find(f=>(f==null?void 0:f.key)==="columnPath"))==null?void 0:o.contents,value:(u=(n=i==null?void 0:i.itemData)==null?void 0:n.find(f=>(f==null?void 0:f.key)==="columnUsingPath"))==null?void 0:u.contents};c!=null&&c.find(f=>(f==null?void 0:f.key)===(s==null?void 0:s.key))?c=c==null?void 0:c.map(f=>((f==null?void 0:f.key)===(s==null?void 0:s.key)&&(f.value=s.value),f)):c.push(s),el.setTableViewContents(c)}kr(i.itemData,i.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>i==null?void 0:i.operatingForm,l=>{l!=null&&l.form&&(ga(l==null?void 0:l.form),_l.value=l==null?void 0:l.dialogTitle,xa.value=!0,Kl.value=!0)},{immediate:!0,deep:!0});const Cr=()=>{var l;(l=ye.value)!=null&&l.includes("read")&&($l.value=!$l.value)},ln=()=>{Aa.value=!Aa.value};e.watch(()=>{var l;return(l=i==null?void 0:i.config)==null?void 0:l.viewport},l=>{var a;ye.value=l,(l==null?void 0:l.length)===0?$l.value=!1:(l!=null&&l.includes("read")||($l.value=!0),l!=null&&l.includes("edit")||($l.value=!1)),ue.value=((a=i==null?void 0:i.config)==null?void 0:a.showIndex)||$l.value},{immediate:!0}),e.watch(()=>$l.value,l=>{var a;l?(Ha("viewChange"),el.setCacheUpdatingData(null)):(El.value=Tl.value,F.value=La.value,sa.value&&(el.setTableLoading(i==null?void 0:i.index),De("change",sa.value))),Y.value=l,ue.value=l||((a=i==null?void 0:i.config)==null?void 0:a.showIndex)},{immediate:!0}),e.watch(()=>{var l;return(l=lr.value)==null?void 0:l.length},l=>{l===0&&(re.currentPage=1)}),e.watch(()=>i==null?void 0:i.compNames,l=>{ll.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:l||[],width:1}]},{immediate:!0}),e.ref(!1);const an=(l,a)=>{var r;Ha("createClick"),a===re.pageSize&&(re.currentPage=Math.ceil(((r=le.value)==null?void 0:r.length)/re.pageSize))},rn=(l,a,r)=>{var o;yr(r,l,a),kl.value=N.cloneDeep(l),Vl.value=l==null?void 0:l.id,ra.value=(o=le.value)==null?void 0:o.length,_l.value=typeof(l==null?void 0:l.id)=="string"?"新增":"编辑",ba(!1)},Cl=l=>{var f,m,D,g,E,M,V,K,S,z;const{row:a,column:r,item:o,slotData:n}=l;let u=a!=null&&a[r==null?void 0:r.prop]||(a==null?void 0:a[r==null?void 0:r.prop])===0?((m=(f=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:f[0])==null?void 0:m.contents)??((a==null?void 0:a[r==null?void 0:r.prop])===0?"0":a==null?void 0:a[r==null?void 0:r.prop]):((g=(D=a==null?void 0:a[o==null?void 0:o.prop])==null?void 0:D[0])==null?void 0:g.contents)??(a==null?void 0:a[o==null?void 0:o.prop])??((M=(E=n==null?void 0:n[o==null?void 0:o.prop])==null?void 0:E[0])==null?void 0:M.contents)??(n==null?void 0:n[o==null?void 0:o.prop])??((S=(K=a==null?void 0:a[(V=o==null?void 0:o.child)==null?void 0:V.prop])==null?void 0:K[0])==null?void 0:S.contents)??(a==null?void 0:a[(z=o==null?void 0:o.child)==null?void 0:z.prop]),s=Array.isArray(u)&&!(u!=null&&u.every(W=>typeof W=="string"||typeof W=="number"))?"查看":u;return s=Array.isArray(s)?s.join(","):s,s},on=l=>{var m,D,g,E,M,V,K,S,z,W;const{row:a,column:r,item:o,slotData:n}=l;let u=a!=null&&a[r==null?void 0:r.prop]?((D=(m=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:m[0])==null?void 0:D.contents)??(a==null?void 0:a[r==null?void 0:r.prop]):((E=(g=a==null?void 0:a[o==null?void 0:o.prop])==null?void 0:g[0])==null?void 0:E.contents)??(a==null?void 0:a[o==null?void 0:o.prop])??((V=(M=n==null?void 0:n[o==null?void 0:o.prop])==null?void 0:M[0])==null?void 0:V.contents)??(n==null?void 0:n[o==null?void 0:o.prop])??((z=(S=a==null?void 0:a[(K=o==null?void 0:o.child)==null?void 0:K.prop])==null?void 0:S[0])==null?void 0:z.contents)??(a==null?void 0:a[(W=o==null?void 0:o.child)==null?void 0:W.prop]);const s=Array.isArray(u)&&!(u!=null&&u.every($=>typeof $=="string"||typeof $=="number")),f=Array.isArray(u)&&(u==null?void 0:u.find($=>$==null?void 0:$.url));return s&&f},nn=l=>{var c,s,f,m,D,g,E,M,V,K;const{row:a,column:r,item:o,slotData:n}=l||{};let u=a!=null&&a[r==null?void 0:r.prop]?((s=(c=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:c[0])==null?void 0:s.contents)??(a==null?void 0:a[r==null?void 0:r.prop]):((m=(f=a==null?void 0:a[o==null?void 0:o.prop])==null?void 0:f[0])==null?void 0:m.contents)??(a==null?void 0:a[o==null?void 0:o.prop])??((g=(D=n==null?void 0:n[o==null?void 0:o.prop])==null?void 0:D[0])==null?void 0:g.contents)??(n==null?void 0:n[o==null?void 0:o.prop])??((V=(M=a==null?void 0:a[(E=o==null?void 0:o.child)==null?void 0:E.prop])==null?void 0:M[0])==null?void 0:V.contents)??(a==null?void 0:a[(K=o==null?void 0:o.child)==null?void 0:K.prop]);return Array.isArray(u)?(u==null?void 0:u.filter(S=>(S==null?void 0:S.url)||(S==null?void 0:S.downloadUrl)))??[]:[]},sn=(l,a)=>l.find(r=>Object.values(r).some(o=>o===a));return e.watch(()=>Rr.value,async l=>{if(l){cl.setContentLoading(!0),await e.nextTick();const a=sn(le.value,l==null?void 0:l.data);if(!a)return cl.setContentLoading(!1);await tr(l==null?void 0:l.data,null,a,{data:l==null?void 0:l.data,isMainKey:!0}),cl.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>i==null?void 0:i.cacheNewData,l=>{var a;l&&(Array.isArray(l)?l.forEach(r=>{var o,n,u,c,s,f,m;if((r==null?void 0:r.compId)===(i==null?void 0:i.index)&&(r!=null&&r.resId)&&((o=r==null?void 0:r.data)!=null&&o.id)&&(le.value=(n=le.value)==null?void 0:n.map(D=>{var g;return(D==null?void 0:D.id)===((g=r==null?void 0:r.data)==null?void 0:g.id)?{...D,id:r==null?void 0:r.resId}:D}),(s=(u=Dl.value)==null?void 0:u.has)!=null&&s.call(u,(c=r==null?void 0:r.data)==null?void 0:c.id))){const D=Dl.value.get((f=r==null?void 0:r.data)==null?void 0:f.id);Dl.value.delete((m=r==null?void 0:r.data)==null?void 0:m.id),Dl.value.set(r==null?void 0:r.resId,{...D,id:r==null?void 0:r.resId})}}):(l==null?void 0:l.compId)===(i==null?void 0:i.index)&&(le.value=(a=le.value)==null?void 0:a.map(r=>{var o;return(r==null?void 0:r.id)===((o=l==null?void 0:l.data)==null?void 0:o.id)?{...r,id:l==null?void 0:l.resId}:r})))},{immediate:!0,deep:!0}),(l,a)=>{var W,$,x,L;const r=e.resolveComponent("svg-icon"),o=e.resolveComponent("el-popover"),n=e.resolveComponent("el-switch"),u=e.resolveComponent("el-checkbox"),c=e.resolveComponent("el-radio"),s=e.resolveComponent("el-radio-group"),f=e.resolveComponent("el-checkbox-group"),m=e.resolveComponent("el-button"),D=e.resolveComponent("LookComponent"),g=e.resolveComponent("el-icon"),E=e.resolveComponent("el-upload"),M=e.resolveComponent("el-alert"),V=e.resolveComponent("el-table-column"),K=e.resolveComponent("el-input"),S=e.resolveComponent("el-table"),z=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",ii,[er.value?(e.openBlock(),e.createBlock(Nl.ssTable,{id:"excel-table",pageObj:re,showIndex:ue.value,isTree:(W=O.compItem)==null?void 0:W.isTree,summaryInfo:oe,columns:F.value,defaultSort:Z,isCardViewport:Aa.value,checkedColumns:_.value,key:Va.value+JSON.stringify(F.value),tableData:lr.value,isEditViewport:$l.value,isShowPagination:Qa.value,isShowEdit:!1,isShowDelete:!1,allowSelect:Y.value,onDbClickRow:ko,extraButton:El.value,rowButton:Hl.value,cacheExtraButtons:Tl.value,isClearSelection:(($=Pl.value)==null?void 0:$.length)===0,onDoCurrentChange:Zr,onDoSizeChange:eo,onContentClick:tr,onRowClick:So,onSelectChange:so,onCellChange:rn,onChange:yr,onPreview:or,onSubmitEditingTable:io,onHandleColEditChange:oo,onHandleColTypeChange:no,onClickButton:Ea},e.createSlots({headerButton:e.withCtx(t=>{var v,y;return[O.showHeader?(e.openBlock(),e.createBlock(Dn,{key:0,pageLayout:O.pageLayout,lockingPage:e.unref(ka)===e.unref(Ve),filterValues:sr.value,selectNums:(v=Pl.value)==null?void 0:v.length,dataNums:(y=le.value)==null?void 0:y.length,compName:O.compName,isDevMode:O.isDevMode,buttons:t.buttons,onButtonClick:a[1]||(a[1]=G=>Ea(G,"",{})),columns:F.value,onFilter:mo,onGetImportData:ao,level:O.level,filterShow:Se.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var t,v,y,G;return[((t=le.value)==null?void 0:t.length)>0&&O.allowOperate&&Je.value?(e.openBlock(),e.createElementBlock("div",ui,[(v=ye.value)!=null&&v.includes("read")&&((y=ye.value)!=null&&y.includes("edit"))&&((G=Hl.value)!=null&&G.some(P=>(P==null?void 0:P.label)==="编辑"))&&!Aa.value&&e.unref(ka)!==e.unref(Ve)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:Cr},[e.createVNode(r,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0),e.createElementVNode("span",{title:"卡片视图",onClick:ln},[e.createVNode(r,{name:"cardViewport",class:"view-icon"})])])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:t,index:v})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:y=>an(t,v)},[e.createVNode(r,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,ci)]),operateCol:e.withCtx(()=>[e.createVNode(o,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Xo},{reference:e.withCtx(()=>[e.createElementVNode("span",di,[e.createVNode(r,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",pi,[a[14]||(a[14]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(n,{"model-value":Me.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=t=>po(t,"sortable"))},null,8,["model-value"]),a[15]||(a[15]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(f,{modelValue:_.value,"onUpdate:modelValue":a[4]||(a[4]=t=>_.value=t),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:C},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ha.value,t=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:t.label},[e.createVNode(u,{value:t.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",{title:t.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},e.toDisplayString(t.label),9,fi)]),_:2},1032,["value"]),e.createVNode(o,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(r,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var v;return[e.createElementVNode("div",hi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((v=Object.keys(t))==null?void 0:v.filter(y=>{var G;return(G=Ze.value)==null?void 0:G.find(P=>(P==null?void 0:P.value)===y)}),y=>{var G,P;return e.openBlock(),e.createElementBlock("div",{key:y},[Ie[y]=="radio"?(e.openBlock(),e.createElementBlock("div",yi,[a[13]||(a[13]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(s,{"model-value":t==null?void 0:t[y],onChange:H=>rr(H,y,t)},{default:e.withCtx(()=>{var H,d;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((d=(H=Ze.value)==null?void 0:H.find(U=>(U==null?void 0:U.value)===y))==null?void 0:d.options,U=>(e.openBlock(),e.createBlock(c,{key:U==null?void 0:U.value,label:U==null?void 0:U.value,value:U==null?void 0:U.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(U==null?void 0:U.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):e.createCommentVNode("",!0),Ie[y]=="switch"?(e.openBlock(),e.createBlock(n,{key:1,"model-value":t==null?void 0:t[y],"active-text":(P=(G=Ze.value)==null?void 0:G.find(H=>(H==null?void 0:H.value)===y))==null?void 0:P.label,onChange:H=>rr(H,y,t)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",vi,[e.createVNode(r,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:e.withCtx(t=>{var v,y,G,P,H,d,U,pe,J,w,R,ie,ne,ae,me,Be,X,te,Pe,fe;return[((v=t==null?void 0:t.column)==null?void 0:v.label)==="OCR图片"||((y=t==null?void 0:t.column)==null?void 0:y.prop)==="OCR图片"?(e.openBlock(),e.createElementBlock("div",gi,[e.createVNode(r,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ve=>Vo(t),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):on(t)?(e.openBlock(),e.createBlock(o,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",bi,e.toDisplayString(Cl(t)),1)]),default:e.withCtx(()=>{var ve,Ee;return[e.createElementVNode("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Ee=t==null?void 0:t.row)==null?void 0:Ee[(ve=t==null?void 0:t.column)==null?void 0:ve.prop],qe=>(e.openBlock(),e.createElementBlock("div",ki,[e.createElementVNode("div",{class:"prop-url",title:ya(qe),onClick:B=>ir(qe)},e.toDisplayString(ya(qe)),9,Ci),e.createElementVNode("div",{class:"prop-download",onClick:B=>yo(qe)}," 下载 ",8,Si)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle({color:!Array.isArray(Cl(t))&&((P=(G=Cl(t))==null?void 0:G.toString())!=null&&P.includes(".txt")||(d=(H=Cl(t))==null?void 0:H.toString())!=null&&d.includes(".cpt")||(pe=(U=Cl(t))==null?void 0:U.toString())!=null&&pe.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Cl(t))&&((w=(J=Cl(t))==null?void 0:J.toString())!=null&&w.includes(".txt")||(ie=(R=Cl(t))==null?void 0:R.toString())!=null&&ie.includes(".cpt")||(ae=(ne=Cl(t))==null?void 0:ne.toString())!=null&&ae.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Cl(t))&&((Be=(me=Cl(t))==null?void 0:me.toString())!=null&&Be.includes(".txt")||(te=(X=Cl(t))==null?void 0:X.toString())!=null&&te.includes(".cpt")||(fe=(Pe=Cl(t))==null?void 0:Pe.toString())!=null&&fe.includes(".cyd"))?"pointer":"",marginLeft:(t==null?void 0:t.colIndex)===0?`${((t==null?void 0:t.level)??0)*20}px`:0}),onClick:ve=>Qr(Cl(t))},e.toDisplayString(Cl(t)===0?"0":Cl(t)),13,xi))]}),_:2},[((x=Hl.value)==null?void 0:x.length)>0&&e.unref(ka)!==e.unref(Ve)?{name:"actions",fn:e.withCtx(({item:t})=>[e.createVNode(o,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(r,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:a[0]||(a[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(vo(Hl.value,t),(v,y)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:y,onClick:e.withModifiers(G=>Ea(v==null?void 0:v.label,t,{extra:v}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:v==null?void 0:v.textColor}),class:"extra-button-label"},e.toDisplayString(v==null?void 0:v.label),5)],8,ti))),128))])]),_:2},1024)]),key:"0"}:void 0,((L=le.value)==null?void 0:L.length)>0?{name:"batchButton",fn:e.withCtx(t=>[e.withDirectives(e.createVNode(Tn,{lockingPage:e.unref(ka)===e.unref(Ve),buttons:t.buttons,selectTableItems:Pl.value,onButtonClick:a[2]||(a[2]=v=>Ea(v,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[e.vShow,Y.value]]),e.withDirectives(e.createElementVNode("div",null,null,512),[[e.vShow,!Y.value]])]),key:"1"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):e.createCommentVNode("",!0),e.createVNode(Yl.ssDialog,{title:_l.value,visible:Kl.value,width:Hr.value,onBeforeDestroy:fo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Ni,[e.createVNode(Nl.ssForm,{rowContents:xe.value,isEnableWrap:!1,showOperator:!1,onChange:Yo,onFixChangeValue:bo,onClickTrigger:ho,isEdit:Ca.value,onBlurChange:to,onCreate:uo,onTagChange:Yr},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[xa.value?(e.openBlock(),e.createElementBlock("div",_i,[e.createVNode(m,{onClick:a[5]||(a[5]=t=>Kl.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>a[16]||(a[16]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[16]}),e.createVNode(m,{class:"ok-button",onClick:a[6]||(a[6]=t=>ba(!0)),id:"themeButton"},{default:e.withCtx(()=>a[17]||(a[17]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[17]})])):e.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),e.createVNode(Yl.ssDialog,{title:_l.value,visible:Sa.value,width:ja.value,onBeforeDestroy:a[8]||(a[8]=t=>Sa.value=!1)},{default:e.withCtx(()=>[e.createVNode(jn)]),footer:e.withCtx(()=>[e.createElementVNode("div",wi,[e.createVNode(m,{onClick:a[7]||(a[7]=t=>Sa.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>a[18]||(a[18]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[18]}),e.createVNode(m,{class:"ok-button",onClick:xo,id:"themeButton"},{default:e.withCtx(()=>a[19]||(a[19]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[19]})])]),_:1},8,["title","visible","width"]),Ql.value?(e.openBlock(),e.createBlock(Nl.ssFilePreview,{key:1,fileDataList:la.value,onDestroy:Co},null,8,["fileDataList"])):e.createCommentVNode("",!0),Ge.value?(e.openBlock(),e.createBlock(Yl.ssDialog,{key:2,visible:Ge.value,onBeforeDestroy:Ho,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(Er.ThreeViewerHost,{files:ua.value,threeData:Ne.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(Yl.ssDialog,{visible:l.componentVisible,onBeforeDestroy:a[9]||(a[9]=t=>l.componentVisible=!1),width:ja.value,style:{height:"70vh"}},{default:e.withCtx(()=>[e.createVNode(D,{dialogItem:ea.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),e.createVNode(Yl.ssDialog,{title:"上传OCR图片",visible:Na.value,onBeforeDestroy:cr,width:"600px"},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",Ai,[e.createVNode(E,{"file-list":zl.value,"onUpdate:fileList":a[10]||(a[10]=t=>zl.value=t),multiple:"",drag:"",action:"","auto-upload":!1,limit:20,accept:"image/*","on-change":Uo,class:"upload-content"},{tip:e.withCtx(()=>a[20]||(a[20]=[e.createElementVNode("div",{class:"el-upload__tip tip-content"}," 请上传图片文件,大小不超过10MB ",-1)])),default:e.withCtx(()=>[e.createVNode(g,{class:"el-icon--upload"},{default:e.withCtx(()=>[e.createVNode(e.unref(N.upload_filled_default))]),_:1}),a[21]||(a[21]=e.createElementVNode("div",{class:"el-upload__text"},[e.createTextVNode(" 将图片拖到此处或"),e.createElementVNode("em",null,"点击上传")],-1))]),file:e.withCtx(({file:t,index:v})=>[e.createElementVNode("div",Di,[e.createElementVNode("div",{class:"upload-content-title",style:{flex:"1",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:t==null?void 0:t.name},e.toDisplayString(t==null?void 0:t.name),9,Ei),e.createElementVNode("div",Ti,[e.createVNode(r,{class:"icon-blue",name:"EyeFill",style:{width:"15px",height:"15px",cursor:"pointer",color:"var(--ssform-label-color)"},onClick:y=>Fo(t),title:"预览"},null,8,["onClick"]),e.createVNode(r,{class:"icon-blue",name:"Cancel",style:{width:"15px",height:"15px",cursor:"pointer",color:"var(--ssform-label-color)"},onClick:y=>zo(v),title:"删除"},null,8,["onClick"])])])]),_:1},8,["file-list"])])),[[z,Il.value]])]),footer:e.withCtx(()=>[e.createElementVNode("div",Bi,[e.createVNode(m,{onClick:Eo,id:"themeBorderButton",disabled:Il.value},{default:e.withCtx(()=>a[22]||(a[22]=[e.createTextVNode("拍照")])),_:1,__:[22]},8,["disabled"]),e.createVNode(m,{onClick:cr,id:"themeBorderButton",disabled:Il.value},{default:e.withCtx(()=>a[23]||(a[23]=[e.createTextVNode("取消")])),_:1,__:[23]},8,["disabled"]),e.createVNode(m,{class:"ok-button",onClick:Lo,id:"themeButton",disabled:Il.value},{default:e.withCtx(()=>a[24]||(a[24]=[e.createTextVNode("确认")])),_:1,__:[24]},8,["disabled"])])]),_:1},8,["visible"]),e.createVNode(Yn,{visible:Da.value,onConfirm:To,onCancel:a[11]||(a[11]=t=>Da.value=!1)},null,8,["visible"]),_a.value?(e.openBlock(),e.createBlock(Nl.ssFilePreview,{key:3,fileDataList:wa.value,onDestroy:Ko},null,8,["fileDataList"])):e.createCommentVNode("",!0),e.createVNode(Yl.ssDialog,{title:"OCR识别结果预览",visible:Pa.value,onBeforeDestroy:Wa,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Oi,[e.createElementVNode("div",Ui,[e.createVNode(M,{title:"请核对识别结果,您可以修改字段值后点击确认添加到表格。在表头勾选字段用于匹配并替换现有数据",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",Li,[e.createVNode(S,{data:oa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(V,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ma.value,t=>(e.openBlock(),e.createBlock(V,{key:t.prop,prop:t.prop,"min-width":t.minWidth||120,"class-name":t.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",ji,[t.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(u,{key:0,"model-value":ql.value.includes(t.prop),onChange:v=>Po(t.prop,v),onClick:a[12]||(a[12]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(t.label),1)])]),default:e.withCtx(({row:v,$index:y})=>[t.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:Ro(v[t.prop]),fontWeight:500})},e.toDisplayString(Mo(v[t.prop])),5)):(e.openBlock(),e.createBlock(K,{key:1,modelValue:v[t.prop],"onUpdate:modelValue":G=>v[t.prop]=G,size:"small",placeholder:"请输入"+t.label,onChange:G=>$o(y,t.prop,G)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",$i,[e.createVNode(m,{onClick:Wa,id:"themeBorderButton"},{default:e.withCtx(()=>a[25]||(a[25]=[e.createTextVNode("取消")])),_:1,__:[25]}),e.createVNode(m,{class:"ok-button",onClick:jo,id:"themeButton"},{default:e.withCtx(()=>a[26]||(a[26]=[e.createTextVNode("确认")])),_:1,__:[26]})])]),_:1},8,["visible"]),e.createVNode(Yl.ssDialog,{title:ll.title,visible:ll.show,width:ll.width,onBeforeDestroy:Bo},{default:e.withCtx(()=>[e.createElementVNode("div",Pi,[e.createVNode(Nl.ssForm,{rowContents:ll==null?void 0:ll.contents,formRules:ll==null?void 0:ll.formRules,showOperator:!1,buttonValue:ll.buttonValue,isEdit:Ca.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:Oo},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},Ri=ma._export_sfc(Mi,[["__scopeId","data-v-13380150"]]);exports.formGetOptions=Ba;exports.getSelectRow=Oa;exports.ssTable=Ri;exports.useFormComp=Pr;exports.useFormToTableComp=Ur;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as l, reactive as c, onMounted as s, createElementBlock as r, openBlock as i, createVNode as p } from "vue";
2
2
  import { S as m } from "./index-CO41nOz7.js";
3
- import { s as _ } from "./index-C-X7YmVi.js";
3
+ import { s as _ } from "./index-CQ52Awk5.js";
4
4
  import { _ as d } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const f = { class: "log-wrap" }, u = /* @__PURE__ */ l({
6
6
  __name: "index",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue");require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D1EZRqgB.cjs");const c=require("./index-DOItJqcJ.cjs"),r=require("./index-CXC0u8pm.cjs"),i=require("./index-BnD8y-0W.cjs"),y=r.useModelComp(),{itemData:g}=c.storeToRefs(y),p=o.ref(0),D=o.ref([{label:"机构名称",value:"",name:"deptName"}]),f=e=>{console.log("handleQueryChange",e)},u=o.ref([{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"编辑"},{label:"删除"}]},{key:"header",contents:[{label:"机构名称",prop:"deptName"},{label:"机构类型",prop:"deptType",formType:"Select",options:[{label:"集团",value:"集团"},{label:"公司",value:"公司"},{label:"部门",value:"部门"},{label:"区域",value:"区域"},{label:"组",value:"组"}]},{label:"机构状态",formType:"Radio",prop:"deptStatus",options:[{label:"启用",value:"启用"},{label:"禁用",value:"禁用"}]},{label:"操作"}]},{key:"tableContents",contents:[]}]),m=e=>{r.submitTableAsyncByVerify(e.singleContent,e.buttonName,p.value)},h=e=>{console.log("onDoubleClick",e)},C=(e,a)=>{console.log("onButtonClick",e,a)},_=async e=>{const a=await r.handleSubmitAsync(c.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),l=a==null?void 0:a.map(t=>{var n;return{id:t.id,tableData:(n=t==null?void 0:t.value)==null?void 0:n.tableData}});return l==null?void 0:l.map(t=>{var n;if(Array.isArray(t==null?void 0:t.tableData)){let s={id:t.id};return(n=t==null?void 0:t.tableData)==null||n.forEach((d,b)=>{s[`a${b}`]=d}),s}else return{...t.tableData,id:t.id}})},S={comp:"Group",name:"/系统管理/部门管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:u.value,name:""}]}]};o.watch(()=>g.value,e=>{var a;e&&(e==null?void 0:e.length)>0&&(u.value=(a=e==null?void 0:e[0])==null?void 0:a.compData)});const k=Object.freeze(Object.defineProperty({__proto__:null,getPageDataAsync:_,handleItemDataChange:m,handleQueryChange:f,onButtonClick:C,onDoubleClick:h,pageData:u,queryFormData:D,structureId:p,tempDeptPageData:S},Symbol.toStringTag,{value:"Module"})),v={class:"role-wrapper"},T=o.defineComponent({__name:"index",setup(e){const a=o.reactive({...k}),l=r.useMenuState(),{activeMenuPath:t}=c.storeToRefs(l);return o.onMounted(async()=>{a.structureId=await r.getActivePageStructureId(t.value)}),(n,s)=>(o.openBlock(),o.createElementBlock("div",v,[o.createVNode(i.ssTable,{itemData:a.pageData,onChange:a.handleItemDataChange},null,8,["itemData","onChange"])]))}});exports.default=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue");require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B_ZyoH-c.cjs");const c=require("./index-DOItJqcJ.cjs"),r=require("./index-CXC0u8pm.cjs"),i=require("./index-Cth3DRog.cjs"),y=r.useModelComp(),{itemData:g}=c.storeToRefs(y),p=o.ref(0),D=o.ref([{label:"机构名称",value:"",name:"deptName"}]),f=e=>{console.log("handleQueryChange",e)},u=o.ref([{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"编辑"},{label:"删除"}]},{key:"header",contents:[{label:"机构名称",prop:"deptName"},{label:"机构类型",prop:"deptType",formType:"Select",options:[{label:"集团",value:"集团"},{label:"公司",value:"公司"},{label:"部门",value:"部门"},{label:"区域",value:"区域"},{label:"组",value:"组"}]},{label:"机构状态",formType:"Radio",prop:"deptStatus",options:[{label:"启用",value:"启用"},{label:"禁用",value:"禁用"}]},{label:"操作"}]},{key:"tableContents",contents:[]}]),m=e=>{r.submitTableAsyncByVerify(e.singleContent,e.buttonName,p.value)},h=e=>{console.log("onDoubleClick",e)},C=(e,a)=>{console.log("onButtonClick",e,a)},_=async e=>{const a=await r.handleSubmitAsync(c.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),l=a==null?void 0:a.map(t=>{var n;return{id:t.id,tableData:(n=t==null?void 0:t.value)==null?void 0:n.tableData}});return l==null?void 0:l.map(t=>{var n;if(Array.isArray(t==null?void 0:t.tableData)){let s={id:t.id};return(n=t==null?void 0:t.tableData)==null||n.forEach((d,b)=>{s[`a${b}`]=d}),s}else return{...t.tableData,id:t.id}})},S={comp:"Group",name:"/系统管理/部门管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:u.value,name:""}]}]};o.watch(()=>g.value,e=>{var a;e&&(e==null?void 0:e.length)>0&&(u.value=(a=e==null?void 0:e[0])==null?void 0:a.compData)});const k=Object.freeze(Object.defineProperty({__proto__:null,getPageDataAsync:_,handleItemDataChange:m,handleQueryChange:f,onButtonClick:C,onDoubleClick:h,pageData:u,queryFormData:D,structureId:p,tempDeptPageData:S},Symbol.toStringTag,{value:"Module"})),v={class:"role-wrapper"},T=o.defineComponent({__name:"index",setup(e){const a=o.reactive({...k}),l=r.useMenuState(),{activeMenuPath:t}=c.storeToRefs(l);return o.onMounted(async()=>{a.structureId=await r.getActivePageStructureId(t.value)}),(n,s)=>(o.openBlock(),o.createElementBlock("div",v,[o.createVNode(i.ssTable,{itemData:a.pageData,onChange:a.handleItemDataChange},null,8,["itemData","onChange"])]))}});exports.default=T;
@@ -1,9 +1,9 @@
1
1
  import { ref as s, watch as d, defineComponent as m, reactive as y, onMounted as g, createElementBlock as i, openBlock as D, createVNode as f } from "vue";
2
2
  import "./index-BHtNKL1L.js";
3
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-oA5S09l2.js";
3
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6Ct13p6.js";
4
4
  import { g as h, s as c } from "./index-7MBVUN82.js";
5
5
  import { ag as C, af as _, a as k, u as S, ah as v } from "./index-3oQGURYh.js";
6
- import { s as T } from "./index-C-X7YmVi.js";
6
+ import { s as T } from "./index-CQ52Awk5.js";
7
7
  const A = k(), { itemData: B } = c(A), u = s(0), I = s([
8
8
  {
9
9
  label: "机构名称",