ss-component-new 1.2.171 → 1.2.173

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