ss-component-new 1.2.193 → 1.2.194

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