ss-component-new 1.2.210 → 1.2.211

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 (96) hide show
  1. package/dist/{MTLLoader-CMQuFz2U.js → MTLLoader-67H7fk80.js} +1 -1
  2. package/dist/{MTLLoader-Dn7qvdQE.cjs → MTLLoader-CL8XSHGp.cjs} +1 -1
  3. package/dist/{OrbitControls-BwOP9BCH.js → OrbitControls-C6M2yrLB.js} +1 -1
  4. package/dist/{OrbitControls-CKmqHTFG.cjs → OrbitControls-CnIsW8aw.cjs} +1 -1
  5. package/dist/{URDFLoader-LcNMUu2Q.cjs → URDFLoader-BX5IuzJ8.cjs} +1 -1
  6. package/dist/{URDFLoader-B4mwog0r.js → URDFLoader-DoVjA77Z.js} +2 -2
  7. package/dist/{animationData-CF8iySCX.js → animationData-BjKOHbzr.js} +1 -1
  8. package/dist/{animationData-CttWJgEw.cjs → animationData-DwRMSEcR.cjs} +1 -1
  9. package/dist/{array-D7pDQ0ai.cjs → array-CJjaF-30.cjs} +1 -1
  10. package/dist/{array-BjZvjLNf.js → array-Cmui25df.js} +1 -1
  11. package/dist/{iconfont-DLz03Pua.js → iconfont-C6xrTLDV.js} +2 -2
  12. package/dist/{iconfont-v_9e6_Wr.cjs → iconfont-alw7deIH.cjs} +1 -1
  13. package/dist/{index-D2BxLiKo.cjs → index-0ZaO0N8Y.cjs} +1 -1
  14. package/dist/{index-DXOFx4Js.js → index-3e98Utf1.js} +2 -2
  15. package/dist/{index-D5o0yFsY.js → index-B16xvnZZ.js} +1 -1
  16. package/dist/{index-BQcDZ9zY.cjs → index-B6eyscWd.cjs} +1 -1
  17. package/dist/{index-9ygxLpV4.cjs → index-BA5lzuZs.cjs} +1 -1
  18. package/dist/{index-CzgAT9P9.js → index-BJ607Cgr.js} +2 -2
  19. package/dist/{index-D9VJiqIr.js → index-BJ6EviJu.js} +1 -1
  20. package/dist/{index-CTXsrOke.js → index-BWYzx9On.js} +1 -1
  21. package/dist/{index-CTVosZpD.cjs → index-BXqsy0Nl.cjs} +1 -1
  22. package/dist/{index-P7IneBeG.js → index-BZWgeRjN.js} +3 -3
  23. package/dist/{index-dVe4jXXP.cjs → index-BiZxAQWz.cjs} +1 -1
  24. package/dist/index-BlzC7uD8.js +3577 -0
  25. package/dist/{index-rat8ooKP.cjs → index-BmVUsjsm.cjs} +1 -1
  26. package/dist/{index-C5mK6G4B.js → index-C251JILB.js} +8 -8
  27. package/dist/{index-CfvIJnQ4.js → index-CAi-JNl0.js} +1 -1
  28. package/dist/{index-Ccucb-4Z.cjs → index-CN4uUlDb.cjs} +1 -1
  29. package/dist/{index-C_IeP5sH.js → index-CqyCNXc9.js} +1 -1
  30. package/dist/{index-CZpCcMJo.cjs → index-Ct9aTte1.cjs} +1 -1
  31. package/dist/{index-C5rlnhuB.cjs → index-Ct_sBp18.cjs} +1 -1
  32. package/dist/index-CvD54iz8.cjs +1 -0
  33. package/dist/{index-DUWL4jpR.js → index-CwI3-CUs.js} +1 -1
  34. package/dist/{index-NSTwCJrr.cjs → index-D-nlJ3o0.cjs} +1 -1
  35. package/dist/{index-C6epDMmF.cjs → index-D737Q5uV.cjs} +1 -1
  36. package/dist/{index-DqpK4iid.js → index-D9R32sv-.js} +4 -4
  37. package/dist/index-DA6AZg6p.cjs +1 -0
  38. package/dist/{index-np8quoQc.cjs → index-DAkcroe-.cjs} +1 -1
  39. package/dist/{index-4xWViEpw.js → index-DBP65bJO.js} +1 -1
  40. package/dist/{index-Co21kVZ9.cjs → index-DEFMo4Ss.cjs} +1 -1
  41. package/dist/{index-BOo0k-6s.cjs → index-DHbfeZj9.cjs} +2 -2
  42. package/dist/{index-FamU_pWj.js → index-DOvORsix.js} +1 -1
  43. package/dist/{index-2kxli95n.cjs → index-DTCncP0c.cjs} +1 -1
  44. package/dist/{index-BFmB_GNc.js → index-DcxH1zsA.js} +1 -1
  45. package/dist/{index-O1tZfdsI.js → index-DgqJP4cy.js} +16 -16
  46. package/dist/{index-ywaZJRUe.js → index-DjhgSTgp.js} +1 -1
  47. package/dist/{index-Gx0qq15p.js → index-DlWLHCf4.js} +1 -1
  48. package/dist/{index-B3ES4Imr.cjs → index-DuLX_CSd.cjs} +1 -1
  49. package/dist/{index-DtC6p78s.cjs → index-Dymvy1ct.cjs} +1 -1
  50. package/dist/index-RlPP0mDo.js +12475 -0
  51. package/dist/{index-Dgk4f0E3.js → index-VDplKeDq.js} +4 -4
  52. package/dist/{index-CRPwb5Di.cjs → index-XIKgdyQI.cjs} +1 -1
  53. package/dist/{index-BV2AdsW7.js → index-bAoJwc65.js} +7 -7
  54. package/dist/{index-CZmf9W1N.cjs → index-d8S_KBKB.cjs} +1 -1
  55. package/dist/{index-BqLlm8pl.cjs → index-kFQ6-6dk.cjs} +1 -1
  56. package/dist/{index-BM6eQMuj.js → index-li-CtQ8f.js} +3 -3
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B1f3iFI0.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BvTCBcSN.js} +8 -8
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CLOMtzqw.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CMQ255im.cjs} +2 -2
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CgpQQnQo.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bz8QgjF-.js} +26750 -26754
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BbQEEyFK.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DLa0ds0U.cjs} +265 -265
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-yEFItRs3.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-2KtqLt8T.js} +4 -4
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-C5U5tv8m.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-BQTgA0X7.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_1_lang-Qda9sMCN.js → index.vue_vue_type_style_index_1_lang-B3X_PfQc.js} +4 -4
  64. package/dist/{index.vue_vue_type_style_index_1_lang-D3s2wGtB.cjs → index.vue_vue_type_style_index_1_lang-YbKSvTqR.cjs} +2 -2
  65. package/dist/{main-B4kLVLRo.js → main-Cor_kytv.js} +3 -3
  66. package/dist/{main-ZKhN5hVB.cjs → main-DDz9fSdf.cjs} +1 -1
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.css +2 -2
  69. package/dist/ss-component.js +9 -9
  70. package/dist/ss-component2.cjs +1 -1
  71. package/dist/ss-component2.js +10 -10
  72. package/dist/{threeModel-C6-ohRly.cjs → threeModel-2290Sh5Q.cjs} +1 -1
  73. package/dist/{threeModel-CCD_TCIt.js → threeModel-ml0tLJ6d.js} +4 -4
  74. package/dist/{threePreview--ajzp9ef.js → threePreview-2xz8Hw38.js} +3 -3
  75. package/dist/{threePreview-C_GqKG7E.cjs → threePreview-C3CVwE-Y.cjs} +1 -1
  76. package/dist/{threeSceneView-BuDjh1PW.cjs → threeSceneView-B4nKIou-.cjs} +1 -1
  77. package/dist/{threeSceneView-2SkyZMLQ.js → threeSceneView-DDpsp26F.js} +8 -8
  78. package/dist/{threeSceneViewForCPMPIP-BAHntlai.js → threeSceneViewForCPMPIP-9PDSLEqZ.js} +7 -7
  79. package/dist/{threeSceneViewForCPMPIP-PKZiN1Hi.cjs → threeSceneViewForCPMPIP-yuW3lgix.cjs} +1 -1
  80. package/dist/{threeTrackPathView-DQXfAyfj.js → threeTrackPathView-BH4W5aAJ.js} +3 -3
  81. package/dist/{threeTrackPathView-CaZJjtlj.cjs → threeTrackPathView-_RjI4stL.cjs} +1 -1
  82. package/dist/{threeViewerHost-BnEGRoC_.js → threeViewerHost-CdKrfyfa.js} +2 -2
  83. package/dist/{threeViewerHost-wJDeMzT0.cjs → threeViewerHost-Di0GKXwU.cjs} +1 -1
  84. package/dist/{urdfTree-CY-l53qd.js → urdfTree-DkFmyNMl.js} +1 -1
  85. package/dist/{urdfTree-Bvjb6fr9.cjs → urdfTree-MhNihTDQ.cjs} +1 -1
  86. package/dist/{workpieceTreePanel-WyflfVY-.js → workpieceTreePanel-BFPFWqV3.js} +4 -4
  87. package/dist/{workpieceTreePanel-Y4Qc_oSv.cjs → workpieceTreePanel-BeRnxO8B.cjs} +1 -1
  88. package/package.json +1 -1
  89. package/dist/index-CaHvkH1f.js +0 -3385
  90. package/dist/index-Cbbw4bt5.cjs +0 -1
  91. package/dist/index-DDJsccuu.cjs +0 -1
  92. package/dist/index-DZYnK5D6.js +0 -12425
  93. package/dist/obj/model.mtl +0 -42
  94. package/dist/obj/model.obj +0 -26110
  95. package/public/obj/model.mtl +0 -42
  96. package/public/obj/model.obj +0 -26110
@@ -1,3385 +0,0 @@
1
- import { ref as W, watch as jl, nextTick as Ga, resolveComponent as Sl, createBlock as Ve, openBlock as ae, withCtx as H, createElementVNode as ve, renderSlot as wr, onMounted as tr, createElementBlock as _e, normalizeStyle as na, normalizeClass as li, toDisplayString as qe, createCommentVNode as We, createVNode as ne, unref as Ll, Fragment as Hl, renderList as Ql, createTextVNode as Al, defineComponent as ai, reactive as Na, computed as ur, inject as kn, provide as Sn, onBeforeUnmount as An, onUnmounted as mn, resolveDirective as Tn, createSlots as _n, withModifiers as or, withDirectives as sr, vShow as Kr } from "vue";
2
- import { bh as zr, as as Jr, c as Z, E as rl, bD as ri, g as ia, p as aa, s as ta, u as xn, c3 as On, f as Cn, b as ra, bv as Dn, bt as Wr, e as Un, c4 as En } from "./index-7MBVUN82.js";
3
- import { $ as ga, aI as jn, aJ as Ba, aK as Ln, g as va, b as $n, a as Pn, _ as Mn, u as Nn, aL as qr, aM as Gr, aN as Hr, aO as Bn, d as dr, X as pr, q as Qr, l as Fn, aP as Xr, a7 as Rn, aQ as wn, aR as Kn, aS as zn, Z as Jn, aT as Wn } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CgpQQnQo.js";
4
- import { d as ba, _ as Zr, j as qn, e as Yr, E as Gn, u as Hn } from "./index-C5mK6G4B.js";
5
- import { a as Qn, T as Xn } from "./threeViewerHost-BnEGRoC_.js";
6
- import { u as Zn, a as Yn, E as Ir } from "./index-3oQGURYh.js";
7
- import { c as In } from "./index.vue_vue_type_style_index_1_lang-Qda9sMCN.js";
8
- import { _ as Ha } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- import { s as ha } from "./index-D5o0yFsY.js";
10
- import "./index-DfFq9kkn.js";
11
- import { i as Vr } from "./isString-D70CzuJZ.js";
12
- const cr = (z) => z.match(/\((.*)\)/)[1], ei = {
13
- __name: "index",
14
- props: {
15
- isVisible: {
16
- type: Boolean,
17
- default: !1
18
- },
19
- title: {
20
- type: String,
21
- default: ""
22
- },
23
- placement: {
24
- type: String,
25
- default: "bottom"
26
- },
27
- width: {
28
- type: Number,
29
- default: 200
30
- }
31
- },
32
- setup(z) {
33
- const fe = z, oe = W(null), w = W(!1), K = W(null);
34
- return jl(
35
- () => fe == null ? void 0 : fe.isVisible,
36
- () => {
37
- w.value = fe == null ? void 0 : fe.isVisible;
38
- },
39
- { deep: !0, immediate: !0 }
40
- ), jl(
41
- () => K.value,
42
- () => {
43
- Ga(() => {
44
- var u, ye;
45
- (ye = (u = oe.value) == null ? void 0 : u.updatePopper) == null || ye.call(u);
46
- });
47
- },
48
- { deep: !0, immediate: !0 }
49
- ), (u, ye) => {
50
- const Ue = Sl("el-popover");
51
- return ae(), Ve(Ue, {
52
- visible: w.value,
53
- title: fe == null ? void 0 : fe.title,
54
- placement: fe == null ? void 0 : fe.placement,
55
- width: fe == null ? void 0 : fe.width,
56
- ref_key: "popOverRef",
57
- ref: oe
58
- }, {
59
- reference: H(() => [
60
- ve("div", null, [
61
- wr(u.$slots, "reference", {
62
- ref_key: "referenceRef",
63
- ref: K
64
- })
65
- ])
66
- ]),
67
- default: H(() => [
68
- ve("div", null, [
69
- wr(u.$slots, "content")
70
- ])
71
- ]),
72
- _: 3
73
- }, 8, ["visible", "title", "placement", "width"]);
74
- };
75
- }
76
- }, Vn = {
77
- key: 0,
78
- class: "extra-button-content"
79
- }, eu = { class: "table-operator-wrap" }, lu = {
80
- key: 0,
81
- class: "extra-button-filter"
82
- }, au = { class: "form-content-value" }, ru = {
83
- key: 1,
84
- class: "extra-header"
85
- }, iu = {
86
- class: "drop-menu",
87
- style: { width: "120px" }
88
- }, nu = { key: 0 }, uu = { key: 1 }, ou = {
89
- key: 1,
90
- class: "extra-button-content tabs-button-wrapper"
91
- }, su = { class: "table-operator-wrap" }, du = { class: "extra-button-filter" }, pu = { class: "form-content-value" }, cu = {
92
- key: 0,
93
- class: "extra-header"
94
- }, fu = {
95
- class: "drop-menu",
96
- style: { width: "120px" }
97
- }, yu = { key: 0 }, tu = { key: 1 }, hu = {
98
- __name: "header",
99
- props: {
100
- pageLayout: {
101
- type: String,
102
- default: "vertical"
103
- },
104
- lockingPage: Boolean,
105
- level: {
106
- type: Number,
107
- default: 1
108
- },
109
- compName: {
110
- type: String,
111
- default: "表格名称",
112
- required: !1
113
- },
114
- filterShow: {
115
- type: Boolean,
116
- default: !1
117
- },
118
- isDevMode: Boolean,
119
- selectNums: Number,
120
- dataNums: Number,
121
- filterValues: Array,
122
- buttons: {
123
- type: Array,
124
- default: () => []
125
- },
126
- columns: {
127
- type: Array,
128
- default: () => []
129
- }
130
- },
131
- emits: ["buttonClick", "filter", "getImportData"],
132
- setup(z, { emit: fe }) {
133
- const oe = fe, w = z, K = W(""), u = W(!1), ye = W([]), Ue = W([{ label: "取消", background: "#999999" }, {
134
- label: "清空",
135
- background: "#999999"
136
- }, { label: "确认" }]), ze = [
137
- {
138
- label: "新增",
139
- icon: "Plus"
140
- },
141
- {
142
- label: "导入",
143
- icon: "import"
144
- },
145
- {
146
- label: "导出",
147
- icon: "export"
148
- },
149
- {
150
- label: "OCR识别",
151
- icon: "ocr"
152
- }
153
- ], Ee = (Te) => {
154
- const Me = Te.raw;
155
- if (!Me) return;
156
- const Ge = new FileReader();
157
- Ge.onload = (ge) => {
158
- try {
159
- const Re = new Uint8Array(ge.target.result), pl = jn(Re, { type: "array" }), Je = pl.SheetNames[0], se = pl.Sheets[Je], cl = Ba.decode_range(se["!ref"]).e.c + 1, Y = new Array(cl).fill(""), _ = [];
160
- for (const X in se) {
161
- if (X[0] === "!") continue;
162
- const { r: Se, c: Le } = Ba.decode_cell(X);
163
- let fl = se[X].v;
164
- if (se[X].t === "n" && fl > 0 && fl < 1e6 && (fl = new Date((fl - 25569) * 86400 * 1e3).toISOString().split("T")[0]), (fl == null || fl === "") && (fl = ""), Se === 0)
165
- Y[Le] = fl;
166
- else {
167
- if (!_[Se - 1]) {
168
- _[Se - 1] = {};
169
- for (let Pl = 0; Pl < cl; Pl++)
170
- _[Se - 1][`col_${Pl}`] = "";
171
- }
172
- _[Se - 1][`col_${Le}`] = fl;
173
- }
174
- }
175
- for (let X = 0; X < cl; X++)
176
- Y[X] === void 0 && (Y[X] = "");
177
- const we = _ == null ? void 0 : _[0];
178
- if (!(we != null && we.hasOwnProperty("col_0"))) return rl.error("导入的数据列不匹配,请检查是否错位");
179
- oe("getImportData", Y, _);
180
- } catch (Re) {
181
- throw rl.error(Re.message), new Error(Re.message);
182
- }
183
- }, Ge.readAsArrayBuffer(Me);
184
- }, _l = (Te) => {
185
- var Ge;
186
- const Me = (Ge = ye.value) == null ? void 0 : Ge.reduce((ge, Re, pl) => (pl === 0 ? ge[Re.label] = Te : ge[Re.label] = Re == null ? void 0 : Re.value, ge), {});
187
- oe("filter", Me, Te, !0);
188
- }, zl = (Te) => {
189
- oe("buttonClick", Te);
190
- }, Yl = (Te) => {
191
- var Me, Ge;
192
- ye.value = (Ge = (Me = ga(Z(Te))) == null ? void 0 : Me.filter((ge) => (ge == null ? void 0 : ge.label) !== "" && (ge == null ? void 0 : ge.label) !== "操作")) == null ? void 0 : Ge.map((ge) => ({
193
- label: (ge == null ? void 0 : ge.label) ?? "",
194
- value: "",
195
- name: (ge == null ? void 0 : ge.label) ?? "",
196
- isFormColHidden: ge == null ? void 0 : ge.isTableColHidden,
197
- width: 2
198
- }));
199
- }, Jl = W(!1), Il = (Te) => {
200
- var Me;
201
- if ((Te == null ? void 0 : Te.buttonName) === "确认" && (oe("filter", Te == null ? void 0 : Te.content), Jl.value = (Te == null ? void 0 : Te.content) && Object.values(Te == null ? void 0 : Te.content).length > 0), (Te == null ? void 0 : Te.buttonName) === "清空") {
202
- const Ge = Z(Te == null ? void 0 : Te.content);
203
- for (const ge in Ge)
204
- Ge[ge] = "";
205
- ye.value = (Me = ye.value) == null ? void 0 : Me.map((ge) => ({
206
- ...ge,
207
- value: ""
208
- })), oe("filter", Ge), Jl.value = !1;
209
- }
210
- u.value = !1;
211
- }, dl = () => {
212
- var Me, Ge;
213
- ye.value = (Me = ye.value) == null ? void 0 : Me.map((ge) => ({
214
- ...ge,
215
- value: ""
216
- }));
217
- const Te = (Ge = ye.value) == null ? void 0 : Ge.reduce((ge, Re) => (ge[Re.label] = Re.value, ge), {});
218
- oe("filter", Te);
219
- };
220
- return tr(() => {
221
- Yl(w.columns);
222
- }), jl(
223
- () => w.columns,
224
- () => {
225
- Yl(w.columns);
226
- },
227
- { deep: !0, immediate: !0 }
228
- ), (Te, Me) => {
229
- var se, I, cl, Y;
230
- const Ge = Sl("el-icon"), ge = Sl("svg-icon"), Re = Sl("el-input"), pl = Sl("el-button"), Je = Sl("el-upload");
231
- return z.pageLayout === "vertical" ? (ae(), _e("div", Vn, [
232
- ve("div", {
233
- class: li(z.compName ? "table-name-wrap" : ""),
234
- style: na({
235
- background: (w == null ? void 0 : w.level) > 1 ? "transparent" : "var(--ssgroup-background)",
236
- paddingLeft: ((w == null ? void 0 : w.level) - 1) * 12 + "px",
237
- fontWeight: 600 - ((w == null ? void 0 : w.level) - 1) * 100 >= 400 ? 600 - ((w == null ? void 0 : w.level) - 1) * 100 : 400,
238
- fontSize: 17 - (w == null ? void 0 : w.level) >= 14 ? 17 - (w == null ? void 0 : w.level) + "px" : "14px"
239
- })
240
- }, qe(z.compName), 7),
241
- ve("div", eu, [
242
- w != null && w.filterShow ? (ae(), _e("div", lu, [
243
- ne(ei, {
244
- title: "",
245
- width: 800,
246
- placement: "bottom-start",
247
- isVisible: u.value
248
- }, {
249
- reference: H(() => {
250
- var _, we, X, Se;
251
- return [
252
- ne(Re, {
253
- modelValue: K.value,
254
- "onUpdate:modelValue": Me[1] || (Me[1] = (Le) => K.value = Le),
255
- style: { "min-width": "80px" },
256
- placeholder: Jl.value ? (X = (we = (_ = z.filterValues) == null ? void 0 : _.filter((Le) => Le)) == null ? void 0 : we.slice(0, 3)) == null ? void 0 : X.join("/") : "搜索",
257
- "prefix-icon": Ll(zr),
258
- clearable: "",
259
- onInput: _l,
260
- disabled: ((Se = ye.value) == null ? void 0 : Se.length) === 0
261
- }, {
262
- suffix: H(() => {
263
- var Le, fl;
264
- return [
265
- !K.value && ((fl = (Le = z.filterValues) == null ? void 0 : Le.filter((Pl) => Pl)) != null && fl.join("/")) ? (ae(), Ve(Ge, {
266
- key: 0,
267
- style: { cursor: "pointer" },
268
- onClick: dl
269
- }, {
270
- default: H(() => [
271
- ne(Ll(Jr))
272
- ]),
273
- _: 1
274
- })) : We("", !0)
275
- ];
276
- }),
277
- append: H(() => [
278
- ve("span", {
279
- title: "条件查询",
280
- onClick: Me[0] || (Me[0] = (Le) => u.value = !u.value)
281
- }, [
282
- ne(ge, {
283
- name: "query",
284
- style: { width: "15px", height: "15px", cursor: "pointer" }
285
- })
286
- ])
287
- ]),
288
- _: 1
289
- }, 8, ["modelValue", "placeholder", "prefix-icon", "disabled"])
290
- ];
291
- }),
292
- content: H(() => [
293
- ve("div", au, [
294
- (ae(), Ve(ba, {
295
- rowContents: ye.value,
296
- buttonValue: Ue.value,
297
- isRowFlex: !0,
298
- isEnableWrap: !1,
299
- isButtonRow: !1,
300
- key: Ue.value,
301
- isStartJustify: !1,
302
- onOnButtonClick: Il
303
- }, null, 8, ["rowContents", "buttonValue"]))
304
- ])
305
- ]),
306
- _: 1
307
- }, 8, ["isVisible"])
308
- ])) : We("", !0),
309
- z.buttons && ((se = z.buttons) == null ? void 0 : se.length) > 0 ? (ae(), _e("div", ru, [
310
- (ae(!0), _e(Hl, null, Ql((I = z.buttons) == null ? void 0 : I.filter((_) => z.isDevMode || (_ == null ? void 0 : _.label) !== "修改模板"), (_, we) => (ae(), _e("div", {
311
- class: "extra-contents",
312
- key: we
313
- }, [
314
- (_ == null ? void 0 : _.type) === "upload" ? (ae(), Ve(Je, {
315
- key: 0,
316
- class: "upload-button-wrap",
317
- "on-change": Ee,
318
- accept: ".xlsx,.xls",
319
- "auto-upload": !1,
320
- action: "#",
321
- "show-file-list": !1,
322
- disabled: !!z.lockingPage
323
- }, {
324
- default: H(() => [
325
- ne(pl, {
326
- disabled: !!z.lockingPage,
327
- style: na({ background: (_ == null ? void 0 : _.background) ?? "var(--ssbutton-theme-bg)", color: (_ == null ? void 0 : _.color) ?? "var(--ssbutton-theme-color)" })
328
- }, {
329
- default: H(() => [
330
- Al(qe(_ == null ? void 0 : _.label), 1)
331
- ]),
332
- _: 2
333
- }, 1032, ["disabled", "style"])
334
- ]),
335
- _: 2
336
- }, 1032, ["disabled"])) : We("", !0),
337
- (_ == null ? void 0 : _.type) === "popover" ? (ae(), Ve(Zr, { key: 1 }, {
338
- dropTitle: H(() => [
339
- (_ == null ? void 0 : _.type) === "popover" ? (ae(), Ve(pl, {
340
- key: 0,
341
- disabled: !!z.lockingPage,
342
- style: na({ background: (_ == null ? void 0 : _.background) ?? "var(--ssbutton-theme-bg)", color: (_ == null ? void 0 : _.color) ?? "var(--ssbutton-theme-color)" })
343
- }, {
344
- default: H(() => [
345
- Al(qe(_ == null ? void 0 : _.label), 1)
346
- ]),
347
- _: 2
348
- }, 1032, ["disabled", "style"])) : We("", !0)
349
- ]),
350
- dropMenu: H(() => [
351
- ve("div", iu, [
352
- (ae(!0), _e(Hl, null, Ql(_ == null ? void 0 : _.contents, (X) => (ae(), Ve(pl, {
353
- key: X == null ? void 0 : X.label,
354
- disabled: !!z.lockingPage,
355
- style: { width: "100%", margin: "0", border: "none", display: "flex", "justify-content": "flex-start" },
356
- onClick: (Se) => zl(X == null ? void 0 : X.label)
357
- }, {
358
- default: H(() => {
359
- var Se, Le;
360
- return [
361
- Al(qe(X == null ? void 0 : X.label), 1),
362
- (Se = X == null ? void 0 : X.label) != null && Se.includes("选中") ? (ae(), _e("span", nu, "(" + qe(z.selectNums) + ")", 1)) : We("", !0),
363
- (Le = X == null ? void 0 : X.label) != null && Le.includes("全部") ? (ae(), _e("span", uu, "(" + qe(z.dataNums) + ")", 1)) : We("", !0)
364
- ];
365
- }),
366
- _: 2
367
- }, 1032, ["disabled", "onClick"]))), 128))
368
- ])
369
- ]),
370
- _: 2
371
- }, 1024)) : We("", !0),
372
- _ != null && _.type ? We("", !0) : (ae(), Ve(pl, {
373
- key: 2,
374
- id: "themeButton",
375
- disabled: !!z.lockingPage,
376
- style: na({ background: (_ == null ? void 0 : _.background) ?? "var(--ssbutton-theme-bg)", color: (_ == null ? void 0 : _.color) ?? "var(--ssbutton-theme-color)" }),
377
- onClick: (X) => zl(_ == null ? void 0 : _.label)
378
- }, {
379
- default: H(() => [
380
- Al(qe(_ == null ? void 0 : _.label), 1)
381
- ]),
382
- _: 2
383
- }, 1032, ["disabled", "style", "onClick"]))
384
- ]))), 128))
385
- ])) : We("", !0)
386
- ])
387
- ])) : (ae(), _e("div", ou, [
388
- ve("div", su, [
389
- ve("div", du, [
390
- ne(ei, {
391
- title: "",
392
- width: 800,
393
- placement: "bottom-start",
394
- isVisible: u.value
395
- }, {
396
- reference: H(() => {
397
- var _, we, X, Se;
398
- return [
399
- ne(Re, {
400
- modelValue: K.value,
401
- "onUpdate:modelValue": Me[3] || (Me[3] = (Le) => K.value = Le),
402
- style: { "min-width": "80px" },
403
- placeholder: Jl.value ? (X = (we = (_ = z.filterValues) == null ? void 0 : _.filter((Le) => Le)) == null ? void 0 : we.slice(0, 3)) == null ? void 0 : X.join("/") : "搜索",
404
- "prefix-icon": Ll(zr),
405
- clearable: "",
406
- onInput: _l,
407
- disabled: ((Se = ye.value) == null ? void 0 : Se.length) === 0
408
- }, {
409
- suffix: H(() => {
410
- var Le, fl;
411
- return [
412
- !K.value && ((fl = (Le = z.filterValues) == null ? void 0 : Le.filter((Pl) => Pl)) != null && fl.join("/")) ? (ae(), Ve(Ge, {
413
- key: 0,
414
- style: { cursor: "pointer" },
415
- onClick: dl
416
- }, {
417
- default: H(() => [
418
- ne(Ll(Jr))
419
- ]),
420
- _: 1
421
- })) : We("", !0)
422
- ];
423
- }),
424
- append: H(() => [
425
- ve("span", {
426
- title: "条件查询",
427
- onClick: Me[2] || (Me[2] = (Le) => u.value = !u.value)
428
- }, [
429
- ne(ge, {
430
- name: "query",
431
- style: { width: "15px", height: "15px", cursor: "pointer" }
432
- })
433
- ])
434
- ]),
435
- _: 1
436
- }, 8, ["modelValue", "placeholder", "prefix-icon", "disabled"])
437
- ];
438
- }),
439
- content: H(() => [
440
- ve("div", pu, [
441
- (ae(), Ve(ba, {
442
- rowContents: ye.value,
443
- buttonValue: Ue.value,
444
- isRowFlex: !0,
445
- isEnableWrap: !1,
446
- isButtonRow: !1,
447
- key: Ue.value,
448
- isStartJustify: !1,
449
- onOnButtonClick: Il
450
- }, null, 8, ["rowContents", "buttonValue"]))
451
- ])
452
- ]),
453
- _: 1
454
- }, 8, ["isVisible"])
455
- ]),
456
- z.buttons && ((cl = z.buttons) == null ? void 0 : cl.length) > 0 ? (ae(), _e("div", cu, [
457
- (ae(!0), _e(Hl, null, Ql((Y = z.buttons) == null ? void 0 : Y.filter((_) => z.isDevMode || (_ == null ? void 0 : _.label) !== "修改模板"), (_, we) => (ae(), _e("div", {
458
- class: "extra-contents",
459
- key: we
460
- }, [
461
- (_ == null ? void 0 : _.type) === "upload" ? (ae(), Ve(Je, {
462
- key: 0,
463
- class: "upload-button-wrap",
464
- "on-change": Ee,
465
- accept: ".xlsx,.xls",
466
- "auto-upload": !1,
467
- action: "#",
468
- "show-file-list": !1
469
- }, {
470
- default: H(() => [
471
- ne(pl, { style: { background: "transparent", color: "#666666" } }, {
472
- icon: H(() => {
473
- var X;
474
- return [
475
- ne(ge, {
476
- name: (X = ze == null ? void 0 : ze.find((Se) => (Se == null ? void 0 : Se.label) === (_ == null ? void 0 : _.label))) == null ? void 0 : X.icon
477
- }, null, 8, ["name"])
478
- ];
479
- }),
480
- default: H(() => [
481
- Al(" " + qe(_ == null ? void 0 : _.label), 1)
482
- ]),
483
- _: 2
484
- }, 1024)
485
- ]),
486
- _: 2
487
- }, 1024)) : We("", !0),
488
- (_ == null ? void 0 : _.type) === "popover" ? (ae(), Ve(Zr, { key: 1 }, {
489
- dropTitle: H(() => [
490
- (_ == null ? void 0 : _.type) === "popover" ? (ae(), Ve(pl, {
491
- key: 0,
492
- style: { background: "transparent", color: "#666666" }
493
- }, {
494
- icon: H(() => {
495
- var X;
496
- return [
497
- ne(ge, {
498
- name: (X = ze == null ? void 0 : ze.find((Se) => (Se == null ? void 0 : Se.label) === (_ == null ? void 0 : _.label))) == null ? void 0 : X.icon
499
- }, null, 8, ["name"])
500
- ];
501
- }),
502
- default: H(() => [
503
- Al(" " + qe(_ == null ? void 0 : _.label), 1)
504
- ]),
505
- _: 2
506
- }, 1024)) : We("", !0)
507
- ]),
508
- dropMenu: H(() => [
509
- ve("div", fu, [
510
- (ae(!0), _e(Hl, null, Ql(_ == null ? void 0 : _.contents, (X) => (ae(), Ve(pl, {
511
- key: X == null ? void 0 : X.label,
512
- style: { width: "100%", margin: "0", border: "none", display: "flex", "justify-content": "flex-start" },
513
- onClick: (Se) => zl(X == null ? void 0 : X.label)
514
- }, {
515
- default: H(() => {
516
- var Se, Le;
517
- return [
518
- Al(qe(X == null ? void 0 : X.label), 1),
519
- (Se = X == null ? void 0 : X.label) != null && Se.includes("选中") ? (ae(), _e("span", yu, "(" + qe(z.selectNums) + ")", 1)) : We("", !0),
520
- (Le = X == null ? void 0 : X.label) != null && Le.includes("全部") ? (ae(), _e("span", tu, "(" + qe(z.dataNums) + ")", 1)) : We("", !0)
521
- ];
522
- }),
523
- _: 2
524
- }, 1032, ["onClick"]))), 128))
525
- ])
526
- ]),
527
- _: 2
528
- }, 1024)) : We("", !0),
529
- _ != null && _.type ? We("", !0) : (ae(), Ve(pl, {
530
- key: 2,
531
- id: "themeButton",
532
- style: na({ background: "transparent", color: (_ == null ? void 0 : _.label) === "新增" ? "var(--ssbutton-theme-bg)" : "#666666" }),
533
- onClick: (X) => zl(_ == null ? void 0 : _.label)
534
- }, {
535
- icon: H(() => {
536
- var X;
537
- return [
538
- ne(ge, {
539
- name: (X = ze == null ? void 0 : ze.find((Se) => (Se == null ? void 0 : Se.label) === (_ == null ? void 0 : _.label))) == null ? void 0 : X.icon
540
- }, null, 8, ["name"])
541
- ];
542
- }),
543
- default: H(() => [
544
- Al(" " + qe(_ == null ? void 0 : _.label), 1)
545
- ]),
546
- _: 2
547
- }, 1032, ["style", "onClick"]))
548
- ]))), 128))
549
- ])) : We("", !0)
550
- ])
551
- ]));
552
- };
553
- }
554
- }, vu = /* @__PURE__ */ Ha(hu, [["__scopeId", "data-v-03b0d8fa"]]), gu = /* @__PURE__ */ ai({
555
- __name: "batch",
556
- props: {
557
- lockingPage: Boolean,
558
- buttons: {
559
- type: Array,
560
- default: () => []
561
- },
562
- selectTableItems: {
563
- type: Array,
564
- default: () => []
565
- },
566
- columns: {
567
- type: Array,
568
- default: () => []
569
- }
570
- },
571
- emits: ["buttonClick"],
572
- setup(z, { emit: fe }) {
573
- const oe = z, w = fe, K = (ye) => {
574
- w("buttonClick", ye);
575
- }, u = (ye) => {
576
- var Ue;
577
- return ye != null && ye.includes("删除") ? ((Ue = oe.selectTableItems) == null ? void 0 : Ue.length) > 0 ? "warning-active-type" : "warning-type" : "default-type";
578
- };
579
- return (ye, Ue) => {
580
- const ze = Sl("el-button");
581
- return ae(), _e("div", null, [
582
- (ae(!0), _e(Hl, null, Ql(z.buttons, (Ee) => (ae(), Ve(ze, {
583
- key: Ee == null ? void 0 : Ee.label,
584
- disabled: !!z.lockingPage,
585
- class: li(u(Ee == null ? void 0 : Ee.label)),
586
- onClick: (_l) => K(Ee == null ? void 0 : Ee.label)
587
- }, {
588
- default: H(() => [
589
- Al(qe(Ee == null ? void 0 : Ee.label), 1)
590
- ]),
591
- _: 2
592
- }, 1032, ["disabled", "class", "onClick"]))), 128))
593
- ]);
594
- };
595
- }
596
- }), bu = /* @__PURE__ */ Ha(gu, [["__scopeId", "data-v-70b12973"]]), ku = ri("formToTableComp", {
597
- state: () => ({
598
- selectArray: [],
599
- selectString: ""
600
- }),
601
- actions: {
602
- setSelectArray(z) {
603
- this.selectArray = z;
604
- },
605
- setSelectString(z) {
606
- this.selectString = z;
607
- }
608
- }
609
- }), Su = { class: "calculator-content" }, Au = { class: "calculator-child" }, mu = { class: "calculator-child" }, Tu = /* @__PURE__ */ ai({
610
- __name: "calculator",
611
- setup(z) {
612
- const fe = W(), oe = W();
613
- return tr(() => {
614
- fe.value = [
615
- {
616
- type: "Upload",
617
- label: "输入",
618
- name: "input"
619
- }
620
- ], oe.value = [
621
- {
622
- type: "Upload",
623
- label: "输出",
624
- name: "output"
625
- }
626
- ];
627
- }), (w, K) => (ae(), _e("div", Su, [
628
- ve("div", Au, [
629
- ne(ba, {
630
- rowContents: fe.value,
631
- isRowFlex: !0
632
- }, null, 8, ["rowContents"])
633
- ]),
634
- ve("div", mu, [
635
- ne(ba, {
636
- rowContents: oe.value,
637
- isEdit: !1,
638
- isRowFlex: !0
639
- }, null, 8, ["rowContents"])
640
- ])
641
- ]));
642
- }
643
- }), _u = /* @__PURE__ */ Ha(Tu, [["__scopeId", "data-v-73db0fe7"]]), yr = (z, fe) => {
644
- let oe = z, w = fe;
645
- return Array.isArray(oe) && (oe = oe == null ? void 0 : oe.map((K, u) => {
646
- if (Array.isArray(K)) {
647
- let ye = {};
648
- return K = K == null ? void 0 : K.forEach((Ue, ze) => {
649
- var Ee;
650
- (Ee = w == null ? void 0 : w[ze]) != null && Ee.prop ? ye[w[ze].prop] = Ue : Array.isArray(Ue) && (ye.children = yr(Ue, w));
651
- }), Object.assign(ye, { id: u });
652
- } else
653
- return K;
654
- })), oe;
655
- }, ii = (z, fe, oe) => {
656
- let w = z, K = fe;
657
- return w = w == null ? void 0 : w.map((u, ye) => {
658
- var Ue, ze;
659
- return !Array.isArray(u) || !((Ue = K == null ? void 0 : K[ye]) != null && Ue.label) && !oe || (u.unshift(((ze = K == null ? void 0 : K[ye]) == null ? void 0 : ze.label) ?? ""), u.some((Ee) => Array.isArray(Ee)) && (u = u == null ? void 0 : u.map((Ee) => {
660
- var _l;
661
- return Array.isArray(Ee) && (Ee = ii(Ee, (_l = K == null ? void 0 : K[ye]) == null ? void 0 : _l.children, oe)), Ee;
662
- }))), u;
663
- }), w;
664
- }, xu = (z, fe, oe) => {
665
- if (fe === "")
666
- return z == null ? void 0 : z.filter((w) => (w == null ? void 0 : w.id) !== oe);
667
- {
668
- const w = fe.split("-");
669
- return Ou(z, w, oe);
670
- }
671
- }, Ou = (z, fe, oe) => {
672
- let w = z, K = fe;
673
- return (K == null ? void 0 : K.length) === 0 ? w = w == null ? void 0 : w.filter((u) => u.id !== oe) : w = w == null ? void 0 : w.map((u) => (u.id.toString() === (K == null ? void 0 : K[0]) && (K == null || K.shift(), u = ni(u, K, oe)), u)), w;
674
- }, ni = (z, fe, oe) => {
675
- var u, ye;
676
- let w = z, K = fe;
677
- return (K == null ? void 0 : K.length) === 0 ? w.children = (u = w.children) == null ? void 0 : u.filter((Ue) => Ue.id !== oe) : w.children = (ye = w.children) == null ? void 0 : ye.map((Ue) => (Ue.id.toString() === (K == null ? void 0 : K[0]) && (K == null || K.shift(), Ue = ni(Ue, K, oe)), Ue)), w;
678
- }, Cu = (z, fe, oe) => {
679
- if (fe === "")
680
- return oe;
681
- {
682
- const w = fe.split("-");
683
- return Du(z, w, oe);
684
- }
685
- }, Du = (z, fe, oe) => {
686
- let w = z, K = fe;
687
- return (K == null ? void 0 : K.length) === 0 ? w = oe : w = w == null ? void 0 : w.map((u) => (u.id.toString() === (K == null ? void 0 : K[0]) && (K == null || K.shift(), u = ui(u, K, oe)), u)), w;
688
- }, ui = (z, fe, oe) => {
689
- var u;
690
- let w = z, K = fe;
691
- return (K == null ? void 0 : K.length) === 0 ? w.children = oe : w.children = (u = w.children) == null ? void 0 : u.map((ye) => (ye.id.toString() === (K == null ? void 0 : K[0]) && (K == null || K.shift(), ye = ui(ye, K, oe)), ye)), w;
692
- }, Uu = ri("formComp", {
693
- state: () => ({
694
- objUrl: [],
695
- blobUrls: []
696
- }),
697
- actions: {
698
- setObjUrl(z) {
699
- this.objUrl = z;
700
- },
701
- setBlobUrls(z) {
702
- this.blobUrls = z;
703
- }
704
- }
705
- }), Eu = 200, ju = "success", Lu = "", $u = [{ 证书类型: "检定证书", 证书编号: "RG112024-03918", 数据: { 编号: "1", 名称: "1", "型号/规格": "1", 出厂编号: "1", 制造厂: "1", 所属试验台: "1", 所属系统: "1", 对应子系统: "1", 启用日期: "1", 负责人: "1", 使用状态: "1", 使用寿命: "1", 管理措施: "1" } }, { 证书类型: "检定证书", 证书编号: "RG112024-03918", 数据: { 编号: "2", 名称: "2", "型号/规格": "2", 出厂编号: "2", 制造厂: "2", 所属试验台: "2", 所属系统: "2", 对应子系统: "2", 启用日期: "2", 负责人: "2", 使用状态: "2", 使用寿命: "2", 管理措施: "2" } }], Pu = {
706
- code: Eu,
707
- type: ju,
708
- message: Lu,
709
- result: $u
710
- }, fr = async (z, fe) => {
711
- var ye, Ue, ze, Ee, _l, zl, Yl, Jl, Il, dl, Te, Me, Ge, ge, Re, pl, Je;
712
- let oe = (Ue = (ye = Z(z)) == null ? void 0 : ye.optionUrl) == null ? void 0 : Ue.menuSelect, w = [];
713
- oe == null || oe.forEach((se) => {
714
- });
715
- let K = "", u = await Ln(oe);
716
- if (u == null || u.forEach((se) => {
717
- var I, cl, Y, _;
718
- (se == null ? void 0 : se.name) === (((_ = (Y = (cl = (I = Z(z)) == null ? void 0 : I.optionUrl) == null ? void 0 : cl.groupSelect) == null ? void 0 : Y[0]) == null ? void 0 : _.replaceAll("'", "")) ?? "") && (K = se == null ? void 0 : se.id);
719
- }), fe) {
720
- K = fe;
721
- const se = await ia({
722
- id: K
723
- }), I = (zl = (_l = (Ee = (ze = se == null ? void 0 : se.data) == null ? void 0 : ze.result) == null ? void 0 : Ee[0]) == null ? void 0 : _l.key) == null ? void 0 : zl.pageKey;
724
- u = await va(I, sessionStorage.getItem("systemKey"), "");
725
- }
726
- if (K !== "") {
727
- let se;
728
- fe ? se = (Yl = u == null ? void 0 : u.find((Y) => (Y == null ? void 0 : Y.id) === fe)) == null ? void 0 : Yl.compData : se = (Jl = u == null ? void 0 : u.find((Y) => {
729
- var _, we, X, Se;
730
- return (Y == null ? void 0 : Y.name) === (((we = (_ = z == null ? void 0 : z.groupSelect) == null ? void 0 : _.split(":")) == null ? void 0 : we[0]) || ((Se = (X = z == null ? void 0 : z.optionUrl) == null ? void 0 : X.groupSelect) == null ? void 0 : Se[0]));
731
- })) == null ? void 0 : Jl.compData;
732
- let I = (dl = (Il = se == null ? void 0 : se.find((Y) => (Y == null ? void 0 : Y.key) === "header")) == null ? void 0 : Il.contents) == null ? void 0 : dl.map((Y) => Y == null ? void 0 : Y.label);
733
- (Me = (Te = se == null ? void 0 : se.find((Y) => (Y == null ? void 0 : Y.key) === "header")) == null ? void 0 : Te.contents) != null && Me.every((Y) => Array.isArray(Y)) && (I = (Re = ga((ge = (Ge = se == null ? void 0 : se.find((Y) => (Y == null ? void 0 : Y.key) === "header")) == null ? void 0 : Ge.contents) == null ? void 0 : ge[0])) == null ? void 0 : Re.map((Y) => Y == null ? void 0 : Y.prop));
734
- let cl = (Je = (pl = se == null ? void 0 : se.find((Y) => (Y == null ? void 0 : Y.key) === "tableContents")) == null ? void 0 : pl.contents) == null ? void 0 : Je.map((Y) => {
735
- if (Array.isArray(Y))
736
- Y = Y == null ? void 0 : Y.filter((_) => !(_ != null && _.id));
737
- else {
738
- let _ = {};
739
- for (let we in Y)
740
- we !== "id" && (_[we] = Y == null ? void 0 : Y[we]);
741
- Y = _;
742
- }
743
- return Y;
744
- });
745
- cl == null || cl.forEach((Y) => {
746
- Array.isArray(Y) ? w.push($n(Y, I)) : w.push(Y);
747
- });
748
- }
749
- return w;
750
- }, Mu = { class: "table-content" }, Nu = { class: "menu-config-wrap" }, Bu = ["onClick"], Fu = {
751
- key: 0,
752
- class: "viewport-wrap"
753
- }, Ru = ["onClick"], wu = { title: "选择显示列信息" }, Ku = {
754
- class: "menu-config-wrap",
755
- style: { padding: "0 0 0 16px", "box-sizing": "border-box", "min-height": "200px", width: "400px", overflow: "auto", position: "relative" }
756
- }, zu = ["title"], Ju = { class: "col-operate-wrap" }, Wu = {
757
- title: "拖拽排序列",
758
- style: { cursor: "move", color: "grey", position: "absolute", right: "15px" }
759
- }, qu = {
760
- key: 0,
761
- style: { display: "flex", "justify-content": "center", "align-items": "center" }
762
- }, Gu = { class: "pop-wrapper" }, Hu = {
763
- key: 0,
764
- class: "file-list-pop"
765
- }, Qu = ["title", "onClick"], Xu = ["onClick"], Zu = { class: "pop-view" }, Yu = { class: "pop-wrapper" }, Iu = { class: "file-list-pop" }, Vu = ["title", "onClick"], eo = ["onClick"], lo = ["onClick"], ao = { class: "form-content" }, ro = {
766
- key: 0,
767
- class: "dialog-footer"
768
- }, io = { class: "dialog-footer" }, no = { style: { display: "flex", "justify-content": "space-between", width: "100%", "align-items": "center" } }, uo = ["title"], oo = {
769
- class: "icon",
770
- style: { display: "flex", gap: "8px" }
771
- }, so = { class: "dialog-footer" }, po = { class: "form-content" }, co = {
772
- __name: "index",
773
- props: {
774
- pageLayout: {
775
- type: String,
776
- default: "vertical"
777
- },
778
- level: {
779
- type: Number,
780
- default: 1
781
- },
782
- compName: {
783
- type: String,
784
- default: "",
785
- required: !1
786
- },
787
- compNames: {
788
- type: Array,
789
- default: () => [],
790
- required: !1
791
- },
792
- compItem: {
793
- type: Object,
794
- default: () => {
795
- }
796
- },
797
- operatingForm: {
798
- type: Object,
799
- default: () => {
800
- }
801
- },
802
- cacheNewData: {
803
- type: Object,
804
- default: () => {
805
- }
806
- },
807
- config: Object,
808
- parentTableId: {
809
- type: Number,
810
- default: 0
811
- },
812
- itemData: {
813
- type: Array,
814
- default: () => []
815
- },
816
- childItemData: {
817
- type: Array,
818
- default: () => []
819
- },
820
- index: Number,
821
- isDevMode: Boolean,
822
- changedContent: {
823
- type: Object,
824
- default: () => {
825
- }
826
- },
827
- showHeader: {
828
- type: Boolean,
829
- default: !0
830
- },
831
- allowSelect: {
832
- type: Boolean,
833
- default: !1
834
- },
835
- allowOperate: {
836
- type: Boolean,
837
- default: !0
838
- },
839
- allMapContents: {
840
- type: Object,
841
- default: () => {
842
- }
843
- }
844
- },
845
- emits: ["getSliceContLength", "clickMainKey", "change", "contentChange", "onButtonClick", "contentClick", "pageChange", "rowClick", "routeUrl"],
846
- setup(z, { emit: fe }) {
847
- var Rr;
848
- const oe = W([]), w = Uu(aa), K = W(null), u = z, ye = W(u == null ? void 0 : u.allowSelect), Ue = W((Rr = u == null ? void 0 : u.config) == null ? void 0 : Rr.showIndex), ze = W(), Ee = W(!0), _l = W(!1), zl = W([
849
- {
850
- label: "排序",
851
- value: "sortable",
852
- checked: !1
853
- },
854
- {
855
- label: "筛选",
856
- value: "filterable",
857
- checked: !1
858
- },
859
- {
860
- label: "合计",
861
- value: "showSummary",
862
- checked: !1
863
- },
864
- {
865
- label: "编辑",
866
- value: "operable",
867
- checked: !1
868
- }
869
- ]), Yl = Pn(aa);
870
- let Jl = "$R";
871
- const { originalPath: Il } = ta(Yl), dl = Il.value, Te = W(!1), Me = W(!1), Ge = W(!1), ge = W(!0), Re = W([]), pl = Na({
872
- column: {},
873
- status: !1,
874
- text: "合计"
875
- }), Je = Na({
876
- currentPage: 1,
877
- pageSize: 10,
878
- total: 0,
879
- pageSizes: [5, 10, 20, 50, 100]
880
- }), se = fe, I = W([]), cl = W([]), Y = Na({ prop: "", order: null }), _ = W([]), we = W(!1), X = W(!1), Se = W(null), { isUseBackdrop: Le, initTrackFileType: fl, getFileExtension: Pl, setData: Qa, getFileInfo: hr, getFilesInfo: oi } = Qn(), Xa = W([]), Vl = W(!1), ua = W(), ul = Zn(), { importLoading: fo, activeMenuPath: Ne, contentLoading: yo, linkMenuInfo: si } = ta(ul), di = Mn(aa), Ze = Yn(aa), { extraContents: Be, cacheUpdatingData: ka, tableViewContents: Sa, tableLoading: to, pageMapState: oa, lockingPage: Fa } = ta(Ze), ee = W([]), Zl = W([]), sa = W(/* @__PURE__ */ new Map());
881
- W(!1);
882
- const Wl = W("");
883
- W();
884
- const Ra = W(!0), da = W(0), vr = W(!0), xl = W(""), ql = W(!1), pi = W({
885
- label: "查看三维模型"
886
- }), wa = W(!1), Za = W(), $l = W([]), Ml = W([]), Ka = W(!1), Aa = W([]), Gl = W([]), Nl = W([]), Ae = W([]), za = W(!1), ma = W(!1), Xl = W([]), ci = W(null), Ya = W(!1), Ia = W([]), gr = W(""), Va = W(""), Ta = In(), fi = ur(() => Ta.getConfig()), Bl = W(), gl = W(), yi = ku(aa), _a = W(), er = W(0), ti = Nn(aa), { selectIndex: hi, selectMenu: xa, selectTitle: ho } = ta(ti), { selectString: ea } = ta(yi), vi = xn(aa), { loginUserInfo: pa } = ta(vi), gi = W(720), Fl = W(!1), Ja = W(!1), Rl = W([]), wl = W(), Oa = W(!0), br = W(!0), la = W([]), bi = kn("contentRef");
887
- Sn("contentRef", bi), jl(() => {
888
- var e;
889
- return (e = ee.value) == null ? void 0 : e.length;
890
- }, (e) => {
891
- Je.total = e;
892
- }), jl(
893
- () => Sa.value,
894
- async () => {
895
- var s, c, n, f, v, x, S, T, L, O, $, d, U, M, P, b, C, k;
896
- if (((s = Sa.value) == null ? void 0 : s.length) === 0 || !((c = u == null ? void 0 : u.itemData) != null && c.find((D) => (D == null ? void 0 : D.key) === "columnPath")) || !((n = u == null ? void 0 : u.itemData) != null && n.find((D) => (D == null ? void 0 : D.key) === "pageColumn"))) return;
897
- let e = (L = (T = (S = (x = (v = (f = u == null ? void 0 : u.itemData) == null ? void 0 : f.find((D) => (D == null ? void 0 : D.key) === "pageColumn")) == null ? void 0 : v.contents) == null ? void 0 : x.split("[")) == null ? void 0 : S[1]) == null ? void 0 : T.split("]")) == null ? void 0 : L[0], l = ((U = (d = ($ = (O = u == null ? void 0 : u.itemData) == null ? void 0 : O.find((D) => (D == null ? void 0 : D.key) === "pageColumn")) == null ? void 0 : $.contents) == null ? void 0 : d.split("[")) == null ? void 0 : U[0]) + ((P = (M = Sa.value) == null ? void 0 : M.find((D) => (D == null ? void 0 : D.key) === e)) == null ? void 0 : P.value), r = ((C = (b = u == null ? void 0 : u.itemData) == null ? void 0 : b.find((D) => (D == null ? void 0 : D.key) === "pageGroup")) == null ? void 0 : C.contents) ?? "", a = await va(l, sessionStorage.getItem("systemKey"), ""), i = (k = a == null ? void 0 : a.find((D) => (D == null ? void 0 : D.name) === (r === "" ? u == null ? void 0 : u.compName : r))) == null ? void 0 : k.compData;
898
- Nr(i, u.allMapContents);
899
- },
900
- { deep: !0 }
901
- );
902
- const ki = async (e, l) => {
903
- var r, a, i, s, c;
904
- try {
905
- const n = await ia({ id: (u == null ? void 0 : u.parentTableId) || (u == null ? void 0 : u.index) });
906
- let f;
907
- ((r = n == null ? void 0 : n.data) == null ? void 0 : r.code) === 200 && (f = ((i = (a = n == null ? void 0 : n.data) == null ? void 0 : a.result) == null ? void 0 : i[0]) || null);
908
- const v = {
909
- type: "data",
910
- pageKey: u != null && u.parentTableId ? (s = f == null ? void 0 : f.key) == null ? void 0 : s.pageKey : Ne.value,
911
- tableId: (u == null ? void 0 : u.parentTableId) || (u == null ? void 0 : u.index),
912
- systemKey: sessionStorage.getItem("systemKey")
913
- }, x = l == null ? void 0 : l.map((L) => {
914
- const O = Object.keys(L), $ = {};
915
- return O.forEach((d, U) => {
916
- $[e[U]] = L[d];
917
- }), $;
918
- }), S = x == null ? void 0 : x.map((L) => ({
919
- key: v,
920
- value: {
921
- tableData: L
922
- }
923
- })), T = await Wr({ dataList: S });
924
- ((c = T == null ? void 0 : T.data) == null ? void 0 : c.code) === 200 ? (Ze.setRefreshCurStructure(!0), rl.success("导入数据成功")) : rl.error("导入数据响应失败");
925
- } catch (n) {
926
- throw rl.error("导入数据处理失败"), new Error(n);
927
- }
928
- }, Si = async (e) => {
929
- var s, c, n, f, v, x, S;
930
- let l = cl.value;
931
- l != null && l.find((T) => (e == null ? void 0 : e.key) === (T == null ? void 0 : T.key)) && (l = l == null ? void 0 : l.filter((T) => (e == null ? void 0 : e.key) !== (T == null ? void 0 : T.key))), l.push({
932
- key: e == null ? void 0 : e.key,
933
- value: [(c = e == null ? void 0 : e.value) == null ? void 0 : c[((s = e == null ? void 0 : e.value) == null ? void 0 : s.length) - 1]]
934
- });
935
- let r = Ae.value;
936
- r = r == null ? void 0 : r.map((T) => {
937
- var L, O;
938
- return (T == null ? void 0 : T.type) === "Select" && (e == null ? void 0 : e.key) === (T == null ? void 0 : T.prop) && Array.isArray(T.value) && (L = T.value) != null && L.every(($) => typeof $ == "string") && (T.selectValue = (O = l == null ? void 0 : l.find(($) => ($ == null ? void 0 : $.key) === (T == null ? void 0 : T.prop))) == null ? void 0 : O.value), T;
939
- });
940
- let a = (f = (n = r == null ? void 0 : r.find((T) => (T == null ? void 0 : T.prop) === (e == null ? void 0 : e.key))) == null ? void 0 : n.optionUrl) == null ? void 0 : f.menuId, i = r == null ? void 0 : r.find((T) => (T == null ? void 0 : T.prop) === (e == null ? void 0 : e.key));
941
- if (a) {
942
- let T = await fr(i == null ? void 0 : i.optionUrl, a), L, O = Re.value, $ = (S = (x = (v = Ae.value) == null ? void 0 : v.find((d) => {
943
- var U;
944
- return (U = i == null ? void 0 : i.optionUrl) == null ? void 0 : U.menuId;
945
- })) == null ? void 0 : x.selectValue) == null ? void 0 : S[0];
946
- if (T == null || T.forEach((d) => {
947
- var U, M, P, b, C, k, D, g, Q, B;
948
- if (a) {
949
- let G = (M = (U = Ae.value) == null ? void 0 : U.find((E) => {
950
- var ce, F;
951
- return ((ce = i == null ? void 0 : i.optionUrl) == null ? void 0 : ce.menuId) === ((F = E == null ? void 0 : E.optionUrl) == null ? void 0 : F.menuId);
952
- })) == null ? void 0 : M.prop, o = (b = (P = r == null ? void 0 : r.find((E) => (E == null ? void 0 : E.prop) === G)) == null ? void 0 : P.selectValue) == null ? void 0 : b[0];
953
- G != null && G.includes("·") && (G = (C = G == null ? void 0 : G.split("·")) == null ? void 0 : C[0], o = (Q = (g = (D = e == null ? void 0 : e.value) == null ? void 0 : D[((k = e == null ? void 0 : e.value) == null ? void 0 : k.length) - 1]) == null ? void 0 : g.split(" ")) == null ? void 0 : Q[0]), O != null && O.find((E) => (E == null ? void 0 : E.value) === $) ? L = (B = O == null ? void 0 : O.find((E) => (E == null ? void 0 : E.value) === $)) == null ? void 0 : B.objectValue : d[G] === o && (L = d);
954
- }
955
- }), L) {
956
- let d = r;
957
- d = d == null ? void 0 : d.map((U) => {
958
- var M, P, b, C, k, D;
959
- return a && (L != null && L[U == null ? void 0 : U.prop]) && xl.value === "新增" && (U == null ? void 0 : U.prop) !== (i == null ? void 0 : i.prop) ? U.value = (L == null ? void 0 : L[U == null ? void 0 : U.prop]) || (L == null ? void 0 : L[(C = (b = (P = (M = U == null ? void 0 : U.optionUrl) == null ? void 0 : M.groupSelect) == null ? void 0 : P[1]) == null ? void 0 : b.replaceAll("[", "")) == null ? void 0 : C.replaceAll("]", "")]) : U.value = (D = (k = Ae.value) == null ? void 0 : k.find((g) => (g == null ? void 0 : g.prop) === (U == null ? void 0 : U.prop))) == null ? void 0 : D.value, U;
960
- }), Ae.value = d;
961
- }
962
- }
963
- cl.value = l;
964
- }, Ai = async (e) => {
965
- var l, r, a, i, s;
966
- if ((l = e == null ? void 0 : e.toString()) != null && l.includes(".txt") || (r = e == null ? void 0 : e.toString()) != null && r.includes(".cpt") || (a = e == null ? void 0 : e.toString()) != null && a.includes(".cyd")) {
967
- const c = await ra.get(e, {
968
- responseType: "blob",
969
- // 必须设置
970
- headers: {
971
- "Content-Type": "application/json"
972
- }
973
- }), n = new Blob([c.data], {
974
- type: "application/octet-stream;charset=UTF-8"
975
- });
976
- let f = URL.createObjectURL(n);
977
- ua.value = [{
978
- name: (s = e == null ? void 0 : e.split("/")) == null ? void 0 : s[((i = e == null ? void 0 : e.split("/")) == null ? void 0 : i.length) - 1],
979
- blobUrl: f
980
- }], Vl.value = !0;
981
- }
982
- };
983
- An(() => {
984
- br.value = !1;
985
- let e = er.value;
986
- er.value = e + 1;
987
- });
988
- const kr = ur(() => {
989
- var a, i;
990
- const e = (Je.currentPage - 1) * Je.pageSize, l = e + Je.pageSize, r = (a = I.value) == null ? void 0 : a.find((s) => {
991
- var c;
992
- return (s == null ? void 0 : s.sortable) && ((c = s == null ? void 0 : s.label) == null ? void 0 : c.includes("时间"));
993
- });
994
- return r && (Y.order = "descending", Y.prop = r == null ? void 0 : r.prop), se("getSliceContLength", Je), (i = ee.value) == null ? void 0 : i.slice(e, l);
995
- }), mi = (e) => {
996
- Je.currentPage = e, se("getSliceContLength", Je);
997
- }, Ti = (e) => {
998
- var l;
999
- Je.pageSize = e, e * Je.currentPage > ((l = ee.value) == null ? void 0 : l.length) && (Je.currentPage = 1, Je.pageSize = 10, rl.warning("分页无效,返回第一页")), se("getSliceContLength", Je);
1000
- }, _i = (e, l) => {
1001
- var c, n;
1002
- const r = (n = (c = I.value) == null ? void 0 : c.map((f) => f == null ? void 0 : f.prop)) == null ? void 0 : n.filter((f) => f !== "operate");
1003
- let a;
1004
- const i = (e == null ? void 0 : e.length) === (r == null ? void 0 : r.length);
1005
- if (e != null && e.includes("序号")) return rl.error("导入的数据不需要包含序号列");
1006
- if (a = i ? e : e.slice(0, r == null ? void 0 : r.length), !(a == null ? void 0 : a.every((f) => r == null ? void 0 : r.find((v) => f === v)))) return rl.error("导入的数据表头不匹配");
1007
- ki(a, l);
1008
- }, xi = (e, l) => {
1009
- var r;
1010
- Ze.setRefreshCurStructure(!1), ((r = I.value) == null ? void 0 : r.length) === 0 || _i(e, l);
1011
- }, Oi = (e, l, r, a) => {
1012
- const i = [], s = [], c = (v) => Object.keys(v).length;
1013
- for (const v in e)
1014
- if (e[v] !== void 0) {
1015
- const x = e[v], S = [];
1016
- for (const [T, L] of Object.entries(x))
1017
- S.push(L), s.length < c(x) && s.push(T);
1018
- i.push(S);
1019
- }
1020
- i.unshift(s);
1021
- const n = Ba.aoa_to_sheet(i), f = Ba.book_new();
1022
- Ba.book_append_sheet(f, n, a), zn(f, `${l}.xlsx`), Rl.value = [];
1023
- }, Wa = async (e, l, r, a = !1, i) => {
1024
- var s, c, n, f, v, x, S, T;
1025
- try {
1026
- Ze.setRefreshCurStructure(!1);
1027
- const L = await ia({
1028
- id: u == null ? void 0 : u.index
1029
- });
1030
- if (((s = L == null ? void 0 : L.data) == null ? void 0 : s.code) === 200) {
1031
- let O = (v = (f = (n = (c = L == null ? void 0 : L.data) == null ? void 0 : c.result) == null ? void 0 : n[0]) == null ? void 0 : f.value) == null ? void 0 : v.pageData;
1032
- a ? O = {
1033
- ...O,
1034
- compData: (S = O == null ? void 0 : O.compData) == null ? void 0 : S.map((d) => {
1035
- var U;
1036
- return (d == null ? void 0 : d.key) === "header" ? {
1037
- ...d,
1038
- contents: (U = d == null ? void 0 : d.contents) == null ? void 0 : U.map((M) => ({
1039
- ...M,
1040
- [e]: r
1041
- }))
1042
- } : d;
1043
- })
1044
- } : O = {
1045
- ...O,
1046
- compData: (x = O == null ? void 0 : O.compData) == null ? void 0 : x.map((d) => {
1047
- var U, M;
1048
- return (d == null ? void 0 : d.key) === "header" ? {
1049
- ...d,
1050
- contents: (U = d == null ? void 0 : d.contents) == null ? void 0 : U.map((P) => (P == null ? void 0 : P.prop) === (l == null ? void 0 : l.prop) ? {
1051
- ...P,
1052
- [e]: r
1053
- } : P)
1054
- } : (d == null ? void 0 : d.key) === "tableToForm" && i ? {
1055
- ...d,
1056
- contents: (M = d == null ? void 0 : d.contents) == null ? void 0 : M.map((P) => (P == null ? void 0 : P.prop) === (l == null ? void 0 : l.prop) ? {
1057
- ...P,
1058
- [i]: r
1059
- } : P)
1060
- } : d;
1061
- })
1062
- };
1063
- const $ = await Un({
1064
- id: u == null ? void 0 : u.index,
1065
- value: {
1066
- pageData: O
1067
- }
1068
- });
1069
- ((T = $ == null ? void 0 : $.data) == null ? void 0 : T.code) === 200 ? (rl.success("编辑成功"), Ze.setRefreshCurStructure(!0)) : rl.error("编辑响应失败");
1070
- }
1071
- } catch (L) {
1072
- rl.error(L);
1073
- }
1074
- }, Ci = async (e, l) => {
1075
- await Wa("label", l, e);
1076
- }, Di = async (e, l) => {
1077
- await Wa("columnType", l, e, !1, "type");
1078
- }, Ui = () => {
1079
- ka.value ? Fl.value = !1 : Br();
1080
- }, Ei = (e) => {
1081
- Rl.value = e;
1082
- }, ji = (e, l) => {
1083
- wl.value === l ? Oa.value = !1 : Oa.value = !0, wl.value = l == null ? void 0 : l.changeProp;
1084
- }, Li = (e) => {
1085
- if (!e)
1086
- return;
1087
- const { item: l, value: r } = e, a = Ae.value.find((i) => i.prop == l.prop);
1088
- a && a.contents.push({
1089
- label: r,
1090
- value: r
1091
- });
1092
- }, Ca = ur(() => {
1093
- var r, a, i;
1094
- const e = (r = I.value) == null ? void 0 : r.some((s) => s == null ? void 0 : s.filterable);
1095
- return document.documentElement.style.setProperty("--ssTable-header-filter-display", e ? "inline-block" : "none"), (i = (a = I.value) == null ? void 0 : a.filter((s) => (s == null ? void 0 : s.label) !== "操作")) == null ? void 0 : i.map((s) => ({
1096
- ...s,
1097
- filterable: !!(s != null && s.filterable),
1098
- showSummary: !!(s != null && s.showSummary),
1099
- operable: !!(s != null && s.operable)
1100
- }));
1101
- }), $i = async (e, l, r) => {
1102
- const a = Z(I.value);
1103
- await Ga(), I.value = a == null ? void 0 : a.map((i) => (r == null ? void 0 : r.label) === (i == null ? void 0 : i.label) ? {
1104
- ...i,
1105
- [l]: e
1106
- } : i), await Wa(l, r, e);
1107
- }, lr = async (e, l) => {
1108
- await Wa(l, null, e, !0);
1109
- }, Pi = () => {
1110
- ql.value = !1;
1111
- }, Mi = (e) => {
1112
- se("clickTrigger", e);
1113
- }, Sr = async (e) => {
1114
- var s, c, n, f, v, x, S, T, L, O, $, d, U, M, P;
1115
- const l = e == null ? void 0 : e.row, r = e == null ? void 0 : e.rowData, a = e == null ? void 0 : e.suffix;
1116
- if ((s = l == null ? void 0 : l.toString()) != null && s.includes(".urdf") || e != null && e.isUrdf || a != null && a.includes(".urdf")) {
1117
- if (l.includes(",")) {
1118
- rl.error("当前版本仅允许单个urdf预览!");
1119
- return;
1120
- }
1121
- if (Le(l)) {
1122
- const C = {
1123
- files: [hr(l)],
1124
- data: {}
1125
- };
1126
- Qa(C);
1127
- return;
1128
- }
1129
- Aa.value = [{
1130
- url: l,
1131
- extension: Pl(l)
1132
- }], X.value = !0, Se.value = {
1133
- data: Z(r)
1134
- }, we.value = !0;
1135
- return;
1136
- }
1137
- let i = [];
1138
- if ((c = l == null ? void 0 : l.toString()) != null && c.includes(".stl") || (n = l == null ? void 0 : l.toString()) != null && n.includes(".STL") || (f = l == null ? void 0 : l.toString()) != null && f.includes(".obj") || (v = l == null ? void 0 : l.toString()) != null && v.includes(".mtl")) {
1139
- const b = (x = l == null ? void 0 : l.toString()) == null ? void 0 : x.split(","), C = oi(b), k = C == null ? void 0 : C[0];
1140
- if (Le(k == null ? void 0 : k.extension)) {
1141
- Qa({
1142
- files: C,
1143
- data: {}
1144
- });
1145
- return;
1146
- }
1147
- Aa.value = C, X.value = !1, we.value = !0;
1148
- return;
1149
- }
1150
- if ((S = l == null ? void 0 : l.toString()) != null && S.includes(".stl") || (T = l == null ? void 0 : l.toString()) != null && T.includes(".STL") || (L = l == null ? void 0 : l.toString()) != null && L.includes(".obj") || (O = l == null ? void 0 : l.toString()) != null && O.includes(".mtl") || a != null && a.includes(".stl") || a != null && a.includes(".STL") || a != null && a.includes(".obj") || a != null && a.includes(".mtl")) {
1151
- let b, C = [], k = {};
1152
- if (Array.isArray(l) ? b = l : b = l == null ? void 0 : l.split(","), b == null || b.forEach((D) => {
1153
- D.includes(".mtl") ? C.push(D) : k.blob = k.blob ? k.blob + "," + D : D;
1154
- }), (C == null ? void 0 : C.length) > 0 && (k.mtlBlobs = C), a && (k.suffix = a), (d = ($ = Object.values(k)) == null ? void 0 : $[0]) != null && d.includes("http:"))
1155
- i.push(k);
1156
- else {
1157
- const D = new Blob([k.blob], {
1158
- type: "application/octet-stream;charset=UTF-8"
1159
- });
1160
- let g = URL.createObjectURL(D), Q = "";
1161
- (U = l == null ? void 0 : l.split("/")) == null || U.forEach((B, G) => {
1162
- var o;
1163
- G === ((o = l == null ? void 0 : l.split("/")) == null ? void 0 : o.length) - 1 && (Q = B);
1164
- }), (M = k.blob) != null && M.includes(".stl") && (Q = (Q == null ? void 0 : Q.replaceAll(">", "")) + ".urdf"), ua.value = [{
1165
- name: Q,
1166
- blobUrl: g
1167
- }], Vl.value = !0;
1168
- }
1169
- } else {
1170
- const b = await ra.get(l, {
1171
- responseType: "blob",
1172
- headers: {
1173
- "Content-Type": "application/json"
1174
- }
1175
- }), C = new Blob([b.data], {
1176
- type: "application/octet-stream;charset=UTF-8"
1177
- });
1178
- let k = URL.createObjectURL(C), D = "";
1179
- if ((P = l == null ? void 0 : l.split("/")) == null || P.forEach((g, Q) => {
1180
- var B;
1181
- Q === ((B = l == null ? void 0 : l.split("/")) == null ? void 0 : B.length) - 1 && (D = g);
1182
- }), Le(D)) {
1183
- const g = fl(D), Q = hr(l);
1184
- Qa({
1185
- files: [Q],
1186
- data: {
1187
- trackFileType: g
1188
- }
1189
- });
1190
- return;
1191
- }
1192
- ua.value = [{
1193
- name: D,
1194
- blobUrl: k
1195
- }], Vl.value = !0;
1196
- }
1197
- (i == null ? void 0 : i.length) > 0 && w.setBlobUrls(i);
1198
- }, ca = (e) => {
1199
- var a, i, s, c;
1200
- if (e != null && e.downloadUrl)
1201
- return e == null ? void 0 : e.name;
1202
- const l = (c = (a = e == null ? void 0 : e.url) == null ? void 0 : a.split(".")) == null ? void 0 : c[((s = (i = e == null ? void 0 : e.url) == null ? void 0 : i.split(".")) == null ? void 0 : s.length) - 1];
1203
- return (e == null ? void 0 : e.name) + "." + l;
1204
- }, Ar = async (e) => {
1205
- let l = null, r = null;
1206
- if (e != null && e.downloadUrl) {
1207
- const i = await ar(), s = Gn.service({
1208
- lock: !0,
1209
- text: "Loading",
1210
- background: "rgba(0, 0, 0, 0.7)"
1211
- }), c = await ra.post(e == null ? void 0 : e.url, null, {
1212
- responseType: "blob",
1213
- // 必须设置
1214
- headers: {
1215
- Authorization: i,
1216
- baseURL: "http://139.196.154.85:20025",
1217
- "Content-Type": "application/json"
1218
- }
1219
- }).finally(() => {
1220
- s.close();
1221
- }), n = new Blob([c.data], {
1222
- type: "application/octet-stream;charset=UTF-8"
1223
- });
1224
- l = URL.createObjectURL(n), r = e == null ? void 0 : e.name;
1225
- } else {
1226
- const i = await dr({
1227
- url: e == null ? void 0 : e.url
1228
- });
1229
- !e.url.toUpperCase().includes(".OBJ") && !e.url.toUpperCase().includes(".STL") && !e.url.toUpperCase().includes(".MTL") && !e.url.toUpperCase().includes(".URDF") ? (l = URL.createObjectURL(i.data), r = ca(e)) : l = e == null ? void 0 : e.url;
1230
- }
1231
- if (Le(l)) {
1232
- const i = {
1233
- row: `${l}`,
1234
- suffix: Pl(r)
1235
- };
1236
- Sr(i);
1237
- return;
1238
- }
1239
- const a = {
1240
- name: r,
1241
- blobUrl: l
1242
- };
1243
- ua.value = [a], Vl.value = !0;
1244
- }, mr = async (e) => {
1245
- let l = null, r = null;
1246
- if (e != null && e.downloadUrl) {
1247
- const s = await ar(), c = await ra.post(e == null ? void 0 : e.url, null, {
1248
- responseType: "blob",
1249
- // 必须设置
1250
- headers: {
1251
- Authorization: s,
1252
- baseURL: "http://139.196.154.85:20025",
1253
- "Content-Type": "application/json"
1254
- }
1255
- }), n = new Blob([c.data], {
1256
- type: "application/octet-stream;charset=UTF-8"
1257
- });
1258
- l = URL.createObjectURL(n), r = e == null ? void 0 : e.name;
1259
- } else {
1260
- const s = await dr({
1261
- url: e == null ? void 0 : e.url
1262
- });
1263
- l = URL.createObjectURL(s.data), r = ca(e);
1264
- }
1265
- const a = {
1266
- name: r,
1267
- blobUrl: l
1268
- }, i = document.createElement("a");
1269
- i.href = a.blobUrl, i.download = a.name, i.style.display = "none", document.body.appendChild(i), i.click(), setTimeout(() => {
1270
- document.body.removeChild(i);
1271
- }, 100);
1272
- }, Ni = (e, l) => {
1273
- var a;
1274
- if (Object.values(l).length === 0) return;
1275
- let r = e;
1276
- return Object.values(l).find((i) => {
1277
- var s, c, n;
1278
- return ((s = i == null ? void 0 : i.toString()) == null ? void 0 : s.includes(".txt")) || ((c = i == null ? void 0 : i.toString()) == null ? void 0 : c.includes(".cpt")) || ((n = i == null ? void 0 : i.toString()) == null ? void 0 : n.includes(".obj"));
1279
- }) ? r = [...e, pi.value] : (a = u == null ? void 0 : u.config) != null && a.allowMove && (r = [...e, { label: "迁移" }]), r;
1280
- }, Bi = (e, l = {}) => [...e == null ? void 0 : e.values()].filter((r) => Object.keys(l).every((a) => {
1281
- var c;
1282
- const i = r[a], s = (c = l[a]) == null ? void 0 : c.toLowerCase();
1283
- return s && i && typeof i == "string" ? i.toLowerCase().includes(s) : !0;
1284
- })), Fi = () => {
1285
- _l.value = !0;
1286
- }, Tr = W([]), Ri = async (e, l, r = !1) => {
1287
- var a;
1288
- if (e) {
1289
- if (Ze.setTableLoading(!0), Tr.value = Object.values(e), e && ((a = Object.values(e)) != null && a.every((i) => !i)))
1290
- return ee.value = Zl.value;
1291
- if (r) {
1292
- ee.value = [...sa.value.values()].filter((i) => Object.values(i).some((s) => typeof s == "string" ? s == null ? void 0 : s.toLowerCase().includes(l == null ? void 0 : l.toLowerCase()) : !1));
1293
- return;
1294
- }
1295
- ee.value = Bi(sa.value, e), Ze.setTableLoading(!1);
1296
- }
1297
- }, wi = async (e) => {
1298
- }, _r = async (e, l, r, a) => {
1299
- var i, s, c, n, f, v, x, S, T, L, O, $, d, U, M, P, b, C, k, D;
1300
- if (se("clickMainKey", r), (a == null ? void 0 : a.isExistChild) === !0) {
1301
- let g = (i = a == null ? void 0 : a.columnType) == null ? void 0 : i.prop, Q = a == null ? void 0 : a.data;
1302
- if (la.value = await va(Ne.value, sessionStorage.getItem("systemKey"), ""), !la.value) {
1303
- let G = (n = (c = (s = Ne.value) == null ? void 0 : s.split("/")) == null ? void 0 : c.filter((o, E) => {
1304
- var ce, F;
1305
- return E !== ((F = (ce = Ne.value) == null ? void 0 : ce.split("/")) == null ? void 0 : F.length) - 1;
1306
- })) == null ? void 0 : n.join("/");
1307
- la.value = await va(G, sessionStorage.getItem("systemKey"), "");
1308
- }
1309
- let B = (f = la.value) == null ? void 0 : f.filter((G) => (G == null ? void 0 : G.name) === g);
1310
- la.value = B == null ? void 0 : B.map((G) => {
1311
- var o;
1312
- return G.compData = (o = G.compData) == null ? void 0 : o.map((E) => {
1313
- var ce, F;
1314
- return (E == null ? void 0 : E.key) === "tableContents" && (ce = E == null ? void 0 : E.contents) != null && ce.every((m) => m == null ? void 0 : m.find((j) => j == null ? void 0 : j.id)) && (E.contents = (F = E == null ? void 0 : E.contents) == null ? void 0 : F.filter((m) => (m == null ? void 0 : m[1]) === Q)), E;
1315
- }), G;
1316
- }), se("routeUrl", la.value, {
1317
- isEdit: !0,
1318
- routerUrl: Ne.value
1319
- });
1320
- return;
1321
- }
1322
- if ((a == null ? void 0 : a.data) === "查看" && (e != null && e.every((g) => (g == null ? void 0 : g.url) && (g == null ? void 0 : g.name)))) {
1323
- let g = Z(e);
1324
- g = await ((v = Z(g)) == null ? void 0 : v.map(async (B) => {
1325
- var E, ce, F, m;
1326
- const G = await dr({
1327
- url: B == null ? void 0 : B.url
1328
- });
1329
- let o = URL.createObjectURL(G.data);
1330
- return {
1331
- name: (B == null ? void 0 : B.name) + "." + ((m = (E = B == null ? void 0 : B.url) == null ? void 0 : E.split(".")) == null ? void 0 : m[((F = (ce = B == null ? void 0 : B.url) == null ? void 0 : ce.split(".")) == null ? void 0 : F.length) - 1]),
1332
- blobUrl: o
1333
- };
1334
- }));
1335
- let Q = await Promise.all(g);
1336
- ua.value = Q, Vl.value = !0;
1337
- }
1338
- if (Z(I.value), (a == null ? void 0 : a.isMainKey) === !0) {
1339
- ul.setActiveMenuPath(void 0), Ze.setRouteToChildPath(void 0), Ze.setFixMenuStatus(!0);
1340
- let g = (S = (x = u.itemData) == null ? void 0 : x.find((B) => (B == null ? void 0 : B.key) === "contentTableId")) == null ? void 0 : S.contents, Q = (L = (T = u.itemData) == null ? void 0 : T.find((B) => (B == null ? void 0 : B.key) === "relatedFilter")) == null ? void 0 : L.index;
1341
- if (Q !== 0) {
1342
- let B = ($ = (O = I.value) == null ? void 0 : O[Q]) == null ? void 0 : $.prop;
1343
- if ((r == null ? void 0 : r[B]) === (a == null ? void 0 : a.data)) {
1344
- let G = await ia({
1345
- id: g
1346
- }), o = (P = (M = (U = (d = G == null ? void 0 : G.data) == null ? void 0 : d.result) == null ? void 0 : U[0]) == null ? void 0 : M.key) == null ? void 0 : P.pageKey;
1347
- ul.setActiveMenuPath(o + "/" + (a == null ? void 0 : a.data));
1348
- } else {
1349
- let G = await ia({
1350
- key: {
1351
- pageKey: Z(Ne).value + "/" + (a == null ? void 0 : a.data),
1352
- systemKey: sessionStorage.getItem("systemKey")
1353
- }
1354
- });
1355
- ((C = (b = G == null ? void 0 : G.data) == null ? void 0 : b.result) == null ? void 0 : C.length) > 0 && ul.setActiveMenuPath(Z(Ne).value + "/" + (a == null ? void 0 : a.data));
1356
- }
1357
- } else {
1358
- let B = await ia({
1359
- key: {
1360
- pageKey: Z(Ne).value + "/" + (a == null ? void 0 : a.data),
1361
- systemKey: sessionStorage.getItem("systemKey")
1362
- }
1363
- });
1364
- ((D = (k = B == null ? void 0 : B.data) == null ? void 0 : k.result) == null ? void 0 : D.length) > 0 && ul.setActiveMenuPath(Z(Ne).value + "/" + (a == null ? void 0 : a.data));
1365
- }
1366
- }
1367
- }, Ki = () => {
1368
- Vl.value = !1;
1369
- }, zi = (e) => {
1370
- se("rowClick", e);
1371
- };
1372
- jl(
1373
- () => u.changedContent,
1374
- () => {
1375
- var r, a;
1376
- if (!u.changedContent) return;
1377
- let e = (r = ee.value) == null ? void 0 : r.map((i) => {
1378
- var s;
1379
- return i.id === ((s = u.changedContent) == null ? void 0 : s.id) && (i = {
1380
- ...u.changedContent,
1381
- id: u.changedContent.newId ? u.changedContent.newId : u.changedContent.id
1382
- }, delete i.newId), i;
1383
- });
1384
- const l = (a = u.itemData) == null ? void 0 : a.map((i) => ((i == null ? void 0 : i.key) === "tableContents" && (i.contents = e), i));
1385
- ee.value = e, se("contentChange", {
1386
- contents: l,
1387
- index: u.index
1388
- }), se("change", {
1389
- content: e,
1390
- index: u == null ? void 0 : u.index,
1391
- buttonName: "",
1392
- id: u == null ? void 0 : u.index
1393
- });
1394
- },
1395
- { deep: !0, immediate: !0 }
1396
- );
1397
- const Ji = () => {
1398
- }, Wi = async () => {
1399
- const e = Ne.value, l = sessionStorage.getItem("systemKey"), r = await va(e, l, ""), a = (r == null ? void 0 : r.find((n) => (n == null ? void 0 : n.name) === "方法明细")) || (r == null ? void 0 : r[0]), i = (a == null ? void 0 : a.compData) || [], s = i == null ? void 0 : i.find((n) => {
1400
- const f = n == null ? void 0 : n.key;
1401
- return f === "formContent" || f === "tableContents";
1402
- });
1403
- return s == null ? void 0 : s.contents;
1404
- }, ar = async () => `Bearer ${En.get("access-token")}`, qi = async (e, { token: l, inputData: r } = {}) => await ra.post(e, r, {
1405
- headers: {
1406
- Authorization: l
1407
- }
1408
- }).catch((i) => (ul.setImportLoading(!1), Promise.reject(i))), Gi = (e) => {
1409
- var a;
1410
- let l = {};
1411
- const r = [];
1412
- return l.form = {}, (a = Z(e)) == null || a.forEach((i, s) => {
1413
- var c, n, f, v, x, S, T, L, O, $, d, U, M, P;
1414
- if ((i == null ? void 0 : i.comp) === "Table") {
1415
- (n = (c = i == null ? void 0 : i.compData) == null ? void 0 : c.find((D) => (D == null ? void 0 : D.key) === "header")) == null || n.contents;
1416
- let b = (x = (v = (f = i == null ? void 0 : i.compData) == null ? void 0 : f.find((D) => (D == null ? void 0 : D.key) === "tableContents")) == null ? void 0 : v.contents) == null ? void 0 : x.map((D) => D.slice(1));
1417
- ($ = (O = (L = (T = (S = i == null ? void 0 : i.compData) == null ? void 0 : S.find((D) => (D == null ? void 0 : D.key) === "header")) == null ? void 0 : T.contents) == null ? void 0 : L[0]) == null ? void 0 : O[0]) == null || $.label;
1418
- let C = (U = (d = i == null ? void 0 : i.compData) == null ? void 0 : d.find((D) => (D == null ? void 0 : D.key) === "header")) == null ? void 0 : U.contents, k = [];
1419
- b == null || b.forEach((D) => {
1420
- let g = [];
1421
- D == null || D.forEach((Q, B) => {
1422
- var o;
1423
- let G = {};
1424
- ((o = C[B]) == null ? void 0 : o.label) !== "操作" && (G[C[B].label] = Q, g.push(G));
1425
- }), k.push(g);
1426
- }), l[i.name] = k;
1427
- } else {
1428
- const b = (P = (M = i.compData) == null ? void 0 : M.find((C) => (C == null ? void 0 : C.key) === "formContent")) == null ? void 0 : P.contents;
1429
- b == null || b.forEach((C) => {
1430
- var k, D;
1431
- if (C.prop !== "") {
1432
- let g = C == null ? void 0 : C.value;
1433
- Array.isArray(g) ? g = ((k = g == null ? void 0 : g[0]) == null ? void 0 : k.oldUrl) || "http://222.92.178.198:62001/" + ((D = g == null ? void 0 : g[0]) == null ? void 0 : D.url) : g = g.toString(), C = {
1434
- key: (C == null ? void 0 : C.prop) ?? (C == null ? void 0 : C.label),
1435
- value: g
1436
- }, r.push(C);
1437
- }
1438
- });
1439
- }
1440
- }), l.form = Wn(r), l;
1441
- }, Hi = (e) => {
1442
- const l = [], r = (a) => {
1443
- a && typeof a == "object" && !Array.isArray(a) ? Object.values(a).forEach(r) : l.push(a);
1444
- };
1445
- return r(e), l;
1446
- }, Qi = async (e, l, r) => {
1447
- var C, k, D, g, Q, B, G, o, E, ce, F;
1448
- ul.setImportLoading(!0), Ze.setFreshContent(!1);
1449
- let a = await Wi().catch((m) => (ul.setImportLoading(!1), Promise.reject(m)));
1450
- a = a == null ? void 0 : a.filter((m) => {
1451
- var j;
1452
- return ((j = m == null ? void 0 : m.find((re) => re == null ? void 0 : re.id)) == null ? void 0 : j.id) === (l == null ? void 0 : l.id);
1453
- });
1454
- let i = Xr([(C = I.value) == null ? void 0 : C.filter((m) => (m == null ? void 0 : m.label) !== "操作")]);
1455
- const s = (D = (k = Rn(a, i)) == null ? void 0 : k[0]) == null ? void 0 : D.find((m) => {
1456
- const j = m == null ? void 0 : m.key;
1457
- return j === "Interface" || j === "方法体";
1458
- }), c = s == null ? void 0 : s.value;
1459
- if (!c) {
1460
- console.log("未搜索到isMain, 缺少算法执行接口"), ul.setImportLoading(!1);
1461
- return;
1462
- }
1463
- const n = I.value ? Xr([I.value]) : [], f = n.find((m) => {
1464
- const j = m == null ? void 0 : m.prop;
1465
- return j === "Input1" || j === "输入数据.输入1" || j === "样本输入数据";
1466
- }), v = f == null ? void 0 : f.prop;
1467
- let x = l == null ? void 0 : l[v];
1468
- const S = await ar().catch((m) => (ul.setImportLoading(!1), Promise.reject(m)));
1469
- let T = !0, L = "";
1470
- (g = I.value) == null || g.forEach((m) => {
1471
- (m == null ? void 0 : m.prop) === v && (T = !!(m != null && m.childPath), L = m == null ? void 0 : m.childPath);
1472
- });
1473
- let O = "";
1474
- if (T) {
1475
- let m = (B = (Q = I.value) == null ? void 0 : Q.find((he) => (he == null ? void 0 : he.isMainKey) === !0)) == null ? void 0 : B.prop;
1476
- O = l == null ? void 0 : l[m];
1477
- let j = L == null ? void 0 : L.split(dl), re = [];
1478
- j == null || j.forEach((he, te) => {
1479
- (j == null ? void 0 : j.length) - 1 === te && re.push(O), re.push(he);
1480
- }), re = re == null ? void 0 : re[0];
1481
- let le = await va(re, sessionStorage.getItem("systemKey"), ""), V = le == null ? void 0 : le.filter((he) => (he == null ? void 0 : he.name) === v);
1482
- V = V == null ? void 0 : V.map((he) => {
1483
- var te;
1484
- return he.compData = (te = he == null ? void 0 : he.compData) == null ? void 0 : te.map((J) => {
1485
- var de;
1486
- return (J == null ? void 0 : J.key) === "tableContents" && (J.contents = (de = J == null ? void 0 : J.contents) == null ? void 0 : de.filter((Fe) => (Fe == null ? void 0 : Fe[1]) === (l == null ? void 0 : l[v]))), J;
1487
- }), he;
1488
- }), (!V || (V == null ? void 0 : V.length) === 0) && (V = le, V = V == null ? void 0 : V.map((he) => {
1489
- var te;
1490
- return he.compData = (te = he == null ? void 0 : he.compData) == null ? void 0 : te.map((J) => {
1491
- var de;
1492
- return (J == null ? void 0 : J.key) === "tableContents" && (J.contents = (de = J == null ? void 0 : J.contents) == null ? void 0 : de.filter((Fe) => {
1493
- var h, R;
1494
- return (Fe == null ? void 0 : Fe[1]) === (l == null ? void 0 : l[(R = (h = I == null ? void 0 : I.value) == null ? void 0 : h[0]) == null ? void 0 : R.prop]);
1495
- })), J;
1496
- }), he;
1497
- })), x = Gi(V);
1498
- }
1499
- const $ = await qi(c, {
1500
- token: S,
1501
- inputData: x
1502
- }).catch((m) => (ul.setImportLoading(!1), Promise.reject(m))), d = (G = $ == null ? void 0 : $.data) == null ? void 0 : G.data, U = n.find((m) => (m == null ? void 0 : m.prop) === "Output1"), M = U == null ? void 0 : U.prop;
1503
- let P = [], b = [];
1504
- if (d && ((o = Object.values(d)) == null ? void 0 : o.length) > 0) {
1505
- let m = [];
1506
- const j = new FormData(), re = (E = Hi(d)) == null ? void 0 : E.map(async (V) => {
1507
- var he, te;
1508
- if (!Array.isArray(V) && (V != null && V.includes("http"))) {
1509
- let J = await ra.get(V, { responseType: "blob" }), de = (te = V == null ? void 0 : V.split("/")) == null ? void 0 : te[((he = V == null ? void 0 : V.split("/")) == null ? void 0 : he.length) - 1];
1510
- j.append("files", J.data, de);
1511
- } else
1512
- m.push(V);
1513
- });
1514
- if (await Promise.all(re), !wn(j)) {
1515
- let V = await Kn(j), he = (F = (ce = V == null ? void 0 : V.data) == null ? void 0 : ce.result) == null ? void 0 : F.map((te) => {
1516
- var J, de, Fe, h, R, ue;
1517
- return {
1518
- name: (ue = (R = (h = (J = te == null ? void 0 : te.url) == null ? void 0 : J.split("/")) == null ? void 0 : h[((Fe = (de = te == null ? void 0 : te.url) == null ? void 0 : de.split("/")) == null ? void 0 : Fe.length) - 1]) == null ? void 0 : R.split(".")) == null ? void 0 : ue[0],
1519
- url: te == null ? void 0 : te.url
1520
- };
1521
- });
1522
- m = [...m, ...he];
1523
- }
1524
- let le = {};
1525
- for (let V in l)
1526
- V !== "id" && (le[V] = l[V]);
1527
- le[M] = m, b.push({
1528
- id: l == null ? void 0 : l.id,
1529
- value: {
1530
- tableData: le
1531
- }
1532
- });
1533
- }
1534
- (b == null ? void 0 : b.length) > 0 && await Dn({
1535
- dataList: b
1536
- }), (P == null ? void 0 : P.length) > 0 && await Wr({
1537
- dataList: P
1538
- }), Ea(!0), ul.setImportLoading(!1), Ze.setFreshContent(!0);
1539
- }, xr = (e, l) => (e = e == null ? void 0 : e.map((r) => {
1540
- var a, i;
1541
- return r != null && r.children && ((a = r.children) != null && a.find((s) => s.id === (l == null ? void 0 : l.id)) ? r.children = (i = r.children) == null ? void 0 : i.filter((s) => (s == null ? void 0 : s.id) !== (l == null ? void 0 : l.id)) : r.children = xr(r.children, l)), r;
1542
- }), e), Ye = Na({
1543
- title: "迁移至",
1544
- show: !1,
1545
- width: "20%",
1546
- selectRow: null,
1547
- from: u == null ? void 0 : u.index,
1548
- to: null,
1549
- contents: [],
1550
- formRules: {
1551
- groupName: [
1552
- { required: !0, message: "输入不能为空", trigger: "blur" },
1553
- {
1554
- validator: (e, l, r) => {
1555
- l === (u == null ? void 0 : u.index) ? r(new Error("选择源不能和目标源一致")) : r();
1556
- }
1557
- }
1558
- ]
1559
- },
1560
- buttonValue: [{ label: "取消", background: "#999999", color: "var(--ssbutton-theme-color)" }, {
1561
- label: "确认",
1562
- background: "var(--ssbutton-theme-bg)",
1563
- color: "var(--ssbutton-theme-color)"
1564
- }]
1565
- }), Xi = () => {
1566
- Ye.show = !1;
1567
- }, Zi = (e) => {
1568
- var l, r;
1569
- if ((e == null ? void 0 : e.buttonName) === "取消") return Ye.show = !1;
1570
- Ye.to = e == null ? void 0 : e.content, !(!(u != null && u.index) || !((l = Ye.to) != null && l.groupName)) && (u == null ? void 0 : u.index) !== ((r = Ye.to) == null ? void 0 : r.groupName) && (se("change", {
1571
- buttonName: "迁移",
1572
- value: {
1573
- from: Ye.from,
1574
- to: Ye.to,
1575
- data: Ye.selectRow
1576
- }
1577
- }), Ye.show = !1);
1578
- }, Yi = (e) => {
1579
- if (e) {
1580
- if (!Ta.validateFileSize(e.raw)) {
1581
- rl.warning(`文件大小不能超过 ${fi.value.maxSize}MB`);
1582
- return;
1583
- }
1584
- if (!Ta.validateFileType(e.raw)) {
1585
- rl.warning("请上传图片文件");
1586
- return;
1587
- }
1588
- }
1589
- }, Ii = async () => {
1590
- var e, l, r;
1591
- if (Xl.value.length === 0) {
1592
- rl.warning("请先选择要上传的图片");
1593
- return;
1594
- }
1595
- ma.value = !0;
1596
- try {
1597
- const a = Xl.value.map(async (x) => {
1598
- var L, O, $, d;
1599
- const S = new FormData();
1600
- S.append("file", x.raw, x.name);
1601
- const T = await Hn(S);
1602
- return {
1603
- name: ((O = (L = T == null ? void 0 : T.data) == null ? void 0 : L.result) == null ? void 0 : O.fileName) ?? x.name,
1604
- url: ((d = ($ = T == null ? void 0 : T.data) == null ? void 0 : $.result) == null ? void 0 : d.url) ?? ""
1605
- };
1606
- }), i = await Promise.all(a), s = Ta.extractTableHeaders(I.value), n = !1 ? Pu : await Ta.recognize(i, s);
1607
- console.log("OCR识别结果:", n);
1608
- const f = Array.isArray(n == null ? void 0 : n.result) ? n.result : [];
1609
- let v = [];
1610
- if (f.length > 0) {
1611
- const x = (e = Hr(I.value) || []) == null ? void 0 : e.filter((O) => (O == null ? void 0 : O.type) !== "operate" && (O == null ? void 0 : O.label) !== "操作" && (O == null ? void 0 : O.prop) !== "operate"), S = /* @__PURE__ */ new Map();
1612
- x == null || x.forEach((O) => {
1613
- O != null && O.label && (O != null && O.prop) && S.set(O.label, O.prop);
1614
- });
1615
- const T = Date.now(), L = (O) => `${T}_${O}`;
1616
- v = f.map((O, $) => {
1617
- const d = O != null && O.数据 && typeof (O == null ? void 0 : O.数据) == "object" ? O.数据 : {}, U = { id: L($), _isOCRRow: !0 };
1618
- for (const [M, P] of S.entries())
1619
- Object.prototype.hasOwnProperty.call(d, M) && (U[P] = d[M]);
1620
- return U;
1621
- }), ee.value = [...ee.value || [], ...v], Zl.value = [...Zl.value || [], ...v], v.forEach((O) => {
1622
- var $, d;
1623
- return (d = ($ = sa.value) == null ? void 0 : $.set) == null ? void 0 : d.call($, O.id, O);
1624
- }), _a.value = ee.value;
1625
- }
1626
- rl.success(`成功上传 ${i.length} 张图片并完成OCR识别`), se("change", {
1627
- content: ee.value,
1628
- index: u == null ? void 0 : u.index,
1629
- type: "ocrRecognitionCompleted",
1630
- buttonName: "OCR识别完成",
1631
- uploadedFiles: i,
1632
- ocrResult: n,
1633
- column: I.value
1634
- }), za.value = !1, Xl.value = [];
1635
- } catch (a) {
1636
- console.error("OCR处理失败:", a), rl.error(((r = (l = a == null ? void 0 : a.response) == null ? void 0 : l.data) == null ? void 0 : r.message) || "OCR识别失败,请重试");
1637
- } finally {
1638
- ma.value = !1;
1639
- }
1640
- }, Or = () => {
1641
- za.value = !1, Xl.value = [], ci.value = null;
1642
- }, Vi = async (e) => {
1643
- gr.value = e == null ? void 0 : e.name;
1644
- const l = e.raw;
1645
- Va.value = URL.createObjectURL(l), Ia.value = [{
1646
- name: gr.value,
1647
- blobUrl: Va.value
1648
- }], Ya.value = !0;
1649
- }, en = () => {
1650
- Ya.value = !1, Ia.value = [], Va.value = "";
1651
- }, ln = (e) => {
1652
- Xl.value = Xl.value.filter((l, r) => r !== e);
1653
- }, qa = async (e, l, r) => {
1654
- var a, i, s, c, n, f, v, x, S, T, L, O, $, d, U;
1655
- if (Wl.value = "", Ka.value = !0, Ra.value = !0, se("onButtonClick", e, l), Re.value = [], e === "删除")
1656
- Ir.confirm("是否确认删除", "温馨提示", {
1657
- confirmButtonText: "确认",
1658
- cancelButtonText: "取消",
1659
- type: "warning"
1660
- }).then(() => {
1661
- var M, P;
1662
- (M = ee.value) != null && M.find((b) => (b == null ? void 0 : b.id) === (l == null ? void 0 : l.id)) ? ee.value = (P = Z(ee.value)) == null ? void 0 : P.filter((b) => (b == null ? void 0 : b.id) !== (l == null ? void 0 : l.id)) : ee.value = xr(Z(ee.value), l), xu(_a.value, xa.value, l == null ? void 0 : l.id), Ze.setTableLoading(u == null ? void 0 : u.index), se("change", {
1663
- content: ee.value,
1664
- singleContent: l,
1665
- index: u == null ? void 0 : u.index,
1666
- type: "delete",
1667
- buttonName: e,
1668
- column: I.value
1669
- });
1670
- });
1671
- else if (e === "批量删除") {
1672
- if (((a = Rl.value) == null ? void 0 : a.length) === 0)
1673
- return rl.warning("请先勾选操作的数据");
1674
- Ir.confirm("是否确认删除", "温馨提示", {
1675
- confirmButtonText: "确认",
1676
- cancelButtonText: "取消",
1677
- type: "warning"
1678
- }).then(
1679
- () => {
1680
- var P, b;
1681
- const M = (P = Rl.value) == null ? void 0 : P.map((C) => C.id);
1682
- ee.value = (b = Z(ee.value)) == null ? void 0 : b.filter((C) => !(M != null && M.includes(C.id))), Ze.setTableLoading(u == null ? void 0 : u.index), se("change", {
1683
- content: ee.value,
1684
- singleContent: null,
1685
- selectItems: Rl.value,
1686
- index: u == null ? void 0 : u.index,
1687
- type: "batchDelete",
1688
- buttonName: e,
1689
- column: I.value
1690
- });
1691
- }
1692
- );
1693
- } else if (e === "复制新增") {
1694
- xl.value = "新增";
1695
- const M = Z(l), P = (i = I.value) == null ? void 0 : i.find((k) => k == null ? void 0 : k.isMainKey), b = P || ((s = I.value) == null ? void 0 : s[0]), C = (c = Nl.value) == null ? void 0 : c.find((k) => (k == null ? void 0 : k.label) === "新建");
1696
- await Dr(!0, C, { data: M, firstCol: b });
1697
- } else if (e === "新增")
1698
- xl.value = "新增", Ua(""), ql.value = !0;
1699
- else if (e === "编辑")
1700
- xl.value = "编辑", Ua(l), ql.value = !0;
1701
- else if (e === "查看")
1702
- xl.value = "查看", Ua(l), Ka.value = !1, Ra.value = !1, ql.value = !0;
1703
- else if (e === "查看三维模型") {
1704
- const M = {};
1705
- for (let b in l)
1706
- b !== "id" && (M[b] = l[b]);
1707
- let P = (n = Object.values(M)) == null ? void 0 : n[1];
1708
- di.setTableShowThree(P);
1709
- } else if (((f = r == null ? void 0 : r.extra) == null ? void 0 : f.type) === "modelExample")
1710
- xl.value = e, wa.value = !0;
1711
- else if (e === "新建") {
1712
- let M = oa.value, P = [];
1713
- for (let g in M)
1714
- g != null && g.includes(`loading${((v = pa.value) == null ? void 0 : v.account) || ((x = pa.value) == null ? void 0 : x.账号)}`) && (P = [...P, ...g]);
1715
- let b = [];
1716
- for (let g in M)
1717
- g != null && g.includes(`updateLoading${((S = pa.value) == null ? void 0 : S.account) || ((T = pa.value) == null ? void 0 : T.账号)}`) && (b = [...b, ...g]);
1718
- let C = P == null ? void 0 : P.map((g) => g == null ? void 0 : g.id);
1719
- const k = b == null ? void 0 : b.map((g) => g == null ? void 0 : g.id);
1720
- C = [...Z(C), ...k], (C == null ? void 0 : C.length) > 0 && (C != null && C.every((g) => g !== null && g)) && await Cn({
1721
- ids: C
1722
- });
1723
- const D = (L = Nl.value) == null ? void 0 : L.find((g) => (g == null ? void 0 : g.label) === "新建");
1724
- await Dr(!1, D);
1725
- } else if (e === "修改模板") {
1726
- let M = Z(Ne).value;
1727
- Ze.setRouteToChildPath(M), ul.setActiveMenuPath(M + dl);
1728
- } else if (e === "执行")
1729
- Qi(e, l);
1730
- else if (e != null && e.includes("导出")) {
1731
- if (e === "导出选中" && ((O = Rl.value) == null ? void 0 : O.length) === 0)
1732
- return rl.warning(`请先勾选${e}的数据`);
1733
- if (e === "导出全部" && (($ = ee.value) == null ? void 0 : $.length) === 0)
1734
- return rl.warning("暂无数据导出");
1735
- const M = (U = (d = I.value) == null ? void 0 : d.map((b) => b == null ? void 0 : b.label)) == null ? void 0 : U.filter((b) => b !== "操作"), P = e === "导出全部" ? Z(ee.value) : Z(Rl.value);
1736
- P == null || P.forEach((b) => {
1737
- b == null || delete b.id;
1738
- }), Oi(P, u == null ? void 0 : u.compName, M, u == null ? void 0 : u.compName);
1739
- } else e === "OCR识别" ? (za.value = !0, Xl.value = []) : e === "迁移" && (Ye.selectRow = l, Ye.show = !0);
1740
- }, an = async (e) => {
1741
- var r, a, i, s, c, n;
1742
- const l = await ia({
1743
- key: {
1744
- pageKey: e,
1745
- type: "structure",
1746
- systemKey: sessionStorage.getItem("systemKey")
1747
- }
1748
- });
1749
- if (((r = l == null ? void 0 : l.data) == null ? void 0 : r.code) === 200)
1750
- return Array.isArray((a = l == null ? void 0 : l.data) == null ? void 0 : a.result) && ((s = (i = l == null ? void 0 : l.data) == null ? void 0 : i.result) == null ? void 0 : s.length) > 0 ? (n = (c = l == null ? void 0 : l.data) == null ? void 0 : c.result) == null ? void 0 : n.map((f) => {
1751
- var v;
1752
- return {
1753
- id: f == null ? void 0 : f.id,
1754
- ...(v = f == null ? void 0 : f.value) == null ? void 0 : v.pageData
1755
- };
1756
- }) : [];
1757
- }, rn = async (e, l) => {
1758
- var r, a, i, s, c, n, f, v, x, S, T, L, O, $, d, U, M, P, b, C;
1759
- try {
1760
- let k, D;
1761
- const g = (r = oa.value[Ne.value + dl]) == null ? void 0 : r.filter((m) => {
1762
- var j;
1763
- return ((j = m == null ? void 0 : m.key) == null ? void 0 : j.type) === "structureMethod";
1764
- }), Q = (a = oa.value[Ne.value + dl]) == null ? void 0 : a.filter((m) => {
1765
- var j;
1766
- return ((j = m == null ? void 0 : m.key) == null ? void 0 : j.type) === "structure";
1767
- }), B = g == null ? void 0 : g.find((m) => {
1768
- var j, re;
1769
- return ((re = (j = m == null ? void 0 : m.value) == null ? void 0 : j.pageData) == null ? void 0 : re.method) === "保存";
1770
- });
1771
- if (!B) return;
1772
- const G = (n = (c = oa.value[(s = (i = B == null ? void 0 : B.value) == null ? void 0 : i.pageData) == null ? void 0 : s.path]) == null ? void 0 : c.filter((m) => {
1773
- var j;
1774
- return ((j = m == null ? void 0 : m.key) == null ? void 0 : j.type) === "data";
1775
- })) == null ? void 0 : n.find((m) => {
1776
- var j, re, le, V;
1777
- return ((re = (j = m == null ? void 0 : m.value) == null ? void 0 : j.tableData) == null ? void 0 : re.算法名称) === ((V = (le = B == null ? void 0 : B.value) == null ? void 0 : le.pageData) == null ? void 0 : V.method);
1778
- });
1779
- if (!G) return;
1780
- const o = {
1781
- buttonName: (v = (f = B == null ? void 0 : B.value) == null ? void 0 : f.pageData) == null ? void 0 : v.method,
1782
- api: (S = (x = G == null ? void 0 : G.value) == null ? void 0 : x.tableData) == null ? void 0 : S.算法体,
1783
- content: Q == null ? void 0 : Q.map((m) => {
1784
- var j;
1785
- return (j = m == null ? void 0 : m.value) == null ? void 0 : j.pageData;
1786
- }),
1787
- extraContent: [],
1788
- extraValues: (L = (T = B == null ? void 0 : B.value) == null ? void 0 : T.pageData) == null ? void 0 : L.data,
1789
- methodName: ($ = (O = B == null ? void 0 : B.value) == null ? void 0 : O.pageData) == null ? void 0 : $.path
1790
- };
1791
- if (!e) return;
1792
- const E = {
1793
- ...e,
1794
- compData: (d = e == null ? void 0 : e.compData) == null ? void 0 : d.map((m) => {
1795
- var j;
1796
- return (m == null ? void 0 : m.key) === "formContent" ? {
1797
- ...m,
1798
- contents: (j = m == null ? void 0 : m.contents) == null ? void 0 : j.map((re) => (re == null ? void 0 : re.prop) === l ? {
1799
- ...re,
1800
- value: ""
1801
- } : re)
1802
- } : m;
1803
- })
1804
- }, ce = {
1805
- key: {
1806
- pageKey: Ne.value + dl,
1807
- parentTable: "",
1808
- systemKey: sessionStorage.getItem("systemKey"),
1809
- type: "structure"
1810
- },
1811
- value: {
1812
- pageData: E
1813
- }
1814
- }, F = await ra.post(o.api, ce, {
1815
- headers: {
1816
- "Content-Type": "application/json"
1817
- }
1818
- });
1819
- return ((U = F == null ? void 0 : F.data) == null ? void 0 : U.code) === 200 && (k = (P = (M = F == null ? void 0 : F.data) == null ? void 0 : M.result) == null ? void 0 : P.latestReportCode, D = (C = (b = F == null ? void 0 : F.data) == null ? void 0 : b.result) == null ? void 0 : C.status), {
1820
- newMainKeyValue: k,
1821
- newStatus: D
1822
- };
1823
- } catch (k) {
1824
- throw rl.error(k), new Error(k);
1825
- }
1826
- }, Cr = (e, l, r, a) => {
1827
- var i;
1828
- se("contentChange", {
1829
- contents: (i = e == null ? void 0 : e.compData) == null ? void 0 : i.map((s) => {
1830
- var c;
1831
- return (s == null ? void 0 : s.key) === "formContent" ? {
1832
- ...s,
1833
- contents: (c = s == null ? void 0 : s.contents) == null ? void 0 : c.map((n) => (n == null ? void 0 : n.key) === l ? {
1834
- ...n,
1835
- value: r
1836
- } : Da.value && (n == null ? void 0 : n.prop) === Da.prop ? {
1837
- ...n,
1838
- value: Da.value
1839
- } : n)
1840
- } : s;
1841
- }),
1842
- index: e == null ? void 0 : e.id
1843
- }, a);
1844
- }, Da = Na({
1845
- prop: "状态",
1846
- value: ""
1847
- }), nn = W(["系统自动生成信息", "审批意见"]), un = async (e, l, r) => {
1848
- var f, v;
1849
- let a = e == null ? void 0 : e[l == null ? void 0 : l.prop], i = 1, s, c;
1850
- const n = Z(Ne).value + dl + a;
1851
- if (n) {
1852
- Da.value = "", s = (f = oa.value[n]) == null ? void 0 : f.filter((T) => {
1853
- var L;
1854
- return ((L = T == null ? void 0 : T.key) == null ? void 0 : L.type) === "structure";
1855
- });
1856
- const x = s == null ? void 0 : s.find((T) => {
1857
- var L, O, $;
1858
- return (($ = (O = (L = T == null ? void 0 : T.value) == null ? void 0 : L.pageData) == null ? void 0 : O.comp) == null ? void 0 : $.toUpperCase()) === "FORM";
1859
- });
1860
- c = {
1861
- ...(v = x == null ? void 0 : x.value) == null ? void 0 : v.pageData,
1862
- id: x == null ? void 0 : x.id
1863
- };
1864
- const S = await rn(c, l == null ? void 0 : l.prop);
1865
- if (Da.value = S == null ? void 0 : S.newStatus, S != null && S.newMainKeyValue) return S == null ? void 0 : S.newMainKeyValue;
1866
- }
1867
- if (ee.value.some((x) => (x == null ? void 0 : x[l == null ? void 0 : l.prop]) === a)) {
1868
- const x = a;
1869
- for (; ee.value.some((S) => (S == null ? void 0 : S[l == null ? void 0 : l.prop]) === `${x}(${i})`); )
1870
- i++;
1871
- a = `${x}(${i})`;
1872
- }
1873
- return a;
1874
- }, Dr = async (e, l, r) => {
1875
- var c, n, f, v, x, S, T, L;
1876
- let a, i;
1877
- const s = await un(r == null ? void 0 : r.data, r == null ? void 0 : r.firstCol);
1878
- if (e ? (a = Z(Ne).value + dl + ((v = r == null ? void 0 : r.data) == null ? void 0 : v[(f = r == null ? void 0 : r.firstCol) == null ? void 0 : f.prop]), i = Z(Ne).value + dl + s) : (a = Z(Ne).value + dl, i = Z(a) + `loading${((c = pa.value) == null ? void 0 : c.account) || ((n = pa.value) == null ? void 0 : n.账号)}`), l) {
1879
- const O = (S = (x = oa.value[i]) == null ? void 0 : x.filter(($) => {
1880
- var d;
1881
- return ((d = $ == null ? void 0 : $.key) == null ? void 0 : d.parentTable) === "";
1882
- })) == null ? void 0 : S.map(($) => {
1883
- var d;
1884
- return {
1885
- id: $ == null ? void 0 : $.id,
1886
- ...(d = $ == null ? void 0 : $.value) == null ? void 0 : d.pageData
1887
- };
1888
- });
1889
- if ((O == null ? void 0 : O.length) > 0)
1890
- if (e) {
1891
- const $ = O == null ? void 0 : O.find((d) => {
1892
- var U;
1893
- return ((U = d == null ? void 0 : d.comp) == null ? void 0 : U.toUpperCase()) === "FORM";
1894
- });
1895
- $ && Cr($, (T = r == null ? void 0 : r.firstCol) == null ? void 0 : T.label, s, Ne.value);
1896
- } else
1897
- Ze.setRouteToChildPath(Z(Ne).value), ul.setActiveMenuPath(i);
1898
- else if (await Fn(a, i, null, null, e ? nn.value : null), e) {
1899
- const $ = await an(i);
1900
- if (($ == null ? void 0 : $.length) > 0) {
1901
- const d = $ == null ? void 0 : $.find((U) => {
1902
- var M;
1903
- return ((M = U == null ? void 0 : U.comp) == null ? void 0 : M.toUpperCase()) === "FORM";
1904
- });
1905
- d && Cr(d, (L = r == null ? void 0 : r.firstCol) == null ? void 0 : L.label, s, Ne.value);
1906
- }
1907
- } else
1908
- Ze.setRouteToChildPath(Z(Ne).value), ul.setActiveMenuPath(i);
1909
- } else
1910
- e ? (Wl.value = "", gl.value = r == null ? void 0 : r.data, Ea(!0, r == null ? void 0 : r.firstCol, s)) : (Ze.setRouteToChildPath(Z(Ne).value), ul.setActiveMenuPath(i));
1911
- }, on = () => {
1912
- we.value = !1, Aa.value = [], X.value = !1;
1913
- }, Ua = (e) => {
1914
- var c, n, f, v, x, S, T, L, O, $, d, U, M, P, b, C, k, D, g, Q, B, G;
1915
- const l = [];
1916
- let r = [];
1917
- for (let o in e)
1918
- Array.isArray(e == null ? void 0 : e[o]) && r.push(o);
1919
- _.value = Z(I.value), (n = ga((c = Z(I.value)) == null ? void 0 : c.filter((o) => (o == null ? void 0 : o.label) !== "操作"))) == null || n.forEach((o, E) => {
1920
- var ce, F, m;
1921
- r.find((j) => j === (o == null ? void 0 : o.prop)) || (o != null && o.formType && ((ce = o == null ? void 0 : o.formType) == null ? void 0 : ce.toUpperCase()) === "SELECT" || o != null && o.menuId ? l.push({
1922
- label: (F = o == null ? void 0 : o.prop) != null && F.includes(".") ? o == null ? void 0 : o.prop : (o == null ? void 0 : o.label) || (o == null ? void 0 : o.prop) || "",
1923
- name: (o == null ? void 0 : o.prop) ?? "t" + E,
1924
- prop: o == null ? void 0 : o.prop,
1925
- type: "Select",
1926
- // (!t?.formType || t?.formType === '') ? 'Input' : t?.formType,
1927
- value: (e == null ? void 0 : e[o == null ? void 0 : o.prop]) ?? (o == null ? void 0 : o.value) ?? "",
1928
- id: (o == null ? void 0 : o.id) ?? E,
1929
- contents: (o == null ? void 0 : o.options) ?? [],
1930
- width: 1,
1931
- isFormColHidden: o == null ? void 0 : o.isFormColHidden,
1932
- relatedValueId: o == null ? void 0 : o.relatedValueId,
1933
- disabled: o == null ? void 0 : o.disabled,
1934
- optionUrl: {
1935
- groupSelect: o == null ? void 0 : o.groupSelect,
1936
- menuSelect: o == null ? void 0 : o.formMenuSelect,
1937
- type: "Select",
1938
- selectRelateType: o == null ? void 0 : o.selectRelateType,
1939
- allSelectionContents: (o == null ? void 0 : o.allSelectionContents) ?? [],
1940
- selectFilter: o == null ? void 0 : o.selectFilter,
1941
- menuId: o == null ? void 0 : o.menuId,
1942
- filterContent: o == null ? void 0 : o.filterContent
1943
- }
1944
- }) : l.push({
1945
- label: (m = o == null ? void 0 : o.prop) != null && m.includes(".") ? o == null ? void 0 : o.prop : (o == null ? void 0 : o.label) || (o == null ? void 0 : o.prop) || "",
1946
- prop: o == null ? void 0 : o.prop,
1947
- name: (o == null ? void 0 : o.prop) ?? "t" + E,
1948
- type: !(o != null && o.formType) || (o == null ? void 0 : o.formType) === "" ? "Input" : o == null ? void 0 : o.formType,
1949
- value: (e == null ? void 0 : e[o == null ? void 0 : o.prop]) ?? (o == null ? void 0 : o.value) ?? "",
1950
- id: (o == null ? void 0 : o.id) ?? E,
1951
- contents: (o == null ? void 0 : o.options) ?? [],
1952
- width: 1,
1953
- isFormColHidden: o == null ? void 0 : o.isFormColHidden,
1954
- disabled: o == null ? void 0 : o.disabled,
1955
- relatedValueId: o == null ? void 0 : o.relatedValueId
1956
- }));
1957
- }), e === "" || !e || (Wl.value = (e == null ? void 0 : e.id) ?? "");
1958
- let a = ga((f = Z(I.value)) == null ? void 0 : f.filter((o) => (o == null ? void 0 : o.label) !== "操作"));
1959
- $l.value && ((v = $l.value) == null ? void 0 : v.length) > 0 && ($l.value = (x = Z($l).value) == null ? void 0 : x.map((o) => {
1960
- var ce;
1961
- let E = (o == null ? void 0 : o.prop) || ((ce = a == null ? void 0 : a.find((F) => (F == null ? void 0 : F.label) === (o == null ? void 0 : o.label))) == null ? void 0 : ce.prop);
1962
- return E && (o.value = e[E]), o;
1963
- })), Ae.value = $l.value && ((S = $l.value) == null ? void 0 : S.length) > 0 ? Bn($l.value) : l;
1964
- let i = [], s = (T = u.itemData) == null ? void 0 : T.filter((o) => (o == null ? void 0 : o.key) === "filterAllType");
1965
- if ((s == null ? void 0 : s.length) > 0 && (i = (s == null ? void 0 : s.map((E) => E == null ? void 0 : E.value)).flat()), (i == null ? void 0 : i.length) > 0) {
1966
- let o = (O = i == null ? void 0 : i.filter((F) => {
1967
- var m;
1968
- return (m = F == null ? void 0 : F.content) == null ? void 0 : m.includes("@Type");
1969
- })) == null ? void 0 : O[((L = i == null ? void 0 : i.filter((F) => {
1970
- var m;
1971
- return (m = F == null ? void 0 : F.content) == null ? void 0 : m.includes("@Type");
1972
- })) == null ? void 0 : L.length) - 1];
1973
- if (o != null && o.content) {
1974
- let F = (U = (d = ($ = o == null ? void 0 : o.content) == null ? void 0 : $.replace(":", Jl)) == null ? void 0 : d.split(Jl)) == null ? void 0 : U[1];
1975
- if (((M = F == null ? void 0 : F.trim()) == null ? void 0 : M.toUpperCase()) === "MANUAL") {
1976
- let m = (D = (k = (P = u.itemData) == null ? void 0 : P.filter((j) => (j == null ? void 0 : j.key) === "contentTableId")) == null ? void 0 : k[((C = (b = u.itemData) == null ? void 0 : b.filter((j) => (j == null ? void 0 : j.key) === "contentTableId")) == null ? void 0 : C.length) - 1]) == null ? void 0 : D.contents;
1977
- Ae.value = (g = Ae.value) == null ? void 0 : g.map((j, re) => {
1978
- var le, V;
1979
- return (le = j == null ? void 0 : j.optionUrl) != null && le.menuId && (j.type = "Select", (V = j == null ? void 0 : j.optionUrl) != null && V.menuId && (j.optionUrl.menuId = j.optionUrl.menuId ?? m, j.optionUrl.menuFilter = i, xl.value === "新增" && (j.optionUrl.multiple = !0, j.optionUrl.multipleLimit = 5))), j;
1980
- });
1981
- }
1982
- }
1983
- let E = (Q = Ae.value) == null ? void 0 : Q.filter((F) => {
1984
- var m, j;
1985
- return ((m = F == null ? void 0 : F.optionUrl) == null ? void 0 : m.menuId) && ((j = F == null ? void 0 : F.optionUrl) == null ? void 0 : j.menuId) !== "";
1986
- }), ce;
1987
- if (E == null || E.forEach((F) => {
1988
- var j, re;
1989
- if (ce !== void 0) return;
1990
- let m = (j = F == null ? void 0 : F.optionUrl) == null ? void 0 : j.menuId;
1991
- ((re = E == null ? void 0 : E.filter((le) => {
1992
- var V;
1993
- return ((V = le == null ? void 0 : le.optionUrl) == null ? void 0 : V.menuId) === m;
1994
- })) == null ? void 0 : re.length) > 1 && (ce = m);
1995
- }), E = E == null ? void 0 : E.filter((F) => {
1996
- var m;
1997
- return ((m = F == null ? void 0 : F.optionUrl) == null ? void 0 : m.menuId) === ce;
1998
- }), (E == null ? void 0 : E.length) > 1) {
1999
- let F = E == null ? void 0 : E.map((le) => le == null ? void 0 : le.prop), m = E == null ? void 0 : E.map((le) => le == null ? void 0 : le.label), j = E == null ? void 0 : E.map((le) => le == null ? void 0 : le.value), re = (B = Z(E)) == null ? void 0 : B[0];
2000
- re.label = m == null ? void 0 : m.join("·"), re.value = j == null ? void 0 : j.join(" "), re.value.trim() === "" && (re.value = ""), re.prop = F == null ? void 0 : F.join("·"), re.usingType = "parent", Ae.value.unshift(re), Ae.value = (G = Ae.value) == null ? void 0 : G.map((le) => (F != null && F.find((V) => V === (le == null ? void 0 : le.prop)) && (le.isFormColHidden = !0), le));
2001
- }
2002
- }
2003
- }, sn = () => {
2004
- var l;
2005
- const e = (l = K.value) == null ? void 0 : l.$el;
2006
- e && Jn.create(e, {
2007
- animation: 150,
2008
- handle: ".col-drag-icon",
2009
- ghostClass: "sortable-ghost",
2010
- onEnd: (r) => {
2011
- var c;
2012
- const { oldIndex: a, newIndex: i } = r;
2013
- if (a === i) return;
2014
- const s = Ca.value.splice(a, 1)[0];
2015
- Ca.value.splice(i, 0, s), I.value = (c = I.value) == null ? void 0 : c.slice().sort((n, f) => {
2016
- if (n.label === "操作") return 1;
2017
- if (f.label === "操作") return -1;
2018
- const v = Ca.value.findIndex((S) => S.label === n.label), x = Ca.value.findIndex((S) => S.label === f.label);
2019
- return v - x;
2020
- });
2021
- }
2022
- });
2023
- };
2024
- tr(() => {
2025
- Za.value = window.innerWidth - 240 * 2;
2026
- });
2027
- const dn = () => {
2028
- Ga(() => {
2029
- sn();
2030
- });
2031
- }, rr = (e, l) => {
2032
- var a;
2033
- if (!e && !(e != null && e.children)) return {
2034
- contents: e,
2035
- currentSelectContents: void 0
2036
- };
2037
- let r;
2038
- return e.children = (a = e.children) == null ? void 0 : a.map((i) => {
2039
- var s, c;
2040
- if ((i == null ? void 0 : i.id) === Wl.value) {
2041
- let n = {};
2042
- for (let f in i) {
2043
- let v = (s = l == null ? void 0 : l.find((x) => (x == null ? void 0 : x.prop) === f)) == null ? void 0 : s.label;
2044
- v ? n[f] = (c = gl.value) == null ? void 0 : c[v] : n[f] = i[f];
2045
- }
2046
- i = Object.assign(n, gl.value), r = i;
2047
- } else {
2048
- let n = rr(i, l);
2049
- i = n == null ? void 0 : n.contents, r = n == null ? void 0 : n.currentSelectContents;
2050
- }
2051
- return i;
2052
- }), {
2053
- contents: e,
2054
- currentSelectContents: r
2055
- };
2056
- }, Ur = (e, l) => {
2057
- let r, a;
2058
- return e != null && e.find((i) => (i == null ? void 0 : i.id) === Wl.value) ? r = e == null ? void 0 : e.map((i) => {
2059
- var s, c;
2060
- if ((i == null ? void 0 : i.id) === Wl.value) {
2061
- let n = {};
2062
- for (let f in i) {
2063
- let v = (s = l == null ? void 0 : l.find((x) => (x == null ? void 0 : x.prop) === f)) == null ? void 0 : s.label;
2064
- v ? n[f] = (c = gl.value) == null ? void 0 : c[v] : n[f] = i[f];
2065
- }
2066
- i = Object.assign(n, gl.value), a = i;
2067
- }
2068
- return i;
2069
- }) : r = e == null ? void 0 : e.map((i) => {
2070
- var s, c, n, f;
2071
- if ((i == null ? void 0 : i.id) === Wl.value) {
2072
- let v = {};
2073
- for (let x in i) {
2074
- let S = (s = l == null ? void 0 : l.find((T) => (T == null ? void 0 : T.prop) === x)) == null ? void 0 : s.label;
2075
- S ? v[x] = (c = gl.value) == null ? void 0 : c[S] : v[x] = i[x];
2076
- }
2077
- i = Object.assign(v, gl.value), a = i;
2078
- } else
2079
- i = (n = rr(i, l)) == null ? void 0 : n.contents, a = (f = rr(i, l)) == null ? void 0 : f.currentSelectContents;
2080
- return i;
2081
- }), {
2082
- newContents: r,
2083
- currentSelectContents: a
2084
- };
2085
- }, Er = (e, l, r) => {
2086
- var a, i;
2087
- 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 && ((i = e.children) == null ? void 0 : i.length) > 0 && (e.children = e.children.map(Er)), e;
2088
- }, ir = (e) => {
2089
- var r;
2090
- const l = [];
2091
- return l.push({ ...e }), e != null && e.children && Array.isArray(e.children) && ((r = e.children) == null || r.forEach((a) => {
2092
- l.push(...ir(a));
2093
- })), (l == null ? void 0 : l.length) > 0 ? l == null ? void 0 : l.map((a) => {
2094
- const i = { ...a };
2095
- return delete i.children, i;
2096
- }) : [];
2097
- }, Ea = (e = !0, l, r) => {
2098
- var v, x, S, T, L, O, $, d, U, M, P, b, C, k, D, g, Q, B, G, o, E, ce, F, m, j, re, le, V, he, te;
2099
- let a = ga((v = Z(I.value)) == null ? void 0 : v.filter((J) => (J == null ? void 0 : J.label) !== "操作")), i, s = Z(ee.value);
2100
- if (!gl.value) {
2101
- ql.value = !1;
2102
- return;
2103
- }
2104
- if (Wl.value === "") {
2105
- da.value++;
2106
- let J;
2107
- l && r ? J = {
2108
- id: da.value.toString(),
2109
- [l == null ? void 0 : l.prop]: r,
2110
- children: gl.value.children
2111
- } : J = { id: da.value.toString() }, J != null && J.children && (J = {
2112
- ...J,
2113
- children: (x = J.children) == null ? void 0 : x.map((de) => Er(de, l, r))
2114
- }), s.push(Object.assign(gl.value, J)), i = Object.assign(gl.value, J);
2115
- } else
2116
- s = (S = Ur(s, a)) == null ? void 0 : S.newContents, i = (T = Ur(s, a)) == null ? void 0 : T.currentSelectContents;
2117
- const c = (L = u.itemData) == null ? void 0 : L.filter((J) => (J == null ? void 0 : J.key) === "childTree")[0];
2118
- if (((O = c == null ? void 0 : c.contents) == null ? void 0 : O.length) > 0) {
2119
- xl.value = "编辑";
2120
- const J = [];
2121
- s == null || s.forEach((de, Fe) => {
2122
- var R;
2123
- let h = {};
2124
- if (Array.isArray(de)) {
2125
- let ue = [];
2126
- de == null || de.filter((be) => !(be != null && be.id)).forEach((be, xe) => {
2127
- var p, ie, $e, A, je, Pe, Qe;
2128
- if ((ie = (p = Bl.value) == null ? void 0 : p[xe]) != null && ie.prop && !Array.isArray(be)) {
2129
- let He = {};
2130
- He[Bl.value[xe].column] = be, Be != null && Be.value && (($e = Be == null ? void 0 : Be.value) == null ? void 0 : $e.length) > 0 && ((A = Be == null ? void 0 : Be.value) != null && A.find((De) => JSON.stringify(De == null ? void 0 : De[0]) === JSON.stringify(He))) && (ue = (je = Be == null ? void 0 : Be.value) == null ? void 0 : je.find((De) => JSON.stringify(De == null ? void 0 : De[0]) === JSON.stringify(He))), ue && ue.length > 0 ? h[Bl.value[xe].prop] = ue != null && ue.find((De) => {
2131
- var Ke;
2132
- return ((Ke = Object.keys(De)) == null ? void 0 : Ke[0]) === Bl.value[xe].column;
2133
- }) ? (Pe = ue == null ? void 0 : ue.find((De) => {
2134
- var Ke;
2135
- return ((Ke = Object.keys(De)) == null ? void 0 : Ke[0]) === Bl.value[xe].column;
2136
- })) == null ? void 0 : Pe[Bl.value[xe].column] : be : h[Bl.value[xe].prop] = be;
2137
- } else Array.isArray(be) && ((Qe = Bl.value[xe]) != null && Qe.prop ? h[Bl.value[xe].prop] = be : h.children = yr(be, Bl.value));
2138
- });
2139
- } else
2140
- h = de;
2141
- Array.isArray(de) && de.some((ue) => ue == null ? void 0 : ue.id) ? J.push(Object.assign(h, { id: (R = de == null ? void 0 : de.find((ue) => ue.id)) == null ? void 0 : R.id })) : h.id ? J.push(h) : J.push(Object.assign(h, { id: Fe.toString() }));
2142
- }), ee.value = Mr(J, c, I.value);
2143
- }
2144
- $r(ee.value), _a.value = ee.value;
2145
- const n = Cu(_a.value, xa.value, s);
2146
- let f = [];
2147
- if (ka.value ? (f = ($ = Z(ka).value.singleContent) == null ? void 0 : $.filter((J) => (J == null ? void 0 : J.id) !== (i == null ? void 0 : i.id)), f.push(i)) : f = [i], Fl.value) {
2148
- const J = {
2149
- content: n,
2150
- singleContent: ((d = c == null ? void 0 : c.contents) == null ? void 0 : d.length) > 0 ? f == null ? void 0 : f.flatMap(ir) : f,
2151
- index: u == null ? void 0 : u.index,
2152
- buttonName: "编辑",
2153
- column: I.value,
2154
- parentTableId: u == null ? void 0 : u.parentTableId
2155
- };
2156
- Ze.setCacheUpdatingData(J);
2157
- }
2158
- if (e) {
2159
- let J = (b = (P = (M = (U = u.itemData) == null ? void 0 : U.find((h) => (h == null ? void 0 : h.key) === "filterAllType")) == null ? void 0 : M.value) == null ? void 0 : P.find((h) => (h == null ? void 0 : h.value) === "onConditionContents")) == null ? void 0 : b.content, de = (C = u.itemData) == null ? void 0 : C.filter((h) => (h == null ? void 0 : h.key) === "filterAllType");
2160
- de = Array.from(
2161
- new Map(
2162
- de.filter(Boolean).map((h, R) => [h.value, { ...h, _idx: R }])
2163
- // 2. 带索引,保证顺序
2164
- ).values()
2165
- // 3. Map 自动保留“后者”
2166
- ).sort((h, R) => h._idx - R._idx).map(({ _idx: h, ...R }) => R), de = (k = de == null ? void 0 : de[(de == null ? void 0 : de.length) - 1]) == null ? void 0 : k.value;
2167
- const Fe = {
2168
- content: n,
2169
- singleContent: ((D = c == null ? void 0 : c.contents) == null ? void 0 : D.length) > 0 ? ir(i) : i,
2170
- index: u == null ? void 0 : u.index,
2171
- buttonName: xl.value,
2172
- column: I.value,
2173
- parentTableId: u == null ? void 0 : u.parentTableId,
2174
- filter: J,
2175
- allFilter: de,
2176
- pathIndex: (Q = (g = u.itemData) == null ? void 0 : g.find((h) => (h == null ? void 0 : h.key) === "relatedFilter")) == null ? void 0 : Q.index,
2177
- rowContents: Ae.value,
2178
- addArrayValues: Re.value
2179
- };
2180
- Ze.setTableLoading(u == null ? void 0 : u.index), ql.value = !1, gl.value = void 0, se("change", Fe);
2181
- }
2182
- if ((o = (G = (B = Ae.value) == null ? void 0 : B[0]) == null ? void 0 : G.optionUrl) != null && o.menuId) {
2183
- ql.value = !1;
2184
- let J = (E = u.itemData) == null ? void 0 : E.filter((de) => (de == null ? void 0 : de.key) === "filterAllType");
2185
- if ((J == null ? void 0 : J.length) > 0) {
2186
- let de = J == null ? void 0 : J.map((R) => R == null ? void 0 : R.value), Fe = (m = (F = (ce = de.flat().find((R) => {
2187
- var ue;
2188
- return (ue = R == null ? void 0 : R.content) == null ? void 0 : ue.includes("@Num");
2189
- })) == null ? void 0 : ce.content) == null ? void 0 : F.split(":")) == null ? void 0 : m[1];
2190
- ((le = (re = (j = de.flat().find((R) => {
2191
- var ue;
2192
- return (ue = R == null ? void 0 : R.content) == null ? void 0 : ue.includes("@Type:");
2193
- })) == null ? void 0 : j.content) == null ? void 0 : re.split(":")) == null ? void 0 : le[1]) !== "Manual" && (Fe = parseInt(Fe), ee.value = (te = ee.value) == null ? void 0 : te.slice(((V = ee.value) == null ? void 0 : V.length) - Fe, (he = ee.value) == null ? void 0 : he.length));
2194
- }
2195
- }
2196
- };
2197
- mn(() => {
2198
- I.value = [], ee.value = [], _.value = [], Xa.value = [], $l.value = [], Ml.value = [], Aa.value = [], Gl.value = [], Ae.value = [], Rl.value = [], K.value = null;
2199
- });
2200
- const jr = async (e, l, r) => {
2201
- var v, x, S, T, L, O, $, d, U, M, P;
2202
- wl.value = r == null ? void 0 : r.prop;
2203
- const a = Z(u.itemData), i = a == null ? void 0 : a.map((b) => {
2204
- var C;
2205
- return (b == null ? void 0 : b.key) === "header" && ((C = b.contents) == null || C.map((k, D) => {
2206
- var g, Q, B, G, o, E, ce, F, m, j, re, le, V, he, te, J, de, Fe, h;
2207
- return k.type = k != null && k.type ? k.type : (G = (B = (Q = (g = k == null ? void 0 : k.key) == null ? void 0 : g.split("$")) == null ? void 0 : Q[1]) == null ? void 0 : B.split("(")) != null && G[0] ? (E = (o = pr) == null ? void 0 : o.find((R) => {
2208
- var ue, be, xe, p;
2209
- return (R == null ? void 0 : R.key) === ((p = (xe = (be = (ue = k == null ? void 0 : k.key) == null ? void 0 : ue.split("$")) == null ? void 0 : be[1]) == null ? void 0 : xe.split("(")) == null ? void 0 : p[0]);
2210
- })) == null ? void 0 : E.value : "Input", k.options = k != null && k.options ? k.options : ((m = (F = (ce = k == null ? void 0 : k.key) == null ? void 0 : ce.split("$")) == null ? void 0 : F[1]) == null ? void 0 : m.length) > 0 ? (V = (le = cr((re = (j = k == null ? void 0 : k.key) == null ? void 0 : j.split("$")) == null ? void 0 : re[1])) == null ? void 0 : le.split(",")) == null ? void 0 : V.map((R) => ({
2211
- label: R,
2212
- value: R
2213
- })) : [], (he = k == null ? void 0 : k.key) != null && he.includes("$") && (k.key = (J = (te = k == null ? void 0 : k.key) == null ? void 0 : te.split("$")) == null ? void 0 : J[0]), k.value = (de = Object.values(l)) == null ? void 0 : de[D], k.optionUrl = k != null && k.formMenuSelect && ((Fe = k == null ? void 0 : k.formMenuSelect) == null ? void 0 : Fe.length) > 0 ? {
2214
- groupSelect: (h = k == null ? void 0 : k.groupSelect) == null ? void 0 : h.split(/[::]/).map((R) => R.trim()),
2215
- menuSelect: k == null ? void 0 : k.formMenuSelect,
2216
- selectRelateType: "",
2217
- type: (k == null ? void 0 : k.formType) ?? (k != null && k.groupSelect ? "Select" : "")
2218
- } : null, k;
2219
- })), b;
2220
- });
2221
- let s = Z(Ae.value), c = (x = (v = Z(i)) == null ? void 0 : v.find((b) => (b == null ? void 0 : b.key) === "header")) == null ? void 0 : x.contents;
2222
- s = s == null ? void 0 : s.map((b) => {
2223
- var C;
2224
- return b.value = (C = c == null ? void 0 : c.find((k, D) => D === (b == null ? void 0 : b.id))) == null ? void 0 : C.value, b;
2225
- });
2226
- let n = "", f = (L = (T = (S = Z(i)) == null ? void 0 : S.find((b) => (b == null ? void 0 : b.key) === "header")) == null ? void 0 : T.contents) == null ? void 0 : L.find((b, C) => {
2227
- var k, D, g;
2228
- return (b == null ? void 0 : b.label) === wl.value || (C == null ? void 0 : C.toString()) === ((g = (D = (k = wl.value) == null ? void 0 : k.split("a")) == null ? void 0 : D[1]) == null ? void 0 : g.toString());
2229
- });
2230
- if ((d = ($ = (O = Z(i)) == null ? void 0 : O.find((b) => (b == null ? void 0 : b.key) === "header")) == null ? void 0 : $.contents) == null || d.forEach((b) => {
2231
- var C, k, D, g, Q;
2232
- n === "" && ((D = (k = (C = b == null ? void 0 : b.optionUrl) == null ? void 0 : C.groupSelect) == null ? void 0 : k[1]) != null && D.includes("[")) && (n = (Q = (g = b == null ? void 0 : b.optionUrl) == null ? void 0 : g.groupSelect) == null ? void 0 : Q[1]);
2233
- }), (U = f == null ? void 0 : f.optionUrl) != null && U.menuSelect) {
2234
- let b = await fr(f), C;
2235
- if (b == null || b.forEach((k) => {
2236
- var D, g, Q, B, G, o, E, ce, F, m;
2237
- n === ((g = (D = f == null ? void 0 : f.optionUrl) == null ? void 0 : D.groupSelect) == null ? void 0 : g[1]) && ((G = (B = (Q = f == null ? void 0 : f.optionUrl) == null ? void 0 : Q.groupSelect) == null ? void 0 : B[1]) != null && G.includes("[")) && ((m = Z(k)) == null ? void 0 : m[(F = (ce = (E = (o = f == null ? void 0 : f.optionUrl) == null ? void 0 : o.groupSelect) == null ? void 0 : E[1]) == null ? void 0 : ce.replaceAll("[", "")) == null ? void 0 : F.replaceAll("]", "")]) === (f == null ? void 0 : f.value) && (C = k);
2238
- }), C) {
2239
- let k = Z(s);
2240
- k = k == null ? void 0 : k.map((g) => {
2241
- var Q, B, G, o, E, ce, F, m, j, re, le;
2242
- return (C != null && C[g == null ? void 0 : g.label] || C != null && C[(o = (G = (B = (Q = g == null ? void 0 : g.optionUrl) == null ? void 0 : Q.groupSelect) == null ? void 0 : B[1]) == null ? void 0 : G.replaceAll("[", "")) == null ? void 0 : o.replaceAll("]", "")]) && ((F = (ce = (E = g == null ? void 0 : g.optionUrl) == null ? void 0 : E.groupSelect) == null ? void 0 : ce[1]) != null && F.includes("[")) && (g.value = (C == null ? void 0 : C[g == null ? void 0 : g.label]) || (C == null ? void 0 : C[(le = (re = (j = (m = g == null ? void 0 : g.optionUrl) == null ? void 0 : m.groupSelect) == null ? void 0 : j[1]) == null ? void 0 : re.replaceAll("[", "")) == null ? void 0 : le.replaceAll("]", "")])), g;
2243
- }), ee.value = (M = Z(ee.value)) == null ? void 0 : M.map((g) => {
2244
- if ((g == null ? void 0 : g.id) === (l == null ? void 0 : l.id)) {
2245
- const Q = {};
2246
- return k == null || k.forEach((B) => {
2247
- Q[B.name] = B.value;
2248
- }), Q.id = g == null ? void 0 : g.id, Q;
2249
- }
2250
- return g;
2251
- });
2252
- let D = Z(k);
2253
- D = D == null ? void 0 : D.map((g) => {
2254
- var Q, B, G, o;
2255
- return (B = (Q = g == null ? void 0 : g.optionUrl) == null ? void 0 : Q.menuSelect) != null && B.some((E) => E == null ? void 0 : E.includes) && (g.optionUrl.menuSelect = (o = (G = g == null ? void 0 : g.optionUrl) == null ? void 0 : G.menuSelect) == null ? void 0 : o.map((E) => {
2256
- var ce, F, m, j;
2257
- if (E != null && E.includes("[")) {
2258
- let re = (F = (ce = E == null ? void 0 : E.replaceAll("[", "").replaceAll("]", "")) == null ? void 0 : ce.split(":")) == null ? void 0 : F[1];
2259
- E = (j = (m = Z(k)) == null ? void 0 : m.find((le) => (le == null ? void 0 : le.label) === re)) == null ? void 0 : j.value;
2260
- }
2261
- return E;
2262
- })), g;
2263
- }), ee.value = (P = Z(ee.value)) == null ? void 0 : P.map((g) => {
2264
- if ((g == null ? void 0 : g.id) === (l == null ? void 0 : l.id)) {
2265
- const Q = {};
2266
- return D == null || D.forEach((B) => {
2267
- Q[B.name] = B.value;
2268
- }), Q.id = g == null ? void 0 : g.id, Q;
2269
- }
2270
- return g;
2271
- });
2272
- }
2273
- }
2274
- }, pn = async (e) => {
2275
- var L, O, $, d, U, M, P, b, C, k, D, g, Q, B, G, o, E, ce, F, m, j, re, le, V, he, te, J, de, Fe;
2276
- if (!e) return;
2277
- gl.value = e;
2278
- const l = Z(u.itemData);
2279
- let r = l == null ? void 0 : l.map((h) => {
2280
- var R, ue, be, xe;
2281
- return (h == null ? void 0 : h.key) === "header" && (Array.isArray((R = h.contents) == null ? void 0 : R[0]) ? h.contents = (be = ga((ue = h.contents) == null ? void 0 : ue[0])) == null ? void 0 : be.map((p, ie) => {
2282
- var $e, A, je, Pe, Qe, He, De, Ke, il, nl, el, me, Oe, ol, tl, hl, kl, yl, Ol, Cl, Dl, Ul, y, q;
2283
- return p.type = p != null && p.type ? p.type : (Pe = (je = (A = ($e = p == null ? void 0 : p.key) == null ? void 0 : $e.split("$")) == null ? void 0 : A[1]) == null ? void 0 : je.split("(")) != null && Pe[0] ? (He = (Qe = pr) == null ? void 0 : Qe.find((pe) => {
2284
- var sl, ke, Xe, ml;
2285
- return (pe == null ? void 0 : pe.key) === ((ml = (Xe = (ke = (sl = p == null ? void 0 : p.key) == null ? void 0 : sl.split("$")) == null ? void 0 : ke[1]) == null ? void 0 : Xe.split("(")) == null ? void 0 : ml[0]);
2286
- })) == null ? void 0 : He.value : "Input", p.options = p != null && p.options ? p.options : ((il = (Ke = (De = p == null ? void 0 : p.key) == null ? void 0 : De.split("$")) == null ? void 0 : Ke[1]) == null ? void 0 : il.length) > 0 ? (Oe = (me = cr((el = (nl = p == null ? void 0 : p.key) == null ? void 0 : nl.split("$")) == null ? void 0 : el[1])) == null ? void 0 : me.split(",")) == null ? void 0 : Oe.map((pe) => ({
2287
- label: pe,
2288
- value: pe
2289
- })) : [], (ol = p == null ? void 0 : p.key) != null && ol.includes("$") && (p.key = (hl = (tl = p == null ? void 0 : p.key) == null ? void 0 : tl.split("$")) == null ? void 0 : hl[0]), ((Ol = (yl = (kl = Ae.value) == null ? void 0 : kl.find((pe) => (pe == null ? void 0 : pe.prop) === (p == null ? void 0 : p.prop))) == null ? void 0 : yl.optionUrl) == null ? void 0 : Ol.multiple) === !0 && !Array.isArray((Cl = Object.values(e)) == null ? void 0 : Cl[ie]) ? p.value = [(Dl = Object.values(e)) == null ? void 0 : Dl[ie]] : p.value = (Ul = Object.values(e)) == null ? void 0 : Ul[ie], p.optionUrl = p != null && p.formMenuSelect && ((y = p == null ? void 0 : p.formMenuSelect) == null ? void 0 : y.length) > 0 ? {
2290
- groupSelect: (q = p == null ? void 0 : p.groupSelect) == null ? void 0 : q.split(/[::]/).map((pe) => pe.trim()),
2291
- menuSelect: p == null ? void 0 : p.formMenuSelect,
2292
- selectRelateType: "",
2293
- type: (p == null ? void 0 : p.formType) ?? (p != null && p.groupSelect ? "Select" : "")
2294
- } : null, p;
2295
- }) : h.contents = (xe = h.contents) == null ? void 0 : xe.map((p, ie) => {
2296
- var $e, A, je, Pe, Qe, He, De, Ke, il, nl, el, me, Oe, ol, tl, hl, kl, yl, Ol, Cl, Dl, Ul, y, q;
2297
- return p.type = p != null && p.type ? p.type : (Pe = (je = (A = ($e = p == null ? void 0 : p.key) == null ? void 0 : $e.split("$")) == null ? void 0 : A[1]) == null ? void 0 : je.split("(")) != null && Pe[0] ? (He = (Qe = pr) == null ? void 0 : Qe.find((pe) => {
2298
- var sl, ke, Xe, ml;
2299
- return (pe == null ? void 0 : pe.key) === ((ml = (Xe = (ke = (sl = p == null ? void 0 : p.key) == null ? void 0 : sl.split("$")) == null ? void 0 : ke[1]) == null ? void 0 : Xe.split("(")) == null ? void 0 : ml[0]);
2300
- })) == null ? void 0 : He.value : "Input", p.options = p != null && p.options ? p.options : ((il = (Ke = (De = p == null ? void 0 : p.key) == null ? void 0 : De.split("$")) == null ? void 0 : Ke[1]) == null ? void 0 : il.length) > 0 ? (Oe = (me = cr((el = (nl = p == null ? void 0 : p.key) == null ? void 0 : nl.split("$")) == null ? void 0 : el[1])) == null ? void 0 : me.split(",")) == null ? void 0 : Oe.map((pe) => ({
2301
- label: pe,
2302
- value: pe
2303
- })) : [], (ol = p == null ? void 0 : p.key) != null && ol.includes("$") && (p.key = (hl = (tl = p == null ? void 0 : p.key) == null ? void 0 : tl.split("$")) == null ? void 0 : hl[0]), ((Ol = (yl = (kl = Ae.value) == null ? void 0 : kl.find((pe) => (pe == null ? void 0 : pe.prop) === (p == null ? void 0 : p.prop))) == null ? void 0 : yl.optionUrl) == null ? void 0 : Ol.multiple) === !0 && !Array.isArray((Cl = Object.values(e)) == null ? void 0 : Cl[ie]) ? p.value = [(Dl = Object.values(e)) == null ? void 0 : Dl[ie]] : p.value = (Ul = Object.values(e)) == null ? void 0 : Ul[ie], p.optionUrl = p != null && p.formMenuSelect && ((y = p == null ? void 0 : p.formMenuSelect) == null ? void 0 : y.length) > 0 ? {
2304
- groupSelect: (q = p == null ? void 0 : p.groupSelect) == null ? void 0 : q.split(/[::]/).map((pe) => pe.trim()),
2305
- menuSelect: p == null ? void 0 : p.formMenuSelect,
2306
- selectRelateType: "",
2307
- type: (p == null ? void 0 : p.formType) ?? (p != null && p.groupSelect ? "Select" : "")
2308
- } : null, p;
2309
- })), h;
2310
- }), a = Ae.value, i = (O = (L = Z(r)) == null ? void 0 : L.find((h) => (h == null ? void 0 : h.key) === "header")) == null ? void 0 : O.contents;
2311
- if (i = i == null ? void 0 : i.filter((h) => (h == null ? void 0 : h.label) !== "操作"), i.push({
2312
- label: "操作",
2313
- type: "operate"
2314
- }), a = a == null ? void 0 : a.map((h) => {
2315
- var R;
2316
- return h.value = h.value ?? ((R = i == null ? void 0 : i.find((ue, be) => (ue == null ? void 0 : ue.prop) === (h == null ? void 0 : h.name))) == null ? void 0 : R.value), h;
2317
- }), !Oa.value) return;
2318
- let s = "", c = Z(wl.value);
2319
- ($ = wl.value) != null && $.includes("·") && (wl.value = (U = (d = wl.value) == null ? void 0 : d.split("·")) == null ? void 0 : U[0]);
2320
- let n = (b = (P = (M = Z(r)) == null ? void 0 : M.find((h) => (h == null ? void 0 : h.key) === "header")) == null ? void 0 : P.contents) == null ? void 0 : b.find((h, R) => {
2321
- var ue, be, xe;
2322
- return (h == null ? void 0 : h.prop) === wl.value || (R == null ? void 0 : R.toString()) === ((xe = (be = (ue = wl.value) == null ? void 0 : ue.split("a")) == null ? void 0 : be[1]) == null ? void 0 : xe.toString());
2323
- }), f = (C = n == null ? void 0 : n.optionUrl) == null ? void 0 : C.menuSelect, v = !0;
2324
- (g = (D = (k = Z(r)) == null ? void 0 : k.find((h) => (h == null ? void 0 : h.key) === "header")) == null ? void 0 : D.contents) == null || g.forEach((h) => {
2325
- var R, ue, be, xe, p, ie;
2326
- v && ((be = (ue = (R = h == null ? void 0 : h.optionUrl) == null ? void 0 : R.groupSelect) == null ? void 0 : ue[1]) != null && be.includes("[")) && (s = (p = (xe = h == null ? void 0 : h.optionUrl) == null ? void 0 : xe.groupSelect) == null ? void 0 : p[1], JSON.stringify(f) === JSON.stringify((ie = h == null ? void 0 : h.optionUrl) == null ? void 0 : ie.menuSelect) && (v = !1));
2327
- });
2328
- let x = Z(a), S = cl.value;
2329
- S != null && S.find((h) => (n == null ? void 0 : n.prop) === (h == null ? void 0 : h.key)) && (S = S == null ? void 0 : S.filter((h) => (n == null ? void 0 : n.prop) !== (h == null ? void 0 : h.key))), S != null && S.find((h) => c === (h == null ? void 0 : h.key)) && (S = S == null ? void 0 : S.filter((h) => c !== (h == null ? void 0 : h.key))), x = x == null ? void 0 : x.map((h) => {
2330
- var R, ue, be, xe, p, ie, $e, A, je;
2331
- return (h == null ? void 0 : h.type) === "Select" && (((ue = (R = h == null ? void 0 : h.optionUrl) == null ? void 0 : R.allSelectionContents) == null ? void 0 : ue.length) > 0 && (h.optionUrl.contactValue = e), ((n == null ? void 0 : n.prop) === (h == null ? void 0 : h.prop) || c === (h == null ? void 0 : h.prop)) && n && (Array.isArray(n.value) && ((be = n.value) == null ? void 0 : be.length) > 0 && ((xe = n.value) != null && xe.every((Pe) => typeof Pe == "string")) ? (S.push({
2332
- key: h == null ? void 0 : h.prop,
2333
- value: [(ie = n.value) == null ? void 0 : ie[((p = n.value) == null ? void 0 : p.length) - 1]]
2334
- }), h.selectValue = ($e = S == null ? void 0 : S.find((Pe) => (Pe == null ? void 0 : Pe.key) === (h == null ? void 0 : h.prop))) == null ? void 0 : $e.value) : Array.isArray(n.value) && ((A = n.value) == null ? void 0 : A.length) === 0 ? (S = [], h.selectValue = [], e[h == null ? void 0 : h.prop] = "") : Array.isArray(h.value) && S.push({
2335
- key: h == null ? void 0 : h.prop,
2336
- value: [(je = h.value) == null ? void 0 : je[(h == null ? void 0 : h.length) - 1]]
2337
- }))), h.value = e == null ? void 0 : e[h == null ? void 0 : h.prop], h;
2338
- }), cl.value = S, Ae.value = Z(x);
2339
- let T = (n == null ? void 0 : n.menuId) ?? ((G = (B = (Q = Ae.value) == null ? void 0 : Q.find((h) => {
2340
- var R;
2341
- return (R = h == null ? void 0 : h.optionUrl) == null ? void 0 : R.menuId;
2342
- })) == null ? void 0 : B.optionUrl) == null ? void 0 : G.menuId);
2343
- if ((o = n == null ? void 0 : n.optionUrl) != null && o.menuSelect && Oa.value || T) {
2344
- let h = await fr(n, T), R;
2345
- if (h == null || h.forEach((p) => {
2346
- var ie, $e, A, je, Pe, Qe, He, De, Ke, il, nl, el, me, Oe, ol, tl, hl, kl, yl, Ol, Cl, Dl, Ul, y, q, pe, sl;
2347
- if (!T && s === (($e = (ie = n == null ? void 0 : n.optionUrl) == null ? void 0 : ie.groupSelect) == null ? void 0 : $e[1]) && ((Pe = (je = (A = n == null ? void 0 : n.optionUrl) == null ? void 0 : A.groupSelect) == null ? void 0 : je[1]) != null && Pe.includes("[")) && ((il = Z(p)) == null ? void 0 : il[(Ke = (De = (He = (Qe = n == null ? void 0 : n.optionUrl) == null ? void 0 : Qe.groupSelect) == null ? void 0 : He[1]) == null ? void 0 : De.replaceAll("[", "")) == null ? void 0 : Ke.replaceAll("]", "")]) === (n == null ? void 0 : n.value) && (R = p), T) {
2348
- let ke = (el = (nl = Ae.value) == null ? void 0 : nl.find((N) => {
2349
- var t;
2350
- return (n == null ? void 0 : n.menuId) === ((t = N == null ? void 0 : N.optionUrl) == null ? void 0 : t.menuId);
2351
- })) == null ? void 0 : el.prop, Xe = e[ke];
2352
- if (ke != null && ke.includes("·"))
2353
- if (!Array.isArray(e[ke]))
2354
- Xe = (Oe = (me = e[ke]) == null ? void 0 : me.split(" ")) == null ? void 0 : Oe[0], ke = (ol = ke == null ? void 0 : ke.split("·")) == null ? void 0 : ol[0];
2355
- else {
2356
- ke = (tl = ke == null ? void 0 : ke.split("·")) == null ? void 0 : tl[0];
2357
- let N = (kl = (hl = x == null ? void 0 : x.find((t) => (t == null ? void 0 : t.prop) === ke)) == null ? void 0 : hl.selectValue) == null ? void 0 : kl[0];
2358
- Xe = (yl = N == null ? void 0 : N.split(" ")) == null ? void 0 : yl[0];
2359
- }
2360
- let ml = (Cl = (Ol = x == null ? void 0 : x.find((N) => {
2361
- var t;
2362
- return (N == null ? void 0 : N.prop) === ke || ((t = N == null ? void 0 : N.prop) == null ? void 0 : t.includes("." + ke));
2363
- })) == null ? void 0 : Ol.selectValue) == null ? void 0 : Cl[0];
2364
- if (ke != null && ke.includes(".") && (ke = (Ul = ke == null ? void 0 : ke.split(".")) == null ? void 0 : Ul[((Dl = ke == null ? void 0 : ke.split(".")) == null ? void 0 : Dl.length) - 1]), Array.isArray(Xe) && !ml && (ml = Xe == null ? void 0 : Xe[0]), p[ke] === (Array.isArray(Xe) ? ml : Xe) && (n == null ? void 0 : n.directiveLabel) === "#isMain") {
2365
- if (c != null && c.includes("·")) {
2366
- let N = c == null ? void 0 : c.split("·"), t = (sl = (pe = (q = Array.isArray(e == null ? void 0 : e[c]) ? (y = e == null ? void 0 : e[c]) == null ? void 0 : y[0] : e == null ? void 0 : e[c]) == null ? void 0 : q.split(" ")) == null ? void 0 : pe.filter((Ce) => Ce && Ce !== "")) == null ? void 0 : sl.map((Ce) => Ce == null ? void 0 : Ce.trim());
2367
- N == null || N.forEach((Ce, ll) => {
2368
- p[Ce] = t == null ? void 0 : t[ll];
2369
- });
2370
- }
2371
- R = p;
2372
- }
2373
- }
2374
- }), _l.value && (n == null ? void 0 : n.directiveLabel) === "#isMain" && (Re.value = []), !R) {
2375
- if (_l.value && (n == null ? void 0 : n.directiveLabel) === "#isMain")
2376
- if (c != null && c.includes("·")) {
2377
- let p = e, ie = (F = (ce = (E = e == null ? void 0 : e[c]) == null ? void 0 : E.split(" ")) == null ? void 0 : ce.filter((A) => A && A !== "")) == null ? void 0 : F.map((A) => A == null ? void 0 : A.trim());
2378
- (m = c == null ? void 0 : c.split("·")) == null || m.forEach((A, je) => {
2379
- p[A] = ie[je];
2380
- });
2381
- let $e = (j = Ae.value) == null ? void 0 : j.find((A) => (A == null ? void 0 : A.prop) === c);
2382
- p[$e.prop] = [$e.value], R = p;
2383
- } else {
2384
- let p = (re = Ae.value) == null ? void 0 : re.find((ie) => (ie == null ? void 0 : ie.prop) === (n == null ? void 0 : n.prop));
2385
- e[p.prop] = [p.value], R = e;
2386
- }
2387
- else if ((n == null ? void 0 : n.directiveLabel) === "#isMain") {
2388
- let p = {};
2389
- (le = Ae.value) == null || le.forEach((ie) => {
2390
- var $e, A;
2391
- (ie == null ? void 0 : ie.prop) === c ? p[ie.prop] = ($e = ie == null ? void 0 : ie.selectValue) != null && $e[0] ? [(A = ie == null ? void 0 : ie.selectValue) == null ? void 0 : A[0]] : "" : p[ie.prop] = "";
2392
- }), R = p;
2393
- }
2394
- }
2395
- if (R) {
2396
- let p = Z(a);
2397
- p = p == null ? void 0 : p.map((A) => {
2398
- var Pe, Qe, He, De, Ke, il, nl, el, me, Oe, ol, tl, hl, kl, yl, Ol, Cl, Dl, Ul, y, q, pe, sl, ke, Xe, ml, N, t, Ce, ll, Ie, vl, Tl;
2399
- (R != null && R[A == null ? void 0 : A.prop] || R != null && R[(De = (He = (Qe = (Pe = A == null ? void 0 : A.optionUrl) == null ? void 0 : Pe.groupSelect) == null ? void 0 : Qe[1]) == null ? void 0 : He.replaceAll("[", "")) == null ? void 0 : De.replaceAll("]", "")]) && ((nl = (il = (Ke = A == null ? void 0 : A.optionUrl) == null ? void 0 : Ke.groupSelect) == null ? void 0 : il[1]) != null && nl.includes("[")) && (A != null && A.relatedValueId) && (A.value = (R == null ? void 0 : R[A == null ? void 0 : A.prop]) || (R == null ? void 0 : R[(ol = (Oe = (me = (el = A == null ? void 0 : A.optionUrl) == null ? void 0 : el.groupSelect) == null ? void 0 : me[1]) == null ? void 0 : Oe.replaceAll("[", "")) == null ? void 0 : ol.replaceAll("]", "")]));
2400
- let je = R == null ? void 0 : R[A == null ? void 0 : A.prop];
2401
- return (tl = A == null ? void 0 : A.prop) != null && tl.includes(".") && ((kl = (hl = n == null ? void 0 : n.prop) == null ? void 0 : hl.split(".")) == null ? void 0 : kl[0]) === ((Ol = (yl = A == null ? void 0 : A.prop) == null ? void 0 : yl.split(".")) == null ? void 0 : Ol[0]) && (je = R == null ? void 0 : R[(y = (Cl = A == null ? void 0 : A.prop) == null ? void 0 : Cl.split(".")) == null ? void 0 : y[((Ul = (Dl = A == null ? void 0 : A.prop) == null ? void 0 : Dl.split(".")) == null ? void 0 : Ul.length) - 1]]), T && (je || je === "") && (A != null && A.relatedValueId) && xl.value === "新增" && ((A == null ? void 0 : A.prop) !== (n == null ? void 0 : n.prop) || c != null && c.includes((n == null ? void 0 : n.prop) + "·") || c != null && c.includes("·" + (A == null ? void 0 : A.prop))) ? A.value = je || (R == null ? void 0 : R[(ke = (sl = (pe = (q = A == null ? void 0 : A.optionUrl) == null ? void 0 : q.groupSelect) == null ? void 0 : pe[1]) == null ? void 0 : sl.replaceAll("[", "")) == null ? void 0 : ke.replaceAll("]", "")]) : (c != null && c.includes("·" + (A == null ? void 0 : A.prop)) || c != null && c.includes(".")) && (A == null ? void 0 : A.prop) !== (n == null ? void 0 : n.prop) ? A.value = je ?? "" : ((Xe = A == null ? void 0 : A.optionUrl) == null ? void 0 : Xe.multiple) === !0 && !Array.isArray((N = (ml = Ae.value) == null ? void 0 : ml.find((al) => (al == null ? void 0 : al.prop) === (A == null ? void 0 : A.prop))) == null ? void 0 : N.value) ? A.value = ((Ce = (t = Ae.value) == null ? void 0 : t.find((al) => (al == null ? void 0 : al.prop) === (A == null ? void 0 : A.prop))) == null ? void 0 : Ce.value) === "" ? [] : [(Ie = (ll = Ae.value) == null ? void 0 : ll.find((al) => (al == null ? void 0 : al.prop) === (A == null ? void 0 : A.prop))) == null ? void 0 : Ie.value] : A.value = (Tl = (vl = Ae.value) == null ? void 0 : vl.find((al) => (al == null ? void 0 : al.prop) === (A == null ? void 0 : A.prop))) == null ? void 0 : Tl.value, A;
2402
- }), Ae.value = Z(p);
2403
- let ie = Z(p);
2404
- ie = ie == null ? void 0 : ie.map((A) => {
2405
- var je, Pe, Qe, He, De, Ke, il, nl, el;
2406
- return (Pe = (je = A == null ? void 0 : A.optionUrl) == null ? void 0 : je.menuSelect) != null && Pe.some((me) => me == null ? void 0 : me.includes("[")) && (A.optionUrl.oldMenuSelect = (He = (Qe = Z(A)) == null ? void 0 : Qe.optionUrl) == null ? void 0 : He.menuSelect, A.optionUrl.menuSelect = (Ke = (De = A == null ? void 0 : A.optionUrl) == null ? void 0 : De.menuSelect) == null ? void 0 : Ke.map((me) => {
2407
- var Oe, ol, tl, hl;
2408
- if (me != null && me.includes("[")) {
2409
- let kl = (ol = (Oe = me == null ? void 0 : me.replaceAll("[", "").replaceAll("]", "")) == null ? void 0 : Oe.split(":")) == null ? void 0 : ol[1];
2410
- me = (hl = (tl = Z(p)) == null ? void 0 : tl.find((yl) => (yl == null ? void 0 : yl.label) === kl)) == null ? void 0 : hl.value;
2411
- }
2412
- return me;
2413
- })), ((n == null ? void 0 : n.prop) === (A == null ? void 0 : A.prop) || c === (A == null ? void 0 : A.prop)) && Array.isArray(n.value) && (il = n.value) != null && il.every((me) => typeof me == "string") && (A.selectValue = ((nl = S == null ? void 0 : S.find((me) => (me == null ? void 0 : me.key) === (A == null ? void 0 : A.prop))) == null ? void 0 : nl.value) ?? ((el = A.value) == null ? void 0 : el[0])), A;
2414
- }), Ae.value = ie;
2415
- let $e = {};
2416
- (V = Ae.value) == null || V.forEach((A) => {
2417
- $e[A.prop] = A == null ? void 0 : A.value;
2418
- }), gl.value = $e;
2419
- }
2420
- let ue = Re.value, be = {};
2421
- (he = Ae.value) == null || he.forEach((p) => {
2422
- var ie, $e, A, je, Pe, Qe, He, De, Ke, il, nl;
2423
- if (((p == null ? void 0 : p.directiveLabel) === "#isMain" || (ie = p == null ? void 0 : p.optionUrl) != null && ie.menuId) && Array.isArray(p == null ? void 0 : p.value)) {
2424
- if (be[p.prop] = (A = p.value) == null ? void 0 : A[(($e = p.value) == null ? void 0 : $e.length) - 1], (je = p == null ? void 0 : p.prop) != null && je.includes("·")) {
2425
- let el = (He = (Qe = (Pe = p == null ? void 0 : p.prop) == null ? void 0 : Pe.split("·")) == null ? void 0 : Qe.filter((Oe) => Oe && Oe !== "")) == null ? void 0 : He.map((Oe) => Oe == null ? void 0 : Oe.trim()), me = (nl = (il = (Ke = (De = p == null ? void 0 : p.selectValue) == null ? void 0 : De[0]) == null ? void 0 : Ke.split(" ")) == null ? void 0 : il.filter((Oe) => Oe && Oe !== "")) == null ? void 0 : nl.map((Oe) => Oe == null ? void 0 : Oe.trim());
2426
- el == null || el.forEach((Oe, ol) => {
2427
- be[Oe] = me == null ? void 0 : me[ol];
2428
- });
2429
- }
2430
- } else
2431
- be[p.prop] = (be == null ? void 0 : be[p == null ? void 0 : p.prop]) ?? p.value;
2432
- });
2433
- let xe = (te = Ae.value) == null ? void 0 : te.find((p) => {
2434
- var ie;
2435
- return (p == null ? void 0 : p.directiveLabel) === "#isMain" || ((ie = p == null ? void 0 : p.optionUrl) == null ? void 0 : ie.menuId);
2436
- });
2437
- (n == null ? void 0 : n.directiveLabel) === "#isMain" ? ue.push({
2438
- label: n == null ? void 0 : n.prop,
2439
- value: (de = n == null ? void 0 : n.value) == null ? void 0 : de[((J = n == null ? void 0 : n.value) == null ? void 0 : J.length) - 1],
2440
- objectValue: be
2441
- }) : ((Fe = xe == null ? void 0 : xe.value) == null ? void 0 : Fe.length) > 0 && (ue = ue == null ? void 0 : ue.map((p) => {
2442
- var ie;
2443
- return (p == null ? void 0 : p.value) === ((ie = xe == null ? void 0 : xe.selectValue) == null ? void 0 : ie[0]) && (p.objectValue = be), p;
2444
- })), Re.value = ue;
2445
- }
2446
- Oa.value = !0, _l.value = !1;
2447
- }, cn = (e) => e ? (e == null ? void 0 : e.toUpperCase()) === "INPUT" ? "TEXTAREA" : e : "TEXTAREA", fn = (e) => {
2448
- var s, c;
2449
- const l = (c = (s = $l.value) == null ? void 0 : s.find((n) => (n == null ? void 0 : n.label) === (e == null ? void 0 : e.label))) == null ? void 0 : c.multiple, r = e == null ? void 0 : e.prop;
2450
- if ((e == null ? void 0 : e.formType) != "Select")
2451
- return;
2452
- ee.value.forEach((n) => {
2453
- const f = n == null ? void 0 : n[r];
2454
- l && Vr(f) && (n[r] = [f]), !l && !Vr(f) && (n[r] = "");
2455
- });
2456
- }, Lr = (e, l) => {
2457
- var r;
2458
- return l == null || l.forEach((a) => {
2459
- e[a == null ? void 0 : a.prop] = a == null ? void 0 : a.value;
2460
- }), e.children && ((r = e.children) == null ? void 0 : r.length) > 0 && (e.children = e.children.map((a) => Lr(a, l))), e;
2461
- }, nr = (e) => {
2462
- var r, a, i, s, c, n;
2463
- Ua("");
2464
- const l = (r = Ae.value) == null ? void 0 : r.reduce((f, v) => (f[v.name] = v.value, f), {});
2465
- if (((a = Object.keys(l)) == null ? void 0 : a.length) > 0) {
2466
- gl.value = l, Wl.value = "", da.value = (i = ee.value) == null ? void 0 : i.length, Gl.value = (s = Nl.value) == null ? void 0 : s.filter((v) => (v == null ? void 0 : v.label) !== "新增");
2467
- const f = (n = (c = _.value) == null ? void 0 : c.filter((v) => (v == null ? void 0 : v.label) !== "操作")) == null ? void 0 : n.map((v) => {
2468
- var S, T, L;
2469
- const x = (T = (S = $l.value) == null ? void 0 : S.find((O) => (O == null ? void 0 : O.label) === (v == null ? void 0 : v.label))) == null ? void 0 : T.multiple;
2470
- return fn(v), {
2471
- ...v,
2472
- contents: (v == null ? void 0 : v.options) ?? [],
2473
- // type: 'edit',
2474
- optionUrl: v != null && v.formMenuSelect && ((L = v == null ? void 0 : v.formMenuSelect) == null ? void 0 : L.length) > 0 ? {
2475
- groupSelect: v == null ? void 0 : v.groupSelect,
2476
- menuSelect: v == null ? void 0 : v.formMenuSelect,
2477
- selectRelateType: "",
2478
- type: v == null ? void 0 : v.formType,
2479
- multiple: x
2480
- } : null
2481
- // 表格编辑视图组件类型:兼容表头类型切换逻辑,优先模型里定义的类型,其次是手动配置的类型
2482
- // columnType: convertColType(col?.formType) || col?.columnType
2483
- };
2484
- });
2485
- I.value = f == null ? void 0 : f.map((v) => Lr(v, [{
2486
- prop: "type",
2487
- value: "edit"
2488
- }, { prop: "columnType", value: cn(v == null ? void 0 : v.formType) || (v == null ? void 0 : v.columnType) }])), e === "createClick" && Ea(!1);
2489
- }
2490
- }, fa = {
2491
- START: "开始时间",
2492
- END: "结束时间",
2493
- HOURS: "工时"
2494
- }, yn = (e, l) => Number(Qr(l).diff(Qr(e), "day", !0).toFixed(1)), $r = (e) => {
2495
- var s;
2496
- const l = u.itemData, r = (s = l == null ? void 0 : l.find((c) => (c == null ? void 0 : c.key) === "header")) == null ? void 0 : s.contents, a = /* @__PURE__ */ new Map();
2497
- return r == null || r.forEach((c, n) => {
2498
- const { label: f } = c;
2499
- a.set(f, n);
2500
- }), !a.has(fa.START) || !a.has(fa.END) || !a.has(fa.HOURS) ? e : e == null ? void 0 : e.map((c) => {
2501
- const n = c == null ? void 0 : c[fa.START], f = c == null ? void 0 : c[fa.END], v = yn(n, f);
2502
- return n && f && (c[fa.HOURS] = `${v}天`), c;
2503
- });
2504
- }, Pr = (e, l, r = 0) => {
2505
- if (r > ((l == null ? void 0 : l.length) ?? "")) return e;
2506
- const a = l == null ? void 0 : l[r], i = /* @__PURE__ */ new Map();
2507
- for (const c of e) {
2508
- const n = c[a];
2509
- i.has(n) || i.set(n, []), i.get(n) && i.get(n).push(c);
2510
- }
2511
- const s = [];
2512
- for (const [c, n] of i) {
2513
- const [f, ...v] = n, x = { ...f };
2514
- r + 1 === ((l == null ? void 0 : l.length) ?? "") ? x.children = n == null ? void 0 : n.map((S) => (S.level = Z(r) + 1, S)).filter((S, T) => T !== 0) : v.length > 0 && (x.children = Pr(v, l, r + 1)), x.level = r, s.push(x);
2515
- }
2516
- return s;
2517
- }, Mr = (e, l, r) => {
2518
- var i;
2519
- if (!(l != null && l.contents) || ((i = l == null ? void 0 : l.contents) == null ? void 0 : i.length) === 0)
2520
- return e;
2521
- let a = [];
2522
- return a = Pr(e, l == null ? void 0 : l.contents, 0), a;
2523
- }, Nr = (e, l) => {
2524
- var L, O, $, d, U, M, P, b, C, k, D, g, Q, B, G, o, E, ce, F, m, j, re, le, V, he, te, J, de, Fe, h, R, ue, be, xe, p, ie, $e, A, je, Pe, Qe, He, De, Ke, il, nl, el, me, Oe, ol, tl, hl, kl, yl, Ol, Cl, Dl, Ul;
2525
- const r = e == null ? void 0 : e.filter((y) => (y == null ? void 0 : y.key) === "header");
2526
- e == null || e.filter((y) => (y == null ? void 0 : y.key) === "tableIndexColumn")[0];
2527
- const a = e == null ? void 0 : e.filter((y) => (y == null ? void 0 : y.key) === "childTree")[0];
2528
- let i = !0;
2529
- if (($ = (O = (L = e == null ? void 0 : e.find((y) => (y == null ? void 0 : y.key) === "filterAllType")) == null ? void 0 : L.value) == null ? void 0 : O.find((y) => (y == null ? void 0 : y.value) === "onPamButtonContents")) != null && $.content) {
2530
- let y = (M = (U = (d = e == null ? void 0 : e.find((q) => (q == null ? void 0 : q.key) === "filterAllType")) == null ? void 0 : d.value) == null ? void 0 : U.find((q) => (q == null ? void 0 : q.value) === "onPamButtonContents")) == null ? void 0 : M.content;
2531
- y = (P = y == null ? void 0 : y.split(":")) == null ? void 0 : P[1], y = (b = y.slice(1, (y == null ? void 0 : y.length) - 1)) == null ? void 0 : b.split(","), i = !!(y != null && y.find((q) => q === "操作"));
2532
- }
2533
- let s = l;
2534
- const c = e == null ? void 0 : e.find((y) => (y == null ? void 0 : y.key) === "page"), n = e == null ? void 0 : e.find((y) => (y == null ? void 0 : y.key) === "rowButton"), f = e == null ? void 0 : e.find((y) => (y == null ? void 0 : y.key) === "extraButton"), v = e == null ? void 0 : e.filter((y) => (y == null ? void 0 : y.key) === "tableContents"), x = e == null ? void 0 : e.filter((y) => (y == null ? void 0 : y.key) === "tableIndex");
2535
- $l.value = (k = (C = e == null ? void 0 : e.filter((y) => (y == null ? void 0 : y.key) === "tableToForm")) == null ? void 0 : C[0]) == null ? void 0 : k.contents, vr.value = (c == null ? void 0 : c.contents) ?? !0;
2536
- let S = [];
2537
- ea.value === "" ? S = r == null ? void 0 : r[0] : S = (r == null ? void 0 : r.find((y) => (y == null ? void 0 : y.selectLabel) === "(" + ea.value + ")")) ?? (r == null ? void 0 : r.find((y) => !(y != null && y.selectLabel)));
2538
- let T = [];
2539
- if (ea.value === "" ? T = x == null ? void 0 : x[0] : T = (x == null ? void 0 : x.find((y) => (y == null ? void 0 : y.selectLabel) === "(" + ea.value + ")")) ?? (x == null ? void 0 : x.find((y) => !(y != null && y.selectLabel))), ((D = S == null ? void 0 : S.contents) == null ? void 0 : D.length) > 0) {
2540
- let y = [];
2541
- if (S != null && S.contents.some((N) => Array.isArray(N) && (N == null ? void 0 : N.find((t) => t.children))))
2542
- xa.value === "" ? y = (Q = (g = qr(S == null ? void 0 : S.contents, i)) == null ? void 0 : g[0]) == null ? void 0 : Q.filter((N) => !Array.isArray(N)) : (xa.value.split("-"), y = (B = qr(S == null ? void 0 : S.contents, i)) == null ? void 0 : B[0]);
2543
- else {
2544
- let N = S != null && S.contents.some((t) => Array.isArray(t)) ? (G = S == null ? void 0 : S.contents) == null ? void 0 : G[0] : S == null ? void 0 : S.contents;
2545
- N == null || N.forEach((t, Ce) => {
2546
- var vl, Tl, al, ja, La;
2547
- let ll = "";
2548
- (Tl = (vl = Ne.value) == null ? void 0 : vl.split("/")) == null || Tl.forEach((Kl) => {
2549
- var $a, Pa, ya;
2550
- if (Kl !== "") {
2551
- let El = (ya = (Pa = ($a = Kl == null ? void 0 : Kl.split(dl + "updateLoading")) == null ? void 0 : $a[0]) == null ? void 0 : Pa.split(dl + "loading")) == null ? void 0 : ya[0];
2552
- ll = ll === "" ? ll + El : ll + "/" + El;
2553
- }
2554
- }), ll = ll + dl + (t == null ? void 0 : t.directiveLabel);
2555
- const Ie = (al = $l.value) == null ? void 0 : al.find((Kl) => (Kl == null ? void 0 : Kl.prop) === (t == null ? void 0 : t.prop));
2556
- y.push({
2557
- label: (t == null ? void 0 : t.label) === "操作" ? i ? "操作" : "" : (t == null ? void 0 : t.label) ?? "",
2558
- prop: (t == null ? void 0 : t.label) === "操作" ? "operate" : (t == null ? void 0 : t.prop) ?? "a" + Ce,
2559
- // width: t?.label === '操作' ? '200' : (t?.width ? parseInt(t.width) : ''),
2560
- width: t != null && t.width ? parseInt(t.width) : "",
2561
- fixed: (t == null ? void 0 : t.fixed) ?? void 0,
2562
- sortable: (t == null ? void 0 : t.sortable) ?? !1,
2563
- filterable: (t == null ? void 0 : t.filterable) ?? !1,
2564
- operable: (t == null ? void 0 : t.operable) ?? !1,
2565
- showSummary: (t == null ? void 0 : t.showSummary) ?? !1,
2566
- align: (t == null ? void 0 : t.align) ?? "left",
2567
- showOverflowTooltip: (t == null ? void 0 : t.showOverflowTooltip) ?? !0,
2568
- isNotDrag: (t == null ? void 0 : t.isNotDrag) ?? !1,
2569
- isEditCol: (t == null ? void 0 : t.isEditCol) ?? !1,
2570
- isOperate: (t == null ? void 0 : t.isOperate) ?? !1,
2571
- id: (t == null ? void 0 : t.id) ?? Ce,
2572
- type: (t == null ? void 0 : t.label) === "操作" ? "operate" : void 0,
2573
- formType: (t == null ? void 0 : t.formType) ?? (t != null && t.groupSelect ? "Select" : ""),
2574
- isTableColHidden: t == null ? void 0 : t.isTableColHidden,
2575
- isFormColHidden: t == null ? void 0 : t.isFormColHidden,
2576
- disabled: t == null ? void 0 : t.disabled,
2577
- options: (t == null ? void 0 : t.options) ?? [],
2578
- value: (t == null ? void 0 : t.value) ?? "",
2579
- formMenuSelect: (t == null ? void 0 : t.formMenuSelect) ?? [],
2580
- isRoute: (t == null ? void 0 : t.isRoute) ?? !1,
2581
- groupSelect: t != null && t.groupSelect ? (ja = t == null ? void 0 : t.groupSelect) == null ? void 0 : ja.replaceAll('"', "").split(":") : [],
2582
- isMainKey: (t == null ? void 0 : t.isMainKey) || (t == null ? void 0 : t.directiveLabel) === "#isMain",
2583
- // 同步弹窗列类型到表格列类型
2584
- columnType: (Ie == null ? void 0 : Ie.type) || (t == null ? void 0 : t.columnType) || "TEXTAREA",
2585
- directiveLabel: t == null ? void 0 : t.directiveLabel,
2586
- directiveColor: (t == null ? void 0 : t.directiveColor) ?? !1,
2587
- isExistChild: !!(t != null && t.directiveLabel && !(s != null && s[ll]) && !((La = t == null ? void 0 : t.directiveLabel) != null && La.includes("@")) && (t == null ? void 0 : t.directiveLabel) !== "#isMain"),
2588
- childPath: (t == null ? void 0 : t.directiveLabel) !== "#isMain" ? ll : void 0,
2589
- allSelectionContents: (t == null ? void 0 : t.allSelectionContents) ?? [],
2590
- selectFilter: t == null ? void 0 : t.selectFilter,
2591
- menuId: t == null ? void 0 : t.menuId,
2592
- filterContent: t == null ? void 0 : t.filterContent,
2593
- relatedValueId: t == null ? void 0 : t.relatedValueId
2594
- });
2595
- });
2596
- }
2597
- I.value = Gr(y), Xa.value = Gr(y), oe.value = (o = I.value) == null ? void 0 : o.map((N) => N == null ? void 0 : N.label), Me.value = (E = I.value) == null ? void 0 : E.every((N) => N == null ? void 0 : N.filterable), Ge.value = (ce = I.value) == null ? void 0 : ce.every((N) => N == null ? void 0 : N.operable), Te.value = (F = I.value) == null ? void 0 : F.every((N) => N == null ? void 0 : N.sortable);
2598
- let q = (j = (m = Hr(I.value)) == null ? void 0 : m.filter((N) => (N == null ? void 0 : N.type) !== "operate")) == null ? void 0 : j.map((N, t) => ({
2599
- prop: (N == null ? void 0 : N.prop) ?? "a" + t,
2600
- column: N.label
2601
- }));
2602
- Bl.value = q;
2603
- let pe = [];
2604
- ea.value === "" ? pe = v == null ? void 0 : v[0] : pe = (v == null ? void 0 : v.find((N) => (N == null ? void 0 : N.selectLabel) === "(" + ea.value + ")")) ?? (v == null ? void 0 : v.find((N) => !(N != null && N.selectLabel)));
2605
- let sl = Array.isArray((re = pe == null ? void 0 : pe.contents) == null ? void 0 : re[0]) && ((le = pe == null ? void 0 : pe.contents) != null && le[0].every((N) => Array.isArray(N))) ? (V = pe == null ? void 0 : pe.contents) == null ? void 0 : V[0] : pe == null ? void 0 : pe.contents;
2606
- T != null && T.contents && ((he = T == null ? void 0 : T.contents) == null ? void 0 : he.length) !== 0 && (sl = (te = Z(sl)) == null ? void 0 : te.map((N, t) => {
2607
- if (!Array.isArray(N)) {
2608
- let Ce = {};
2609
- for (let ll in N)
2610
- ll !== "id" && ll !== "index" && (Ce[ll] = N[ll]);
2611
- N = Object.values(Ce);
2612
- }
2613
- return N;
2614
- }));
2615
- const ke = !!((J = I.value) != null && J.find((N) => N.prop === "index"));
2616
- sl = ii(sl, T == null ? void 0 : T.contents, ke);
2617
- const Xe = [];
2618
- sl == null || sl.forEach((N, t) => {
2619
- var ll;
2620
- let Ce = {};
2621
- if (Array.isArray(N)) {
2622
- let Ie = [];
2623
- N == null || N.filter((vl) => !(vl != null && vl.id)).forEach((vl, Tl) => {
2624
- var al, ja, La, Kl, $a, Pa;
2625
- if ((al = q == null ? void 0 : q[Tl]) != null && al.prop && !Array.isArray(vl)) {
2626
- let ya = {};
2627
- ya[q[Tl].column] = vl, Be != null && Be.value && ((ja = Be == null ? void 0 : Be.value) == null ? void 0 : ja.length) > 0 && ((La = Be == null ? void 0 : Be.value) != null && La.find((El) => JSON.stringify(El == null ? void 0 : El[0]) === JSON.stringify(ya))) && (Ie = (Kl = Be == null ? void 0 : Be.value) == null ? void 0 : Kl.find((El) => JSON.stringify(El == null ? void 0 : El[0]) === JSON.stringify(ya))), Ie && Ie.length > 0 ? Ce[q[Tl].prop] = Ie != null && Ie.find((El) => {
2628
- var Ma;
2629
- return ((Ma = Object.keys(El)) == null ? void 0 : Ma[0]) === q[Tl].column;
2630
- }) ? ($a = Ie == null ? void 0 : Ie.find((El) => {
2631
- var Ma;
2632
- return ((Ma = Object.keys(El)) == null ? void 0 : Ma[0]) === q[Tl].column;
2633
- })) == null ? void 0 : $a[q[Tl].column] : vl : Ce[q[Tl].prop] = vl;
2634
- } else Array.isArray(vl) && ((Pa = q[Tl]) != null && Pa.prop ? Ce[q[Tl].prop] = vl : Ce.children = yr(vl, q));
2635
- });
2636
- } else
2637
- Ce = N;
2638
- Array.isArray(N) && N.some((Ie) => Ie == null ? void 0 : Ie.id) ? Xe.push(Object.assign(Ce, { id: (ll = N == null ? void 0 : N.find((Ie) => Ie.id)) == null ? void 0 : ll.id })) : Ce.id ? Xe.push(Ce) : Xe.push(Object.assign(Ce, { id: t.toString() }));
2639
- }), ee.value = Mr(Xe, a, I.value), Zl.value = Xe, (de = Zl.value) == null || de.forEach((N) => {
2640
- var t;
2641
- (t = sa.value) == null || t.set(N.id, N);
2642
- });
2643
- const ml = Array.from(((Fe = sa.value) == null ? void 0 : Fe.values()) || []).filter((N) => N == null ? void 0 : N._isOCRRow);
2644
- if (ml.length > 0) {
2645
- const N = new Set((ee.value || []).map((Ce) => Ce == null ? void 0 : Ce.id)), t = ml.filter((Ce) => !N.has(Ce.id));
2646
- t.length > 0 && (ee.value = [...ee.value || [], ...t], Zl.value = [...Zl.value || [], ...t]);
2647
- }
2648
- } else
2649
- I.value = [], _.value = [], ee.value = [], Zl.value = [], sa.value = /* @__PURE__ */ new Map();
2650
- if (((h = n == null ? void 0 : n.contents) == null ? void 0 : h.length) > 0)
2651
- if ((be = (ue = (R = e == null ? void 0 : e.find((y) => (y == null ? void 0 : y.key) === "filterAllType")) == null ? void 0 : R.value) == null ? void 0 : ue.find((y) => (y == null ? void 0 : y.value) === "onRowButtonContents")) != null && be.content) {
2652
- let y = (ie = (p = (xe = e == null ? void 0 : e.find((q) => (q == null ? void 0 : q.key) === "filterAllType")) == null ? void 0 : xe.value) == null ? void 0 : p.find((q) => (q == null ? void 0 : q.value) === "onButtonContents")) == null ? void 0 : ie.content;
2653
- y = ($e = y == null ? void 0 : y.split(":")) == null ? void 0 : $e[1], y = (A = y.slice(1, (y == null ? void 0 : y.length) - 1)) == null ? void 0 : A.split(","), Ml.value = (je = n == null ? void 0 : n.contents) == null ? void 0 : je.filter((q) => y == null ? void 0 : y.find((pe) => pe === (q == null ? void 0 : q.label)));
2654
- } else
2655
- Ml.value = n == null ? void 0 : n.contents;
2656
- else
2657
- Ml.value = [];
2658
- if ((Pe = Ml.value) != null && Pe.some((y) => (y == null ? void 0 : y.label) === "OCR识别") || (Ml.value = [...Ml.value, { label: "OCR识别" }]), ((Qe = f == null ? void 0 : f.contents) == null ? void 0 : Qe.length) > 0)
2659
- if ((Ke = (De = (He = e == null ? void 0 : e.find((y) => (y == null ? void 0 : y.key) === "filterAllType")) == null ? void 0 : He.value) == null ? void 0 : De.find((y) => (y == null ? void 0 : y.value) === "onButtonContents")) != null && Ke.content) {
2660
- let y = (el = (nl = (il = e == null ? void 0 : e.find((q) => (q == null ? void 0 : q.key) === "filterAllType")) == null ? void 0 : il.value) == null ? void 0 : nl.find((q) => (q == null ? void 0 : q.value) === "onButtonContents")) == null ? void 0 : el.content;
2661
- y = (me = y == null ? void 0 : y.split(":")) == null ? void 0 : me[1], y = (Oe = y.slice(1, (y == null ? void 0 : y.length) - 1)) == null ? void 0 : Oe.split(","), Gl.value = (ol = f == null ? void 0 : f.contents) == null ? void 0 : ol.filter((q) => y == null ? void 0 : y.find((pe) => pe === (q == null ? void 0 : q.label))), Nl.value = (tl = f == null ? void 0 : f.contents) == null ? void 0 : tl.filter((q) => y == null ? void 0 : y.find((pe) => pe === (q == null ? void 0 : q.label))), Ee.value = !!(y != null && y.find((q) => q === "搜索")), ge.value = !!(y != null && y.find((q) => q === "块状显示"));
2662
- } else
2663
- Gl.value = f == null ? void 0 : f.contents, Nl.value = f == null ? void 0 : f.contents;
2664
- else
2665
- Gl.value = [], Nl.value = [];
2666
- ((hl = Gl.value) == null ? void 0 : hl.length) > 0 && (Gl.value = (kl = Gl.value) == null ? void 0 : kl.filter((y) => (y == null ? void 0 : y.label) !== "OCR识别")), ((yl = Nl.value) == null ? void 0 : yl.length) > 0 && (Nl.value = (Ol = Nl.value) == null ? void 0 : Ol.filter((y) => (y == null ? void 0 : y.label) !== "OCR识别")), da.value = ((Cl = ee == null ? void 0 : ee.value) == null ? void 0 : Cl.length) ?? 0, $r(ee.value), _a.value = ee.value, Fl.value && (I.value = (Ul = (Dl = _.value) == null ? void 0 : Dl.filter((y) => (y == null ? void 0 : y.label) !== "操作")) == null ? void 0 : Ul.map((y) => {
2667
- var q;
2668
- return {
2669
- ...y,
2670
- type: "edit",
2671
- optionUrl: y != null && y.formMenuSelect && ((q = y == null ? void 0 : y.formMenuSelect) == null ? void 0 : q.length) > 0 ? {
2672
- groupSelect: y == null ? void 0 : y.groupSelect,
2673
- menuSelect: y == null ? void 0 : y.formMenuSelect,
2674
- selectRelateType: "",
2675
- type: y == null ? void 0 : y.formType
2676
- } : null
2677
- };
2678
- }), nr());
2679
- };
2680
- jl(
2681
- () => [u.itemData, ea.value, hi.value, xa.value, Be == null ? void 0 : Be.value],
2682
- async () => {
2683
- var e, l, r, a, i, s;
2684
- if ((e = u == null ? void 0 : u.itemData) != null && e.find((c) => (c == null ? void 0 : c.key) === "columnPath") && !((l = Sa.value) != null && l.find((c) => {
2685
- var n, f;
2686
- return (c == null ? void 0 : c.key) === ((f = (n = u == null ? void 0 : u.itemData) == null ? void 0 : n.find((v) => (v == null ? void 0 : v.key) === "columnPath")) == null ? void 0 : f.contents);
2687
- }))) {
2688
- let c = Sa.value, n = {
2689
- key: (a = (r = u == null ? void 0 : u.itemData) == null ? void 0 : r.find((f) => (f == null ? void 0 : f.key) === "columnPath")) == null ? void 0 : a.contents,
2690
- value: (s = (i = u == null ? void 0 : u.itemData) == null ? void 0 : i.find((f) => (f == null ? void 0 : f.key) === "columnUsingPath")) == null ? void 0 : s.contents
2691
- };
2692
- c != null && c.find((f) => (f == null ? void 0 : f.key) === (n == null ? void 0 : n.key)) ? c = c == null ? void 0 : c.map((f) => ((f == null ? void 0 : f.key) === (n == null ? void 0 : n.key) && (f.value = n.value), f)) : c.push(n), Ze.setTableViewContents(c);
2693
- }
2694
- Nr(u.itemData, u.allMapContents);
2695
- },
2696
- { deep: !0, immediate: !0 }
2697
- ), jl(() => u == null ? void 0 : u.operatingForm, (e) => {
2698
- e != null && e.form && (Ua(e == null ? void 0 : e.form), xl.value = e == null ? void 0 : e.dialogTitle, Ka.value = !0, ql.value = !0);
2699
- }, { immediate: !0, deep: !0 });
2700
- const Br = () => {
2701
- var e;
2702
- (e = ze.value) != null && e.includes("read") && (Fl.value = !Fl.value);
2703
- }, tn = () => {
2704
- Ja.value = !Ja.value;
2705
- };
2706
- jl(() => {
2707
- var e;
2708
- return (e = u == null ? void 0 : u.config) == null ? void 0 : e.viewport;
2709
- }, (e) => {
2710
- var l;
2711
- ze.value = e, (e == null ? void 0 : e.length) === 0 ? Fl.value = !1 : (e != null && e.includes("read") || (Fl.value = !0), e != null && e.includes("edit") || (Fl.value = !1)), Ue.value = ((l = u == null ? void 0 : u.config) == null ? void 0 : l.showIndex) || Fl.value;
2712
- }, { immediate: !0 }), jl(() => Fl.value, (e) => {
2713
- var l;
2714
- e ? (nr("viewChange"), Ze.setCacheUpdatingData(null)) : (Gl.value = Nl.value, I.value = Xa.value, ka.value && (Ze.setTableLoading(u == null ? void 0 : u.index), se("change", ka.value))), ye.value = e, Ue.value = e || ((l = u == null ? void 0 : u.config) == null ? void 0 : l.showIndex);
2715
- }, { immediate: !0 }), jl(() => {
2716
- var e;
2717
- return (e = kr.value) == null ? void 0 : e.length;
2718
- }, (e) => {
2719
- e === 0 && (Je.currentPage = 1);
2720
- }), jl(() => u == null ? void 0 : u.compNames, (e) => {
2721
- Ye.contents = [
2722
- {
2723
- label: "列表名",
2724
- prop: "groupName",
2725
- name: "列表名",
2726
- type: "select",
2727
- value: "",
2728
- id: 0,
2729
- contents: e || [],
2730
- width: 1
2731
- }
2732
- ];
2733
- }, { immediate: !0 }), W(!1);
2734
- const hn = (e, l) => {
2735
- var r;
2736
- nr("createClick"), l === Je.pageSize && (Je.currentPage = Math.ceil(((r = ee.value) == null ? void 0 : r.length) / Je.pageSize));
2737
- }, vn = (e, l, r) => {
2738
- var a;
2739
- jr(r, e, l), gl.value = Z(e), Wl.value = e == null ? void 0 : e.id, da.value = (a = ee.value) == null ? void 0 : a.length, xl.value = typeof (e == null ? void 0 : e.id) == "string" ? "新增" : "编辑", Ea(!1);
2740
- }, bl = (e) => {
2741
- var f, v, x, S, T, L, O, $, d, U;
2742
- const { row: l, column: r, item: a, slotData: i } = e;
2743
- let s = l != null && l[r == null ? void 0 : r.prop] || (l == null ? void 0 : l[r == null ? void 0 : r.prop]) === 0 ? ((v = (f = l == null ? void 0 : l[r == null ? void 0 : r.prop]) == null ? void 0 : f[0]) == null ? void 0 : v.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]) : ((S = (x = l == null ? void 0 : l[a == null ? void 0 : a.prop]) == null ? void 0 : x[0]) == null ? void 0 : S.contents) ?? (l == null ? void 0 : l[a == null ? void 0 : a.prop]) ?? ((L = (T = i == null ? void 0 : i[a == null ? void 0 : a.prop]) == null ? void 0 : T[0]) == null ? void 0 : L.contents) ?? (i == null ? void 0 : i[a == null ? void 0 : a.prop]) ?? ((d = ($ = l == null ? void 0 : l[(O = a == null ? void 0 : a.child) == null ? void 0 : O.prop]) == null ? void 0 : $[0]) == null ? void 0 : d.contents) ?? (l == null ? void 0 : l[(U = a == null ? void 0 : a.child) == null ? void 0 : U.prop]), n = Array.isArray(s) && !(s != null && s.every((M) => typeof M == "string" || typeof M == "number")) ? "查看" : s;
2744
- return n = Array.isArray(n) ? n.join(",") : n, n;
2745
- }, gn = (e) => {
2746
- var v, x, S, T, L, O, $, d, U, M;
2747
- const { row: l, column: r, item: a, slotData: i } = e;
2748
- let s = l != null && l[r == null ? void 0 : r.prop] ? ((x = (v = l == null ? void 0 : l[r == null ? void 0 : r.prop]) == null ? void 0 : v[0]) == null ? void 0 : x.contents) ?? (l == null ? void 0 : l[r == null ? void 0 : r.prop]) : ((T = (S = l == null ? void 0 : l[a == null ? void 0 : a.prop]) == null ? void 0 : S[0]) == null ? void 0 : T.contents) ?? (l == null ? void 0 : l[a == null ? void 0 : a.prop]) ?? ((O = (L = i == null ? void 0 : i[a == null ? void 0 : a.prop]) == null ? void 0 : L[0]) == null ? void 0 : O.contents) ?? (i == null ? void 0 : i[a == null ? void 0 : a.prop]) ?? ((U = (d = l == null ? void 0 : l[($ = a == null ? void 0 : a.child) == null ? void 0 : $.prop]) == null ? void 0 : d[0]) == null ? void 0 : U.contents) ?? (l == null ? void 0 : l[(M = a == null ? void 0 : a.child) == null ? void 0 : M.prop]);
2749
- const n = Array.isArray(s) && !(s != null && s.every((P) => typeof P == "string" || typeof P == "number")), f = Array.isArray(s) && (s == null ? void 0 : s.find((P) => P == null ? void 0 : P.url));
2750
- return n && f;
2751
- }, Fr = (e) => {
2752
- var c, n, f, v, x, S, T, L, O, $;
2753
- const { row: l, column: r, item: a, slotData: i } = e || {};
2754
- let s = l != null && l[r == null ? void 0 : r.prop] ? ((n = (c = l == null ? void 0 : l[r == null ? void 0 : r.prop]) == null ? void 0 : c[0]) == null ? void 0 : n.contents) ?? (l == null ? void 0 : l[r == null ? void 0 : r.prop]) : ((v = (f = l == null ? void 0 : l[a == null ? void 0 : a.prop]) == null ? void 0 : f[0]) == null ? void 0 : v.contents) ?? (l == null ? void 0 : l[a == null ? void 0 : a.prop]) ?? ((S = (x = i == null ? void 0 : i[a == null ? void 0 : a.prop]) == null ? void 0 : x[0]) == null ? void 0 : S.contents) ?? (i == null ? void 0 : i[a == null ? void 0 : a.prop]) ?? ((O = (L = l == null ? void 0 : l[(T = a == null ? void 0 : a.child) == null ? void 0 : T.prop]) == null ? void 0 : L[0]) == null ? void 0 : O.contents) ?? (l == null ? void 0 : l[($ = a == null ? void 0 : a.child) == null ? void 0 : $.prop]);
2755
- return Array.isArray(s) ? (s == null ? void 0 : s.filter((d) => (d == null ? void 0 : d.url) || (d == null ? void 0 : d.downloadUrl))) ?? [] : [];
2756
- }, bn = (e, l) => e.find((r) => Object.values(r).some((a) => a === l));
2757
- return jl(() => si.value, async (e) => {
2758
- if (e) {
2759
- ul.setContentLoading(!0), await Ga();
2760
- const l = bn(ee.value, e == null ? void 0 : e.data);
2761
- if (!l) return ul.setContentLoading(!1);
2762
- await _r(e == null ? void 0 : e.data, null, l, { data: e == null ? void 0 : e.data, isMainKey: !0 }), ul.setContentLoading(!1);
2763
- }
2764
- }, { deep: !0, immediate: !0 }), jl(() => u == null ? void 0 : u.cacheNewData, (e) => {
2765
- var l;
2766
- e && (Array.isArray(e) || (e == null ? void 0 : e.compId) === (u == null ? void 0 : u.index) && (ee.value = (l = ee.value) == null ? void 0 : l.map((r) => {
2767
- var a;
2768
- return (r == null ? void 0 : r.id) === ((a = e == null ? void 0 : e.data) == null ? void 0 : a.id) ? {
2769
- ...r,
2770
- id: e == null ? void 0 : e.resId
2771
- } : r;
2772
- })));
2773
- }, { immediate: !0, deep: !0 }), (e, l) => {
2774
- var T, L, O, $;
2775
- const r = Sl("svg-icon"), a = Sl("el-popover"), i = Sl("el-switch"), s = Sl("el-checkbox"), c = Sl("el-checkbox-group"), n = Sl("el-button"), f = Sl("LookComponent"), v = Sl("el-icon"), x = Sl("el-upload"), S = Tn("loading");
2776
- return ae(), _e("div", Mu, [
2777
- br.value ? (ae(), Ve(qn, {
2778
- id: "excel-table",
2779
- pageObj: Je,
2780
- showIndex: Ue.value,
2781
- isTree: (T = z.compItem) == null ? void 0 : T.isTree,
2782
- summaryInfo: pl,
2783
- columns: I.value,
2784
- defaultSort: Y,
2785
- isCardViewport: Ja.value,
2786
- checkedColumns: oe.value,
2787
- key: er.value + JSON.stringify(I.value),
2788
- tableData: kr.value,
2789
- isEditViewport: Fl.value,
2790
- isShowPagination: vr.value,
2791
- isShowEdit: !1,
2792
- isShowDelete: !1,
2793
- allowSelect: ye.value,
2794
- onDbClickRow: wi,
2795
- extraButton: Gl.value,
2796
- rowButton: Ml.value,
2797
- cacheExtraButtons: Nl.value,
2798
- isClearSelection: ((L = Rl.value) == null ? void 0 : L.length) === 0,
2799
- onDoCurrentChange: mi,
2800
- onDoSizeChange: Ti,
2801
- onContentClick: _r,
2802
- onRowClick: zi,
2803
- onSelectChange: Ei,
2804
- onCellChange: vn,
2805
- onChange: jr,
2806
- onPreview: Sr,
2807
- onSubmitEditingTable: Ui,
2808
- onHandleColEditChange: Ci,
2809
- onHandleColTypeChange: Di,
2810
- onClickButton: qa
2811
- }, _n({
2812
- headerButton: H((d) => {
2813
- var U, M;
2814
- return [
2815
- z.showHeader ? (ae(), Ve(vu, {
2816
- key: 0,
2817
- pageLayout: z.pageLayout,
2818
- lockingPage: Ll(Fa) === Ll(Ne),
2819
- filterValues: Tr.value,
2820
- selectNums: (U = Rl.value) == null ? void 0 : U.length,
2821
- dataNums: (M = ee.value) == null ? void 0 : M.length,
2822
- compName: z.compName,
2823
- isDevMode: z.isDevMode,
2824
- buttons: d.buttons,
2825
- onButtonClick: l[1] || (l[1] = (P) => qa(P, "", {})),
2826
- columns: I.value,
2827
- onFilter: Ri,
2828
- onGetImportData: xi,
2829
- level: z.level,
2830
- filterShow: Ee.value
2831
- }, null, 8, ["pageLayout", "lockingPage", "filterValues", "selectNums", "dataNums", "compName", "isDevMode", "buttons", "columns", "level", "filterShow"])) : We("", !0)
2832
- ];
2833
- }),
2834
- viewport: H(() => {
2835
- var d, U, M, P;
2836
- return [
2837
- ((d = ee.value) == null ? void 0 : d.length) > 0 && z.allowOperate && ge.value ? (ae(), _e("div", Fu, [
2838
- (U = ze.value) != null && U.includes("read") && ((M = ze.value) != null && M.includes("edit")) && ((P = Ml.value) != null && P.some((b) => (b == null ? void 0 : b.label) === "编辑")) && !Ja.value && Ll(Fa) !== Ll(Ne) ? (ae(), _e("span", {
2839
- key: 0,
2840
- title: "编辑表格",
2841
- onClick: Br
2842
- }, [
2843
- ne(r, {
2844
- name: "editTable",
2845
- class: "view-icon"
2846
- })
2847
- ])) : We("", !0),
2848
- ve("span", {
2849
- title: "卡片视图",
2850
- onClick: tn
2851
- }, [
2852
- ne(r, {
2853
- name: "cardViewport",
2854
- class: "view-icon"
2855
- })
2856
- ])
2857
- ])) : We("", !0)
2858
- ];
2859
- }),
2860
- rowCreate: H(({ row: d, index: U }) => [
2861
- ve("span", {
2862
- title: "新增",
2863
- class: "row-create-wrap",
2864
- onClick: (M) => hn(d, U)
2865
- }, [
2866
- ne(r, {
2867
- name: "rowCreate",
2868
- style: { width: "10px", height: "10px" }
2869
- })
2870
- ], 8, Ru)
2871
- ]),
2872
- operateCol: H(() => [
2873
- ne(a, {
2874
- title: "选择显示列信息",
2875
- placement: "left-start",
2876
- "popper-class": "menu-operate-popover",
2877
- trigger: "hover",
2878
- onShow: dn
2879
- }, {
2880
- reference: H(() => [
2881
- ve("span", wu, [
2882
- ne(r, {
2883
- name: "operate",
2884
- style: { width: "15px", height: "15px", cursor: "pointer" }
2885
- })
2886
- ])
2887
- ]),
2888
- default: H(() => [
2889
- ve("div", Ku, [
2890
- l[14] || (l[14] = ve("div", { class: "group-title" }, "表格操作", -1)),
2891
- ne(i, {
2892
- "model-value": Te.value,
2893
- "active-text": "排序",
2894
- "inactive-text": "",
2895
- style: { "margin-right": "8px" },
2896
- onChange: l[3] || (l[3] = (d) => lr(d, "sortable"))
2897
- }, null, 8, ["model-value"]),
2898
- ne(i, {
2899
- "model-value": Me.value,
2900
- "active-text": "筛选",
2901
- "inactive-text": "",
2902
- style: { "margin-right": "8px" },
2903
- onChange: l[4] || (l[4] = (d) => lr(d, "filterable"))
2904
- }, null, 8, ["model-value"]),
2905
- ne(i, {
2906
- "model-value": Ge.value,
2907
- "active-text": "编辑所有表头",
2908
- "inactive-text": "",
2909
- onChange: l[5] || (l[5] = (d) => lr(d, "operable"))
2910
- }, null, 8, ["model-value"]),
2911
- l[15] || (l[15] = ve("div", { class: "group-title" }, "表格列操作", -1)),
2912
- ne(c, {
2913
- modelValue: oe.value,
2914
- "onUpdate:modelValue": l[6] || (l[6] = (d) => oe.value = d),
2915
- style: { height: "100%" },
2916
- min: 2,
2917
- ref_key: "checkboxGroupRef",
2918
- ref: K
2919
- }, {
2920
- default: H(() => [
2921
- (ae(!0), _e(Hl, null, Ql(Ca.value, (d) => (ae(), _e("div", {
2922
- style: { display: "flex", "align-items": "center" },
2923
- key: d.label
2924
- }, [
2925
- ne(s, {
2926
- value: d.label,
2927
- style: { width: "100%", marginRight: 0 }
2928
- }, {
2929
- default: H(() => [
2930
- ve("span", {
2931
- title: d.label,
2932
- style: { display: "inline-block", width: "250px", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }
2933
- }, qe(d.label), 9, zu)
2934
- ]),
2935
- _: 2
2936
- }, 1032, ["value"]),
2937
- ne(a, {
2938
- title: "列操作",
2939
- placement: "left",
2940
- teleported: !1,
2941
- trigger: "hover"
2942
- }, {
2943
- reference: H(() => [
2944
- ne(r, {
2945
- name: "colOperate",
2946
- style: { width: "15px", height: "15px", cursor: "pointer", color: "grey", position: "absolute", right: "40px" }
2947
- })
2948
- ]),
2949
- default: H(() => {
2950
- var U;
2951
- return [
2952
- ve("div", Ju, [
2953
- (ae(!0), _e(Hl, null, Ql((U = Object.keys(d)) == null ? void 0 : U.filter((M) => {
2954
- var P;
2955
- return (P = zl.value) == null ? void 0 : P.find((b) => (b == null ? void 0 : b.value) === M);
2956
- }), (M) => {
2957
- var P, b;
2958
- return ae(), _e("div", { key: M }, [
2959
- ne(i, {
2960
- "model-value": d == null ? void 0 : d[M],
2961
- "active-text": (b = (P = zl.value) == null ? void 0 : P.find((C) => (C == null ? void 0 : C.value) === M)) == null ? void 0 : b.label,
2962
- onChange: (C) => $i(C, M, d)
2963
- }, null, 8, ["model-value", "active-text", "onChange"])
2964
- ]);
2965
- }), 128))
2966
- ])
2967
- ];
2968
- }),
2969
- _: 2
2970
- }, 1024),
2971
- ve("span", Wu, [
2972
- ne(r, {
2973
- name: "drag",
2974
- class: "col-drag-icon",
2975
- style: { width: "15px", height: "15px" }
2976
- })
2977
- ])
2978
- ]))), 128))
2979
- ]),
2980
- _: 1
2981
- }, 8, ["modelValue"])
2982
- ])
2983
- ]),
2984
- _: 1
2985
- })
2986
- ]),
2987
- content: H((d) => {
2988
- var U, M, P, b, C, k, D, g, Q, B, G, o, E, ce, F, m, j, re, le, V;
2989
- return [
2990
- ((U = d == null ? void 0 : d.column) == null ? void 0 : U.label) === "OCR图片" || ((M = d == null ? void 0 : d.column) == null ? void 0 : M.prop) === "OCR图片" ? (ae(), _e("div", qu, [
2991
- ne(a, {
2992
- "popper-class": "file-popover",
2993
- placement: "right",
2994
- trigger: "click",
2995
- effect: "light",
2996
- width: "auto"
2997
- }, {
2998
- reference: H(() => [
2999
- ne(r, {
3000
- name: "query",
3001
- style: {
3002
- width: "20px",
3003
- height: "20px",
3004
- color: "var(--ssComponent-theme-color)",
3005
- cursor: "pointer"
3006
- },
3007
- onClick: l[7] || (l[7] = or(() => {
3008
- }, ["stop"])),
3009
- title: "查看OCR图片"
3010
- })
3011
- ]),
3012
- default: H(() => {
3013
- var he;
3014
- return [
3015
- ve("div", Gu, [
3016
- ((he = Fr(d)) == null ? void 0 : he.length) === 0 ? (ae(), _e("div", Hu, l[16] || (l[16] = [
3017
- ve("div", { class: "prop-url" }, "暂无图片", -1)
3018
- ]))) : (ae(!0), _e(Hl, { key: 1 }, Ql(Fr(d), (te) => (ae(), _e("div", {
3019
- class: "file-list-pop",
3020
- key: (te == null ? void 0 : te.url) || (te == null ? void 0 : te.name)
3021
- }, [
3022
- ve("div", {
3023
- class: "prop-url",
3024
- title: ca(te),
3025
- onClick: (J) => Ar(te)
3026
- }, qe(ca(te)), 9, Qu),
3027
- ve("div", {
3028
- class: "prop-download",
3029
- onClick: (J) => mr(te)
3030
- }, " 下载 ", 8, Xu)
3031
- ]))), 128))
3032
- ])
3033
- ];
3034
- }),
3035
- _: 2
3036
- }, 1024)
3037
- ])) : gn(d) ? (ae(), Ve(a, {
3038
- key: 1,
3039
- "popper-class": "file-popover",
3040
- placement: "right",
3041
- trigger: "hover",
3042
- effect: "light",
3043
- width: "auto"
3044
- }, {
3045
- reference: H(() => [
3046
- ve("span", Zu, qe(bl(d)), 1)
3047
- ]),
3048
- default: H(() => {
3049
- var he, te;
3050
- return [
3051
- ve("div", Yu, [
3052
- (ae(!0), _e(Hl, null, Ql((te = d == null ? void 0 : d.row) == null ? void 0 : te[(he = d == null ? void 0 : d.column) == null ? void 0 : he.prop], (J) => (ae(), _e("div", Iu, [
3053
- ve("div", {
3054
- class: "prop-url",
3055
- title: ca(J),
3056
- onClick: (de) => Ar(J)
3057
- }, qe(ca(J)), 9, Vu),
3058
- ve("div", {
3059
- class: "prop-download",
3060
- onClick: (de) => mr(J)
3061
- }, " 下载 ", 8, eo)
3062
- ]))), 256))
3063
- ])
3064
- ];
3065
- }),
3066
- _: 2
3067
- }, 1024)) : (ae(), _e("div", {
3068
- key: 2,
3069
- style: na({
3070
- color: !Array.isArray(bl(d)) && ((b = (P = bl(d)) == null ? void 0 : P.toString()) != null && b.includes(".txt") || (k = (C = bl(d)) == null ? void 0 : C.toString()) != null && k.includes(".cpt") || (g = (D = bl(d)) == null ? void 0 : D.toString()) != null && g.includes(".cyd")) ? "var(--vertical-menuitem-active-bg)" : "",
3071
- textDecoration: !Array.isArray(bl(d)) && ((B = (Q = bl(d)) == null ? void 0 : Q.toString()) != null && B.includes(".txt") || (o = (G = bl(d)) == null ? void 0 : G.toString()) != null && o.includes(".cpt") || (ce = (E = bl(d)) == null ? void 0 : E.toString()) != null && ce.includes(".cyd")) ? "underline" : "",
3072
- cursor: !Array.isArray(bl(d)) && ((m = (F = bl(d)) == null ? void 0 : F.toString()) != null && m.includes(".txt") || (re = (j = bl(d)) == null ? void 0 : j.toString()) != null && re.includes(".cpt") || (V = (le = bl(d)) == null ? void 0 : le.toString()) != null && V.includes(".cyd")) ? "pointer" : "",
3073
- marginLeft: (d == null ? void 0 : d.colIndex) === 0 ? `${((d == null ? void 0 : d.level) ?? 0) * 20}px` : 0
3074
- }),
3075
- onClick: (he) => Ai(bl(d))
3076
- }, qe(bl(d) === 0 ? "0" : bl(d)), 13, lo))
3077
- ];
3078
- }),
3079
- _: 2
3080
- }, [
3081
- ((O = Ml.value) == null ? void 0 : O.length) > 0 && Ll(Fa) !== Ll(Ne) ? {
3082
- name: "actions",
3083
- fn: H(({ item: d }) => [
3084
- ne(a, {
3085
- title: "",
3086
- placement: "left-start",
3087
- "popper-class": "menu-operate-popover"
3088
- }, {
3089
- reference: H(() => [
3090
- ne(r, {
3091
- name: "more",
3092
- style: { cursor: "pointer", width: "15px", height: "15px" },
3093
- onClick: l[0] || (l[0] = or(() => {
3094
- }, ["stop"]))
3095
- })
3096
- ]),
3097
- default: H(() => [
3098
- ve("div", Nu, [
3099
- (ae(!0), _e(Hl, null, Ql(Ni(Ml.value, d), (U, M) => (ae(), _e("div", {
3100
- class: "menu-config-item",
3101
- key: M,
3102
- onClick: or((P) => qa(U == null ? void 0 : U.label, d, { extra: U }), ["stop"])
3103
- }, [
3104
- ve("div", {
3105
- style: na({ color: U == null ? void 0 : U.textColor }),
3106
- class: "extra-button-label"
3107
- }, qe(U == null ? void 0 : U.label), 5)
3108
- ], 8, Bu))), 128))
3109
- ])
3110
- ]),
3111
- _: 2
3112
- }, 1024)
3113
- ]),
3114
- key: "0"
3115
- } : void 0,
3116
- (($ = ee.value) == null ? void 0 : $.length) > 0 ? {
3117
- name: "batchButton",
3118
- fn: H((d) => [
3119
- sr(ne(bu, {
3120
- lockingPage: Ll(Fa) === Ll(Ne),
3121
- buttons: d.buttons,
3122
- selectTableItems: Rl.value,
3123
- onButtonClick: l[2] || (l[2] = (U) => qa(U, "", {}))
3124
- }, null, 8, ["lockingPage", "buttons", "selectTableItems"]), [
3125
- [Kr, ye.value]
3126
- ]),
3127
- sr(ve("div", null, null, 512), [
3128
- [Kr, !ye.value]
3129
- ])
3130
- ]),
3131
- key: "1"
3132
- } : void 0
3133
- ]), 1032, ["pageObj", "showIndex", "isTree", "summaryInfo", "columns", "defaultSort", "isCardViewport", "checkedColumns", "tableData", "isEditViewport", "isShowPagination", "allowSelect", "extraButton", "rowButton", "cacheExtraButtons", "isClearSelection"])) : We("", !0),
3134
- ne(ha, {
3135
- title: xl.value,
3136
- visible: ql.value,
3137
- width: gi.value,
3138
- onBeforeDestroy: Pi,
3139
- style: { height: "74%" }
3140
- }, {
3141
- default: H(() => [
3142
- ve("div", ao, [
3143
- ne(ba, {
3144
- rowContents: Ae.value,
3145
- isEnableWrap: !1,
3146
- showOperator: !1,
3147
- onChange: pn,
3148
- onFixChangeValue: Fi,
3149
- onClickTrigger: Mi,
3150
- isEdit: Ra.value,
3151
- onBlurChange: ji,
3152
- onCreate: Li,
3153
- onTagChange: Si
3154
- }, null, 8, ["rowContents", "isEdit"])
3155
- ])
3156
- ]),
3157
- footer: H(() => [
3158
- Ka.value ? (ae(), _e("div", ro, [
3159
- ne(n, {
3160
- onClick: l[8] || (l[8] = (d) => ql.value = !1),
3161
- id: "themeBorderButton"
3162
- }, {
3163
- default: H(() => l[17] || (l[17] = [
3164
- Al(qe("取消"))
3165
- ])),
3166
- _: 1,
3167
- __: [17]
3168
- }),
3169
- ne(n, {
3170
- class: "ok-button",
3171
- onClick: l[9] || (l[9] = (d) => Ea(!0)),
3172
- id: "themeButton"
3173
- }, {
3174
- default: H(() => l[18] || (l[18] = [
3175
- Al(qe("确认"))
3176
- ])),
3177
- _: 1,
3178
- __: [18]
3179
- })
3180
- ])) : We("", !0)
3181
- ]),
3182
- _: 1
3183
- }, 8, ["title", "visible", "width"]),
3184
- ne(ha, {
3185
- title: xl.value,
3186
- visible: wa.value,
3187
- width: Za.value,
3188
- onBeforeDestroy: l[11] || (l[11] = (d) => wa.value = !1)
3189
- }, {
3190
- default: H(() => [
3191
- ne(_u)
3192
- ]),
3193
- footer: H(() => [
3194
- ve("div", io, [
3195
- ne(n, {
3196
- onClick: l[10] || (l[10] = (d) => wa.value = !1),
3197
- class: "cancel-button",
3198
- id: "themeBorderButton"
3199
- }, {
3200
- default: H(() => l[19] || (l[19] = [
3201
- Al(qe("取消"))
3202
- ])),
3203
- _: 1,
3204
- __: [19]
3205
- }),
3206
- ne(n, {
3207
- class: "ok-button",
3208
- onClick: Ji,
3209
- id: "themeButton"
3210
- }, {
3211
- default: H(() => l[20] || (l[20] = [
3212
- Al(qe("确认"))
3213
- ])),
3214
- _: 1,
3215
- __: [20]
3216
- })
3217
- ])
3218
- ]),
3219
- _: 1
3220
- }, 8, ["title", "visible", "width"]),
3221
- Vl.value ? (ae(), Ve(Yr, {
3222
- key: 1,
3223
- fileDataList: ua.value,
3224
- onDestroy: Ki
3225
- }, null, 8, ["fileDataList"])) : We("", !0),
3226
- we.value ? (ae(), Ve(ha, {
3227
- key: 2,
3228
- visible: we.value,
3229
- onBeforeDestroy: on,
3230
- style: { height: "80vh", width: "80vw" },
3231
- "body-class": "three-dialog-body",
3232
- "footer-class": "three-dialog-footer"
3233
- }, {
3234
- default: H(() => [
3235
- ne(Xn, {
3236
- files: Aa.value,
3237
- threeData: Se.value
3238
- }, null, 8, ["files", "threeData"])
3239
- ]),
3240
- _: 1
3241
- }, 8, ["visible"])) : We("", !0),
3242
- ne(ha, {
3243
- visible: e.componentVisible,
3244
- onBeforeDestroy: l[12] || (l[12] = (d) => e.componentVisible = !1),
3245
- width: Za.value,
3246
- style: { height: "70vh" }
3247
- }, {
3248
- default: H(() => [
3249
- ne(f, { dialogItem: la.value }, null, 8, ["dialogItem"])
3250
- ]),
3251
- _: 1
3252
- }, 8, ["visible", "width"]),
3253
- ne(ha, {
3254
- title: "上传OCR图片",
3255
- visible: za.value,
3256
- onBeforeDestroy: Or,
3257
- width: "600px"
3258
- }, {
3259
- default: H(() => [
3260
- sr((ae(), _e("div", null, [
3261
- ne(x, {
3262
- "file-list": Xl.value,
3263
- "onUpdate:fileList": l[13] || (l[13] = (d) => Xl.value = d),
3264
- multiple: "",
3265
- drag: "",
3266
- action: "",
3267
- "auto-upload": !1,
3268
- limit: 20,
3269
- accept: "image/*",
3270
- "on-change": Yi,
3271
- class: "upload-content"
3272
- }, {
3273
- tip: H(() => l[21] || (l[21] = [
3274
- ve("div", { class: "el-upload__tip tip-content" }, " 请上传图片文件,大小不超过10MB ", -1)
3275
- ])),
3276
- default: H(() => [
3277
- ne(v, { class: "el-icon--upload" }, {
3278
- default: H(() => [
3279
- ne(Ll(On))
3280
- ]),
3281
- _: 1
3282
- }),
3283
- l[22] || (l[22] = ve("div", { class: "el-upload__text" }, [
3284
- Al(" 将图片拖到此处或"),
3285
- ve("em", null, "点击上传")
3286
- ], -1))
3287
- ]),
3288
- file: H(({ file: d, index: U }) => [
3289
- ve("div", no, [
3290
- ve("div", {
3291
- class: "upload-content-title",
3292
- style: { flex: "1", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" },
3293
- title: d == null ? void 0 : d.name
3294
- }, qe(d == null ? void 0 : d.name), 9, uo),
3295
- ve("div", oo, [
3296
- ne(r, {
3297
- class: "icon-blue",
3298
- name: "EyeFill",
3299
- style: { width: "15px", height: "15px", cursor: "pointer", color: "var(--ssform-label-color)" },
3300
- onClick: (M) => Vi(d),
3301
- title: "预览"
3302
- }, null, 8, ["onClick"]),
3303
- ne(r, {
3304
- class: "icon-blue",
3305
- name: "Cancel",
3306
- style: { width: "15px", height: "15px", cursor: "pointer", color: "var(--ssform-label-color)" },
3307
- onClick: (M) => ln(U),
3308
- title: "删除"
3309
- }, null, 8, ["onClick"])
3310
- ])
3311
- ])
3312
- ]),
3313
- _: 1
3314
- }, 8, ["file-list"])
3315
- ])), [
3316
- [S, ma.value]
3317
- ])
3318
- ]),
3319
- footer: H(() => [
3320
- ve("div", so, [
3321
- ne(n, {
3322
- onClick: Or,
3323
- id: "themeBorderButton",
3324
- disabled: ma.value
3325
- }, {
3326
- default: H(() => l[23] || (l[23] = [
3327
- Al("取消")
3328
- ])),
3329
- _: 1,
3330
- __: [23]
3331
- }, 8, ["disabled"]),
3332
- ne(n, {
3333
- class: "ok-button",
3334
- onClick: Ii,
3335
- id: "themeButton",
3336
- disabled: ma.value
3337
- }, {
3338
- default: H(() => l[24] || (l[24] = [
3339
- Al("确认")
3340
- ])),
3341
- _: 1,
3342
- __: [24]
3343
- }, 8, ["disabled"])
3344
- ])
3345
- ]),
3346
- _: 1
3347
- }, 8, ["visible"]),
3348
- Ya.value ? (ae(), Ve(Yr, {
3349
- key: 3,
3350
- fileDataList: Ia.value,
3351
- onDestroy: en
3352
- }, null, 8, ["fileDataList"])) : We("", !0),
3353
- ne(ha, {
3354
- title: Ye.title,
3355
- visible: Ye.show,
3356
- width: Ye.width,
3357
- onBeforeDestroy: Xi
3358
- }, {
3359
- default: H(() => [
3360
- ve("div", po, [
3361
- ne(ba, {
3362
- rowContents: Ye == null ? void 0 : Ye.contents,
3363
- formRules: Ye == null ? void 0 : Ye.formRules,
3364
- showOperator: !1,
3365
- buttonValue: Ye.buttonValue,
3366
- isEdit: Ra.value,
3367
- isStartJustify: !1,
3368
- isEnableWrap: !1,
3369
- onOnButtonClick: Zi
3370
- }, null, 8, ["rowContents", "formRules", "buttonValue", "isEdit"])
3371
- ])
3372
- ]),
3373
- _: 1
3374
- }, 8, ["title", "visible", "width"])
3375
- ]);
3376
- };
3377
- }
3378
- }, Co = /* @__PURE__ */ Ha(co, [["__scopeId", "data-v-24de0450"]]);
3379
- export {
3380
- ku as a,
3381
- cr as f,
3382
- fr as g,
3383
- Co as s,
3384
- Uu as u
3385
- };