ss-component-new 1.2.53 → 1.2.55

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