ss-component-new 1.2.9 → 1.2.11

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 (117) hide show
  1. package/dist/{animationData-1jRSDcwE.js → animationData-C_gV7XAN.js} +16 -16
  2. package/dist/animationData-CyP8-u7i.cjs +1 -0
  3. package/dist/array-A59WrroX.js +1207 -0
  4. package/dist/array-BtZq8qON.cjs +11 -0
  5. package/dist/index-2nEz-J89.js +24 -0
  6. package/dist/{index-CQAvn30B.cjs → index-7eyGTvr0.cjs} +1 -1
  7. package/dist/{index-DNm5s2Lm.cjs → index-Adqs5vHH.cjs} +1 -1
  8. package/dist/{index-fMxLuU_H.js → index-B7g38Yte.js} +2 -2
  9. package/dist/{index-Cyk0Tzhx.cjs → index-B9OZcnHm.cjs} +13 -13
  10. package/dist/index-BAOnUk_J.cjs +1 -0
  11. package/dist/{index-B1NmIRwn.js → index-BDaeo6qO.js} +2 -2
  12. package/dist/{index-L3WHrdzB.cjs → index-BJBNtx2b.cjs} +1 -1
  13. package/dist/{index-cA_EynOM.js → index-BMYtLkw8.js} +4 -4
  14. package/dist/{index-Dfhvay-Y.js → index-BQ4Rjf8F.js} +6 -6
  15. package/dist/{index-BQdJqnJf.cjs → index-BUUEqGRN.cjs} +1 -1
  16. package/dist/{index-CgtkRkQ3.js → index-B_ZGJtId.js} +1 -1
  17. package/dist/{index-C2aGGJxk.cjs → index-B_mFQujY.cjs} +1 -1
  18. package/dist/{index-lyUWApVE.js → index-BbI9_JbX.js} +32 -48
  19. package/dist/index-BeYNgEHV.js +144 -0
  20. package/dist/{index-CKHNyMzP.js → index-BwjuTBrR.js} +1 -1
  21. package/dist/{index-Ci_C9h8v.js → index-C-c1pt-2.js} +1 -1
  22. package/dist/{index-DbisH6iI.cjs → index-C40ofXP7.cjs} +1 -1
  23. package/dist/{index-CvrTrN91.js → index-C461j30b.js} +1 -1
  24. package/dist/{index-1vs_3Pz3.cjs → index-C5gPrwPs.cjs} +1 -1
  25. package/dist/{index-Duqrg0DV.cjs → index-C68Hri2v.cjs} +1 -1
  26. package/dist/{index-Djagy2ww.cjs → index-CAewC69j.cjs} +1 -1
  27. package/dist/index-CApZYDIm.cjs +1 -0
  28. package/dist/{index-BWECkG4C.js → index-CKLBlQoK.js} +2122 -2129
  29. package/dist/{index-BaOQV1JK.cjs → index-CKt6cj9f.cjs} +1 -1
  30. package/dist/index-CN29uy_G.js +7293 -0
  31. package/dist/{index-B--6DX0M.js → index-CRiovRyR.js} +2 -2
  32. package/dist/index-CTRmgnKQ.js +2643 -0
  33. package/dist/{index-DWfuOOVD.js → index-CVDv-Zz-.js} +1012 -1009
  34. package/dist/index-CVadHkfS.cjs +1 -0
  35. package/dist/{index-DbzvXPKu.js → index-CYp77kPp.js} +175 -175
  36. package/dist/{index-DGE2awa5.js → index-CjB5ZP_P.js} +2 -2
  37. package/dist/{index-D9wa1LMS.js → index-CkA2IZJB.js} +5 -5
  38. package/dist/{index-fzCcjoGJ.js → index-CoVAbxHN.js} +1 -1
  39. package/dist/index-CwhX2vaq.cjs +1 -0
  40. package/dist/{index-BkrJ0cBf.js → index-D4CVC2Sk.js} +4 -4
  41. package/dist/{index-BzOBvH4x.cjs → index-D55zzS4D.cjs} +1 -1
  42. package/dist/{index-C_MIoNOd.cjs → index-D5ShC3zu.cjs} +1 -1
  43. package/dist/{index-BxftyAcm.cjs → index-D9l1Z4TO.cjs} +1 -1
  44. package/dist/index-DDhAMgrO.js +22 -0
  45. package/dist/{index-CXbvmuYZ.cjs → index-DGBDGLOK.cjs} +1 -1
  46. package/dist/{index-D732VV-0.js → index-DHQH1rlQ.js} +2 -2
  47. package/dist/{index-LjRfbvxs.js → index-DJMHw-xb.js} +11 -11
  48. package/dist/index-DP7rcz4I.cjs +1 -0
  49. package/dist/{index-y1YK6w8c.js → index-DQZ_oAyj.js} +6 -6
  50. package/dist/{index-CVfC3cyK.js → index-DTkAIcvV.js} +13 -13
  51. package/dist/{index-pkxiNiXI.js → index-DfKkN76b.js} +3 -3
  52. package/dist/{index-BFl4mw2K.cjs → index-DkG4A3iE.cjs} +1 -1
  53. package/dist/{index-pleSKUL2.cjs → index-DnU2slQv.cjs} +1 -1
  54. package/dist/{index-sS7-HQlI.cjs → index-DsQ-qtQ9.cjs} +1 -1
  55. package/dist/index-Dwr4RHei.cjs +1 -0
  56. package/dist/{index-BDVOKqI5.js → index-ESNVepXU.js} +6 -6
  57. package/dist/{index-CxbH4zmS.js → index-H_3u1NA_.js} +24 -24
  58. package/dist/{index-wpD5_HUA.cjs → index-QkDZ18PI.cjs} +1 -1
  59. package/dist/index-RVDLy1iy.cjs +1 -0
  60. package/dist/{index-Dcd9HZXq.js → index-ecVCII_e.js} +5 -5
  61. package/dist/{index-BsPQl6nI.cjs → index-i50hp6po.cjs} +1 -1
  62. package/dist/{index-BlZXanJX.js → index-qu3KI1yZ.js} +5 -5
  63. package/dist/{index-BxL4p0ej.cjs → index-t6--MDLB.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkSoLqEi.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BRxOMo6y.js} +8749 -8765
  65. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-hGi9c2Ju.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dwdjsitu.cjs} +108 -108
  66. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-B5nxyyO7.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DfqsvuRy.cjs} +1 -1
  67. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BfcynI3w.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-e_PTrAf6.js} +6 -6
  68. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-7HSISF9c.cjs +56 -0
  69. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BqmMCEyN.js +37436 -0
  70. package/dist/{index.vue_vue_type_style_index_1_lang-Bmq_QiXo.js → index.vue_vue_type_style_index_1_lang-CsY5rIO4.js} +3 -3
  71. package/dist/{index.vue_vue_type_style_index_1_lang-B_ESWhzz.cjs → index.vue_vue_type_style_index_1_lang-DOjFqzi3.cjs} +1 -1
  72. package/dist/index.vue_vue_type_style_index_1_lang-DQUFi_Vi.cjs +32 -0
  73. package/dist/index.vue_vue_type_style_index_1_lang-Ds1cd7yg.js +7806 -0
  74. package/dist/{isString-CZMLuMzD.js → isString-BNK38WbE.js} +1 -1
  75. package/dist/{main-YbBj49yf.cjs → main-CVaemyhm.cjs} +1 -1
  76. package/dist/{main-CSTH0D6W.js → main-DIbH2rlN.js} +5 -5
  77. package/dist/ss-component.cjs +1 -1
  78. package/dist/ss-component.css +2 -2
  79. package/dist/ss-component.js +11 -11
  80. package/dist/ss-component2.cjs +1 -1
  81. package/dist/ss-component2.js +12 -12
  82. package/dist/{threeLatheView-BmVBnC8n.js → threeLatheView-Bp0kjo_V.js} +2 -2
  83. package/dist/{threeModel-Xb9BSJ_k.js → threeModel-27sl0tTS.js} +3 -3
  84. package/dist/{threeModel-nbfSsMNt.cjs → threeModel-C0Jdw2O3.cjs} +1 -1
  85. package/dist/{threePreview-CYX5wKoL.js → threePreview-DFFjm93P.js} +1 -1
  86. package/dist/threeSceneView-CEpBvJSV.cjs +5 -0
  87. package/dist/threeSceneView-ZDXqO8ZA.js +1413 -0
  88. package/dist/{threeSceneViewForCPMPIP-CT63Js8f.cjs → threeSceneViewForCPMPIP-B0VPmBWd.cjs} +3 -3
  89. package/dist/{threeSceneViewForCPMPIP-skA3ZWC-.js → threeSceneViewForCPMPIP-BPPWM68P.js} +83 -84
  90. package/dist/{threeViewerHost-Enxz60zh.js → threeViewerHost-CKE2a4PV.js} +65 -78
  91. package/dist/threeViewerHost-yHvsk7TK.cjs +1 -0
  92. package/dist/useRayCaster-1DNcSYPR.cjs +1 -0
  93. package/dist/{useRayCaster-CQ61IQT5.js → useRayCaster-BM9XKGKx.js} +3 -3
  94. package/package.json +1 -1
  95. package/dist/animationData-BQdcO65E.cjs +0 -1
  96. package/dist/array-BI6c3lN7.cjs +0 -11
  97. package/dist/array-BivICFct.js +0 -1142
  98. package/dist/index-BBVbSXk-.cjs +0 -1
  99. package/dist/index-BM6YLczV.js +0 -2567
  100. package/dist/index-BSa3xW1H.js +0 -158
  101. package/dist/index-C9gh-jny.js +0 -7211
  102. package/dist/index-CA-edgmV.js +0 -3370
  103. package/dist/index-CIv0zRrQ.cjs +0 -1
  104. package/dist/index-DW7I4GY6.cjs +0 -1
  105. package/dist/index-DdFUblTC.cjs +0 -1
  106. package/dist/index-Dy3FE211.cjs +0 -1
  107. package/dist/index-YMD55UlA.cjs +0 -1
  108. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-86_u8ovk.js +0 -34129
  109. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-dAkBFPF0.cjs +0 -56
  110. package/dist/index.vue_vue_type_style_index_1_lang-Bl5IzVKi.js +0 -8126
  111. package/dist/index.vue_vue_type_style_index_1_lang-Cb3WPLY1.cjs +0 -32
  112. package/dist/isUndefined-ClRzgwTy.cjs +0 -1
  113. package/dist/isUndefined-chfCDxUU.js +0 -84
  114. package/dist/threeSceneView-BLWTfaec.js +0 -1472
  115. package/dist/threeSceneView-JPxH8xcz.cjs +0 -5
  116. package/dist/threeViewerHost-UHWY3q2v.cjs +0 -1
  117. package/dist/useRayCaster-CvOiIyjA.cjs +0 -1
@@ -1,2567 +0,0 @@
1
- import { ref as H, watch as Ge, nextTick as ea, resolveComponent as Ne, createBlock as Fe, openBlock as ie, withCtx as re, createElementVNode as be, renderSlot as Ba, onMounted as ha, createElementBlock as Ue, normalizeStyle as Ol, normalizeClass as Ha, toDisplayString as je, createCommentVNode as Me, createVNode as te, unref as Ie, Fragment as vl, renderList as bl, createTextVNode as rl, defineComponent as Qa, reactive as Zl, inject as Qr, provide as Xr, onBeforeUnmount as Yr, computed as Ma, onUnmounted as Zr, createSlots as Ir } from "vue";
2
- import { ba as Vr, ae as en, c as q, E as $e, bY as ya, g as _l, p as hl, s as Ul, u as ln, bo as pa, d as Ka, b as yl, bp as an, f as rn, c1 as nn } from "./index-DbzvXPKu.js";
3
- import { d as Na, S as sn } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkSoLqEi.js";
4
- import { c as la, _ as un, h as on, e as tn, E as cn } from "./index-BWECkG4C.js";
5
- import { a as dn, T as pn, d as fa, c as fn } from "./threeViewerHost-Enxz60zh.js";
6
- import { aK as Kl, aA as gn, i as al, j as hn, k as yn, u as vn, aJ as bn, a as Sn, aZ as Fa, a_ as wa, a$ as kn, b0 as Tn, l as Il, E as za, aH as Ja, b1 as Wa, aS as mn, b2 as An } from "./index.vue_vue_type_style_index_1_lang-Bl5IzVKi.js";
7
- import { r as Un, a as Nl, w as _n } from "./index.vue_vue_type_style_index_1_lang-Bmq_QiXo.js";
8
- import { _ as aa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- import "./three-viewport-gizmo-CkQ98n-T.js";
10
- import { s as Vl } from "./index-Ci_C9h8v.js";
11
- import "./index-BlZXanJX.js";
12
- import { i as Ga } from "./isString-CZMLuMzD.js";
13
- const Ra = (N) => N.match(/\((.*)\)/)[1], On = {
14
- __name: "index",
15
- props: {
16
- isVisible: {
17
- type: Boolean,
18
- default: !1
19
- },
20
- title: {
21
- type: String,
22
- default: ""
23
- },
24
- placement: {
25
- type: String,
26
- default: "bottom"
27
- },
28
- width: {
29
- type: Number,
30
- default: 200
31
- }
32
- },
33
- setup(N) {
34
- const I = N, X = H(null), B = H(!1), $ = H(null);
35
- return Ge(
36
- () => I == null ? void 0 : I.isVisible,
37
- () => {
38
- B.value = I == null ? void 0 : I.isVisible;
39
- },
40
- { deep: !0, immediate: !0 }
41
- ), Ge(
42
- () => $.value,
43
- () => {
44
- ea(() => {
45
- var i, ae;
46
- (ae = (i = X.value) == null ? void 0 : i.updatePopper) == null || ae.call(i);
47
- });
48
- },
49
- { deep: !0, immediate: !0 }
50
- ), (i, ae) => {
51
- const ge = Ne("el-popover");
52
- return ie(), Fe(ge, {
53
- visible: B.value,
54
- title: I == null ? void 0 : I.title,
55
- placement: I == null ? void 0 : I.placement,
56
- width: I == null ? void 0 : I.width,
57
- ref_key: "popOverRef",
58
- ref: X
59
- }, {
60
- reference: re(() => [
61
- be("div", null, [
62
- Ba(i.$slots, "reference", {
63
- ref_key: "referenceRef",
64
- ref: $
65
- })
66
- ])
67
- ]),
68
- default: re(() => [
69
- be("div", null, [
70
- Ba(i.$slots, "content")
71
- ])
72
- ]),
73
- _: 3
74
- }, 8, ["visible", "title", "placement", "width"]);
75
- };
76
- }
77
- }, Cn = { class: "extra-button-content" }, Dn = { class: "table-operator-wrap" }, En = { class: "extra-button-filter" }, xn = { class: "form-content-value" }, jn = {
78
- key: 0,
79
- class: "extra-header"
80
- }, Ln = {
81
- class: "drop-menu",
82
- style: { width: "120px" }
83
- }, Pn = { key: 0 }, $n = { key: 1 }, Bn = {
84
- __name: "header",
85
- props: {
86
- lockingPage: Boolean,
87
- level: {
88
- type: Number,
89
- default: 1
90
- },
91
- compName: {
92
- type: String,
93
- default: "表格名称",
94
- required: !1
95
- },
96
- isDevMode: Boolean,
97
- selectNums: Number,
98
- dataNums: Number,
99
- filterValues: Array,
100
- buttons: {
101
- type: Array,
102
- default: () => []
103
- },
104
- columns: {
105
- type: Array,
106
- default: () => []
107
- }
108
- },
109
- emits: ["buttonClick", "filter", "getImportData"],
110
- setup(N, { emit: I }) {
111
- const X = I, B = N, $ = H(""), i = H(!1), ae = H([]), ge = H([{ label: "取消", background: "#999999" }, {
112
- label: "清空",
113
- background: "#999999"
114
- }, { label: "确认" }]), Be = (V) => {
115
- const ce = V.raw;
116
- if (!ce) return;
117
- const R = new FileReader();
118
- R.onload = (ne) => {
119
- try {
120
- const Te = new Uint8Array(ne.target.result), De = Un(Te, { type: "array" }), Re = De.SheetNames[0], we = De.Sheets[Re], w = Nl.decode_range(we["!ref"]).e.c + 1, me = new Array(w).fill(""), O = [];
121
- for (const Z in we) {
122
- if (Z[0] === "!") continue;
123
- const { r: ze, c: el } = Nl.decode_cell(Z);
124
- let Je = we[Z].v;
125
- if (we[Z].t === "n" && Je > 0 && Je < 1e6 && (Je = new Date((Je - 25569) * 86400 * 1e3).toISOString().split("T")[0]), (Je == null || Je === "") && (Je = ""), ze === 0)
126
- me[el] = Je;
127
- else {
128
- if (!O[ze - 1]) {
129
- O[ze - 1] = {};
130
- for (let he = 0; he < w; he++)
131
- O[ze - 1][`col_${he}`] = "";
132
- }
133
- O[ze - 1][`col_${el}`] = Je;
134
- }
135
- }
136
- for (let Z = 0; Z < w; Z++)
137
- me[Z] === void 0 && (me[Z] = "");
138
- const Oe = O == null ? void 0 : O[0];
139
- if (!(Oe != null && Oe.hasOwnProperty("col_0"))) return $e.error("导入的数据列不匹配,请检查是否错位");
140
- X("getImportData", me, O);
141
- } catch (Te) {
142
- throw $e.error(Te.message), new Error(Te.message);
143
- }
144
- }, R.readAsArrayBuffer(ce);
145
- }, fe = (V) => {
146
- var R;
147
- const ce = (R = ae.value) == null ? void 0 : R.reduce((ne, Te, De) => (De === 0 ? ne[Te.label] = V : ne[Te.label] = Te == null ? void 0 : Te.value, ne), {});
148
- X("filter", ce, V, !0);
149
- }, oe = (V) => {
150
- X("buttonClick", V);
151
- }, nl = (V) => {
152
- var ce, R;
153
- ae.value = (R = (ce = Kl(q(V))) == null ? void 0 : ce.filter((ne) => (ne == null ? void 0 : ne.label) !== "" && (ne == null ? void 0 : ne.label) !== "操作")) == null ? void 0 : R.map((ne) => ({
154
- label: (ne == null ? void 0 : ne.label) ?? "",
155
- value: "",
156
- name: (ne == null ? void 0 : ne.label) ?? "",
157
- isFormColHidden: ne == null ? void 0 : ne.isTableColHidden,
158
- width: 2
159
- }));
160
- }, Ve = H(!1), ol = (V) => {
161
- var ce;
162
- if ((V == null ? void 0 : V.buttonName) === "确认" && (X("filter", V == null ? void 0 : V.content), Ve.value = (V == null ? void 0 : V.content) && Object.values(V == null ? void 0 : V.content).length > 0), (V == null ? void 0 : V.buttonName) === "清空") {
163
- const R = q(V == null ? void 0 : V.content);
164
- for (const ne in R)
165
- R[ne] = "";
166
- ae.value = (ce = ae.value) == null ? void 0 : ce.map((ne) => ({
167
- ...ne,
168
- value: ""
169
- })), X("filter", R), Ve.value = !1;
170
- }
171
- i.value = !1;
172
- }, Sl = () => {
173
- var ce, R;
174
- ae.value = (ce = ae.value) == null ? void 0 : ce.map((ne) => ({
175
- ...ne,
176
- value: ""
177
- }));
178
- const V = (R = ae.value) == null ? void 0 : R.reduce((ne, Te) => (ne[Te.label] = Te.value, ne), {});
179
- X("filter", V);
180
- };
181
- return ha(() => {
182
- nl(B.columns);
183
- }), Ge(
184
- () => B.columns,
185
- () => {
186
- nl(B.columns);
187
- },
188
- { deep: !0, immediate: !0 }
189
- ), (V, ce) => {
190
- var we, de;
191
- const R = Ne("el-icon"), ne = Ne("svg-icon"), Te = Ne("el-input"), De = Ne("el-button"), Re = Ne("el-upload");
192
- return ie(), Ue("div", Cn, [
193
- be("div", {
194
- class: Ha(N.compName ? "table-name-wrap" : ""),
195
- style: Ol({
196
- background: (B == null ? void 0 : B.level) > 1 ? "transparent" : "var(--ssgroup-background)",
197
- paddingLeft: (B == null ? void 0 : B.level) > 1 ? "0px" : "8px",
198
- fontWeight: 600 - ((B == null ? void 0 : B.level) - 1) * 100 >= 400 ? 600 - ((B == null ? void 0 : B.level) - 1) * 100 : 400,
199
- fontSize: 17 - (B == null ? void 0 : B.level) >= 14 ? 17 - (B == null ? void 0 : B.level) + "px" : "14px"
200
- })
201
- }, je(N.compName), 7),
202
- be("div", Dn, [
203
- be("div", En, [
204
- te(On, {
205
- title: "",
206
- width: 800,
207
- placement: "bottom-start",
208
- isVisible: i.value
209
- }, {
210
- reference: re(() => {
211
- var w, me, O, Oe;
212
- return [
213
- te(Te, {
214
- modelValue: $.value,
215
- "onUpdate:modelValue": ce[1] || (ce[1] = (Z) => $.value = Z),
216
- style: { "min-width": "80px" },
217
- placeholder: Ve.value ? (O = (me = (w = N.filterValues) == null ? void 0 : w.filter((Z) => Z)) == null ? void 0 : me.slice(0, 3)) == null ? void 0 : O.join("/") : "搜索",
218
- "prefix-icon": Ie(Vr),
219
- clearable: "",
220
- onInput: fe,
221
- disabled: ((Oe = ae.value) == null ? void 0 : Oe.length) === 0
222
- }, {
223
- suffix: re(() => {
224
- var Z, ze;
225
- return [
226
- !$.value && ((ze = (Z = N.filterValues) == null ? void 0 : Z.filter((el) => el)) != null && ze.join("/")) ? (ie(), Fe(R, {
227
- key: 0,
228
- style: { cursor: "pointer" },
229
- onClick: Sl
230
- }, {
231
- default: re(() => [
232
- te(Ie(en))
233
- ]),
234
- _: 1
235
- })) : Me("", !0)
236
- ];
237
- }),
238
- append: re(() => [
239
- be("span", {
240
- title: "条件查询",
241
- onClick: ce[0] || (ce[0] = (Z) => i.value = !i.value)
242
- }, [
243
- te(ne, {
244
- name: "query",
245
- style: { width: "15px", height: "15px", cursor: "pointer" }
246
- })
247
- ])
248
- ]),
249
- _: 1
250
- }, 8, ["modelValue", "placeholder", "prefix-icon", "disabled"])
251
- ];
252
- }),
253
- content: re(() => [
254
- be("div", xn, [
255
- (ie(), Fe(la, {
256
- rowContents: ae.value,
257
- buttonValue: ge.value,
258
- isRowFlex: !0,
259
- isEnableWrap: !1,
260
- isButtonRow: !1,
261
- key: ge.value,
262
- isStartJustify: !1,
263
- onOnButtonClick: ol
264
- }, null, 8, ["rowContents", "buttonValue"]))
265
- ])
266
- ]),
267
- _: 1
268
- }, 8, ["isVisible"])
269
- ]),
270
- N.buttons && ((we = N.buttons) == null ? void 0 : we.length) > 0 ? (ie(), Ue("div", jn, [
271
- (ie(!0), Ue(vl, null, bl((de = N.buttons) == null ? void 0 : de.filter((w) => N.isDevMode || (w == null ? void 0 : w.label) !== "修改模板"), (w, me) => (ie(), Ue("div", {
272
- class: "extra-contents",
273
- key: me
274
- }, [
275
- (w == null ? void 0 : w.type) === "upload" ? (ie(), Fe(Re, {
276
- key: 0,
277
- class: "upload-button-wrap",
278
- "on-change": Be,
279
- accept: ".xlsx,.xls",
280
- "auto-upload": !1,
281
- action: "#",
282
- "show-file-list": !1,
283
- disabled: !!N.lockingPage
284
- }, {
285
- default: re(() => [
286
- te(De, {
287
- disabled: !!N.lockingPage,
288
- style: Ol({ background: (w == null ? void 0 : w.background) ?? "var(--ssbutton-theme-bg)", color: (w == null ? void 0 : w.color) ?? "var(--ssbutton-theme-color)" })
289
- }, {
290
- default: re(() => [
291
- rl(je(w == null ? void 0 : w.label), 1)
292
- ]),
293
- _: 2
294
- }, 1032, ["disabled", "style"])
295
- ]),
296
- _: 2
297
- }, 1032, ["disabled"])) : Me("", !0),
298
- (w == null ? void 0 : w.type) === "popover" ? (ie(), Fe(un, { key: 1 }, {
299
- dropTitle: re(() => [
300
- (w == null ? void 0 : w.type) === "popover" ? (ie(), Fe(De, {
301
- key: 0,
302
- disabled: !!N.lockingPage,
303
- style: Ol({ background: (w == null ? void 0 : w.background) ?? "var(--ssbutton-theme-bg)", color: (w == null ? void 0 : w.color) ?? "var(--ssbutton-theme-color)" })
304
- }, {
305
- default: re(() => [
306
- rl(je(w == null ? void 0 : w.label), 1)
307
- ]),
308
- _: 2
309
- }, 1032, ["disabled", "style"])) : Me("", !0)
310
- ]),
311
- dropMenu: re(() => [
312
- be("div", Ln, [
313
- (ie(!0), Ue(vl, null, bl(w == null ? void 0 : w.contents, (O) => (ie(), Fe(De, {
314
- key: O == null ? void 0 : O.label,
315
- disabled: !!N.lockingPage,
316
- style: { width: "100%", margin: "0", border: "none", display: "flex", "justify-content": "flex-start" },
317
- onClick: (Oe) => oe(O == null ? void 0 : O.label)
318
- }, {
319
- default: re(() => {
320
- var Oe, Z;
321
- return [
322
- rl(je(O == null ? void 0 : O.label), 1),
323
- (Oe = O == null ? void 0 : O.label) != null && Oe.includes("选中") ? (ie(), Ue("span", Pn, "(" + je(N.selectNums) + ")", 1)) : Me("", !0),
324
- (Z = O == null ? void 0 : O.label) != null && Z.includes("全部") ? (ie(), Ue("span", $n, "(" + je(N.dataNums) + ")", 1)) : Me("", !0)
325
- ];
326
- }),
327
- _: 2
328
- }, 1032, ["disabled", "onClick"]))), 128))
329
- ])
330
- ]),
331
- _: 2
332
- }, 1024)) : Me("", !0),
333
- w != null && w.type ? Me("", !0) : (ie(), Fe(De, {
334
- key: 2,
335
- id: "themeButton",
336
- disabled: !!N.lockingPage,
337
- style: Ol({ background: (w == null ? void 0 : w.background) ?? "var(--ssbutton-theme-bg)", color: (w == null ? void 0 : w.color) ?? "var(--ssbutton-theme-color)" }),
338
- onClick: (O) => oe(w == null ? void 0 : w.label)
339
- }, {
340
- default: re(() => [
341
- rl(je(w == null ? void 0 : w.label), 1)
342
- ]),
343
- _: 2
344
- }, 1032, ["disabled", "style", "onClick"]))
345
- ]))), 128))
346
- ])) : Me("", !0)
347
- ])
348
- ]);
349
- };
350
- }
351
- }, Mn = /* @__PURE__ */ aa(Bn, [["__scopeId", "data-v-0f9ba5cc"]]), Kn = /* @__PURE__ */ Qa({
352
- __name: "batch",
353
- props: {
354
- lockingPage: Boolean,
355
- buttons: {
356
- type: Array,
357
- default: () => []
358
- },
359
- selectTableItems: {
360
- type: Array,
361
- default: () => []
362
- },
363
- columns: {
364
- type: Array,
365
- default: () => []
366
- }
367
- },
368
- emits: ["buttonClick"],
369
- setup(N, { emit: I }) {
370
- const X = N, B = I, $ = (ae) => {
371
- B("buttonClick", ae);
372
- }, i = (ae) => {
373
- var ge;
374
- return ae != null && ae.includes("删除") ? ((ge = X.selectTableItems) == null ? void 0 : ge.length) > 0 ? "warning-active-type" : "warning-type" : "default-type";
375
- };
376
- return (ae, ge) => {
377
- const Be = Ne("el-button");
378
- return ie(), Ue("div", null, [
379
- (ie(!0), Ue(vl, null, bl(N.buttons, (fe) => (ie(), Fe(Be, {
380
- key: fe == null ? void 0 : fe.label,
381
- disabled: !!N.lockingPage,
382
- class: Ha(i(fe == null ? void 0 : fe.label)),
383
- onClick: (oe) => $(fe == null ? void 0 : fe.label)
384
- }, {
385
- default: re(() => [
386
- rl(je(fe == null ? void 0 : fe.label), 1)
387
- ]),
388
- _: 2
389
- }, 1032, ["disabled", "class", "onClick"]))), 128))
390
- ]);
391
- };
392
- }
393
- }), Nn = /* @__PURE__ */ aa(Kn, [["__scopeId", "data-v-70b12973"]]), Fn = ya("formToTableComp", {
394
- state: () => ({
395
- selectArray: [],
396
- selectString: ""
397
- }),
398
- actions: {
399
- setSelectArray(N) {
400
- this.selectArray = N;
401
- },
402
- setSelectString(N) {
403
- this.selectString = N;
404
- }
405
- }
406
- }), wn = { class: "calculator-content" }, zn = { class: "calculator-child" }, Jn = { class: "calculator-child" }, Wn = /* @__PURE__ */ Qa({
407
- __name: "calculator",
408
- setup(N) {
409
- const I = H(), X = H();
410
- return ha(() => {
411
- I.value = [
412
- {
413
- type: "Upload",
414
- label: "输入",
415
- name: "input"
416
- }
417
- ], X.value = [
418
- {
419
- type: "Upload",
420
- label: "输出",
421
- name: "output"
422
- }
423
- ];
424
- }), (B, $) => (ie(), Ue("div", wn, [
425
- be("div", zn, [
426
- te(la, {
427
- rowContents: I.value,
428
- isRowFlex: !0
429
- }, null, 8, ["rowContents"])
430
- ]),
431
- be("div", Jn, [
432
- te(la, {
433
- rowContents: X.value,
434
- isEdit: !1,
435
- isRowFlex: !0
436
- }, null, 8, ["rowContents"])
437
- ])
438
- ]));
439
- }
440
- }), Gn = /* @__PURE__ */ aa(Wn, [["__scopeId", "data-v-73db0fe7"]]), Rn = ya("unit", {
441
- state: () => ({
442
- selectIndex: "",
443
- selectMenu: "",
444
- selectTitle: []
445
- }),
446
- actions: {
447
- setSelectIndex(N) {
448
- this.selectIndex = N;
449
- },
450
- setSelectMenu(N) {
451
- this.selectMenu = N;
452
- },
453
- setSelectTitle(N) {
454
- this.selectTitle = N;
455
- }
456
- }
457
- }), ga = (N, I) => {
458
- let X = N, B = I;
459
- return Array.isArray(X) && (X = X == null ? void 0 : X.map(($, i) => {
460
- if (Array.isArray($)) {
461
- let ae = {};
462
- return $ = $ == null ? void 0 : $.forEach((ge, Be) => {
463
- var fe;
464
- (fe = B == null ? void 0 : B[Be]) != null && fe.prop ? ae[B[Be].prop] = ge : Array.isArray(ge) && (ae.children = ga(ge, B));
465
- }), Object.assign(ae, { id: i });
466
- } else
467
- return $;
468
- })), X;
469
- }, Xa = (N, I, X) => {
470
- let B = N, $ = I;
471
- return B = B == null ? void 0 : B.map((i, ae) => {
472
- var ge, Be;
473
- return !Array.isArray(i) || !((ge = $ == null ? void 0 : $[ae]) != null && ge.label) && !X || (i.unshift(((Be = $ == null ? void 0 : $[ae]) == null ? void 0 : Be.label) ?? ""), i.some((fe) => Array.isArray(fe)) && (i = i == null ? void 0 : i.map((fe) => {
474
- var oe;
475
- return Array.isArray(fe) && (fe = Xa(fe, (oe = $ == null ? void 0 : $[ae]) == null ? void 0 : oe.children, X)), fe;
476
- }))), i;
477
- }), B;
478
- }, qn = (N, I, X) => {
479
- if (I === "")
480
- return N == null ? void 0 : N.filter((B) => (B == null ? void 0 : B.id) !== X);
481
- {
482
- const B = I.split("-");
483
- return Hn(N, B, X);
484
- }
485
- }, Hn = (N, I, X) => {
486
- let B = N, $ = I;
487
- return ($ == null ? void 0 : $.length) === 0 ? B = B == null ? void 0 : B.filter((i) => i.id !== X) : B = B == null ? void 0 : B.map((i) => (i.id.toString() === ($ == null ? void 0 : $[0]) && ($ == null || $.shift(), i = Ya(i, $, X)), i)), B;
488
- }, Ya = (N, I, X) => {
489
- var i, ae;
490
- let B = N, $ = I;
491
- return ($ == null ? void 0 : $.length) === 0 ? B.children = (i = B.children) == null ? void 0 : i.filter((ge) => ge.id !== X) : B.children = (ae = B.children) == null ? void 0 : ae.map((ge) => (ge.id.toString() === ($ == null ? void 0 : $[0]) && ($ == null || $.shift(), ge = Ya(ge, $, X)), ge)), B;
492
- }, Qn = (N, I, X) => {
493
- if (I === "")
494
- return X;
495
- {
496
- const B = I.split("-");
497
- return Xn(N, B, X);
498
- }
499
- }, Xn = (N, I, X) => {
500
- let B = N, $ = I;
501
- return ($ == null ? void 0 : $.length) === 0 ? B = X : B = B == null ? void 0 : B.map((i) => (i.id.toString() === ($ == null ? void 0 : $[0]) && ($ == null || $.shift(), i = Za(i, $, X)), i)), B;
502
- }, Za = (N, I, X) => {
503
- var i;
504
- let B = N, $ = I;
505
- return ($ == null ? void 0 : $.length) === 0 ? B.children = X : B.children = (i = B.children) == null ? void 0 : i.map((ae) => (ae.id.toString() === ($ == null ? void 0 : $[0]) && ($ == null || $.shift(), ae = Za(ae, $, X)), ae)), B;
506
- }, Yn = ya("formComp", {
507
- state: () => ({
508
- objUrl: [],
509
- blobUrls: []
510
- }),
511
- actions: {
512
- setObjUrl(N) {
513
- this.objUrl = N;
514
- },
515
- setBlobUrls(N) {
516
- this.blobUrls = N;
517
- }
518
- }
519
- }), qa = async (N, I) => {
520
- var ae, ge, Be, fe, oe, nl, Ve, ol, Sl, V, ce, R, ne, Te, De, Re, we;
521
- let X = (ge = (ae = q(N)) == null ? void 0 : ae.optionUrl) == null ? void 0 : ge.menuSelect, B = [];
522
- X == null || X.forEach((de) => {
523
- });
524
- let $ = "", i = await gn(X);
525
- if (i == null || i.forEach((de) => {
526
- var w, me, O, Oe;
527
- (de == null ? void 0 : de.name) === (((Oe = (O = (me = (w = q(N)) == null ? void 0 : w.optionUrl) == null ? void 0 : me.groupSelect) == null ? void 0 : O[0]) == null ? void 0 : Oe.replaceAll("'", "")) ?? "") && ($ = de == null ? void 0 : de.id);
528
- }), I) {
529
- $ = I;
530
- const de = await _l({
531
- id: $
532
- }), w = (nl = (oe = (fe = (Be = de == null ? void 0 : de.data) == null ? void 0 : Be.result) == null ? void 0 : fe[0]) == null ? void 0 : oe.key) == null ? void 0 : nl.pageKey;
533
- i = await al(w, sessionStorage.getItem("systemKey"), "");
534
- }
535
- if ($ !== "") {
536
- let de;
537
- I ? de = (Ve = i == null ? void 0 : i.find((O) => (O == null ? void 0 : O.id) === I)) == null ? void 0 : Ve.compData : de = (ol = i == null ? void 0 : i.find((O) => {
538
- var Oe, Z, ze, el;
539
- return (O == null ? void 0 : O.name) === (((Z = (Oe = N == null ? void 0 : N.groupSelect) == null ? void 0 : Oe.split(":")) == null ? void 0 : Z[0]) || ((el = (ze = N == null ? void 0 : N.optionUrl) == null ? void 0 : ze.groupSelect) == null ? void 0 : el[0]));
540
- })) == null ? void 0 : ol.compData;
541
- let w = (V = (Sl = de == null ? void 0 : de.find((O) => (O == null ? void 0 : O.key) === "header")) == null ? void 0 : Sl.contents) == null ? void 0 : V.map((O) => O == null ? void 0 : O.label);
542
- (R = (ce = de == null ? void 0 : de.find((O) => (O == null ? void 0 : O.key) === "header")) == null ? void 0 : ce.contents) != null && R.every((O) => Array.isArray(O)) && (w = (De = Kl((Te = (ne = de == null ? void 0 : de.find((O) => (O == null ? void 0 : O.key) === "header")) == null ? void 0 : ne.contents) == null ? void 0 : Te[0])) == null ? void 0 : De.map((O) => O == null ? void 0 : O.prop));
543
- let me = (we = (Re = de == null ? void 0 : de.find((O) => (O == null ? void 0 : O.key) === "tableContents")) == null ? void 0 : Re.contents) == null ? void 0 : we.map((O) => (O = O == null ? void 0 : O.filter((Oe) => !(Oe != null && Oe.id)), O));
544
- me == null || me.forEach((O) => {
545
- B.push(hn(O, w));
546
- });
547
- }
548
- return B;
549
- }, Zn = { class: "table-content" }, In = { class: "menu-config-wrap" }, Vn = ["onClick"], es = {
550
- key: 0,
551
- class: "viewport-wrap"
552
- }, ls = ["onClick"], as = { title: "选择显示列信息" }, rs = {
553
- class: "menu-config-wrap",
554
- style: { padding: "0 0 0 16px", "box-sizing": "border-box", "min-height": "200px", width: "400px", overflow: "auto", position: "relative" }
555
- }, ns = ["title"], ss = { class: "col-operate-wrap" }, us = {
556
- title: "拖拽排序列",
557
- style: { cursor: "move", color: "grey", position: "absolute", right: "15px" }
558
- }, is = { class: "pop-view" }, os = { class: "pop-wrapper" }, ts = { class: "file-list-pop" }, cs = ["title", "onClick"], ds = ["onClick"], ps = ["onClick"], fs = { class: "form-content" }, gs = {
559
- key: 0,
560
- class: "dialog-footer"
561
- }, hs = { class: "dialog-footer" }, ys = {
562
- __name: "index",
563
- props: {
564
- level: {
565
- type: Number,
566
- default: 1
567
- },
568
- compName: {
569
- type: String,
570
- default: "",
571
- required: !1
572
- },
573
- operatingForm: {
574
- type: Object,
575
- default: () => {
576
- }
577
- },
578
- cacheNewData: {
579
- type: Object,
580
- default: () => {
581
- }
582
- },
583
- parentTableId: {
584
- type: Number,
585
- default: 0
586
- },
587
- itemData: {
588
- type: Array,
589
- default: () => []
590
- },
591
- childItemData: {
592
- type: Array,
593
- default: () => []
594
- },
595
- index: Number,
596
- isDevMode: Boolean,
597
- changedContent: {
598
- type: Object,
599
- default: () => {
600
- }
601
- },
602
- showHeader: {
603
- type: Boolean,
604
- default: !0
605
- },
606
- allowSelect: {
607
- type: Boolean,
608
- default: !0
609
- },
610
- allowOperate: {
611
- type: Boolean,
612
- default: !0
613
- },
614
- allMapContents: {
615
- type: Object,
616
- default: () => {
617
- }
618
- }
619
- },
620
- emits: ["change", "contentChange", "onButtonClick", "contentClick", "pageChange", "rowClick", "routeUrl"],
621
- setup(N, { emit: I }) {
622
- const X = H([]), B = Yn(hl), $ = H(null), i = N, ae = H([
623
- {
624
- label: "排序",
625
- value: "sortable",
626
- checked: !1
627
- },
628
- {
629
- label: "筛选",
630
- value: "filterable",
631
- checked: !1
632
- },
633
- {
634
- label: "合计",
635
- value: "showSummary",
636
- checked: !1
637
- },
638
- {
639
- label: "编辑",
640
- value: "operable",
641
- checked: !1
642
- }
643
- ]), ge = yn(hl);
644
- let Be = "$R";
645
- const { originalPath: fe } = Ul(ge), oe = fe.value, nl = H(!1), Ve = H(!1), ol = H(!1), Sl = Zl({
646
- column: {},
647
- status: !1,
648
- text: "合计"
649
- }), V = Zl({
650
- currentPage: 1,
651
- pageSize: 10,
652
- total: 0,
653
- pageSizes: [5, 10, 20, 50, 100]
654
- }), ce = I, R = H([]), ne = Zl({ prop: "", order: null }), Te = H([]), De = H(!1), Re = H(!1), we = H(null);
655
- dn();
656
- const de = H([]), w = H(!1), me = H(), O = vn(), { importLoading: Oe, activeMenuPath: Z, contentLoading: ze, linkMenuInfo: el } = Ul(O), Je = bn(hl), he = Sn(hl), { extraContents: ye, cacheUpdatingData: Cl, tableViewContents: Dl, tableLoading: vs, pageMapState: tl, lockingPage: Fl } = Ul(he), Y = H([]), wl = H([]), zl = H(/* @__PURE__ */ new Map());
657
- H(!1);
658
- const Ye = H("");
659
- H();
660
- const ra = H(!0), kl = H(0), va = H(!0), qe = H(""), Ze = H(!1), Ia = H({
661
- label: "查看三维模型"
662
- }), Jl = H(!1), na = H(), We = H([]), cl = H([]), Wl = H(!1), El = H([]), Tl = H([]), dl = H([]), Ce = H([]), He = H(), Le = H(), Va = Fn(hl), Gl = H(), sa = H(0), Rl = Rn(hl), { selectIndex: er, selectMenu: ll, selectTitle: ua } = Ul(Rl), { selectString: pl } = Ul(Va), lr = ln(hl), { loginUserInfo: Ae } = Ul(lr), ar = H(720), fl = H(!1), ql = H(!1), Qe = H([]), gl = H(), xl = H(!0), ba = H(!0), Hl = H([]), rr = Qr("contentRef");
663
- Xr("contentRef", rr), Ge(() => {
664
- var e;
665
- return (e = Y.value) == null ? void 0 : e.length;
666
- }, (e) => {
667
- V.total = e;
668
- }), Ge(
669
- () => Dl.value,
670
- async () => {
671
- var u, o, t, c, p, v, C, f, m, D, P, U, W, z, K, n, S, h;
672
- if (((u = Dl.value) == null ? void 0 : u.length) === 0 || !((o = i == null ? void 0 : i.itemData) != null && o.find((T) => (T == null ? void 0 : T.key) === "columnPath")) || !((t = i == null ? void 0 : i.itemData) != null && t.find((T) => (T == null ? void 0 : T.key) === "pageColumn"))) return;
673
- let e = (m = (f = (C = (v = (p = (c = i == null ? void 0 : i.itemData) == null ? void 0 : c.find((T) => (T == null ? void 0 : T.key) === "pageColumn")) == null ? void 0 : p.contents) == null ? void 0 : v.split("[")) == null ? void 0 : C[1]) == null ? void 0 : f.split("]")) == null ? void 0 : m[0], l = ((W = (U = (P = (D = i == null ? void 0 : i.itemData) == null ? void 0 : D.find((T) => (T == null ? void 0 : T.key) === "pageColumn")) == null ? void 0 : P.contents) == null ? void 0 : U.split("[")) == null ? void 0 : W[0]) + ((K = (z = Dl.value) == null ? void 0 : z.find((T) => (T == null ? void 0 : T.key) === e)) == null ? void 0 : K.value), r = ((S = (n = i == null ? void 0 : i.itemData) == null ? void 0 : n.find((T) => (T == null ? void 0 : T.key) === "pageGroup")) == null ? void 0 : S.contents) ?? "", a = await al(l, sessionStorage.getItem("systemKey"), ""), s = (h = a == null ? void 0 : a.find((T) => (T == null ? void 0 : T.name) === (r === "" ? i == null ? void 0 : i.compName : r))) == null ? void 0 : h.compData;
674
- Pa(s, i.allMapContents);
675
- },
676
- { deep: !0 }
677
- );
678
- const nr = async (e, l) => {
679
- var r, a, s, u, o;
680
- try {
681
- const t = await _l({ id: (i == null ? void 0 : i.parentTableId) || (i == null ? void 0 : i.index) });
682
- let c;
683
- ((r = t == null ? void 0 : t.data) == null ? void 0 : r.code) === 200 && (c = ((s = (a = t == null ? void 0 : t.data) == null ? void 0 : a.result) == null ? void 0 : s[0]) || null);
684
- const p = {
685
- type: "data",
686
- pageKey: i != null && i.parentTableId ? (u = c == null ? void 0 : c.key) == null ? void 0 : u.pageKey : Z.value,
687
- tableId: (i == null ? void 0 : i.parentTableId) || (i == null ? void 0 : i.index),
688
- systemKey: sessionStorage.getItem("systemKey")
689
- }, v = l == null ? void 0 : l.map((m) => {
690
- const D = Object.keys(m), P = {};
691
- return D.forEach((U, W) => {
692
- P[e[W]] = m[U];
693
- }), P;
694
- }), C = v == null ? void 0 : v.map((m) => ({
695
- key: p,
696
- value: {
697
- tableData: m
698
- }
699
- })), f = await pa({ dataList: C });
700
- ((o = f == null ? void 0 : f.data) == null ? void 0 : o.code) === 200 ? (he.setRefreshCurStructure(!0), $e.success("导入数据成功")) : $e.error("导入数据响应失败");
701
- } catch (t) {
702
- throw $e.error("导入数据处理失败"), new Error(t);
703
- }
704
- }, sr = async (e) => {
705
- var l, r;
706
- if (e != null && e.includes(".txt") || e != null && e.includes(".cpt") || e != null && e.includes(".cyd")) {
707
- const a = await yl.get(e, {
708
- responseType: "blob",
709
- // 必须设置
710
- headers: {
711
- "Content-Type": "application/json"
712
- }
713
- }), s = new Blob([a.data], {
714
- type: "application/octet-stream;charset=UTF-8"
715
- });
716
- let u = URL.createObjectURL(s);
717
- me.value = [{
718
- name: (r = e == null ? void 0 : e.split("/")) == null ? void 0 : r[((l = e == null ? void 0 : e.split("/")) == null ? void 0 : l.length) - 1],
719
- blobUrl: u
720
- }], w.value = !0;
721
- }
722
- };
723
- Yr(() => {
724
- ba.value = !1;
725
- let e = sa.value;
726
- sa.value = e + 1;
727
- });
728
- const Sa = Ma(() => {
729
- var a, s;
730
- const e = (V.currentPage - 1) * V.pageSize, l = e + V.pageSize, r = (a = R.value) == null ? void 0 : a.find((u) => {
731
- var o;
732
- return (u == null ? void 0 : u.sortable) && ((o = u == null ? void 0 : u.label) == null ? void 0 : o.includes("时间"));
733
- });
734
- return r && (ne.order = "descending", ne.prop = r == null ? void 0 : r.prop), (s = Y.value) == null ? void 0 : s.slice(e, l);
735
- }), ur = (e) => {
736
- V.currentPage = e;
737
- }, ir = (e) => {
738
- var l;
739
- V.pageSize = e, e * V.currentPage > ((l = Y.value) == null ? void 0 : l.length) && (V.currentPage = 1, $e.warning("分页无效,返回第一页"));
740
- }, or = (e, l) => {
741
- var o, t;
742
- const r = (t = (o = R.value) == null ? void 0 : o.map((c) => c == null ? void 0 : c.prop)) == null ? void 0 : t.filter((c) => c !== "operate");
743
- let a;
744
- const s = (e == null ? void 0 : e.length) === (r == null ? void 0 : r.length);
745
- if (e != null && e.includes("序号")) return $e.error("导入的数据不需要包含序号列");
746
- if (a = s ? e : e.slice(0, r == null ? void 0 : r.length), !(a == null ? void 0 : a.every((c) => r == null ? void 0 : r.find((p) => c === p)))) return $e.error("导入的数据表头不匹配");
747
- nr(a, l);
748
- }, tr = (e, l) => {
749
- var r;
750
- he.setRefreshCurStructure(!1), ((r = R.value) == null ? void 0 : r.length) === 0 || or(e, l);
751
- }, cr = (e, l, r, a) => {
752
- const s = [], u = [], o = (p) => Object.keys(p).length;
753
- for (const p in e)
754
- if (e[p] !== void 0) {
755
- const v = e[p], C = [];
756
- for (const [f, m] of Object.entries(v))
757
- C.push(m), u.length < o(v) && u.push(f);
758
- s.push(C);
759
- }
760
- s.unshift(u);
761
- const t = Nl.aoa_to_sheet(s), c = Nl.book_new();
762
- Nl.book_append_sheet(c, t, a), _n(c, `${l}.xlsx`), Qe.value = [];
763
- }, Ql = async (e, l, r, a = !1, s) => {
764
- var u, o, t, c, p, v, C, f;
765
- try {
766
- he.setRefreshCurStructure(!1);
767
- const m = await _l({
768
- id: i == null ? void 0 : i.index
769
- });
770
- if (((u = m == null ? void 0 : m.data) == null ? void 0 : u.code) === 200) {
771
- let D = (p = (c = (t = (o = m == null ? void 0 : m.data) == null ? void 0 : o.result) == null ? void 0 : t[0]) == null ? void 0 : c.value) == null ? void 0 : p.pageData;
772
- a ? D = {
773
- ...D,
774
- compData: (C = D == null ? void 0 : D.compData) == null ? void 0 : C.map((U) => {
775
- var W;
776
- return (U == null ? void 0 : U.key) === "header" ? {
777
- ...U,
778
- contents: (W = U == null ? void 0 : U.contents) == null ? void 0 : W.map((z) => ({
779
- ...z,
780
- [e]: r
781
- }))
782
- } : U;
783
- })
784
- } : D = {
785
- ...D,
786
- compData: (v = D == null ? void 0 : D.compData) == null ? void 0 : v.map((U) => {
787
- var W, z;
788
- return (U == null ? void 0 : U.key) === "header" ? {
789
- ...U,
790
- contents: (W = U == null ? void 0 : U.contents) == null ? void 0 : W.map((K) => (K == null ? void 0 : K.prop) === (l == null ? void 0 : l.prop) ? {
791
- ...K,
792
- [e]: r
793
- } : K)
794
- } : (U == null ? void 0 : U.key) === "tableToForm" && s ? {
795
- ...U,
796
- contents: (z = U == null ? void 0 : U.contents) == null ? void 0 : z.map((K) => (K == null ? void 0 : K.prop) === (l == null ? void 0 : l.prop) ? {
797
- ...K,
798
- [s]: r
799
- } : K)
800
- } : U;
801
- })
802
- };
803
- const P = await rn({
804
- id: i == null ? void 0 : i.index,
805
- value: {
806
- pageData: D
807
- }
808
- });
809
- ((f = P == null ? void 0 : P.data) == null ? void 0 : f.code) === 200 ? ($e.success("编辑成功"), he.setRefreshCurStructure(!0)) : $e.error("编辑响应失败");
810
- }
811
- } catch (m) {
812
- $e.error(m);
813
- }
814
- }, dr = async (e, l) => {
815
- await Ql("label", l, e);
816
- }, pr = async (e, l) => {
817
- await Ql("columnType", l, e, !1, "type");
818
- }, fr = () => {
819
- Cl.value ? fl.value = !1 : $a();
820
- }, gr = (e) => {
821
- Qe.value = e;
822
- }, hr = (e, l) => {
823
- gl.value === l ? xl.value = !1 : xl.value = !0, gl.value = l == null ? void 0 : l.changeProp;
824
- }, jl = Ma(() => {
825
- var r, a, s;
826
- const e = (r = R.value) == null ? void 0 : r.some((u) => u == null ? void 0 : u.filterable);
827
- return document.documentElement.style.setProperty("--ssTable-header-filter-display", e ? "inline-block" : "none"), (s = (a = R.value) == null ? void 0 : a.filter((u) => (u == null ? void 0 : u.label) !== "操作")) == null ? void 0 : s.map((u) => ({
828
- ...u,
829
- filterable: !!(u != null && u.filterable),
830
- showSummary: !!(u != null && u.showSummary),
831
- operable: !!(u != null && u.operable)
832
- }));
833
- }), yr = async (e, l, r) => {
834
- const a = q(R.value);
835
- await ea(), R.value = a == null ? void 0 : a.map((s) => (r == null ? void 0 : r.label) === (s == null ? void 0 : s.label) ? {
836
- ...s,
837
- [l]: e
838
- } : s), await Ql(l, r, e);
839
- }, ia = async (e, l) => {
840
- await Ql(l, null, e, !0);
841
- }, vr = () => {
842
- Ze.value = !1;
843
- }, br = (e) => {
844
- ce("clickTrigger", e);
845
- }, ka = async (e) => {
846
- var u, o, t, c, p, v, C, f, m, D, P, U, W, z, K;
847
- const l = e == null ? void 0 : e.row, r = e == null ? void 0 : e.rowData, a = e == null ? void 0 : e.suffix;
848
- if ((u = l == null ? void 0 : l.toString()) != null && u.includes(".urdf") || e != null && e.isUrdf || a != null && a.includes(".urdf")) {
849
- if (l.includes(",")) {
850
- $e.error("当前版本仅允许单个urdf预览!");
851
- return;
852
- }
853
- El.value = [l], Re.value = !0, we.value = {
854
- data: q(r)
855
- }, De.value = !0;
856
- return;
857
- }
858
- let s = [];
859
- if ((o = l == null ? void 0 : l.toString()) != null && o.includes(".stl") || (t = l == null ? void 0 : l.toString()) != null && t.includes(".STL") || (c = l == null ? void 0 : l.toString()) != null && c.includes(".obj") || (p = l == null ? void 0 : l.toString()) != null && p.includes(".mtl")) {
860
- El.value = (v = l == null ? void 0 : l.toString()) == null ? void 0 : v.split(","), Re.value = !1, De.value = !0;
861
- return;
862
- }
863
- if ((C = l == null ? void 0 : l.toString()) != null && C.includes(".stl") || (f = l == null ? void 0 : l.toString()) != null && f.includes(".STL") || (m = l == null ? void 0 : l.toString()) != null && m.includes(".obj") || (D = l == null ? void 0 : l.toString()) != null && D.includes(".mtl") || a != null && a.includes(".stl") || a != null && a.includes(".STL") || a != null && a.includes(".obj") || a != null && a.includes(".mtl")) {
864
- let n, S = [], h = {};
865
- if (Array.isArray(l) ? n = l : n = l == null ? void 0 : l.split(","), n == null || n.forEach((T) => {
866
- T.includes(".mtl") ? S.push(T) : h.blob = h.blob ? h.blob + "," + T : T;
867
- }), (S == null ? void 0 : S.length) > 0 && (h.mtlBlobs = S), a && (h.suffix = a), (U = (P = Object.values(h)) == null ? void 0 : P[0]) != null && U.includes("http:"))
868
- s.push(h);
869
- else {
870
- const T = new Blob([h.blob], {
871
- type: "application/octet-stream;charset=UTF-8"
872
- });
873
- let k = URL.createObjectURL(T), Q = "";
874
- (W = l == null ? void 0 : l.split("/")) == null || W.forEach((j, E) => {
875
- var J;
876
- E === ((J = l == null ? void 0 : l.split("/")) == null ? void 0 : J.length) - 1 && (Q = j);
877
- }), (z = h.blob) != null && z.includes(".stl") && (Q = (Q == null ? void 0 : Q.replaceAll(">", "")) + ".urdf"), me.value = [{
878
- name: Q,
879
- blobUrl: k
880
- }], w.value = !0;
881
- }
882
- } else {
883
- const n = await yl.get(l, {
884
- responseType: "blob",
885
- headers: {
886
- "Content-Type": "application/json"
887
- }
888
- }), S = new Blob([n.data], {
889
- type: "application/octet-stream;charset=UTF-8"
890
- });
891
- let h = URL.createObjectURL(S), T = "";
892
- (K = l == null ? void 0 : l.split("/")) == null || K.forEach((k, Q) => {
893
- var j;
894
- Q === ((j = l == null ? void 0 : l.split("/")) == null ? void 0 : j.length) - 1 && (T = k);
895
- }), me.value = [{
896
- name: T,
897
- blobUrl: h
898
- }], w.value = !0;
899
- }
900
- (s == null ? void 0 : s.length) > 0 && B.setBlobUrls(s);
901
- }, Xl = (e) => {
902
- var a, s, u, o;
903
- if (e != null && e.downloadUrl)
904
- return e == null ? void 0 : e.name;
905
- const l = (o = (a = e == null ? void 0 : e.url) == null ? void 0 : a.split(".")) == null ? void 0 : o[((u = (s = e == null ? void 0 : e.url) == null ? void 0 : s.split(".")) == null ? void 0 : u.length) - 1];
906
- return (e == null ? void 0 : e.name) + "." + l;
907
- }, Sr = async (e) => {
908
- let l = null, r = null, a = null;
909
- if (e != null && e.downloadUrl) {
910
- const u = await oa(), o = cn.service({
911
- lock: !0,
912
- text: "Loading",
913
- background: "rgba(0, 0, 0, 0.7)"
914
- }), t = await yl.post(e == null ? void 0 : e.url, null, {
915
- responseType: "blob",
916
- // 必须设置
917
- headers: {
918
- Authorization: u,
919
- baseURL: "http://139.196.154.85:20025",
920
- "Content-Type": "application/json"
921
- }
922
- }).finally(() => {
923
- o.close();
924
- }), c = new Blob([t.data], {
925
- type: "application/octet-stream;charset=UTF-8"
926
- });
927
- l = URL.createObjectURL(c), r = e == null ? void 0 : e.name;
928
- const p = r == null ? void 0 : r.lastIndexOf(".");
929
- a = r == null ? void 0 : r.slice(p);
930
- } else {
931
- const u = await fa({
932
- url: e == null ? void 0 : e.url
933
- });
934
- !e.url.toUpperCase().includes(".OBJ") && !e.url.toUpperCase().includes(".STL") && !e.url.toUpperCase().includes(".MTL") && !e.url.toUpperCase().includes(".URDF") ? (l = URL.createObjectURL(u.data), r = Xl(e)) : l = e == null ? void 0 : e.url;
935
- }
936
- if (a != null && a.includes(".urdf") || a != null && a.includes(".stl") || a != null && a.includes(".STL") || a != null && a.includes(".obj") || a != null && a.includes(".mtl")) {
937
- const u = {
938
- row: `${l}`,
939
- suffix: a
940
- };
941
- ka(u);
942
- return;
943
- }
944
- const s = {
945
- name: r,
946
- blobUrl: l
947
- };
948
- me.value = [s], w.value = !0;
949
- }, kr = async (e) => {
950
- let l = null, r = null;
951
- if (e != null && e.downloadUrl) {
952
- const u = await oa(), o = await yl.post(e == null ? void 0 : e.url, null, {
953
- responseType: "blob",
954
- // 必须设置
955
- headers: {
956
- Authorization: u,
957
- baseURL: "http://139.196.154.85:20025",
958
- "Content-Type": "application/json"
959
- }
960
- }), t = new Blob([o.data], {
961
- type: "application/octet-stream;charset=UTF-8"
962
- });
963
- l = URL.createObjectURL(t), r = e == null ? void 0 : e.name;
964
- } else {
965
- const u = await fa({
966
- url: e == null ? void 0 : e.url
967
- });
968
- l = URL.createObjectURL(u.data), r = Xl(e);
969
- }
970
- const a = {
971
- name: r,
972
- blobUrl: l
973
- }, s = document.createElement("a");
974
- s.href = a.blobUrl, s.download = a.name, s.style.display = "none", document.body.appendChild(s), s.click(), setTimeout(() => {
975
- document.body.removeChild(s);
976
- }, 100);
977
- }, Tr = (e, l) => {
978
- if (Object.values(l).length !== 0)
979
- return Object.values(l).find((r) => {
980
- var a, s, u;
981
- return ((a = r == null ? void 0 : r.toString()) == null ? void 0 : a.includes(".txt")) || ((s = r == null ? void 0 : r.toString()) == null ? void 0 : s.includes(".cpt")) || ((u = r == null ? void 0 : r.toString()) == null ? void 0 : u.includes(".obj"));
982
- }) ? [...e, Ia.value] : e;
983
- }, mr = (e, l = {}) => [...e == null ? void 0 : e.values()].filter((r) => Object.keys(l).every((a) => {
984
- var o;
985
- const s = r[a], u = (o = l[a]) == null ? void 0 : o.toLowerCase();
986
- return u && s && typeof s == "string" ? s.toLowerCase().includes(u) : !0;
987
- })), Ta = H([]), Ar = async (e, l, r = !1) => {
988
- var a;
989
- if (e) {
990
- if (he.setTableLoading(!0), Ta.value = Object.values(e), e && ((a = Object.values(e)) != null && a.every((s) => !s)))
991
- return Y.value = wl.value;
992
- if (r) {
993
- Y.value = [...zl.value.values()].filter((s) => Object.values(s).some((u) => typeof u == "string" ? u == null ? void 0 : u.toLowerCase().includes(l == null ? void 0 : l.toLowerCase()) : !1));
994
- return;
995
- }
996
- Y.value = mr(zl.value, e), he.setTableLoading(!1);
997
- }
998
- }, Ur = async (e) => {
999
- var o, t, c, p, v, C, f, m, D, P, U, W, z, K, n;
1000
- const l = await _l({
1001
- keyLikes: {
1002
- pageKey: `loading${((o = Ae.value) == null ? void 0 : o.account) || ((t = Ae.value) == null ? void 0 : t.账号)}`,
1003
- systemKey: sessionStorage.getItem("systemKey")
1004
- }
1005
- }), r = await _l({
1006
- keyLikes: {
1007
- pageKey: `updateLoading${((c = Ae.value) == null ? void 0 : c.account) || ((p = Ae.value) == null ? void 0 : p.账号)}`,
1008
- systemKey: sessionStorage.getItem("systemKey")
1009
- }
1010
- });
1011
- let a = (C = (v = l == null ? void 0 : l.data) == null ? void 0 : v.result) == null ? void 0 : C.map((S) => S == null ? void 0 : S.id);
1012
- const s = (m = (f = r == null ? void 0 : r.data) == null ? void 0 : f.result) == null ? void 0 : m.map((S) => S == null ? void 0 : S.id);
1013
- a = [...q(a), ...s], (a == null ? void 0 : a.length) > 0 && (a != null && a.every((S) => S !== null && S)) && await Ka({
1014
- ids: a
1015
- });
1016
- let u = await al(Z.value, sessionStorage.getItem("systemKey"), e.id);
1017
- if (u = u == null ? void 0 : u.filter((S) => S.comp !== "methodButton"), u && u.length > 0) {
1018
- const S = !Array.isArray(ua.value) && ((D = ua.value) == null ? void 0 : D.key) !== "main" ? [] : ua.value;
1019
- S.push({
1020
- key: ll.value === "" ? (P = e == null ? void 0 : e.id) == null ? void 0 : P.toString() : ll.value + "-" + ((U = e == null ? void 0 : e.id) == null ? void 0 : U.toString()),
1021
- value: e[(W = Object.keys(e)) == null ? void 0 : W.filter((h) => h !== "index" && h !== "id")[0]]
1022
- }), Rl.setSelectMenu(ll.value === "" ? (z = e == null ? void 0 : e.id) == null ? void 0 : z.toString() : ll.value + "-" + ((K = e == null ? void 0 : e.id) == null ? void 0 : K.toString())), Rl.setSelectTitle(S), Rl.setSelectIndex((n = e == null ? void 0 : e.id) == null ? void 0 : n.toString()), ce("pageChange", u);
1023
- }
1024
- }, ma = async (e, l, r, a) => {
1025
- var u, o, t, c, p, v, C, f, m, D, P, U, W, z, K, n, S, h, T, k, Q, j, E, J, b;
1026
- if ((a == null ? void 0 : a.isExistChild) === !0) {
1027
- let x = (o = (u = R.value) == null ? void 0 : u.find((L) => (L == null ? void 0 : L.isMainKey) === !0)) == null ? void 0 : o.prop, _ = (t = a == null ? void 0 : a.rowContent) == null ? void 0 : t[x], d = (p = (c = a == null ? void 0 : a.columnType) == null ? void 0 : c.childPath) == null ? void 0 : p.split(oe), M = [];
1028
- d == null || d.forEach((L, y) => {
1029
- (d == null ? void 0 : d.length) - 1 === y && M.push(_), M.push(L);
1030
- }), M = M.join(oe);
1031
- let F = await al(M, sessionStorage.getItem("systemKey"), ""), ee = await al((v = a == null ? void 0 : a.columnType) == null ? void 0 : v.childPath, sessionStorage.getItem("systemKey"), "");
1032
- if (!F || (F == null ? void 0 : F.length) === 0) {
1033
- let L = [];
1034
- ee == null || ee.forEach((G) => {
1035
- var _e, Se, A, g;
1036
- let le = {
1037
- type: "structure",
1038
- pageKey: M,
1039
- version: 1,
1040
- systemKey: sessionStorage.getItem("systemKey"),
1041
- parentTable: "",
1042
- createUserId: (_e = Ae.value) == null ? void 0 : _e.id,
1043
- parentPageKey: "",
1044
- createUserLayer: ((Se = Ae.value) == null ? void 0 : Se.dept) || ((A = Ae.value) == null ? void 0 : A.部门名称)
1045
- }, ve = {
1046
- pageData: {
1047
- comp: G == null ? void 0 : G.comp,
1048
- compData: (g = G == null ? void 0 : G.compData) == null ? void 0 : g.filter((ue) => (ue == null ? void 0 : ue.key) !== "tableContents"),
1049
- name: G == null ? void 0 : G.name,
1050
- isShow: G == null ? void 0 : G.isShow
1051
- }
1052
- };
1053
- L.push({
1054
- key: le,
1055
- value: ve
1056
- });
1057
- }), (L == null ? void 0 : L.length) > 0 && await pa({
1058
- dataList: L
1059
- });
1060
- let y = await al(M, sessionStorage.getItem("systemKey"), "");
1061
- Hl.value = y;
1062
- } else
1063
- Hl.value = F;
1064
- ce("routeUrl", Hl.value, {
1065
- isEdit: !0,
1066
- routerUrl: M
1067
- });
1068
- return;
1069
- }
1070
- if ((a == null ? void 0 : a.data) === "查看" && (e != null && e.every((x) => (x == null ? void 0 : x.url) && (x == null ? void 0 : x.name)))) {
1071
- let x = q(e);
1072
- x = await ((C = q(x)) == null ? void 0 : C.map(async (d) => {
1073
- var ee, L, y, G;
1074
- const M = await fa({
1075
- url: d == null ? void 0 : d.url
1076
- });
1077
- let F = URL.createObjectURL(M.data);
1078
- return {
1079
- name: (d == null ? void 0 : d.name) + "." + ((G = (ee = d == null ? void 0 : d.url) == null ? void 0 : ee.split(".")) == null ? void 0 : G[((y = (L = d == null ? void 0 : d.url) == null ? void 0 : L.split(".")) == null ? void 0 : y.length) - 1]),
1080
- blobUrl: F
1081
- };
1082
- }));
1083
- let _ = await Promise.all(x);
1084
- me.value = _, w.value = !0;
1085
- }
1086
- const s = q(R.value);
1087
- if ((a == null ? void 0 : a.isMainKey) === !0 && (s == null ? void 0 : s.length) > 0) {
1088
- (f = s == null ? void 0 : s[0]) == null || f.prop;
1089
- let x = q(Z).value + oe + (a == null ? void 0 : a.data), _ = q(Z).value, d = (D = (m = tl.value[x]) == null ? void 0 : m.filter((L) => {
1090
- var y, G;
1091
- return ((y = L == null ? void 0 : L.key) == null ? void 0 : y.type) === "structure" && ((G = L == null ? void 0 : L.key) == null ? void 0 : G.parentTable) === "";
1092
- })) == null ? void 0 : D.map((L) => {
1093
- var y;
1094
- return (y = L == null ? void 0 : L.value) == null ? void 0 : y.pageData;
1095
- }), M = {};
1096
- (P = R.value) == null || P.forEach((L) => {
1097
- (L == null ? void 0 : L.label) !== "操作" && (M[L.label] = r[L.prop] ?? r[L.label]);
1098
- });
1099
- let F = (W = (U = i == null ? void 0 : i.itemData) == null ? void 0 : U.find((L) => (L == null ? void 0 : L.key) === "mainRouters")) == null ? void 0 : W.contents, ee;
1100
- if ((F == null ? void 0 : F.length) > 0) {
1101
- let L = x == null ? void 0 : x.split(oe)[((z = x == null ? void 0 : x.split(oe)) == null ? void 0 : z.length) - 1], y = F == null ? void 0 : F.find((G) => (G == null ? void 0 : G.key) === L);
1102
- ee = (y == null ? void 0 : y.routerContent) + oe + (y == null ? void 0 : y.key);
1103
- }
1104
- if ((d == null ? void 0 : d.length) > 0)
1105
- await al(x + oe + `updateLoading${((K = Ae.value) == null ? void 0 : K.account) || ((n = Ae.value) == null ? void 0 : n.账号)}`, sessionStorage.getItem("systemKey"), "") || await Il(x, x + oe + `updateLoading${((S = Ae.value) == null ? void 0 : S.account) || ((h = Ae.value) == null ? void 0 : h.账号)}`, M, ee), he.setRouteToChildPath(_), O.setActiveMenuPath(x + oe + `updateLoading${((T = Ae.value) == null ? void 0 : T.account) || ((k = Ae.value) == null ? void 0 : k.账号)}`);
1106
- else {
1107
- (Q = s == null ? void 0 : s[0]) == null || Q.prop;
1108
- let L = q(Z).value + oe + (a == null ? void 0 : a.data), y = q(Z).value;
1109
- await al(y + oe, sessionStorage.getItem("systemKey"), ""), await Il(y + oe, L, M), await Il(L, L + oe + `updateLoading${((j = Ae.value) == null ? void 0 : j.account) || ((E = Ae.value) == null ? void 0 : E.账号)}`, M, ee), he.setRouteToChildPath(y), O.setActiveMenuPath(L + oe + `updateLoading${((J = Ae.value) == null ? void 0 : J.account) || ((b = Ae.value) == null ? void 0 : b.账号)}`);
1110
- }
1111
- }
1112
- }, _r = () => {
1113
- w.value = !1;
1114
- }, Or = (e) => {
1115
- ce("rowClick", e);
1116
- };
1117
- Ge(
1118
- () => i.changedContent,
1119
- () => {
1120
- var r, a;
1121
- if (!i.changedContent) return;
1122
- let e = (r = Y.value) == null ? void 0 : r.map((s) => {
1123
- var u;
1124
- return s.id === ((u = i.changedContent) == null ? void 0 : u.id) && (s = {
1125
- ...i.changedContent,
1126
- id: i.changedContent.newId ? i.changedContent.newId : i.changedContent.id
1127
- }, delete s.newId), s;
1128
- });
1129
- const l = (a = i.itemData) == null ? void 0 : a.map((s) => ((s == null ? void 0 : s.key) === "tableContents" && (s.contents = e), s));
1130
- Y.value = e, ce("contentChange", {
1131
- contents: l,
1132
- index: i.index
1133
- }), ce("change", {
1134
- content: e,
1135
- index: i == null ? void 0 : i.index,
1136
- buttonName: "",
1137
- id: i == null ? void 0 : i.index
1138
- });
1139
- },
1140
- { deep: !0, immediate: !0 }
1141
- );
1142
- const Cr = () => {
1143
- }, Dr = async () => {
1144
- const e = Z.value, l = sessionStorage.getItem("systemKey"), r = await al(e, l, ""), a = (r == null ? void 0 : r.find((t) => (t == null ? void 0 : t.name) === "方法明细")) || (r == null ? void 0 : r[0]), s = (a == null ? void 0 : a.compData) || [], u = s == null ? void 0 : s.find((t) => {
1145
- const c = t == null ? void 0 : t.key;
1146
- return c === "formContent" || c === "tableContents";
1147
- });
1148
- return u == null ? void 0 : u.contents;
1149
- }, oa = async () => `Bearer ${nn.get("access-token")}`, Er = async (e, { token: l, inputData: r } = {}) => await yl.post(e, r, {
1150
- headers: {
1151
- Authorization: l
1152
- }
1153
- }).catch((s) => (O.setImportLoading(!1), Promise.reject(s))), xr = (e) => {
1154
- const l = [], r = (a) => {
1155
- a && typeof a == "object" && !Array.isArray(a) ? Object.values(a).forEach(r) : l.push(a);
1156
- };
1157
- return r(e), l;
1158
- }, jr = async (e, l, r) => {
1159
- var z, K, n, S, h, T, k, Q;
1160
- O.setImportLoading(!0), he.setFreshContent(!1);
1161
- let a = await Dr().catch((j) => (O.setImportLoading(!1), Promise.reject(j)));
1162
- a = a == null ? void 0 : a.filter((j) => {
1163
- var E;
1164
- return ((E = j == null ? void 0 : j.find((J) => J == null ? void 0 : J.id)) == null ? void 0 : E.id) === (l == null ? void 0 : l.id);
1165
- });
1166
- let s = Wa([(z = R.value) == null ? void 0 : z.filter((j) => (j == null ? void 0 : j.label) !== "操作")]);
1167
- const u = (n = (K = mn(a, s)) == null ? void 0 : K[0]) == null ? void 0 : n.find((j) => {
1168
- const E = j == null ? void 0 : j.key;
1169
- return E === "算法体" || E === "方法体";
1170
- }), o = u == null ? void 0 : u.value;
1171
- if (!o) {
1172
- console.log("未搜索到isMain, 缺少算法执行接口"), O.setImportLoading(!1);
1173
- return;
1174
- }
1175
- const t = R.value ? Wa([R.value]) : [], c = t.find((j) => {
1176
- const E = j == null ? void 0 : j.prop;
1177
- return E === "输入" || E === "输入数据.输入1" || E === "样本输入数据";
1178
- }), p = c == null ? void 0 : c.prop;
1179
- let v = l == null ? void 0 : l[p];
1180
- const C = await oa().catch((j) => (O.setImportLoading(!1), Promise.reject(j))), f = await Er(o, {
1181
- token: C,
1182
- inputData: v
1183
- }).catch((j) => (O.setImportLoading(!1), Promise.reject(j))), m = (S = f == null ? void 0 : f.data) == null ? void 0 : S.data, D = t.find((j) => (j == null ? void 0 : j.prop) === "输出数据.输出1"), P = D == null ? void 0 : D.prop;
1184
- let U = [], W = [];
1185
- if (((h = Object.values(m)) == null ? void 0 : h.length) > 0) {
1186
- let j = [];
1187
- const E = new FormData(), J = (T = xr(m)) == null ? void 0 : T.map(async (x) => {
1188
- var _, d;
1189
- if (!Array.isArray(x) && (x != null && x.includes("http"))) {
1190
- let M = await yl.get(x, { responseType: "blob" }), F = (d = x == null ? void 0 : x.split("/")) == null ? void 0 : d[((_ = x == null ? void 0 : x.split("/")) == null ? void 0 : _.length) - 1];
1191
- E.append("files", M.data, F);
1192
- } else
1193
- j.push(x);
1194
- });
1195
- if (await Promise.all(J), !An(E)) {
1196
- let x = await fn(E), _ = (Q = (k = x == null ? void 0 : x.data) == null ? void 0 : k.result) == null ? void 0 : Q.map((d) => {
1197
- var M, F, ee, L, y, G;
1198
- return {
1199
- name: (G = (y = (L = (M = d == null ? void 0 : d.url) == null ? void 0 : M.split("/")) == null ? void 0 : L[((ee = (F = d == null ? void 0 : d.url) == null ? void 0 : F.split("/")) == null ? void 0 : ee.length) - 1]) == null ? void 0 : y.split(".")) == null ? void 0 : G[0],
1200
- url: d == null ? void 0 : d.url
1201
- };
1202
- });
1203
- j = [...j, ..._];
1204
- }
1205
- let b = {};
1206
- for (let x in l)
1207
- x !== "id" && (b[x] = l[x]);
1208
- b[P] = j, W.push({
1209
- id: l == null ? void 0 : l.id,
1210
- value: {
1211
- tableData: b
1212
- }
1213
- });
1214
- }
1215
- (W == null ? void 0 : W.length) > 0 && await an({
1216
- dataList: W
1217
- }), (U == null ? void 0 : U.length) > 0 && await pa({
1218
- dataList: U
1219
- }), $l(!0), O.setImportLoading(!1), he.setFreshContent(!0);
1220
- }, Aa = (e, l) => (e = e == null ? void 0 : e.map((r) => {
1221
- var a, s;
1222
- return r != null && r.children && ((a = r.children) != null && a.find((u) => u.id === (l == null ? void 0 : l.id)) ? r.children = (s = r.children) == null ? void 0 : s.filter((u) => (u == null ? void 0 : u.id) !== (l == null ? void 0 : l.id)) : r.children = Aa(r.children, l)), r;
1223
- }), e), Yl = async (e, l, r) => {
1224
- var a, s, u, o, t, c, p, v, C, f, m, D, P, U, W;
1225
- if (Ye.value = "", Wl.value = !0, ra.value = !0, ce("onButtonClick", e, l), e === "删除")
1226
- za.confirm("是否确认删除", "温馨提示", {
1227
- confirmButtonText: "确认",
1228
- cancelButtonText: "取消",
1229
- type: "warning"
1230
- }).then(() => {
1231
- var z, K;
1232
- (z = Y.value) != null && z.find((n) => (n == null ? void 0 : n.id) === (l == null ? void 0 : l.id)) ? Y.value = (K = q(Y.value)) == null ? void 0 : K.filter((n) => (n == null ? void 0 : n.id) !== (l == null ? void 0 : l.id)) : Y.value = Aa(q(Y.value), l), qn(Gl.value, ll.value, l == null ? void 0 : l.id), he.setTableLoading(i == null ? void 0 : i.index), ce("change", {
1233
- content: Y.value,
1234
- singleContent: l,
1235
- index: i == null ? void 0 : i.index,
1236
- type: "delete",
1237
- buttonName: e,
1238
- column: R.value
1239
- });
1240
- });
1241
- else if (e === "批量删除") {
1242
- if (((a = Qe.value) == null ? void 0 : a.length) === 0)
1243
- return $e.warning("请先勾选操作的数据");
1244
- za.confirm("是否确认删除", "温馨提示", {
1245
- confirmButtonText: "确认",
1246
- cancelButtonText: "取消",
1247
- type: "warning"
1248
- }).then(
1249
- () => {
1250
- var K, n;
1251
- const z = (K = Qe.value) == null ? void 0 : K.map((S) => S.id);
1252
- Y.value = (n = q(Y.value)) == null ? void 0 : n.filter((S) => !(z != null && z.includes(S.id))), he.setTableLoading(i == null ? void 0 : i.index), ce("change", {
1253
- content: Y.value,
1254
- singleContent: null,
1255
- selectItems: Qe.value,
1256
- index: i == null ? void 0 : i.index,
1257
- type: "batchDelete",
1258
- buttonName: e,
1259
- column: R.value
1260
- });
1261
- }
1262
- );
1263
- } else if (e === "复制新增") {
1264
- qe.value = "新增";
1265
- const z = q(l), K = (s = R.value) == null ? void 0 : s.find((h) => h == null ? void 0 : h.isMainKey), n = K || ((u = R.value) == null ? void 0 : u[0]), S = (o = dl.value) == null ? void 0 : o.find((h) => (h == null ? void 0 : h.label) === "新建");
1266
- await _a(!0, S, { data: z, firstCol: n });
1267
- } else if (e === "新增")
1268
- qe.value = "新增", Pl(""), Ze.value = !0;
1269
- else if (e === "编辑")
1270
- qe.value = "编辑", Pl(l), Ze.value = !0;
1271
- else if (e === "查看")
1272
- qe.value = "查看", Pl(l), Wl.value = !1, ra.value = !1, Ze.value = !0;
1273
- else if (e === "查看三维模型") {
1274
- const z = {};
1275
- for (let n in l)
1276
- n !== "id" && (z[n] = l[n]);
1277
- let K = (t = Object.values(z)) == null ? void 0 : t[1];
1278
- Je.setTableShowThree(K);
1279
- } else if (((c = r == null ? void 0 : r.extra) == null ? void 0 : c.type) === "modelExample")
1280
- qe.value = e, Jl.value = !0;
1281
- else if (e === "新建") {
1282
- let z = tl.value, K = [];
1283
- for (let k in z)
1284
- k != null && k.includes(`loading${((p = Ae.value) == null ? void 0 : p.account) || ((v = Ae.value) == null ? void 0 : v.账号)}`) && (K = [...K, ...k]);
1285
- let n = [];
1286
- for (let k in z)
1287
- k != null && k.includes(`updateLoading${((C = Ae.value) == null ? void 0 : C.account) || ((f = Ae.value) == null ? void 0 : f.账号)}`) && (n = [...n, ...k]);
1288
- let S = K == null ? void 0 : K.map((k) => k == null ? void 0 : k.id);
1289
- const h = n == null ? void 0 : n.map((k) => k == null ? void 0 : k.id);
1290
- S = [...q(S), ...h], (S == null ? void 0 : S.length) > 0 && (S != null && S.every((k) => k !== null && k)) && await Ka({
1291
- ids: S
1292
- });
1293
- const T = (m = dl.value) == null ? void 0 : m.find((k) => (k == null ? void 0 : k.label) === "新建");
1294
- await _a(!1, T);
1295
- } else if (e === "修改模板") {
1296
- let z = q(Z).value;
1297
- he.setRouteToChildPath(z), O.setActiveMenuPath(z + oe);
1298
- } else if (e === "执行")
1299
- jr(e, l);
1300
- else if (e != null && e.includes("导出")) {
1301
- if (e === "导出选中" && ((D = Qe.value) == null ? void 0 : D.length) === 0)
1302
- return $e.warning(`请先勾选${e}的数据`);
1303
- if (e === "导出全部" && ((P = Y.value) == null ? void 0 : P.length) === 0)
1304
- return $e.warning("暂无数据导出");
1305
- const z = (W = (U = R.value) == null ? void 0 : U.map((n) => n == null ? void 0 : n.label)) == null ? void 0 : W.filter((n) => n !== "操作"), K = e === "导出全部" ? q(Y.value) : q(Qe.value);
1306
- K == null || K.forEach((n) => {
1307
- n == null || delete n.id;
1308
- }), cr(K, i == null ? void 0 : i.compName, z, i == null ? void 0 : i.compName);
1309
- }
1310
- }, Lr = async (e) => {
1311
- var r, a, s, u, o, t;
1312
- const l = await _l({
1313
- key: {
1314
- pageKey: e,
1315
- type: "structure",
1316
- systemKey: sessionStorage.getItem("systemKey")
1317
- }
1318
- });
1319
- if (((r = l == null ? void 0 : l.data) == null ? void 0 : r.code) === 200)
1320
- return Array.isArray((a = l == null ? void 0 : l.data) == null ? void 0 : a.result) && ((u = (s = l == null ? void 0 : l.data) == null ? void 0 : s.result) == null ? void 0 : u.length) > 0 ? (t = (o = l == null ? void 0 : l.data) == null ? void 0 : o.result) == null ? void 0 : t.map((c) => {
1321
- var p;
1322
- return {
1323
- id: c == null ? void 0 : c.id,
1324
- ...(p = c == null ? void 0 : c.value) == null ? void 0 : p.pageData
1325
- };
1326
- }) : [];
1327
- }, Pr = async (e, l) => {
1328
- var r, a, s, u, o, t, c, p, v, C, f, m, D, P, U, W, z, K, n, S;
1329
- try {
1330
- let h, T;
1331
- const k = (r = tl.value[Z.value + oe]) == null ? void 0 : r.filter((d) => {
1332
- var M;
1333
- return ((M = d == null ? void 0 : d.key) == null ? void 0 : M.type) === "structureMethod";
1334
- }), Q = (a = tl.value[Z.value + oe]) == null ? void 0 : a.filter((d) => {
1335
- var M;
1336
- return ((M = d == null ? void 0 : d.key) == null ? void 0 : M.type) === "structure";
1337
- }), j = k == null ? void 0 : k.find((d) => {
1338
- var M, F;
1339
- return ((F = (M = d == null ? void 0 : d.value) == null ? void 0 : M.pageData) == null ? void 0 : F.method) === "保存";
1340
- });
1341
- if (!j) return;
1342
- const E = (t = (o = tl.value[(u = (s = j == null ? void 0 : j.value) == null ? void 0 : s.pageData) == null ? void 0 : u.path]) == null ? void 0 : o.filter((d) => {
1343
- var M;
1344
- return ((M = d == null ? void 0 : d.key) == null ? void 0 : M.type) === "data";
1345
- })) == null ? void 0 : t.find((d) => {
1346
- var M, F, ee, L;
1347
- return ((F = (M = d == null ? void 0 : d.value) == null ? void 0 : M.tableData) == null ? void 0 : F.算法名称) === ((L = (ee = j == null ? void 0 : j.value) == null ? void 0 : ee.pageData) == null ? void 0 : L.method);
1348
- });
1349
- if (!E) return;
1350
- const J = {
1351
- buttonName: (p = (c = j == null ? void 0 : j.value) == null ? void 0 : c.pageData) == null ? void 0 : p.method,
1352
- api: (C = (v = E == null ? void 0 : E.value) == null ? void 0 : v.tableData) == null ? void 0 : C.算法体,
1353
- content: Q == null ? void 0 : Q.map((d) => {
1354
- var M;
1355
- return (M = d == null ? void 0 : d.value) == null ? void 0 : M.pageData;
1356
- }),
1357
- extraContent: [],
1358
- extraValues: (m = (f = j == null ? void 0 : j.value) == null ? void 0 : f.pageData) == null ? void 0 : m.data,
1359
- methodName: (P = (D = j == null ? void 0 : j.value) == null ? void 0 : D.pageData) == null ? void 0 : P.path
1360
- };
1361
- if (!e) return;
1362
- const b = {
1363
- ...e,
1364
- compData: (U = e == null ? void 0 : e.compData) == null ? void 0 : U.map((d) => {
1365
- var M;
1366
- return (d == null ? void 0 : d.key) === "formContent" ? {
1367
- ...d,
1368
- contents: (M = d == null ? void 0 : d.contents) == null ? void 0 : M.map((F) => (F == null ? void 0 : F.prop) === l ? {
1369
- ...F,
1370
- value: ""
1371
- } : F)
1372
- } : d;
1373
- })
1374
- }, x = {
1375
- key: {
1376
- pageKey: Z.value + oe,
1377
- parentTable: "",
1378
- systemKey: sessionStorage.getItem("systemKey"),
1379
- type: "structure"
1380
- },
1381
- value: {
1382
- pageData: b
1383
- }
1384
- }, _ = await yl.post(J.api, x, {
1385
- headers: {
1386
- "Content-Type": "application/json"
1387
- }
1388
- });
1389
- return ((W = _ == null ? void 0 : _.data) == null ? void 0 : W.code) === 200 && (h = (K = (z = _ == null ? void 0 : _.data) == null ? void 0 : z.result) == null ? void 0 : K.latestReportCode, T = (S = (n = _ == null ? void 0 : _.data) == null ? void 0 : n.result) == null ? void 0 : S.status), {
1390
- newMainKeyValue: h,
1391
- newStatus: T
1392
- };
1393
- } catch (h) {
1394
- throw $e.error(h), new Error(h);
1395
- }
1396
- }, Ua = (e, l, r, a) => {
1397
- var s;
1398
- ce("contentChange", {
1399
- contents: (s = e == null ? void 0 : e.compData) == null ? void 0 : s.map((u) => {
1400
- var o;
1401
- return (u == null ? void 0 : u.key) === "formContent" ? {
1402
- ...u,
1403
- contents: (o = u == null ? void 0 : u.contents) == null ? void 0 : o.map((t) => (t == null ? void 0 : t.key) === l ? {
1404
- ...t,
1405
- value: r
1406
- } : Ll.value && (t == null ? void 0 : t.prop) === Ll.prop ? {
1407
- ...t,
1408
- value: Ll.value
1409
- } : t)
1410
- } : u;
1411
- }),
1412
- index: e == null ? void 0 : e.id
1413
- }, a);
1414
- }, Ll = Zl({
1415
- prop: "状态",
1416
- value: ""
1417
- }), $r = H("系统自动生成信息"), Br = async (e, l, r) => {
1418
- var c, p;
1419
- let a = e == null ? void 0 : e[l == null ? void 0 : l.prop], s = 1, u, o;
1420
- const t = q(Z).value + oe + a;
1421
- if (t) {
1422
- Ll.value = "", u = (c = tl.value[t]) == null ? void 0 : c.filter((f) => {
1423
- var m;
1424
- return ((m = f == null ? void 0 : f.key) == null ? void 0 : m.type) === "structure";
1425
- });
1426
- const v = u == null ? void 0 : u.find((f) => {
1427
- var m, D, P;
1428
- return ((P = (D = (m = f == null ? void 0 : f.value) == null ? void 0 : m.pageData) == null ? void 0 : D.comp) == null ? void 0 : P.toUpperCase()) === "FORM";
1429
- });
1430
- o = {
1431
- ...(p = v == null ? void 0 : v.value) == null ? void 0 : p.pageData,
1432
- id: v == null ? void 0 : v.id
1433
- };
1434
- const C = await Pr(o, l == null ? void 0 : l.prop);
1435
- if (Ll.value = C == null ? void 0 : C.newStatus, C != null && C.newMainKeyValue) return C == null ? void 0 : C.newMainKeyValue;
1436
- }
1437
- if (Y.value.some((v) => (v == null ? void 0 : v[l == null ? void 0 : l.prop]) === a)) {
1438
- const v = a;
1439
- for (; Y.value.some((C) => (C == null ? void 0 : C[l == null ? void 0 : l.prop]) === `${v}(${s})`); )
1440
- s++;
1441
- a = `${v}(${s})`;
1442
- }
1443
- return a;
1444
- }, _a = async (e, l, r) => {
1445
- var o, t, c, p, v, C, f, m;
1446
- let a, s;
1447
- const u = await Br(r == null ? void 0 : r.data, r == null ? void 0 : r.firstCol);
1448
- if (e ? (a = q(Z).value + oe + ((p = r == null ? void 0 : r.data) == null ? void 0 : p[(c = r == null ? void 0 : r.firstCol) == null ? void 0 : c.prop]), s = q(Z).value + oe + u) : (a = q(Z).value + oe, s = q(a) + `loading${((o = Ae.value) == null ? void 0 : o.account) || ((t = Ae.value) == null ? void 0 : t.账号)}`), l) {
1449
- const D = (C = (v = tl.value[s]) == null ? void 0 : v.filter((P) => {
1450
- var U;
1451
- return ((U = P == null ? void 0 : P.key) == null ? void 0 : U.parentTable) === "";
1452
- })) == null ? void 0 : C.map((P) => {
1453
- var U;
1454
- return {
1455
- id: P == null ? void 0 : P.id,
1456
- ...(U = P == null ? void 0 : P.value) == null ? void 0 : U.pageData
1457
- };
1458
- });
1459
- if ((D == null ? void 0 : D.length) > 0)
1460
- if (e) {
1461
- const P = D == null ? void 0 : D.find((U) => {
1462
- var W;
1463
- return ((W = U == null ? void 0 : U.comp) == null ? void 0 : W.toUpperCase()) === "FORM";
1464
- });
1465
- P && Ua(P, (f = r == null ? void 0 : r.firstCol) == null ? void 0 : f.label, u, Z.value);
1466
- } else
1467
- he.setRouteToChildPath(q(Z).value), O.setActiveMenuPath(s);
1468
- else if (await Il(a, s, null, null, $r.value), e) {
1469
- const P = await Lr(s);
1470
- if ((P == null ? void 0 : P.length) > 0) {
1471
- const U = P == null ? void 0 : P.find((W) => {
1472
- var z;
1473
- return ((z = W == null ? void 0 : W.comp) == null ? void 0 : z.toUpperCase()) === "FORM";
1474
- });
1475
- U && Ua(U, (m = r == null ? void 0 : r.firstCol) == null ? void 0 : m.label, u, Z.value);
1476
- }
1477
- } else
1478
- he.setRouteToChildPath(q(Z).value), O.setActiveMenuPath(s);
1479
- } else
1480
- e ? (Ye.value = "", Le.value = r == null ? void 0 : r.data, $l(!0, r == null ? void 0 : r.firstCol, u)) : (he.setRouteToChildPath(q(Z).value), O.setActiveMenuPath(s));
1481
- }, Mr = () => {
1482
- De.value = !1, El.value = [], Re.value = !1;
1483
- }, Pl = (e) => {
1484
- var o, t, c, p, v, C, f, m, D, P, U, W, z, K;
1485
- const l = [];
1486
- let r = [];
1487
- for (let n in e)
1488
- Array.isArray(e == null ? void 0 : e[n]) && r.push(n);
1489
- Te.value = q(R.value), (t = Kl((o = q(R.value)) == null ? void 0 : o.filter((n) => (n == null ? void 0 : n.label) !== "操作"))) == null || t.forEach((n, S) => {
1490
- var h;
1491
- r.find((T) => T === (n == null ? void 0 : n.prop)) || (n != null && n.formType && ((h = n == null ? void 0 : n.formType) == null ? void 0 : h.toUpperCase()) === "SELECT" ? l.push({
1492
- label: (n == null ? void 0 : n.prop) || (n == null ? void 0 : n.label) || "",
1493
- name: (n == null ? void 0 : n.prop) ?? "t" + S,
1494
- prop: n == null ? void 0 : n.prop,
1495
- type: !(n != null && n.formType) || (n == null ? void 0 : n.formType) === "" ? "Input" : n == null ? void 0 : n.formType,
1496
- value: (e == null ? void 0 : e[n == null ? void 0 : n.prop]) ?? (n == null ? void 0 : n.value) ?? "",
1497
- id: (n == null ? void 0 : n.id) ?? S,
1498
- contents: (n == null ? void 0 : n.options) ?? [],
1499
- width: 1,
1500
- isFormColHidden: n == null ? void 0 : n.isFormColHidden,
1501
- disabled: n == null ? void 0 : n.disabled,
1502
- optionUrl: {
1503
- groupSelect: n == null ? void 0 : n.groupSelect,
1504
- menuSelect: n == null ? void 0 : n.formMenuSelect,
1505
- type: "Select",
1506
- selectRelateType: n == null ? void 0 : n.selectRelateType
1507
- }
1508
- }) : l.push({
1509
- label: (n == null ? void 0 : n.prop) || (n == null ? void 0 : n.label) || "",
1510
- prop: n == null ? void 0 : n.prop,
1511
- name: (n == null ? void 0 : n.prop) ?? "t" + S,
1512
- type: !(n != null && n.formType) || (n == null ? void 0 : n.formType) === "" ? "Input" : n == null ? void 0 : n.formType,
1513
- value: (e == null ? void 0 : e[n == null ? void 0 : n.prop]) ?? (n == null ? void 0 : n.value) ?? "",
1514
- id: (n == null ? void 0 : n.id) ?? S,
1515
- contents: (n == null ? void 0 : n.options) ?? [],
1516
- width: 1,
1517
- isFormColHidden: n == null ? void 0 : n.isFormColHidden,
1518
- disabled: n == null ? void 0 : n.disabled
1519
- }));
1520
- }), e === "" || !e || (Ye.value = (e == null ? void 0 : e.id) ?? "");
1521
- let a = Kl((c = q(R.value)) == null ? void 0 : c.filter((n) => (n == null ? void 0 : n.label) !== "操作"));
1522
- We.value && ((p = We.value) == null ? void 0 : p.length) > 0 && (We.value = (v = q(We).value) == null ? void 0 : v.map((n) => {
1523
- var h;
1524
- let S = (n == null ? void 0 : n.prop) || ((h = a == null ? void 0 : a.find((T) => (T == null ? void 0 : T.label) === (n == null ? void 0 : n.label))) == null ? void 0 : h.prop);
1525
- return S && (n.value = e[S]), n;
1526
- })), Ce.value = We.value && ((C = We.value) == null ? void 0 : C.length) > 0 ? Tn(We.value) : l;
1527
- let s = [], u = (f = i.itemData) == null ? void 0 : f.filter((n) => (n == null ? void 0 : n.key) === "filterAllType");
1528
- if ((u == null ? void 0 : u.length) > 0 && (s = (u == null ? void 0 : u.map((S) => S == null ? void 0 : S.value)).flat()), (s == null ? void 0 : s.length) > 0) {
1529
- let n = s == null ? void 0 : s.find((S) => {
1530
- var h;
1531
- return (h = S == null ? void 0 : S.content) == null ? void 0 : h.includes("@Type");
1532
- });
1533
- if (n != null && n.content) {
1534
- let S = (P = (D = (m = n == null ? void 0 : n.content) == null ? void 0 : m.replace(":", Be)) == null ? void 0 : D.split(Be)) == null ? void 0 : P[1];
1535
- if (((U = S == null ? void 0 : S.trim()) == null ? void 0 : U.toUpperCase()) === "MANUAL") {
1536
- let h = (z = (W = i.itemData) == null ? void 0 : W.find((T) => (T == null ? void 0 : T.key) === "contentTableId")) == null ? void 0 : z.contents;
1537
- Ce.value = (K = Ce.value) == null ? void 0 : K.map((T, k) => {
1538
- var Q;
1539
- return k === 0 && (T.type = "Select", (Q = T == null ? void 0 : T.optionUrl) != null && Q.menuId ? (T.optionUrl.menuId = h, T.optionUrl.menuFilter = s) : T.optionUrl = {
1540
- menuId: h,
1541
- menuFilter: s
1542
- }), T;
1543
- });
1544
- }
1545
- }
1546
- }
1547
- }, Kr = () => {
1548
- var l;
1549
- const e = (l = $.value) == null ? void 0 : l.$el;
1550
- e && sn.create(e, {
1551
- animation: 150,
1552
- handle: ".col-drag-icon",
1553
- ghostClass: "sortable-ghost",
1554
- onEnd: (r) => {
1555
- var o;
1556
- const { oldIndex: a, newIndex: s } = r;
1557
- if (a === s) return;
1558
- const u = jl.value.splice(a, 1)[0];
1559
- jl.value.splice(s, 0, u), R.value = (o = R.value) == null ? void 0 : o.slice().sort((t, c) => {
1560
- if (t.label === "操作") return 1;
1561
- if (c.label === "操作") return -1;
1562
- const p = jl.value.findIndex((C) => C.label === t.label), v = jl.value.findIndex((C) => C.label === c.label);
1563
- return p - v;
1564
- });
1565
- }
1566
- });
1567
- };
1568
- ha(() => {
1569
- na.value = window.innerWidth - 240 * 2;
1570
- });
1571
- const Nr = () => {
1572
- ea(() => {
1573
- Kr();
1574
- });
1575
- }, ta = (e, l) => {
1576
- var a;
1577
- if (!e && !(e != null && e.children)) return {
1578
- contents: e,
1579
- currentSelectContents: void 0
1580
- };
1581
- let r;
1582
- return e.children = (a = e.children) == null ? void 0 : a.map((s) => {
1583
- var u, o;
1584
- if ((s == null ? void 0 : s.id) === Ye.value) {
1585
- let t = {};
1586
- for (let c in s) {
1587
- let p = (u = l == null ? void 0 : l.find((v) => (v == null ? void 0 : v.prop) === c)) == null ? void 0 : u.label;
1588
- p ? t[c] = (o = Le.value) == null ? void 0 : o[p] : t[c] = s[c];
1589
- }
1590
- s = Object.assign(t, Le.value), r = s;
1591
- } else {
1592
- let t = ta(s, l);
1593
- s = t == null ? void 0 : t.contents, r = t == null ? void 0 : t.currentSelectContents;
1594
- }
1595
- return s;
1596
- }), {
1597
- contents: e,
1598
- currentSelectContents: r
1599
- };
1600
- }, Oa = (e, l) => {
1601
- let r, a;
1602
- return e != null && e.find((s) => (s == null ? void 0 : s.id) === Ye.value) ? r = e == null ? void 0 : e.map((s) => {
1603
- var u, o;
1604
- if ((s == null ? void 0 : s.id) === Ye.value) {
1605
- let t = {};
1606
- for (let c in s) {
1607
- let p = (u = l == null ? void 0 : l.find((v) => (v == null ? void 0 : v.prop) === c)) == null ? void 0 : u.label;
1608
- p ? t[c] = (o = Le.value) == null ? void 0 : o[p] : t[c] = s[c];
1609
- }
1610
- s = Object.assign(t, Le.value), a = s;
1611
- }
1612
- return s;
1613
- }) : r = e == null ? void 0 : e.map((s) => {
1614
- var u, o, t, c;
1615
- if ((s == null ? void 0 : s.id) === Ye.value) {
1616
- let p = {};
1617
- for (let v in s) {
1618
- let C = (u = l == null ? void 0 : l.find((f) => (f == null ? void 0 : f.prop) === v)) == null ? void 0 : u.label;
1619
- C ? p[v] = (o = Le.value) == null ? void 0 : o[C] : p[v] = s[v];
1620
- }
1621
- s = Object.assign(p, Le.value), a = s;
1622
- } else
1623
- s = (t = ta(s, l)) == null ? void 0 : t.contents, a = (c = ta(s, l)) == null ? void 0 : c.currentSelectContents;
1624
- return s;
1625
- }), {
1626
- newContents: r,
1627
- currentSelectContents: a
1628
- };
1629
- }, Ca = (e, l, r) => {
1630
- var a, s;
1631
- return e[l == null ? void 0 : l.prop] = r, typeof e.id == "number" && (e.id = (a = e.id) == null ? void 0 : a.toString()), e.children && ((s = e.children) == null ? void 0 : s.length) > 0 && (e.children = e.children.map(Ca)), e;
1632
- }, ca = (e) => {
1633
- var r;
1634
- const l = [];
1635
- return l.push({ ...e }), e != null && e.children && Array.isArray(e.children) && ((r = e.children) == null || r.forEach((a) => {
1636
- l.push(...ca(a));
1637
- })), (l == null ? void 0 : l.length) > 0 ? l == null ? void 0 : l.map((a) => {
1638
- const s = { ...a };
1639
- return delete s.children, s;
1640
- }) : [];
1641
- }, $l = (e = !0, l, r) => {
1642
- var p, v, C, f, m, D, P, U, W, z, K, n, S, h, T, k, Q, j, E, J, b, x;
1643
- let a = Kl((p = q(R.value)) == null ? void 0 : p.filter((_) => (_ == null ? void 0 : _.label) !== "操作")), s, u = q(Y.value);
1644
- if (!Le.value) {
1645
- Ze.value = !1;
1646
- return;
1647
- }
1648
- if (Ye.value === "") {
1649
- kl.value++;
1650
- let _;
1651
- l && r ? _ = {
1652
- id: kl.value.toString(),
1653
- [l == null ? void 0 : l.prop]: r,
1654
- children: Le.value.children
1655
- } : _ = { id: kl.value.toString() }, _ != null && _.children && (_ = {
1656
- ..._,
1657
- children: (v = _.children) == null ? void 0 : v.map((d) => Ca(d, l, r))
1658
- }), u.push(Object.assign(Le.value, _)), s = Object.assign(Le.value, _);
1659
- } else
1660
- u = (C = Oa(u, a)) == null ? void 0 : C.newContents, s = (f = Oa(u, a)) == null ? void 0 : f.currentSelectContents;
1661
- const o = (m = i.itemData) == null ? void 0 : m.filter((_) => (_ == null ? void 0 : _.key) === "childTree")[0];
1662
- if (((D = o == null ? void 0 : o.contents) == null ? void 0 : D.length) > 0) {
1663
- qe.value = "编辑";
1664
- const _ = [];
1665
- u == null || u.forEach((d, M) => {
1666
- var ee;
1667
- let F = {};
1668
- if (Array.isArray(d)) {
1669
- let L = [];
1670
- d == null || d.filter((y) => !(y != null && y.id)).forEach((y, G) => {
1671
- var le, ve, _e, Se, A, g, ue;
1672
- if ((ve = (le = He.value) == null ? void 0 : le[G]) != null && ve.prop && !Array.isArray(y)) {
1673
- let pe = {};
1674
- pe[He.value[G].column] = y, ye != null && ye.value && ((_e = ye == null ? void 0 : ye.value) == null ? void 0 : _e.length) > 0 && ((Se = ye == null ? void 0 : ye.value) != null && Se.find((se) => JSON.stringify(se == null ? void 0 : se[0]) === JSON.stringify(pe))) && (L = (A = ye == null ? void 0 : ye.value) == null ? void 0 : A.find((se) => JSON.stringify(se == null ? void 0 : se[0]) === JSON.stringify(pe))), L && L.length > 0 ? F[He.value[G].prop] = L != null && L.find((se) => {
1675
- var ke;
1676
- return ((ke = Object.keys(se)) == null ? void 0 : ke[0]) === He.value[G].column;
1677
- }) ? (g = L == null ? void 0 : L.find((se) => {
1678
- var ke;
1679
- return ((ke = Object.keys(se)) == null ? void 0 : ke[0]) === He.value[G].column;
1680
- })) == null ? void 0 : g[He.value[G].column] : y : F[He.value[G].prop] = y;
1681
- } else Array.isArray(y) && ((ue = He.value[G]) != null && ue.prop ? F[He.value[G].prop] = y : F.children = ga(y, He.value));
1682
- });
1683
- } else
1684
- F = d;
1685
- Array.isArray(d) && d.some((L) => L == null ? void 0 : L.id) ? _.push(Object.assign(F, { id: (ee = d == null ? void 0 : d.find((L) => L.id)) == null ? void 0 : ee.id })) : F.id ? _.push(F) : _.push(Object.assign(F, { id: M.toString() }));
1686
- }), Y.value = La(_, o, R.value);
1687
- } else
1688
- Y.value = u;
1689
- xa(Y.value), Gl.value = Y.value;
1690
- const t = Qn(Gl.value, ll.value, u);
1691
- let c = [];
1692
- if (Cl.value ? (c = (P = q(Cl).value.singleContent) == null ? void 0 : P.filter((_) => (_ == null ? void 0 : _.id) !== (s == null ? void 0 : s.id)), c.push(s)) : c = [s], fl.value) {
1693
- const _ = {
1694
- content: t,
1695
- singleContent: ((U = o == null ? void 0 : o.contents) == null ? void 0 : U.length) > 0 ? c == null ? void 0 : c.flatMap(ca) : c,
1696
- index: i == null ? void 0 : i.index,
1697
- buttonName: "编辑",
1698
- column: R.value,
1699
- parentTableId: i == null ? void 0 : i.parentTableId
1700
- };
1701
- he.setCacheUpdatingData(_);
1702
- }
1703
- if (e && !((K = (z = (W = Ce.value) == null ? void 0 : W[0]) == null ? void 0 : z.optionUrl) != null && K.menuId)) {
1704
- const _ = {
1705
- content: t,
1706
- singleContent: ((n = o == null ? void 0 : o.contents) == null ? void 0 : n.length) > 0 ? ca(s) : s,
1707
- index: i == null ? void 0 : i.index,
1708
- buttonName: qe.value,
1709
- column: R.value,
1710
- parentTableId: i == null ? void 0 : i.parentTableId
1711
- };
1712
- he.setTableLoading(i == null ? void 0 : i.index), Ze.value = !1, Le.value = void 0, ce("change", _);
1713
- }
1714
- if ((T = (h = (S = Ce.value) == null ? void 0 : S[0]) == null ? void 0 : h.optionUrl) != null && T.menuId) {
1715
- Ze.value = !1;
1716
- let _ = (k = i.itemData) == null ? void 0 : k.filter((d) => (d == null ? void 0 : d.key) === "filterAllType");
1717
- if ((_ == null ? void 0 : _.length) > 0) {
1718
- let M = (E = (j = (Q = (_ == null ? void 0 : _.map((F) => F == null ? void 0 : F.value)).flat().find((F) => {
1719
- var ee;
1720
- return (ee = F == null ? void 0 : F.content) == null ? void 0 : ee.includes("@Num");
1721
- })) == null ? void 0 : Q.content) == null ? void 0 : j.split(":")) == null ? void 0 : E[1];
1722
- M = parseInt(M), Y.value = (x = Y.value) == null ? void 0 : x.slice(((J = Y.value) == null ? void 0 : J.length) - M, (b = Y.value) == null ? void 0 : b.length);
1723
- }
1724
- }
1725
- };
1726
- Zr(() => {
1727
- R.value = [], Y.value = [], Te.value = [], de.value = [], We.value = [], cl.value = [], El.value = [], Tl.value = [], Ce.value = [], Qe.value = [], $.value = null;
1728
- });
1729
- const Da = async (e, l, r) => {
1730
- var p, v, C, f, m, D, P, U, W, z, K;
1731
- gl.value = r == null ? void 0 : r.prop;
1732
- const a = q(i.itemData), s = a == null ? void 0 : a.map((n) => {
1733
- var S;
1734
- return (n == null ? void 0 : n.key) === "header" && ((S = n.contents) == null || S.map((h, T) => {
1735
- var k, Q, j, E, J, b, x, _, d, M, F, ee, L, y, G, le, ve, _e, Se;
1736
- return h.type = h != null && h.type ? h.type : (E = (j = (Q = (k = h == null ? void 0 : h.key) == null ? void 0 : k.split("$")) == null ? void 0 : Q[1]) == null ? void 0 : j.split("(")) != null && E[0] ? (b = (J = Ja) == null ? void 0 : J.find((A) => {
1737
- var g, ue, pe, se;
1738
- return (A == null ? void 0 : A.key) === ((se = (pe = (ue = (g = h == null ? void 0 : h.key) == null ? void 0 : g.split("$")) == null ? void 0 : ue[1]) == null ? void 0 : pe.split("(")) == null ? void 0 : se[0]);
1739
- })) == null ? void 0 : b.value : "Input", h.options = h != null && h.options ? h.options : ((d = (_ = (x = h == null ? void 0 : h.key) == null ? void 0 : x.split("$")) == null ? void 0 : _[1]) == null ? void 0 : d.length) > 0 ? (L = (ee = Ra((F = (M = h == null ? void 0 : h.key) == null ? void 0 : M.split("$")) == null ? void 0 : F[1])) == null ? void 0 : ee.split(",")) == null ? void 0 : L.map((A) => ({
1740
- label: A,
1741
- value: A
1742
- })) : [], (y = h == null ? void 0 : h.key) != null && y.includes("$") && (h.key = (le = (G = h == null ? void 0 : h.key) == null ? void 0 : G.split("$")) == null ? void 0 : le[0]), h.value = (ve = Object.values(l)) == null ? void 0 : ve[T], h.optionUrl = h != null && h.formMenuSelect && ((_e = h == null ? void 0 : h.formMenuSelect) == null ? void 0 : _e.length) > 0 ? {
1743
- groupSelect: (Se = h == null ? void 0 : h.groupSelect) == null ? void 0 : Se.split(/[::]/).map((A) => A.trim()),
1744
- menuSelect: h == null ? void 0 : h.formMenuSelect,
1745
- selectRelateType: "",
1746
- type: (h == null ? void 0 : h.formType) ?? (h != null && h.groupSelect ? "Select" : "")
1747
- } : null, h;
1748
- })), n;
1749
- });
1750
- let u = q(Ce.value), o = (v = (p = q(s)) == null ? void 0 : p.find((n) => (n == null ? void 0 : n.key) === "header")) == null ? void 0 : v.contents;
1751
- u = u == null ? void 0 : u.map((n) => {
1752
- var S;
1753
- return n.value = (S = o == null ? void 0 : o.find((h, T) => T === (n == null ? void 0 : n.id))) == null ? void 0 : S.value, n;
1754
- });
1755
- let t = "", c = (m = (f = (C = q(s)) == null ? void 0 : C.find((n) => (n == null ? void 0 : n.key) === "header")) == null ? void 0 : f.contents) == null ? void 0 : m.find((n, S) => {
1756
- var h, T, k;
1757
- return (n == null ? void 0 : n.label) === gl.value || (S == null ? void 0 : S.toString()) === ((k = (T = (h = gl.value) == null ? void 0 : h.split("a")) == null ? void 0 : T[1]) == null ? void 0 : k.toString());
1758
- });
1759
- if ((U = (P = (D = q(s)) == null ? void 0 : D.find((n) => (n == null ? void 0 : n.key) === "header")) == null ? void 0 : P.contents) == null || U.forEach((n) => {
1760
- var S, h, T, k, Q;
1761
- t === "" && ((T = (h = (S = n == null ? void 0 : n.optionUrl) == null ? void 0 : S.groupSelect) == null ? void 0 : h[1]) != null && T.includes("[")) && (t = (Q = (k = n == null ? void 0 : n.optionUrl) == null ? void 0 : k.groupSelect) == null ? void 0 : Q[1]);
1762
- }), (W = c == null ? void 0 : c.optionUrl) != null && W.menuSelect) {
1763
- let n = await qa(c), S;
1764
- if (n == null || n.forEach((h) => {
1765
- var T, k, Q, j, E, J, b, x, _, d;
1766
- t === ((k = (T = c == null ? void 0 : c.optionUrl) == null ? void 0 : T.groupSelect) == null ? void 0 : k[1]) && ((E = (j = (Q = c == null ? void 0 : c.optionUrl) == null ? void 0 : Q.groupSelect) == null ? void 0 : j[1]) != null && E.includes("[")) && ((d = q(h)) == null ? void 0 : d[(_ = (x = (b = (J = c == null ? void 0 : c.optionUrl) == null ? void 0 : J.groupSelect) == null ? void 0 : b[1]) == null ? void 0 : x.replaceAll("[", "")) == null ? void 0 : _.replaceAll("]", "")]) === (c == null ? void 0 : c.value) && (S = h);
1767
- }), S) {
1768
- let h = q(u);
1769
- h = h == null ? void 0 : h.map((k) => {
1770
- var Q, j, E, J, b, x, _, d, M, F, ee;
1771
- return (S != null && S[k == null ? void 0 : k.label] || S != null && S[(J = (E = (j = (Q = k == null ? void 0 : k.optionUrl) == null ? void 0 : Q.groupSelect) == null ? void 0 : j[1]) == null ? void 0 : E.replaceAll("[", "")) == null ? void 0 : J.replaceAll("]", "")]) && ((_ = (x = (b = k == null ? void 0 : k.optionUrl) == null ? void 0 : b.groupSelect) == null ? void 0 : x[1]) != null && _.includes("[")) && (k.value = (S == null ? void 0 : S[k == null ? void 0 : k.label]) || (S == null ? void 0 : S[(ee = (F = (M = (d = k == null ? void 0 : k.optionUrl) == null ? void 0 : d.groupSelect) == null ? void 0 : M[1]) == null ? void 0 : F.replaceAll("[", "")) == null ? void 0 : ee.replaceAll("]", "")])), k;
1772
- }), Y.value = (z = q(Y.value)) == null ? void 0 : z.map((k) => {
1773
- if ((k == null ? void 0 : k.id) === (l == null ? void 0 : l.id)) {
1774
- const Q = {};
1775
- return h == null || h.forEach((j) => {
1776
- Q[j.name] = j.value;
1777
- }), Q.id = k == null ? void 0 : k.id, Q;
1778
- }
1779
- return k;
1780
- });
1781
- let T = q(h);
1782
- T = T == null ? void 0 : T.map((k) => {
1783
- var Q, j, E, J;
1784
- return (j = (Q = k == null ? void 0 : k.optionUrl) == null ? void 0 : Q.menuSelect) != null && j.some((b) => b == null ? void 0 : b.includes) && (k.optionUrl.menuSelect = (J = (E = k == null ? void 0 : k.optionUrl) == null ? void 0 : E.menuSelect) == null ? void 0 : J.map((b) => {
1785
- var x, _, d, M;
1786
- if (b != null && b.includes("[")) {
1787
- let F = (_ = (x = b == null ? void 0 : b.replaceAll("[", "").replaceAll("]", "")) == null ? void 0 : x.split(":")) == null ? void 0 : _[1];
1788
- b = (M = (d = q(h)) == null ? void 0 : d.find((ee) => (ee == null ? void 0 : ee.label) === F)) == null ? void 0 : M.value;
1789
- }
1790
- return b;
1791
- })), k;
1792
- }), Y.value = (K = q(Y.value)) == null ? void 0 : K.map((k) => {
1793
- if ((k == null ? void 0 : k.id) === (l == null ? void 0 : l.id)) {
1794
- const Q = {};
1795
- return T == null || T.forEach((j) => {
1796
- Q[j.name] = j.value;
1797
- }), Q.id = k == null ? void 0 : k.id, Q;
1798
- }
1799
- return k;
1800
- });
1801
- }
1802
- }
1803
- }, Fr = async (e) => {
1804
- var p, v, C, f, m, D, P, U, W, z, K, n, S, h, T, k, Q, j;
1805
- if (!e) return;
1806
- Le.value = e;
1807
- const l = q(i.itemData);
1808
- let r = l == null ? void 0 : l.map((E) => {
1809
- var J;
1810
- return (E == null ? void 0 : E.key) === "header" && ((J = E.contents) == null || J.map((b, x) => {
1811
- var _, d, M, F, ee, L, y, G, le, ve, _e, Se, A, g, ue, pe, se, ke, Ee;
1812
- return b.type = b != null && b.type ? b.type : (F = (M = (d = (_ = b == null ? void 0 : b.key) == null ? void 0 : _.split("$")) == null ? void 0 : d[1]) == null ? void 0 : M.split("(")) != null && F[0] ? (L = (ee = Ja) == null ? void 0 : ee.find((xe) => {
1813
- var sl, Ke, ul, il;
1814
- return (xe == null ? void 0 : xe.key) === ((il = (ul = (Ke = (sl = b == null ? void 0 : b.key) == null ? void 0 : sl.split("$")) == null ? void 0 : Ke[1]) == null ? void 0 : ul.split("(")) == null ? void 0 : il[0]);
1815
- })) == null ? void 0 : L.value : "Input", b.options = b != null && b.options ? b.options : ((le = (G = (y = b == null ? void 0 : b.key) == null ? void 0 : y.split("$")) == null ? void 0 : G[1]) == null ? void 0 : le.length) > 0 ? (A = (Se = Ra((_e = (ve = b == null ? void 0 : b.key) == null ? void 0 : ve.split("$")) == null ? void 0 : _e[1])) == null ? void 0 : Se.split(",")) == null ? void 0 : A.map((xe) => ({
1816
- label: xe,
1817
- value: xe
1818
- })) : [], (g = b == null ? void 0 : b.key) != null && g.includes("$") && (b.key = (pe = (ue = b == null ? void 0 : b.key) == null ? void 0 : ue.split("$")) == null ? void 0 : pe[0]), b.value = (se = Object.values(e)) == null ? void 0 : se[x], b.optionUrl = b != null && b.formMenuSelect && ((ke = b == null ? void 0 : b.formMenuSelect) == null ? void 0 : ke.length) > 0 ? {
1819
- groupSelect: (Ee = b == null ? void 0 : b.groupSelect) == null ? void 0 : Ee.split(/[::]/).map((xe) => xe.trim()),
1820
- menuSelect: b == null ? void 0 : b.formMenuSelect,
1821
- selectRelateType: "",
1822
- type: (b == null ? void 0 : b.formType) ?? (b != null && b.groupSelect ? "Select" : "")
1823
- } : null, b;
1824
- })), E;
1825
- }), a = q(Ce.value), s = (v = (p = q(r)) == null ? void 0 : p.find((E) => (E == null ? void 0 : E.key) === "header")) == null ? void 0 : v.contents;
1826
- if (a = a == null ? void 0 : a.map((E) => {
1827
- var J;
1828
- return E.value = (J = s == null ? void 0 : s.find((b, x) => (b == null ? void 0 : b.prop) === (E == null ? void 0 : E.name))) == null ? void 0 : J.value, E;
1829
- }), !xl.value) return;
1830
- let u = "", o = (m = (f = (C = q(r)) == null ? void 0 : C.find((E) => (E == null ? void 0 : E.key) === "header")) == null ? void 0 : f.contents) == null ? void 0 : m.find((E, J) => {
1831
- var b, x, _;
1832
- return (E == null ? void 0 : E.label) === gl.value || (J == null ? void 0 : J.toString()) === ((_ = (x = (b = gl.value) == null ? void 0 : b.split("a")) == null ? void 0 : x[1]) == null ? void 0 : _.toString());
1833
- }), t = (D = o == null ? void 0 : o.optionUrl) == null ? void 0 : D.menuSelect, c = !0;
1834
- if ((W = (U = (P = q(r)) == null ? void 0 : P.find((E) => (E == null ? void 0 : E.key) === "header")) == null ? void 0 : U.contents) == null || W.forEach((E) => {
1835
- var J, b, x, _, d, M;
1836
- c && ((x = (b = (J = E == null ? void 0 : E.optionUrl) == null ? void 0 : J.groupSelect) == null ? void 0 : b[1]) != null && x.includes("[")) && (u = (d = (_ = E == null ? void 0 : E.optionUrl) == null ? void 0 : _.groupSelect) == null ? void 0 : d[1], JSON.stringify(t) === JSON.stringify((M = E == null ? void 0 : E.optionUrl) == null ? void 0 : M.menuSelect) && (c = !1));
1837
- }), (z = o == null ? void 0 : o.optionUrl) != null && z.menuSelect && xl.value || (S = (n = (K = Ce.value) == null ? void 0 : K[0]) == null ? void 0 : n.optionUrl) != null && S.menuId) {
1838
- let E = await qa(o, (k = (T = (h = Ce.value) == null ? void 0 : h[0]) == null ? void 0 : T.optionUrl) == null ? void 0 : k.menuId), J;
1839
- if ((Q = o == null ? void 0 : o.optionUrl) == null || Q.menuSelect, E == null || E.forEach((b) => {
1840
- var x, _, d, M, F, ee, L, y, G, le, ve, _e, Se, A, g, ue, pe;
1841
- u === ((_ = (x = o == null ? void 0 : o.optionUrl) == null ? void 0 : x.groupSelect) == null ? void 0 : _[1]) && ((F = (M = (d = o == null ? void 0 : o.optionUrl) == null ? void 0 : d.groupSelect) == null ? void 0 : M[1]) != null && F.includes("[")) && ((le = q(b)) == null ? void 0 : le[(G = (y = (L = (ee = o == null ? void 0 : o.optionUrl) == null ? void 0 : ee.groupSelect) == null ? void 0 : L[1]) == null ? void 0 : y.replaceAll("[", "")) == null ? void 0 : G.replaceAll("]", "")]) === (o == null ? void 0 : o.value) && (J = b), (Se = (_e = (ve = Ce.value) == null ? void 0 : ve[0]) == null ? void 0 : _e.optionUrl) != null && Se.menuId && b[(g = (A = Ce.value) == null ? void 0 : A[0]) == null ? void 0 : g.prop] === e[(pe = (ue = Ce.value) == null ? void 0 : ue[0]) == null ? void 0 : pe.prop] && (J = b);
1842
- }), J) {
1843
- let b = q(a);
1844
- b = b == null ? void 0 : b.map((d) => {
1845
- var M, F, ee, L, y, G, le, ve, _e, Se, A, g, ue, pe, se, ke, Ee, xe;
1846
- return (J != null && J[d == null ? void 0 : d.label] || J != null && J[(L = (ee = (F = (M = d == null ? void 0 : d.optionUrl) == null ? void 0 : M.groupSelect) == null ? void 0 : F[1]) == null ? void 0 : ee.replaceAll("[", "")) == null ? void 0 : L.replaceAll("]", "")]) && ((le = (G = (y = d == null ? void 0 : d.optionUrl) == null ? void 0 : y.groupSelect) == null ? void 0 : G[1]) != null && le.includes("[")) && (d.value = (J == null ? void 0 : J[d == null ? void 0 : d.label]) || (J == null ? void 0 : J[(A = (Se = (_e = (ve = d == null ? void 0 : d.optionUrl) == null ? void 0 : ve.groupSelect) == null ? void 0 : _e[1]) == null ? void 0 : Se.replaceAll("[", "")) == null ? void 0 : A.replaceAll("]", "")])), (pe = (ue = (g = Ce.value) == null ? void 0 : g[0]) == null ? void 0 : ue.optionUrl) != null && pe.menuId && (d.value = (J == null ? void 0 : J[d == null ? void 0 : d.label]) || (J == null ? void 0 : J[(xe = (Ee = (ke = (se = d == null ? void 0 : d.optionUrl) == null ? void 0 : se.groupSelect) == null ? void 0 : ke[1]) == null ? void 0 : Ee.replaceAll("[", "")) == null ? void 0 : xe.replaceAll("]", "")])), d;
1847
- }), Ce.value = q(b);
1848
- let x = q(b);
1849
- x = x == null ? void 0 : x.map((d) => {
1850
- var M, F, ee, L, y, G;
1851
- return (F = (M = d == null ? void 0 : d.optionUrl) == null ? void 0 : M.menuSelect) != null && F.some((le) => le == null ? void 0 : le.includes("[")) && (d.optionUrl.oldMenuSelect = (L = (ee = q(d)) == null ? void 0 : ee.optionUrl) == null ? void 0 : L.menuSelect, d.optionUrl.menuSelect = (G = (y = d == null ? void 0 : d.optionUrl) == null ? void 0 : y.menuSelect) == null ? void 0 : G.map((le) => {
1852
- var ve, _e, Se, A;
1853
- if (le != null && le.includes("[")) {
1854
- let g = (_e = (ve = le == null ? void 0 : le.replaceAll("[", "").replaceAll("]", "")) == null ? void 0 : ve.split(":")) == null ? void 0 : _e[1];
1855
- le = (A = (Se = q(b)) == null ? void 0 : Se.find((ue) => (ue == null ? void 0 : ue.label) === g)) == null ? void 0 : A.value;
1856
- }
1857
- return le;
1858
- })), d;
1859
- }), Ce.value = x;
1860
- let _ = {};
1861
- (j = Ce.value) == null || j.forEach((d) => {
1862
- _[d.prop] = d == null ? void 0 : d.value;
1863
- }), Le.value = _;
1864
- }
1865
- }
1866
- xl.value = !1;
1867
- }, wr = (e) => e ? (e == null ? void 0 : e.toUpperCase()) === "INPUT" ? "TEXTAREA" : e : "TEXTAREA", zr = (e) => {
1868
- var u, o;
1869
- const l = (o = (u = We.value) == null ? void 0 : u.find((t) => (t == null ? void 0 : t.label) === (e == null ? void 0 : e.label))) == null ? void 0 : o.multiple, r = e == null ? void 0 : e.prop;
1870
- if ((e == null ? void 0 : e.formType) != "Select")
1871
- return;
1872
- Y.value.forEach((t) => {
1873
- const c = t == null ? void 0 : t[r];
1874
- l && Ga(c) && (t[r] = [c]), !l && !Ga(c) && (t[r] = "");
1875
- });
1876
- }, Ea = (e, l) => {
1877
- var r;
1878
- return l == null || l.forEach((a) => {
1879
- e[a == null ? void 0 : a.prop] = a == null ? void 0 : a.value;
1880
- }), e.children && ((r = e.children) == null ? void 0 : r.length) > 0 && (e.children = e.children.map((a) => Ea(a, l))), e;
1881
- }, da = (e) => {
1882
- var r, a, s, u, o, t;
1883
- Pl("");
1884
- const l = (r = Ce.value) == null ? void 0 : r.reduce((c, p) => (c[p.name] = p.value, c), {});
1885
- if (((a = Object.keys(l)) == null ? void 0 : a.length) > 0) {
1886
- Le.value = l, Ye.value = "", kl.value = (s = Y.value) == null ? void 0 : s.length, Tl.value = (u = dl.value) == null ? void 0 : u.filter((p) => (p == null ? void 0 : p.label) !== "新增");
1887
- const c = (t = (o = Te.value) == null ? void 0 : o.filter((p) => (p == null ? void 0 : p.label) !== "操作")) == null ? void 0 : t.map((p) => {
1888
- var C, f, m;
1889
- const v = (f = (C = We.value) == null ? void 0 : C.find((D) => (D == null ? void 0 : D.label) === (p == null ? void 0 : p.label))) == null ? void 0 : f.multiple;
1890
- return zr(p), {
1891
- ...p,
1892
- contents: (p == null ? void 0 : p.options) ?? [],
1893
- // type: 'edit',
1894
- optionUrl: p != null && p.formMenuSelect && ((m = p == null ? void 0 : p.formMenuSelect) == null ? void 0 : m.length) > 0 ? {
1895
- groupSelect: p == null ? void 0 : p.groupSelect,
1896
- menuSelect: p == null ? void 0 : p.formMenuSelect,
1897
- selectRelateType: "",
1898
- type: p == null ? void 0 : p.formType,
1899
- multiple: v
1900
- } : null
1901
- // 表格编辑视图组件类型:兼容表头类型切换逻辑,优先模型里定义的类型,其次是手动配置的类型
1902
- // columnType: convertColType(col?.formType) || col?.columnType
1903
- };
1904
- });
1905
- R.value = c == null ? void 0 : c.map((p) => Ea(p, [{
1906
- prop: "type",
1907
- value: "edit"
1908
- }, { prop: "columnType", value: wr(p == null ? void 0 : p.formType) || (p == null ? void 0 : p.columnType) }])), e === "createClick" && $l(!1);
1909
- }
1910
- }, ml = {
1911
- START: "开始时间",
1912
- END: "结束时间",
1913
- HOURS: "工时"
1914
- }, Jr = (e, l) => Number(Na(l).diff(Na(e), "day", !0).toFixed(1)), xa = (e) => {
1915
- var u;
1916
- const l = i.itemData, r = (u = l == null ? void 0 : l.find((o) => (o == null ? void 0 : o.key) === "header")) == null ? void 0 : u.contents, a = /* @__PURE__ */ new Map();
1917
- return r == null || r.forEach((o, t) => {
1918
- const { label: c } = o;
1919
- a.set(c, t);
1920
- }), !a.has(ml.START) || !a.has(ml.END) || !a.has(ml.HOURS) ? e : e == null ? void 0 : e.map((o) => {
1921
- const t = o == null ? void 0 : o[ml.START], c = o == null ? void 0 : o[ml.END], p = Jr(t, c);
1922
- return t && c && (o[ml.HOURS] = `${p}天`), o;
1923
- });
1924
- }, ja = (e, l, r = 0) => {
1925
- if (r > ((l == null ? void 0 : l.length) ?? "")) return e;
1926
- const a = l == null ? void 0 : l[r], s = /* @__PURE__ */ new Map();
1927
- for (const o of e) {
1928
- const t = o[a];
1929
- s.has(t) || s.set(t, []), s.get(t) && s.get(t).push(o);
1930
- }
1931
- const u = [];
1932
- for (const [o, t] of s) {
1933
- const [c, ...p] = t, v = { ...c };
1934
- r + 1 === ((l == null ? void 0 : l.length) ?? "") ? v.children = t == null ? void 0 : t.map((C) => (C.level = q(r) + 1, C)).filter((C, f) => f !== 0) : p.length > 0 && (v.children = ja(p, l, r + 1)), v.level = r, u.push(v);
1935
- }
1936
- return u;
1937
- }, La = (e, l, r) => {
1938
- var s;
1939
- if (!(l != null && l.contents) || ((s = l == null ? void 0 : l.contents) == null ? void 0 : s.length) === 0)
1940
- return e;
1941
- let a = [];
1942
- return a = ja(e, l == null ? void 0 : l.contents, 0), a;
1943
- }, Pa = (e, l) => {
1944
- var f, m, D, P, U, W, z, K, n, S, h, T, k, Q, j, E, J, b, x, _, d, M, F, ee, L;
1945
- const r = e == null ? void 0 : e.filter((y) => (y == null ? void 0 : y.key) === "header");
1946
- e == null || e.filter((y) => (y == null ? void 0 : y.key) === "tableIndexColumn")[0];
1947
- const a = e == null ? void 0 : e.filter((y) => (y == null ? void 0 : y.key) === "childTree")[0];
1948
- let s = l;
1949
- const u = e == null ? void 0 : e.find((y) => (y == null ? void 0 : y.key) === "page"), o = e == null ? void 0 : e.find((y) => (y == null ? void 0 : y.key) === "rowButton"), t = e == null ? void 0 : e.find((y) => (y == null ? void 0 : y.key) === "extraButton"), c = e == null ? void 0 : e.filter((y) => (y == null ? void 0 : y.key) === "tableContents"), p = e == null ? void 0 : e.filter((y) => (y == null ? void 0 : y.key) === "tableIndex");
1950
- We.value = (m = (f = e == null ? void 0 : e.filter((y) => (y == null ? void 0 : y.key) === "tableToForm")) == null ? void 0 : f[0]) == null ? void 0 : m.contents, va.value = (u == null ? void 0 : u.contents) ?? !0;
1951
- let v = [];
1952
- pl.value === "" ? v = r == null ? void 0 : r[0] : v = (r == null ? void 0 : r.find((y) => (y == null ? void 0 : y.selectLabel) === "(" + pl.value + ")")) ?? (r == null ? void 0 : r.find((y) => !(y != null && y.selectLabel)));
1953
- let C = [];
1954
- if (pl.value === "" ? C = p == null ? void 0 : p[0] : C = (p == null ? void 0 : p.find((y) => (y == null ? void 0 : y.selectLabel) === "(" + pl.value + ")")) ?? (p == null ? void 0 : p.find((y) => !(y != null && y.selectLabel))), ((D = v == null ? void 0 : v.contents) == null ? void 0 : D.length) > 0) {
1955
- let y = [];
1956
- if (v != null && v.contents.some((A) => Array.isArray(A) && (A == null ? void 0 : A.find((g) => g.children))))
1957
- ll.value === "" ? y = (U = (P = Fa(v == null ? void 0 : v.contents)) == null ? void 0 : P[0]) == null ? void 0 : U.filter((A) => !Array.isArray(A)) : (ll.value.split("-"), y = (W = Fa(v == null ? void 0 : v.contents)) == null ? void 0 : W[0]);
1958
- else {
1959
- let A = v != null && v.contents.some((g) => Array.isArray(g)) ? (z = v == null ? void 0 : v.contents) == null ? void 0 : z[0] : v == null ? void 0 : v.contents;
1960
- A == null || A.forEach((g, ue) => {
1961
- var ke, Ee, xe, sl;
1962
- let pe = "";
1963
- (Ee = (ke = Z.value) == null ? void 0 : ke.split("/")) == null || Ee.forEach((Ke) => {
1964
- var ul, il, Bl;
1965
- if (Ke !== "") {
1966
- let Al = (Bl = (il = (ul = Ke == null ? void 0 : Ke.split(oe + "updateLoading")) == null ? void 0 : ul[0]) == null ? void 0 : il.split(oe + "loading")) == null ? void 0 : Bl[0];
1967
- pe = pe === "" ? pe + Al : pe + "/" + Al;
1968
- }
1969
- }), pe = pe + oe + (g == null ? void 0 : g.directiveLabel);
1970
- const se = (xe = We.value) == null ? void 0 : xe.find((Ke) => (Ke == null ? void 0 : Ke.prop) === (g == null ? void 0 : g.prop));
1971
- y.push({
1972
- label: (g == null ? void 0 : g.label) ?? "",
1973
- prop: (g == null ? void 0 : g.label) === "操作" ? "operate" : (g == null ? void 0 : g.prop) ?? "a" + ue,
1974
- // width: t?.label === '操作' ? '200' : (t?.width ? parseInt(t.width) : ''),
1975
- width: g != null && g.width ? parseInt(g.width) : "",
1976
- fixed: (g == null ? void 0 : g.fixed) ?? void 0,
1977
- sortable: (g == null ? void 0 : g.sortable) ?? !1,
1978
- filterable: (g == null ? void 0 : g.filterable) ?? !1,
1979
- operable: (g == null ? void 0 : g.operable) ?? !1,
1980
- showSummary: (g == null ? void 0 : g.showSummary) ?? !1,
1981
- align: (g == null ? void 0 : g.align) ?? "left",
1982
- showOverflowTooltip: (g == null ? void 0 : g.showOverflowTooltip) ?? !0,
1983
- isNotDrag: (g == null ? void 0 : g.isNotDrag) ?? !1,
1984
- isEditCol: (g == null ? void 0 : g.isEditCol) ?? !1,
1985
- isOperate: (g == null ? void 0 : g.isOperate) ?? !1,
1986
- id: (g == null ? void 0 : g.id) ?? ue,
1987
- type: (g == null ? void 0 : g.label) === "操作" ? "operate" : void 0,
1988
- formType: (g == null ? void 0 : g.formType) ?? (g != null && g.groupSelect ? "Select" : ""),
1989
- isTableColHidden: g == null ? void 0 : g.isTableColHidden,
1990
- isFormColHidden: g == null ? void 0 : g.isFormColHidden,
1991
- disabled: g == null ? void 0 : g.disabled,
1992
- options: (g == null ? void 0 : g.options) ?? [],
1993
- value: (g == null ? void 0 : g.value) ?? "",
1994
- formMenuSelect: (g == null ? void 0 : g.formMenuSelect) ?? [],
1995
- isRoute: (g == null ? void 0 : g.isRoute) ?? !1,
1996
- groupSelect: g != null && g.groupSelect ? (sl = g == null ? void 0 : g.groupSelect) == null ? void 0 : sl.replaceAll('"', "").split(":") : [],
1997
- isMainKey: (g == null ? void 0 : g.isMainKey) || (g == null ? void 0 : g.directiveLabel) && !s[pe],
1998
- // 同步弹窗列类型到表格列类型
1999
- columnType: (se == null ? void 0 : se.type) || (g == null ? void 0 : g.columnType) || "TEXTAREA",
2000
- directiveLabel: g == null ? void 0 : g.directiveLabel,
2001
- isExistChild: !!(g != null && g.directiveLabel && s[pe]),
2002
- childPath: pe
2003
- });
2004
- });
2005
- }
2006
- R.value = wa(y), de.value = wa(y), X.value = (K = R.value) == null ? void 0 : K.map((A) => A == null ? void 0 : A.label), Ve.value = (n = R.value) == null ? void 0 : n.every((A) => A == null ? void 0 : A.filterable), ol.value = (S = R.value) == null ? void 0 : S.every((A) => A == null ? void 0 : A.operable), nl.value = (h = R.value) == null ? void 0 : h.every((A) => A == null ? void 0 : A.sortable);
2007
- let G = (k = (T = kn(R.value)) == null ? void 0 : T.filter((A) => (A == null ? void 0 : A.type) !== "operate")) == null ? void 0 : k.map((A, g) => ({
2008
- prop: (A == null ? void 0 : A.prop) ?? "a" + g,
2009
- column: A.label
2010
- }));
2011
- He.value = G;
2012
- let le = [];
2013
- pl.value === "" ? le = c == null ? void 0 : c[0] : le = (c == null ? void 0 : c.find((A) => (A == null ? void 0 : A.selectLabel) === "(" + pl.value + ")")) ?? (c == null ? void 0 : c.find((A) => !(A != null && A.selectLabel)));
2014
- let ve = Array.isArray((Q = le == null ? void 0 : le.contents) == null ? void 0 : Q[0]) && ((j = le == null ? void 0 : le.contents) != null && j[0].every((A) => Array.isArray(A))) ? (E = le == null ? void 0 : le.contents) == null ? void 0 : E[0] : le == null ? void 0 : le.contents;
2015
- C != null && C.contents && ((J = C == null ? void 0 : C.contents) == null ? void 0 : J.length) !== 0 && (ve = (b = q(ve)) == null ? void 0 : b.map((A, g) => {
2016
- if (!Array.isArray(A)) {
2017
- let ue = {};
2018
- for (let pe in A)
2019
- pe !== "id" && pe !== "index" && (ue[pe] = A[pe]);
2020
- A = Object.values(ue);
2021
- }
2022
- return A;
2023
- }));
2024
- const _e = !!((x = R.value) != null && x.find((A) => A.prop === "index"));
2025
- ve = Xa(ve, C == null ? void 0 : C.contents, _e);
2026
- const Se = [];
2027
- ve == null || ve.forEach((A, g) => {
2028
- var pe;
2029
- let ue = {};
2030
- if (Array.isArray(A)) {
2031
- let se = [];
2032
- A == null || A.filter((ke) => !(ke != null && ke.id)).forEach((ke, Ee) => {
2033
- var xe, sl, Ke, ul, il, Bl;
2034
- if ((xe = G == null ? void 0 : G[Ee]) != null && xe.prop && !Array.isArray(ke)) {
2035
- let Al = {};
2036
- Al[G[Ee].column] = ke, ye != null && ye.value && ((sl = ye == null ? void 0 : ye.value) == null ? void 0 : sl.length) > 0 && ((Ke = ye == null ? void 0 : ye.value) != null && Ke.find((Xe) => JSON.stringify(Xe == null ? void 0 : Xe[0]) === JSON.stringify(Al))) && (se = (ul = ye == null ? void 0 : ye.value) == null ? void 0 : ul.find((Xe) => JSON.stringify(Xe == null ? void 0 : Xe[0]) === JSON.stringify(Al))), se && se.length > 0 ? ue[G[Ee].prop] = se != null && se.find((Xe) => {
2037
- var Ml;
2038
- return ((Ml = Object.keys(Xe)) == null ? void 0 : Ml[0]) === G[Ee].column;
2039
- }) ? (il = se == null ? void 0 : se.find((Xe) => {
2040
- var Ml;
2041
- return ((Ml = Object.keys(Xe)) == null ? void 0 : Ml[0]) === G[Ee].column;
2042
- })) == null ? void 0 : il[G[Ee].column] : ke : ue[G[Ee].prop] = ke;
2043
- } else Array.isArray(ke) && ((Bl = G[Ee]) != null && Bl.prop ? ue[G[Ee].prop] = ke : ue.children = ga(ke, G));
2044
- });
2045
- } else
2046
- ue = A;
2047
- Array.isArray(A) && A.some((se) => se == null ? void 0 : se.id) ? Se.push(Object.assign(ue, { id: (pe = A == null ? void 0 : A.find((se) => se.id)) == null ? void 0 : pe.id })) : ue.id ? Se.push(ue) : Se.push(Object.assign(ue, { id: g.toString() }));
2048
- }), Y.value = La(Se, a, R.value), wl.value = Se, (_ = wl.value) == null || _.forEach((A) => {
2049
- var g;
2050
- (g = zl.value) == null || g.set(A.id, A);
2051
- });
2052
- } else
2053
- R.value = [], Te.value = [], Y.value = [], wl.value = [], zl.value = /* @__PURE__ */ new Map();
2054
- ((d = o == null ? void 0 : o.contents) == null ? void 0 : d.length) > 0 ? cl.value = o == null ? void 0 : o.contents : cl.value = [], ((M = t == null ? void 0 : t.contents) == null ? void 0 : M.length) > 0 ? (Tl.value = t == null ? void 0 : t.contents, dl.value = t == null ? void 0 : t.contents) : (Tl.value = [], dl.value = []), kl.value = ((F = Y == null ? void 0 : Y.value) == null ? void 0 : F.length) ?? 0, xa(Y.value), Gl.value = Y.value, fl.value && (R.value = (L = (ee = Te.value) == null ? void 0 : ee.filter((y) => (y == null ? void 0 : y.label) !== "操作")) == null ? void 0 : L.map((y) => {
2055
- var G;
2056
- return {
2057
- ...y,
2058
- type: "edit",
2059
- optionUrl: y != null && y.formMenuSelect && ((G = y == null ? void 0 : y.formMenuSelect) == null ? void 0 : G.length) > 0 ? {
2060
- groupSelect: y == null ? void 0 : y.groupSelect,
2061
- menuSelect: y == null ? void 0 : y.formMenuSelect,
2062
- selectRelateType: "",
2063
- type: y == null ? void 0 : y.formType
2064
- } : null
2065
- };
2066
- }), da());
2067
- };
2068
- Ge(
2069
- () => [i.itemData, pl.value, er.value, ll.value, ye == null ? void 0 : ye.value],
2070
- async () => {
2071
- var e, l, r, a, s, u;
2072
- if ((e = i == null ? void 0 : i.itemData) != null && e.find((o) => (o == null ? void 0 : o.key) === "columnPath") && !((l = Dl.value) != null && l.find((o) => {
2073
- var t, c;
2074
- return (o == null ? void 0 : o.key) === ((c = (t = i == null ? void 0 : i.itemData) == null ? void 0 : t.find((p) => (p == null ? void 0 : p.key) === "columnPath")) == null ? void 0 : c.contents);
2075
- }))) {
2076
- let o = Dl.value, t = {
2077
- key: (a = (r = i == null ? void 0 : i.itemData) == null ? void 0 : r.find((c) => (c == null ? void 0 : c.key) === "columnPath")) == null ? void 0 : a.contents,
2078
- value: (u = (s = i == null ? void 0 : i.itemData) == null ? void 0 : s.find((c) => (c == null ? void 0 : c.key) === "columnUsingPath")) == null ? void 0 : u.contents
2079
- };
2080
- o != null && o.find((c) => (c == null ? void 0 : c.key) === (t == null ? void 0 : t.key)) ? o = o == null ? void 0 : o.map((c) => ((c == null ? void 0 : c.key) === (t == null ? void 0 : t.key) && (c.value = t.value), c)) : o.push(t), he.setTableViewContents(o);
2081
- }
2082
- Pa(i.itemData, i.allMapContents);
2083
- },
2084
- { deep: !0, immediate: !0 }
2085
- ), Ge(() => i == null ? void 0 : i.operatingForm, (e) => {
2086
- e != null && e.form && (Pl(e == null ? void 0 : e.form), qe.value = e == null ? void 0 : e.dialogTitle, Wl.value = !0, Ze.value = !0);
2087
- }, { immediate: !0, deep: !0 });
2088
- const $a = () => {
2089
- fl.value = !fl.value;
2090
- }, Wr = () => {
2091
- ql.value = !ql.value;
2092
- };
2093
- Ge(() => fl.value, (e) => {
2094
- e ? (da("viewChange"), he.setCacheUpdatingData(null)) : (Tl.value = dl.value, R.value = de.value, Cl.value && (he.setTableLoading(i == null ? void 0 : i.index), ce("change", Cl.value)));
2095
- }, { immediate: !0 }), Ge(() => {
2096
- var e;
2097
- return (e = Sa.value) == null ? void 0 : e.length;
2098
- }, (e) => {
2099
- e === 0 && (V.currentPage = 1);
2100
- }), H(!1);
2101
- const Gr = (e, l) => {
2102
- var r;
2103
- da("createClick"), l === V.pageSize && (V.currentPage = Math.ceil(((r = Y.value) == null ? void 0 : r.length) / V.pageSize));
2104
- }, Rr = (e, l, r) => {
2105
- var a;
2106
- Da(r, e, l), Le.value = q(e), Ye.value = e == null ? void 0 : e.id, kl.value = (a = Y.value) == null ? void 0 : a.length, qe.value = typeof (e == null ? void 0 : e.id) == "string" ? "新增" : "编辑", $l(!1);
2107
- }, Pe = (e) => {
2108
- var c, p, v, C, f, m, D, P, U, W;
2109
- const { row: l, column: r, item: a, slotData: s } = e;
2110
- let u = l != null && l[r == null ? void 0 : r.prop] || (l == null ? void 0 : l[r == null ? void 0 : r.prop]) === 0 ? ((p = (c = l == null ? void 0 : l[r == null ? void 0 : r.prop]) == null ? void 0 : c[0]) == null ? void 0 : p.contents) ?? ((l == null ? void 0 : l[r == null ? void 0 : r.prop]) === 0 ? "0" : l == null ? void 0 : l[r == null ? void 0 : r.prop]) : ((C = (v = l == null ? void 0 : l[a == null ? void 0 : a.prop]) == null ? void 0 : v[0]) == null ? void 0 : C.contents) ?? (l == null ? void 0 : l[a == null ? void 0 : a.prop]) ?? ((m = (f = s == null ? void 0 : s[a == null ? void 0 : a.prop]) == null ? void 0 : f[0]) == null ? void 0 : m.contents) ?? (s == null ? void 0 : s[a == null ? void 0 : a.prop]) ?? ((U = (P = l == null ? void 0 : l[(D = a == null ? void 0 : a.child) == null ? void 0 : D.prop]) == null ? void 0 : P[0]) == null ? void 0 : U.contents) ?? (l == null ? void 0 : l[(W = a == null ? void 0 : a.child) == null ? void 0 : W.prop]), t = Array.isArray(u) && !(u != null && u.every((z) => typeof z == "string" || typeof z == "number")) ? "查看" : u;
2111
- return t = Array.isArray(t) ? t.join(",") : t, t;
2112
- }, qr = (e) => {
2113
- var p, v, C, f, m, D, P, U, W, z;
2114
- const { row: l, column: r, item: a, slotData: s } = e;
2115
- let u = l != null && l[r == null ? void 0 : r.prop] ? ((v = (p = l == null ? void 0 : l[r == null ? void 0 : r.prop]) == null ? void 0 : p[0]) == null ? void 0 : v.contents) ?? (l == null ? void 0 : l[r == null ? void 0 : r.prop]) : ((f = (C = l == null ? void 0 : l[a == null ? void 0 : a.prop]) == null ? void 0 : C[0]) == null ? void 0 : f.contents) ?? (l == null ? void 0 : l[a == null ? void 0 : a.prop]) ?? ((D = (m = s == null ? void 0 : s[a == null ? void 0 : a.prop]) == null ? void 0 : m[0]) == null ? void 0 : D.contents) ?? (s == null ? void 0 : s[a == null ? void 0 : a.prop]) ?? ((W = (U = l == null ? void 0 : l[(P = a == null ? void 0 : a.child) == null ? void 0 : P.prop]) == null ? void 0 : U[0]) == null ? void 0 : W.contents) ?? (l == null ? void 0 : l[(z = a == null ? void 0 : a.child) == null ? void 0 : z.prop]);
2116
- const t = Array.isArray(u) && !(u != null && u.every((K) => typeof K == "string" || typeof K == "number")), c = Array.isArray(u) && (u == null ? void 0 : u.find((K) => K == null ? void 0 : K.url));
2117
- return t && c;
2118
- }, Hr = (e, l) => e.find((r) => Object.values(r).some((a) => a === l));
2119
- return Ge(() => el.value, async (e) => {
2120
- if (e) {
2121
- O.setContentLoading(!0), await ea();
2122
- const l = Hr(Y.value, e == null ? void 0 : e.data);
2123
- if (!l) return O.setContentLoading(!1);
2124
- await ma(e == null ? void 0 : e.data, null, l, { data: e == null ? void 0 : e.data, isMainKey: !0 }), O.setContentLoading(!1);
2125
- }
2126
- }, { deep: !0, immediate: !0 }), Ge(() => i == null ? void 0 : i.cacheNewData, (e) => {
2127
- var l;
2128
- e && (Array.isArray(e) || (e == null ? void 0 : e.compId) === (i == null ? void 0 : i.index) && (Y.value = (l = Y.value) == null ? void 0 : l.map((r) => {
2129
- var a;
2130
- return (r == null ? void 0 : r.id) === ((a = e == null ? void 0 : e.data) == null ? void 0 : a.id) ? {
2131
- ...r,
2132
- id: e == null ? void 0 : e.resId
2133
- } : r;
2134
- })));
2135
- }, { immediate: !0, deep: !0 }), (e, l) => {
2136
- var p, v, C;
2137
- const r = Ne("svg-icon"), a = Ne("el-popover"), s = Ne("el-switch"), u = Ne("el-checkbox"), o = Ne("el-checkbox-group"), t = Ne("el-button"), c = Ne("LookComponent");
2138
- return ie(), Ue("div", Zn, [
2139
- ba.value ? (ie(), Fe(on, {
2140
- id: "excel-table",
2141
- pageObj: V,
2142
- summaryInfo: Sl,
2143
- columns: R.value,
2144
- defaultSort: ne,
2145
- isCardViewport: ql.value,
2146
- checkedColumns: X.value,
2147
- key: sa.value + JSON.stringify(R.value),
2148
- tableData: Sa.value,
2149
- isEditViewport: fl.value,
2150
- isShowPagination: va.value,
2151
- isShowEdit: !1,
2152
- isShowDelete: !1,
2153
- allowSelect: N.allowSelect,
2154
- onDbClickRow: Ur,
2155
- extraButton: Tl.value,
2156
- rowButton: cl.value,
2157
- cacheExtraButtons: dl.value,
2158
- isClearSelection: ((p = Qe.value) == null ? void 0 : p.length) === 0,
2159
- onDoCurrentChange: ur,
2160
- onDoSizeChange: ir,
2161
- onContentClick: ma,
2162
- onRowClick: Or,
2163
- onSelectChange: gr,
2164
- onCellChange: Rr,
2165
- onChange: Da,
2166
- onPreview: ka,
2167
- onSubmitEditingTable: fr,
2168
- onHandleColEditChange: dr,
2169
- onHandleColTypeChange: pr,
2170
- onClickButton: Yl
2171
- }, Ir({
2172
- headerButton: re((f) => {
2173
- var m, D;
2174
- return [
2175
- N.showHeader ? (ie(), Fe(Mn, {
2176
- key: 0,
2177
- lockingPage: Ie(Fl) === Ie(Z),
2178
- filterValues: Ta.value,
2179
- selectNums: (m = Qe.value) == null ? void 0 : m.length,
2180
- dataNums: (D = Y.value) == null ? void 0 : D.length,
2181
- compName: N.compName,
2182
- isDevMode: N.isDevMode,
2183
- buttons: f.buttons,
2184
- onButtonClick: l[0] || (l[0] = (P) => Yl(P, "", {})),
2185
- columns: R.value,
2186
- onFilter: Ar,
2187
- onGetImportData: tr,
2188
- level: N.level
2189
- }, null, 8, ["lockingPage", "filterValues", "selectNums", "dataNums", "compName", "isDevMode", "buttons", "columns", "level"])) : Me("", !0)
2190
- ];
2191
- }),
2192
- viewport: re(() => {
2193
- var f, m;
2194
- return [
2195
- ((f = Y.value) == null ? void 0 : f.length) > 0 && N.allowOperate ? (ie(), Ue("div", es, [
2196
- (m = cl.value) != null && m.some((D) => (D == null ? void 0 : D.label) === "编辑") && !ql.value && Ie(Fl) !== Ie(Z) ? (ie(), Ue("span", {
2197
- key: 0,
2198
- title: "编辑表格",
2199
- onClick: $a
2200
- }, [
2201
- te(r, {
2202
- name: "editTable",
2203
- class: "view-icon"
2204
- })
2205
- ])) : Me("", !0),
2206
- be("span", {
2207
- title: "卡片视图",
2208
- onClick: Wr
2209
- }, [
2210
- te(r, {
2211
- name: "cardViewport",
2212
- class: "view-icon"
2213
- })
2214
- ])
2215
- ])) : Me("", !0)
2216
- ];
2217
- }),
2218
- rowCreate: re(({ row: f, index: m }) => [
2219
- be("span", {
2220
- title: "新增",
2221
- class: "row-create-wrap",
2222
- onClick: (D) => Gr(f, m)
2223
- }, [
2224
- te(r, {
2225
- name: "rowCreate",
2226
- style: { width: "10px", height: "10px" }
2227
- })
2228
- ], 8, ls)
2229
- ]),
2230
- operateCol: re(() => [
2231
- te(a, {
2232
- title: "选择显示列信息",
2233
- placement: "left-start",
2234
- "popper-class": "menu-operate-popover",
2235
- trigger: "hover",
2236
- onShow: Nr
2237
- }, {
2238
- reference: re(() => [
2239
- be("span", as, [
2240
- te(r, {
2241
- name: "operate",
2242
- style: { width: "15px", height: "15px", cursor: "pointer" }
2243
- })
2244
- ])
2245
- ]),
2246
- default: re(() => [
2247
- be("div", rs, [
2248
- l[11] || (l[11] = be("div", { class: "group-title" }, "表格操作", -1)),
2249
- te(s, {
2250
- "model-value": nl.value,
2251
- "active-text": "排序",
2252
- "inactive-text": "",
2253
- style: { "margin-right": "8px" },
2254
- onChange: l[2] || (l[2] = (f) => ia(f, "sortable"))
2255
- }, null, 8, ["model-value"]),
2256
- te(s, {
2257
- "model-value": Ve.value,
2258
- "active-text": "筛选",
2259
- "inactive-text": "",
2260
- style: { "margin-right": "8px" },
2261
- onChange: l[3] || (l[3] = (f) => ia(f, "filterable"))
2262
- }, null, 8, ["model-value"]),
2263
- te(s, {
2264
- "model-value": ol.value,
2265
- "active-text": "编辑所有表头",
2266
- "inactive-text": "",
2267
- onChange: l[4] || (l[4] = (f) => ia(f, "operable"))
2268
- }, null, 8, ["model-value"]),
2269
- l[12] || (l[12] = be("div", { class: "group-title" }, "表格列操作", -1)),
2270
- te(o, {
2271
- modelValue: X.value,
2272
- "onUpdate:modelValue": l[5] || (l[5] = (f) => X.value = f),
2273
- style: { height: "100%" },
2274
- min: 2,
2275
- ref_key: "checkboxGroupRef",
2276
- ref: $
2277
- }, {
2278
- default: re(() => [
2279
- (ie(!0), Ue(vl, null, bl(jl.value, (f) => (ie(), Ue("div", {
2280
- style: { display: "flex", "align-items": "center" },
2281
- key: f.label
2282
- }, [
2283
- te(u, {
2284
- value: f.label,
2285
- style: { width: "100%", marginRight: 0 }
2286
- }, {
2287
- default: re(() => [
2288
- be("span", {
2289
- title: f.label,
2290
- style: { display: "inline-block", width: "250px", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }
2291
- }, je(f.label), 9, ns)
2292
- ]),
2293
- _: 2
2294
- }, 1032, ["value"]),
2295
- te(a, {
2296
- title: "列操作",
2297
- placement: "left",
2298
- teleported: !1,
2299
- trigger: "hover"
2300
- }, {
2301
- reference: re(() => [
2302
- te(r, {
2303
- name: "colOperate",
2304
- style: { width: "15px", height: "15px", cursor: "pointer", color: "grey", position: "absolute", right: "40px" }
2305
- })
2306
- ]),
2307
- default: re(() => {
2308
- var m;
2309
- return [
2310
- be("div", ss, [
2311
- (ie(!0), Ue(vl, null, bl((m = Object.keys(f)) == null ? void 0 : m.filter((D) => {
2312
- var P;
2313
- return (P = ae.value) == null ? void 0 : P.find((U) => (U == null ? void 0 : U.value) === D);
2314
- }), (D) => {
2315
- var P, U;
2316
- return ie(), Ue("div", { key: D }, [
2317
- te(s, {
2318
- "model-value": f == null ? void 0 : f[D],
2319
- "active-text": (U = (P = ae.value) == null ? void 0 : P.find((W) => (W == null ? void 0 : W.value) === D)) == null ? void 0 : U.label,
2320
- onChange: (W) => yr(W, D, f)
2321
- }, null, 8, ["model-value", "active-text", "onChange"])
2322
- ]);
2323
- }), 128))
2324
- ])
2325
- ];
2326
- }),
2327
- _: 2
2328
- }, 1024),
2329
- be("span", us, [
2330
- te(r, {
2331
- name: "drag",
2332
- class: "col-drag-icon",
2333
- style: { width: "15px", height: "15px" }
2334
- })
2335
- ])
2336
- ]))), 128))
2337
- ]),
2338
- _: 1
2339
- }, 8, ["modelValue"])
2340
- ])
2341
- ]),
2342
- _: 1
2343
- })
2344
- ]),
2345
- content: re((f) => {
2346
- var m, D, P, U, W, z, K, n, S, h, T, k, Q, j, E, J, b, x;
2347
- return [
2348
- qr(f) ? (ie(), Fe(a, {
2349
- key: 0,
2350
- "popper-class": "file-popover",
2351
- placement: "right",
2352
- trigger: "hover",
2353
- effect: "light",
2354
- width: "auto"
2355
- }, {
2356
- reference: re(() => [
2357
- be("span", is, je(Pe(f)), 1)
2358
- ]),
2359
- default: re(() => {
2360
- var _, d;
2361
- return [
2362
- be("div", os, [
2363
- (ie(!0), Ue(vl, null, bl((d = f == null ? void 0 : f.row) == null ? void 0 : d[(_ = f == null ? void 0 : f.column) == null ? void 0 : _.prop], (M) => (ie(), Ue("div", ts, [
2364
- be("div", {
2365
- class: "prop-url",
2366
- title: Xl(M),
2367
- onClick: (F) => Sr(M)
2368
- }, je(Xl(M)), 9, cs),
2369
- be("div", {
2370
- class: "prop-download",
2371
- onClick: (F) => kr(M)
2372
- }, " 下载 ", 8, ds)
2373
- ]))), 256))
2374
- ])
2375
- ];
2376
- }),
2377
- _: 2
2378
- }, 1024)) : (ie(), Ue("div", {
2379
- key: 1,
2380
- style: Ol({
2381
- color: !Array.isArray(Pe(f)) && ((D = (m = Pe(f)) == null ? void 0 : m.toString()) != null && D.includes(".txt") || (U = (P = Pe(f)) == null ? void 0 : P.toString()) != null && U.includes(".cpt") || (z = (W = Pe(f)) == null ? void 0 : W.toString()) != null && z.includes(".cyd")) ? "var(--vertical-menuitem-active-bg)" : "",
2382
- textDecoration: !Array.isArray(Pe(f)) && ((n = (K = Pe(f)) == null ? void 0 : K.toString()) != null && n.includes(".txt") || (h = (S = Pe(f)) == null ? void 0 : S.toString()) != null && h.includes(".cpt") || (k = (T = Pe(f)) == null ? void 0 : T.toString()) != null && k.includes(".cyd")) ? "underline" : "",
2383
- cursor: !Array.isArray(Pe(f)) && ((j = (Q = Pe(f)) == null ? void 0 : Q.toString()) != null && j.includes(".txt") || (J = (E = Pe(f)) == null ? void 0 : E.toString()) != null && J.includes(".cpt") || (x = (b = Pe(f)) == null ? void 0 : b.toString()) != null && x.includes(".cyd")) ? "pointer" : "",
2384
- marginLeft: (f == null ? void 0 : f.colIndex) === 0 ? `${((f == null ? void 0 : f.level) ?? 0) * 20}px` : 0
2385
- }),
2386
- onClick: (_) => sr(Pe(f))
2387
- }, je(Pe(f) === 0 ? "0" : Pe(f)), 13, ps))
2388
- ];
2389
- }),
2390
- _: 2
2391
- }, [
2392
- ((v = cl.value) == null ? void 0 : v.length) > 0 && Ie(Fl) !== Ie(Z) ? {
2393
- name: "actions",
2394
- fn: re(({ item: f }) => [
2395
- te(a, {
2396
- title: "",
2397
- placement: "left-start",
2398
- "popper-class": "menu-operate-popover"
2399
- }, {
2400
- reference: re(() => [
2401
- te(r, {
2402
- name: "more",
2403
- style: { cursor: "pointer", width: "15px", height: "15px" }
2404
- })
2405
- ]),
2406
- default: re(() => [
2407
- be("div", In, [
2408
- (ie(!0), Ue(vl, null, bl(Tr(cl.value, f), (m, D) => (ie(), Ue("div", {
2409
- class: "menu-config-item",
2410
- key: D,
2411
- onClick: (P) => Yl(m == null ? void 0 : m.label, f, { extra: m })
2412
- }, [
2413
- be("div", {
2414
- style: Ol({ color: m == null ? void 0 : m.textColor }),
2415
- class: "extra-button-label"
2416
- }, je(m == null ? void 0 : m.label), 5)
2417
- ], 8, Vn))), 128))
2418
- ])
2419
- ]),
2420
- _: 2
2421
- }, 1024)
2422
- ]),
2423
- key: "0"
2424
- } : void 0,
2425
- ((C = Y.value) == null ? void 0 : C.length) > 0 ? {
2426
- name: "batchButton",
2427
- fn: re((f) => [
2428
- te(Nn, {
2429
- lockingPage: Ie(Fl) === Ie(Z),
2430
- buttons: f.buttons,
2431
- selectTableItems: Qe.value,
2432
- onButtonClick: l[1] || (l[1] = (m) => Yl(m, "", {}))
2433
- }, null, 8, ["lockingPage", "buttons", "selectTableItems"])
2434
- ]),
2435
- key: "1"
2436
- } : void 0
2437
- ]), 1032, ["pageObj", "summaryInfo", "columns", "defaultSort", "isCardViewport", "checkedColumns", "tableData", "isEditViewport", "isShowPagination", "allowSelect", "extraButton", "rowButton", "cacheExtraButtons", "isClearSelection"])) : Me("", !0),
2438
- te(Vl, {
2439
- title: qe.value,
2440
- visible: Ze.value,
2441
- width: ar.value,
2442
- onBeforeDestroy: vr,
2443
- style: { height: "74%" }
2444
- }, {
2445
- default: re(() => [
2446
- be("div", fs, [
2447
- te(la, {
2448
- rowContents: Ce.value,
2449
- isEnableWrap: !1,
2450
- showOperator: !1,
2451
- onChange: Fr,
2452
- onClickTrigger: br,
2453
- isEdit: ra.value,
2454
- onBlurChange: hr
2455
- }, null, 8, ["rowContents", "isEdit"])
2456
- ])
2457
- ]),
2458
- footer: re(() => [
2459
- Wl.value ? (ie(), Ue("div", gs, [
2460
- te(t, {
2461
- onClick: l[6] || (l[6] = (f) => Ze.value = !1),
2462
- id: "themeBorderButton"
2463
- }, {
2464
- default: re(() => l[13] || (l[13] = [
2465
- rl(je("取消"))
2466
- ])),
2467
- _: 1,
2468
- __: [13]
2469
- }),
2470
- te(t, {
2471
- class: "ok-button",
2472
- onClick: l[7] || (l[7] = (f) => $l(!0)),
2473
- id: "themeButton"
2474
- }, {
2475
- default: re(() => l[14] || (l[14] = [
2476
- rl(je("确认"))
2477
- ])),
2478
- _: 1,
2479
- __: [14]
2480
- })
2481
- ])) : Me("", !0)
2482
- ]),
2483
- _: 1
2484
- }, 8, ["title", "visible", "width"]),
2485
- te(Vl, {
2486
- title: qe.value,
2487
- visible: Jl.value,
2488
- width: na.value,
2489
- onBeforeDestroy: l[9] || (l[9] = (f) => Jl.value = !1)
2490
- }, {
2491
- default: re(() => [
2492
- te(Gn)
2493
- ]),
2494
- footer: re(() => [
2495
- be("div", hs, [
2496
- te(t, {
2497
- onClick: l[8] || (l[8] = (f) => Jl.value = !1),
2498
- class: "cancel-button",
2499
- id: "themeBorderButton"
2500
- }, {
2501
- default: re(() => l[15] || (l[15] = [
2502
- rl(je("取消"))
2503
- ])),
2504
- _: 1,
2505
- __: [15]
2506
- }),
2507
- te(t, {
2508
- class: "ok-button",
2509
- onClick: Cr,
2510
- id: "themeButton"
2511
- }, {
2512
- default: re(() => l[16] || (l[16] = [
2513
- rl(je("确认"))
2514
- ])),
2515
- _: 1,
2516
- __: [16]
2517
- })
2518
- ])
2519
- ]),
2520
- _: 1
2521
- }, 8, ["title", "visible", "width"]),
2522
- w.value ? (ie(), Fe(tn, {
2523
- key: 1,
2524
- fileDataList: me.value,
2525
- onDestroy: _r
2526
- }, null, 8, ["fileDataList"])) : Me("", !0),
2527
- De.value ? (ie(), Fe(Vl, {
2528
- key: 2,
2529
- visible: De.value,
2530
- onBeforeDestroy: Mr,
2531
- style: { height: "80vh", width: "80vw" },
2532
- "body-class": "three-dialog-body",
2533
- "footer-class": "three-dialog-footer"
2534
- }, {
2535
- default: re(() => [
2536
- te(pn, {
2537
- "file-urls": El.value,
2538
- isThreeScene: Re.value,
2539
- isSelfWindow: !0,
2540
- threeData: we.value
2541
- }, null, 8, ["file-urls", "isThreeScene", "threeData"])
2542
- ]),
2543
- _: 1
2544
- }, 8, ["visible"])) : Me("", !0),
2545
- te(Vl, {
2546
- visible: e.componentVisible,
2547
- onBeforeDestroy: l[10] || (l[10] = (f) => e.componentVisible = !1),
2548
- width: na.value,
2549
- style: { height: "70vh" }
2550
- }, {
2551
- default: re(() => [
2552
- te(c, { dialogItem: Hl.value }, null, 8, ["dialogItem"])
2553
- ]),
2554
- _: 1
2555
- }, 8, ["visible", "width"])
2556
- ]);
2557
- };
2558
- }
2559
- }, xs = /* @__PURE__ */ aa(ys, [["__scopeId", "data-v-a0a41ccb"]]);
2560
- export {
2561
- Yn as a,
2562
- Fn as b,
2563
- Ra as f,
2564
- qa as g,
2565
- xs as s,
2566
- Rn as u
2567
- };