ss-component-new 1.2.177 → 1.2.179

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