ss-component-new 1.1.415 → 1.1.417
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.
- package/dist/array-CP-DB-qS.cjs +7 -0
- package/dist/array-CU7_6w0r.js +346 -0
- package/dist/{index-BSAEf__V.js → index-4pgWhRVN.js} +5 -5
- package/dist/{index-DjhZHYH_.cjs → index-B3AJmz_C.cjs} +1 -1
- package/dist/index-B8GEl5H_.cjs +87 -0
- package/dist/{index-BPDslvev.js → index-B8O_p-_G.js} +2 -2
- package/dist/{index-Dm1_86kX.js → index-BF4CXK8w.js} +3 -3
- package/dist/index-BMFW7H3U.cjs +1 -0
- package/dist/{index-BJitBJZu.cjs → index-BVTdPibL.cjs} +2 -2
- package/dist/{index-faxMOO3y.js → index-Bcyk637L.js} +5 -5
- package/dist/{index-CNQtTLfb.cjs → index-BpsdG9J0.cjs} +1 -1
- package/dist/{index-eSv5uzFM.js → index-Bwr24NdY.js} +354 -359
- package/dist/{index-DuwxEG2Y.js → index-C3T7U42Q.js} +11 -11
- package/dist/index-CCEkCHrk.js +1112 -0
- package/dist/{index-DbuzlHfh.js → index-CChV4BPy.js} +10 -10
- package/dist/{index-8nzu3dKT.js → index-CDLCxYbO.js} +4 -4
- package/dist/{index-BHxsT1eb.cjs → index-CEPaQEEW.cjs} +1 -1
- package/dist/{index-AzrB9NlT.js → index-CFD-iDJS.js} +4 -4
- package/dist/{index-VOSN3Mnh.js → index-CHub3JaO.js} +5 -5
- package/dist/{index-CTTEAggF.cjs → index-CIE6JLs1.cjs} +1 -1
- package/dist/index-CJ4l3GaJ.cjs +1 -0
- package/dist/{index-BxHhG5PY.js → index-CLRc75f_.js} +8 -8
- package/dist/{index-DrCpGMdZ.js → index-CMM_ICmU.js} +3 -3
- package/dist/{index-DrUjNhjW.js → index-COlD7pxM.js} +1 -1
- package/dist/index-CPP5Pt28.js +731 -0
- package/dist/{index-DoIHM98M.js → index-CSsv4KqN.js} +1 -1
- package/dist/{index-3dpRV7yS.cjs → index-CTu1NToC.cjs} +1 -1
- package/dist/{index-CdLmmvxi.cjs → index-CVMCiTTv.cjs} +1 -1
- package/dist/{index-BA-Qtevs.cjs → index-CZbhV1ZJ.cjs} +1 -1
- package/dist/{index-CilqH8oC.cjs → index-CZh-SfBL.cjs} +1 -1
- package/dist/{index-BimZK7wy.cjs → index-CcaDRZTq.cjs} +1 -1
- package/dist/{index-CA9lI4P8.js → index-CeBT1Ulw.js} +4 -4
- package/dist/{index-BVuLbYm9.cjs → index-CeVsvY0k.cjs} +1 -1
- package/dist/{index-ZUmqWSaw.cjs → index-ChcZGPnx.cjs} +1 -1
- package/dist/{index-CffNkMWN.cjs → index-CwIH21hM.cjs} +1 -1
- package/dist/{index-Dxfzna5p.cjs → index-D-RyjmUO.cjs} +1 -1
- package/dist/{index-B6_X9xq9.js → index-D3z4AgL1.js} +4 -4
- package/dist/{index-BJIMXITA.js → index-D5V1e9cO.js} +5 -5
- package/dist/{index-9srnYnzT.js → index-D6iU6Te6.js} +9 -9
- package/dist/{index-BibIA5-P.cjs → index-D88jka5v.cjs} +1 -1
- package/dist/{index-DHhMROzm.cjs → index-DADBCqDR.cjs} +1 -1
- package/dist/{index-9QTlnrEQ.cjs → index-DFb2ZrvR.cjs} +1 -1
- package/dist/{index-DPm-3I4S.js → index-DKCxgFUW.js} +6 -6
- package/dist/{index-BszUQuvL.cjs → index-DLhT_R3Q.cjs} +1 -1
- package/dist/{index-WPbX9sqP.cjs → index-DX66EWCT.cjs} +1 -1
- package/dist/{index-DMp2zGXo.js → index-Dd4IqazP.js} +7 -7
- package/dist/{index-DBB_scdx.cjs → index-WFdingrw.cjs} +1 -1
- package/dist/{index-FBp-XX6h.js → index-dGIARC7m.js} +7051 -7021
- package/dist/{index-BOzZXj2f.js → index-lGikBSHE.js} +7 -7
- package/dist/{index-BJiXsb3E.cjs → index-mGKl9i0X.cjs} +1 -1
- package/dist/{index-Bhg9ISur.js → index-oMbmGcaB.js} +6 -6
- package/dist/{index-C8jmJvXd.cjs → index-pLa33V9a.cjs} +1 -1
- package/dist/{index-UYsrvpRs.js → index-qs1AQKGF.js} +4 -4
- package/dist/index-xzoZUttH.cjs +7 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-CKDefrVd.js → index.vue_vue_type_script_setup_true_lang-BEMlrqwP.js} +3 -3
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dr6igsfU.cjs → index.vue_vue_type_script_setup_true_lang-Bk4PHjWn.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CaGB6aRQ.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D5XW-lZk.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-x_oCFRtr.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNfIOSKK.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-BJ24PgNH.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-DlAg03w9.js +1636 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-CNkToObt.cjs +1 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_306ecd73_lang-CMsb25AU.js → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-DM39K5kZ.js} +90 -89
- package/dist/login-0tdy4gQs.js +75 -0
- package/dist/login-BEZ7u6zR.cjs +1 -0
- package/dist/{main-C7zpT64X.js → main-Cq1MaQxR.js} +6 -6
- package/dist/{main-NoOanZcQ.cjs → main-DWQfy0Jj.cjs} +1 -1
- package/dist/{menu-B-Z5KAh5.cjs → menu-CAtGS1Fx.cjs} +4 -4
- package/dist/{menu-D9x5_s9p.js → menu-D7VMU4Hp.js} +9 -6
- package/dist/menuIndex-BWim3TlH.js +33 -0
- package/dist/menuIndex-Cg6xI-jR.cjs +1 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +10 -10
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/dist/{threeModel-BazaxATJ.js → threeModel-CLiNKACw.js} +5 -6
- package/dist/{threeModel-MVkoDB-c.cjs → threeModel-CiwhTLoC.cjs} +1 -1
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CBBWsMHp.cjs → threeModel.vue_vue_type_style_index_0_scoped_43c8b141_lang-CHtdDFOo.cjs} +1 -1
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CnQhvwfL.js → threeModel.vue_vue_type_style_index_0_scoped_43c8b141_lang-CwNweo5U.js} +2 -2
- package/package.json +1 -1
- package/dist/array-CYOvmzeK.js +0 -1310
- package/dist/array-DAoy3WS9.cjs +0 -7
- package/dist/index-Bvr0YvSP.cjs +0 -74
- package/dist/index-CyOcoFxe.cjs +0 -1
- package/dist/index-D68A4TXc.cjs +0 -1
- package/dist/index-DIv5glVC.js +0 -1567
- package/dist/index-Dnq8JVuW.cjs +0 -7
- package/dist/index-TEDdJfFz.js +0 -677
- package/dist/index.vue_vue_type_style_index_0_scoped_306ecd73_lang-B7CgbfdF.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-COxDD0Fj.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-DDi07ZiD.js +0 -1593
- package/dist/login-CARNmuDg.js +0 -103
- package/dist/login-DsWsywlE.cjs +0 -1
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
package/dist/index-TEDdJfFz.js
DELETED
|
@@ -1,677 +0,0 @@
|
|
|
1
|
-
import { ref as b, computed as j, reactive as te, nextTick as L, defineComponent as ge, onMounted as fe, resolveComponent as J, resolveDirective as ve, createElementBlock as Q, openBlock as X, createElementVNode as A, withDirectives as he, createVNode as D, withCtx as x, createTextVNode as Y } from "vue";
|
|
2
|
-
import { s as le, g as $, u as ae, E as N, p as K, c as oe, d as ne, e as be, h as ye } from "./menu-D9x5_s9p.js";
|
|
3
|
-
import { u as Ce } from "./threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CnQhvwfL.js";
|
|
4
|
-
import { u as ke, v as Te } from "./index-faxMOO3y.js";
|
|
5
|
-
import { h as De } from "./index-Bhg9ISur.js";
|
|
6
|
-
import { f as Ie } from "./login-CARNmuDg.js";
|
|
7
|
-
import { c as E } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CaGB6aRQ.js";
|
|
8
|
-
import { s as _e, b as we } from "./index-UYsrvpRs.js";
|
|
9
|
-
import { _ as Me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
const _ = Ce(K), re = ke(K), k = ae(K), { menus: se, configMenu: F, activeMenuPath: z, cacheStructures: S } = le(k), U = b(!1), Se = j(() => {
|
|
11
|
-
var t, e;
|
|
12
|
-
return [
|
|
13
|
-
{
|
|
14
|
-
key: "extraButton",
|
|
15
|
-
contents: [
|
|
16
|
-
// {
|
|
17
|
-
// label: "新增"
|
|
18
|
-
// }
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
key: "rowButton",
|
|
23
|
-
contents: [
|
|
24
|
-
{
|
|
25
|
-
label: "修改"
|
|
26
|
-
}
|
|
27
|
-
// {
|
|
28
|
-
// label: "删除"
|
|
29
|
-
// }
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
key: "header",
|
|
34
|
-
contents: [
|
|
35
|
-
{
|
|
36
|
-
label: "菜单名称",
|
|
37
|
-
prop: "title",
|
|
38
|
-
isFormColHidden: !1
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
label: "菜单类型",
|
|
42
|
-
prop: "menuType",
|
|
43
|
-
formType: "select",
|
|
44
|
-
options: [
|
|
45
|
-
{
|
|
46
|
-
label: "系统菜单",
|
|
47
|
-
value: "集团"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
label: "公司",
|
|
51
|
-
value: "公司"
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
isTableColHidden: !1,
|
|
55
|
-
isFormColHidden: !0
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: "操作"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
key: "tableContents",
|
|
64
|
-
contents: (e = (t = E(se.value)) == null ? void 0 : t.map((a) => ({
|
|
65
|
-
...a,
|
|
66
|
-
menuType: "系统菜单"
|
|
67
|
-
}))) == null ? void 0 : e.filter((a) => a.title !== "系统管理" && a.title !== "平台管理")
|
|
68
|
-
}
|
|
69
|
-
];
|
|
70
|
-
}), W = b([]), O = b([
|
|
71
|
-
{
|
|
72
|
-
// label: "新增",
|
|
73
|
-
label: "新建"
|
|
74
|
-
}
|
|
75
|
-
]), Ne = j(() => [
|
|
76
|
-
{
|
|
77
|
-
key: "extraButton",
|
|
78
|
-
contents: O.value
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
key: "rowButton",
|
|
82
|
-
contents: [
|
|
83
|
-
{
|
|
84
|
-
// label: "编辑",
|
|
85
|
-
label: "修改"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
label: "删除"
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
key: "header",
|
|
94
|
-
contents: [
|
|
95
|
-
{
|
|
96
|
-
label: "操作类型",
|
|
97
|
-
prop: "operateType",
|
|
98
|
-
formType: "select",
|
|
99
|
-
options: [
|
|
100
|
-
{
|
|
101
|
-
label: "新增",
|
|
102
|
-
value: "新增"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
label: "编辑",
|
|
106
|
-
value: "编辑"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
label: "删除",
|
|
110
|
-
value: "删除"
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
value: ""
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
label: "操作图标",
|
|
117
|
-
prop: "operateIcon",
|
|
118
|
-
formType: "inputPopover",
|
|
119
|
-
value: ""
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
label: "操作触发事件",
|
|
123
|
-
prop: "trigger",
|
|
124
|
-
formType: "select",
|
|
125
|
-
options: [
|
|
126
|
-
{
|
|
127
|
-
label: "弹出弹窗",
|
|
128
|
-
value: "openDialog"
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
value: "openDialog"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
label: "配置一:",
|
|
135
|
-
prop: "dialogConfig",
|
|
136
|
-
formType: "button",
|
|
137
|
-
value: "弹窗内容",
|
|
138
|
-
isTableColHidden: !0
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
label: "配置二:",
|
|
142
|
-
prop: "contentConfig",
|
|
143
|
-
formType: "button",
|
|
144
|
-
value: "模块内容",
|
|
145
|
-
isTableColHidden: !0
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
label: "继承配置:",
|
|
149
|
-
prop: "allowInherit",
|
|
150
|
-
formType: "radio",
|
|
151
|
-
contents: [
|
|
152
|
-
{
|
|
153
|
-
label: "是",
|
|
154
|
-
value: !0
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
label: "否",
|
|
158
|
-
value: !1
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
value: !1,
|
|
162
|
-
isTableColHidden: !0
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
label: "操作"
|
|
166
|
-
}
|
|
167
|
-
]
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
key: "tableContents",
|
|
171
|
-
contents: W.value
|
|
172
|
-
}
|
|
173
|
-
]), ue = b([]), T = b({}), Fe = b({}), Z = b([
|
|
174
|
-
// {
|
|
175
|
-
// label: "配置菜单:",
|
|
176
|
-
// prop: 'menu',
|
|
177
|
-
// type: 'cascader',
|
|
178
|
-
// contents: [],
|
|
179
|
-
// config: {
|
|
180
|
-
// checkStrictly: true
|
|
181
|
-
// },
|
|
182
|
-
// // value: ['压气机叶片', 'CJ-1000A']
|
|
183
|
-
// value: []
|
|
184
|
-
// },
|
|
185
|
-
{
|
|
186
|
-
label: "菜单",
|
|
187
|
-
prop: "path",
|
|
188
|
-
isFormColHidden: !0,
|
|
189
|
-
value: ""
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
label: "菜单图标:",
|
|
193
|
-
prop: "menuIcon",
|
|
194
|
-
type: "inputPopover",
|
|
195
|
-
value: ""
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
label: "操作类型:",
|
|
199
|
-
prop: "operateType",
|
|
200
|
-
type: "select",
|
|
201
|
-
contents: [
|
|
202
|
-
{
|
|
203
|
-
label: "新增",
|
|
204
|
-
value: "新增"
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
label: "编辑",
|
|
208
|
-
value: "编辑"
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
label: "删除",
|
|
212
|
-
value: "删除"
|
|
213
|
-
}
|
|
214
|
-
],
|
|
215
|
-
value: ""
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
label: "操作图标:",
|
|
219
|
-
prop: "operateIcon",
|
|
220
|
-
type: "inputPopover",
|
|
221
|
-
value: ""
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
label: "操作触发事件:",
|
|
225
|
-
prop: "trigger",
|
|
226
|
-
type: "select",
|
|
227
|
-
contents: [
|
|
228
|
-
{
|
|
229
|
-
label: "弹出弹窗",
|
|
230
|
-
value: "openDialog"
|
|
231
|
-
}
|
|
232
|
-
],
|
|
233
|
-
value: "openDialog"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
label: "配置一:",
|
|
237
|
-
prop: "dialogConfig",
|
|
238
|
-
type: "button",
|
|
239
|
-
value: "操作触发的弹窗结构"
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
label: "配置二:",
|
|
243
|
-
prop: "contentConfig",
|
|
244
|
-
type: "button",
|
|
245
|
-
value: "操作生成的模块结构"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
label: "",
|
|
249
|
-
prop: "structureIds",
|
|
250
|
-
type: "input",
|
|
251
|
-
value: [],
|
|
252
|
-
isFormColHidden: !0
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
label: "继承配置:",
|
|
256
|
-
prop: "allowInherit",
|
|
257
|
-
type: "radio",
|
|
258
|
-
contents: [
|
|
259
|
-
{
|
|
260
|
-
label: "是",
|
|
261
|
-
value: !0
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
label: "否",
|
|
265
|
-
value: !1
|
|
266
|
-
}
|
|
267
|
-
],
|
|
268
|
-
value: !1
|
|
269
|
-
}
|
|
270
|
-
]), V = (t) => {
|
|
271
|
-
var e;
|
|
272
|
-
console.log("formatFormData", t), ue.value = t ? (e = Z.value) == null ? void 0 : e.map((a) => a.prop === "dialogConfig" || a.prop === "contentConfig" || a.prop === "trigger" ? a : {
|
|
273
|
-
...a,
|
|
274
|
-
value: t ? t[a == null ? void 0 : a.prop] : ""
|
|
275
|
-
}) : Z.value;
|
|
276
|
-
}, Be = b([
|
|
277
|
-
{
|
|
278
|
-
label: "查询"
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
label: "重置"
|
|
282
|
-
}
|
|
283
|
-
]), Pe = async () => {
|
|
284
|
-
}, ce = (t) => t.map((e) => e.childMenus && e.childMenus.length > 0 ? {
|
|
285
|
-
...e,
|
|
286
|
-
value: e == null ? void 0 : e.title,
|
|
287
|
-
label: e == null ? void 0 : e.title,
|
|
288
|
-
children: ce(e.childMenus)
|
|
289
|
-
} : {
|
|
290
|
-
...e,
|
|
291
|
-
value: e == null ? void 0 : e.title,
|
|
292
|
-
label: e == null ? void 0 : e.title
|
|
293
|
-
}), f = te({
|
|
294
|
-
show: !1,
|
|
295
|
-
title: "菜单配置",
|
|
296
|
-
width: "30%",
|
|
297
|
-
type: "create"
|
|
298
|
-
}), q = b([]), C = b({}), h = b(null), I = b([]), ie = j(() => {
|
|
299
|
-
var t;
|
|
300
|
-
return (t = ce(se.value)) == null ? void 0 : t.filter((e) => e.title !== "系统管理" && e.title !== "平台管理");
|
|
301
|
-
}), de = async (t) => {
|
|
302
|
-
var a, s, n, u;
|
|
303
|
-
const e = await $({
|
|
304
|
-
key: {
|
|
305
|
-
type: "subStructure",
|
|
306
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
307
|
-
pageKey: t,
|
|
308
|
-
version: 1
|
|
309
|
-
}
|
|
310
|
-
});
|
|
311
|
-
((a = e == null ? void 0 : e.data) == null ? void 0 : a.code) === 200 && (s = e.data) != null && s.result && (I.value = (u = (n = e.data) == null ? void 0 : n.result) == null ? void 0 : u.map((o) => {
|
|
312
|
-
var c;
|
|
313
|
-
return {
|
|
314
|
-
id: o == null ? void 0 : o.id,
|
|
315
|
-
...(c = o == null ? void 0 : o.value) == null ? void 0 : c.pageData
|
|
316
|
-
};
|
|
317
|
-
}));
|
|
318
|
-
}, xe = async (t) => {
|
|
319
|
-
var e;
|
|
320
|
-
U.value = !0, h.value = {
|
|
321
|
-
...t,
|
|
322
|
-
rootNode: Ie(ie.value, t.path)
|
|
323
|
-
}, (t == null ? void 0 : t.level) === 0 ? O.value.splice(0) : (O.value = [{ label: "新建" }], q.value = (e = t == null ? void 0 : t.path) == null ? void 0 : e.split("/")), await k.setConfigMenu(null), await de(t == null ? void 0 : t.path), await R(t);
|
|
324
|
-
}, Ke = (t) => {
|
|
325
|
-
switch (t) {
|
|
326
|
-
case "新建":
|
|
327
|
-
return "create";
|
|
328
|
-
case "修改":
|
|
329
|
-
return "update";
|
|
330
|
-
case "删除":
|
|
331
|
-
return "delete";
|
|
332
|
-
}
|
|
333
|
-
}, Ee = async (t, e) => {
|
|
334
|
-
var a, s;
|
|
335
|
-
if (!h.value) return N.warning("请先选择菜单");
|
|
336
|
-
if (f.type = Ke(t), q.value = [], _.setSubmitCurStructure(!1), re.setSelectTitle([]), k.setCacheStructures(null), C.value = E(e), f.type !== "delete") {
|
|
337
|
-
switch (f.type) {
|
|
338
|
-
case "create":
|
|
339
|
-
V(null), await k.setConfigMenu(null);
|
|
340
|
-
break;
|
|
341
|
-
case "update":
|
|
342
|
-
V(C.value), await k.setConfigMenu(C.value);
|
|
343
|
-
break;
|
|
344
|
-
}
|
|
345
|
-
await L(), f.title = `【${f.type === "create" ? (a = h.value) == null ? void 0 : a.path : (s = C.value) == null ? void 0 : s.path}】菜单配置${t}`, f.show = !0;
|
|
346
|
-
} else
|
|
347
|
-
await pe(C.value, f.type);
|
|
348
|
-
}, Re = async (t) => {
|
|
349
|
-
var e;
|
|
350
|
-
T.value = t, await k.setConfigMenu({
|
|
351
|
-
...T.value,
|
|
352
|
-
path: (e = h.value) == null ? void 0 : e.path
|
|
353
|
-
});
|
|
354
|
-
}, Ae = b(null), He = async (t, e) => {
|
|
355
|
-
var o, c, d, i, p;
|
|
356
|
-
if (f.type === "create" && ((o = I.value) == null ? void 0 : o.length) > 0 && e === "contentConfig" && _.setItemData(I.value), !(t != null && t.structureIds) || ((c = t == null ? void 0 : t.structureIds) == null ? void 0 : c.length) === 0) return;
|
|
357
|
-
const a = (i = (d = t == null ? void 0 : t.structureIds) == null ? void 0 : d.filter((l) => (l == null ? void 0 : l.key) === e)) == null ? void 0 : i.map((l) => l == null ? void 0 : l.id);
|
|
358
|
-
console.log("getTriggerStructures", t == null ? void 0 : t.structureIds, e);
|
|
359
|
-
let s = a == null ? void 0 : a.map((l) => {
|
|
360
|
-
if (l)
|
|
361
|
-
return $({ id: l });
|
|
362
|
-
});
|
|
363
|
-
const n = await Promise.all(s);
|
|
364
|
-
if (n == null ? void 0 : n.every((l) => {
|
|
365
|
-
var g;
|
|
366
|
-
return ((g = l == null ? void 0 : l.data) == null ? void 0 : g.code) === 200;
|
|
367
|
-
}))
|
|
368
|
-
if ((n == null ? void 0 : n.length) > 0) {
|
|
369
|
-
const l = n == null ? void 0 : n.map((g) => {
|
|
370
|
-
var y, w, r, B, P, M, v, G;
|
|
371
|
-
return {
|
|
372
|
-
id: (r = (w = (y = g == null ? void 0 : g.data) == null ? void 0 : y.result) == null ? void 0 : w[0]) == null ? void 0 : r.id,
|
|
373
|
-
...(G = (v = (M = (P = (B = g == null ? void 0 : g.data) == null ? void 0 : B.result) == null ? void 0 : P[0]) == null ? void 0 : M.value) == null ? void 0 : v.pageData) == null ? void 0 : G.structure
|
|
374
|
-
};
|
|
375
|
-
});
|
|
376
|
-
_.setItemData(l), console.log("clickTrigger2", l);
|
|
377
|
-
} else
|
|
378
|
-
((p = I.value) == null ? void 0 : p.length) > 0 && e === "contentConfig" && _.setItemData(I.value);
|
|
379
|
-
}, Oe = async (t) => {
|
|
380
|
-
var n, u, o, c, d, i, p, l;
|
|
381
|
-
const e = t === "操作触发的弹窗结构" ? "dialogConfig" : "contentConfig";
|
|
382
|
-
if (k.setButtonTriggerType(e), f.type === "create" && ((n = S.value) == null ? void 0 : n.length) > 0) {
|
|
383
|
-
const g = (o = (u = S.value) == null ? void 0 : u.filter((y) => (y == null ? void 0 : y.key) === e)) == null ? void 0 : o.flatMap((y) => y == null ? void 0 : y.data);
|
|
384
|
-
console.log("clickTrigger", e, S.value, g), _.setItemData(g);
|
|
385
|
-
} else
|
|
386
|
-
await He(C.value, e);
|
|
387
|
-
let a;
|
|
388
|
-
(c = T.value) != null && c.subMenus && ((d = T.value) == null ? void 0 : d.subMenus.length) > 0 && (a = (i = q.value) == null ? void 0 : i.map((g) => ({
|
|
389
|
-
value: g
|
|
390
|
-
})), a.unshift({
|
|
391
|
-
value: (p = C.value) == null ? void 0 : p.title
|
|
392
|
-
}));
|
|
393
|
-
let s;
|
|
394
|
-
f.type === "create" ? s = {
|
|
395
|
-
...T.value,
|
|
396
|
-
path: (l = h.value) == null ? void 0 : l.path
|
|
397
|
-
} : f.type === "update" && (s = F.value), await k.setConfigMenu(s), re.setSelectTitle(a), _.setIsEdit("edit");
|
|
398
|
-
}, R = async (t) => {
|
|
399
|
-
var a, s, n, u, o, c;
|
|
400
|
-
const e = await $({
|
|
401
|
-
key: {
|
|
402
|
-
type: "menuConfigData",
|
|
403
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
404
|
-
pageKey: z.value + "/" + (t == null ? void 0 : t.path),
|
|
405
|
-
tableId: ""
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
((a = e == null ? void 0 : e.data) == null ? void 0 : a.code) === 200 && (s = e.data) != null && s.result && (W.value = ((u = (n = e.data) == null ? void 0 : n.result) == null ? void 0 : u.length) > 0 ? (c = (o = e.data) == null ? void 0 : o.result) == null ? void 0 : c.map((d) => {
|
|
409
|
-
var i;
|
|
410
|
-
return {
|
|
411
|
-
id: d == null ? void 0 : d.id,
|
|
412
|
-
...(i = d == null ? void 0 : d.value) == null ? void 0 : i.tableData
|
|
413
|
-
};
|
|
414
|
-
}) : []), U.value = !1;
|
|
415
|
-
}, H = async (t, e, a = "contentConfig") => {
|
|
416
|
-
var s, n, u, o, c, d;
|
|
417
|
-
console.log("clickSubmitForm4", t);
|
|
418
|
-
try {
|
|
419
|
-
let i, p;
|
|
420
|
-
if (e === "create")
|
|
421
|
-
i = {
|
|
422
|
-
key: {
|
|
423
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
424
|
-
pageKey: z.value + "/" + ((s = h.value) == null ? void 0 : s.path),
|
|
425
|
-
type: "structure",
|
|
426
|
-
rootNodePath: (u = (n = h.value) == null ? void 0 : n.rootNode) == null ? void 0 : u.path,
|
|
427
|
-
structureBelong: a,
|
|
428
|
-
parentTable: "",
|
|
429
|
-
version: 1
|
|
430
|
-
},
|
|
431
|
-
value: {
|
|
432
|
-
pageData: t
|
|
433
|
-
}
|
|
434
|
-
}, p = oe;
|
|
435
|
-
else if (e === "update") {
|
|
436
|
-
const g = E(t.data);
|
|
437
|
-
g == null || delete g.id, i = {
|
|
438
|
-
id: t == null ? void 0 : t.id,
|
|
439
|
-
// key: {
|
|
440
|
-
// systemKey: sessionStorage.getItem("systemKey"),
|
|
441
|
-
// pageKey: activeMenuPath.value + '/' + clickNode.value?.path,
|
|
442
|
-
// type: 'structure',
|
|
443
|
-
// rootNodePath: clickNode.value?.rootNode?.path,
|
|
444
|
-
// structureBelong,
|
|
445
|
-
// parentTable: '',
|
|
446
|
-
// version: 1
|
|
447
|
-
// },
|
|
448
|
-
value: {
|
|
449
|
-
pageData: g
|
|
450
|
-
}
|
|
451
|
-
}, p = ne;
|
|
452
|
-
} else e === "delete" && (i = {
|
|
453
|
-
id: t
|
|
454
|
-
}, p = be);
|
|
455
|
-
const l = await p(i);
|
|
456
|
-
if (((o = l == null ? void 0 : l.data) == null ? void 0 : o.code) !== 200)
|
|
457
|
-
throw N.error("保存响应失败"), new Error("保存响应失败");
|
|
458
|
-
return {
|
|
459
|
-
status: ((c = l == null ? void 0 : l.data) == null ? void 0 : c.code) === 200,
|
|
460
|
-
data: {
|
|
461
|
-
id: (d = l == null ? void 0 : l.data) == null ? void 0 : d.result,
|
|
462
|
-
key: a
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
} catch {
|
|
466
|
-
N.error("保存响应失败");
|
|
467
|
-
}
|
|
468
|
-
}, m = (t, e) => {
|
|
469
|
-
var d, i, p;
|
|
470
|
-
const a = (d = t == null ? void 0 : t.flatMap((l) => l == null ? void 0 : l.data)) == null ? void 0 : d.map((l) => l == null ? void 0 : l.id), s = e.filter((l) => !(a != null && a.includes(l))), n = a == null ? void 0 : a.filter((l) => !e.includes(l));
|
|
471
|
-
let u = null, o = null, c = null;
|
|
472
|
-
return u = [...s, ...n].filter((l) => l), o = (i = t == null ? void 0 : t.flatMap((l) => l == null ? void 0 : l.data)) == null ? void 0 : i.filter((l) => !(l != null && l.id)), c = (p = t == null ? void 0 : t.flatMap((l) => l == null ? void 0 : l.data)) == null ? void 0 : p.filter((l) => l == null ? void 0 : l.id), {
|
|
473
|
-
deleteIds: u,
|
|
474
|
-
createComps: o,
|
|
475
|
-
updateComps: c
|
|
476
|
-
};
|
|
477
|
-
}, ee = (t, e) => {
|
|
478
|
-
var s, n, u, o, c, d;
|
|
479
|
-
let a = [];
|
|
480
|
-
return ((s = e == null ? void 0 : e.deleteIds) == null ? void 0 : s.length) > 0 && ((n = e == null ? void 0 : e.deleteIds) == null || n.forEach((i) => {
|
|
481
|
-
a.push(H(i, "delete", t));
|
|
482
|
-
})), ((u = e == null ? void 0 : e.createComps) == null ? void 0 : u.length) > 0 && ((o = e == null ? void 0 : e.createComps) == null || o.forEach((i) => {
|
|
483
|
-
var p, l;
|
|
484
|
-
a.push(H({
|
|
485
|
-
menuConfig: F.value,
|
|
486
|
-
structure: i,
|
|
487
|
-
rootNodePath: (l = (p = h.value) == null ? void 0 : p.rootNode) == null ? void 0 : l.path
|
|
488
|
-
}, "create", t));
|
|
489
|
-
})), ((c = e == null ? void 0 : e.updateComps) == null ? void 0 : c.length) > 0 && ((d = e == null ? void 0 : e.updateComps) == null || d.forEach((i) => {
|
|
490
|
-
var p, l;
|
|
491
|
-
a.push(H({
|
|
492
|
-
menuConfig: F.value,
|
|
493
|
-
structure: i,
|
|
494
|
-
rootNodePath: (l = (p = h.value) == null ? void 0 : p.rootNode) == null ? void 0 : l.path
|
|
495
|
-
}, "update", t));
|
|
496
|
-
})), a;
|
|
497
|
-
}, Ve = async (t, e) => {
|
|
498
|
-
var l, g, y, w;
|
|
499
|
-
const a = (l = I.value) == null ? void 0 : l.map((r) => r == null ? void 0 : r.id), s = t == null ? void 0 : t.filter((r) => (r == null ? void 0 : r.key) === "contentConfig"), n = t == null ? void 0 : t.filter((r) => (r == null ? void 0 : r.key) === "dialogConfig"), u = (w = (y = (g = S.value) == null ? void 0 : g.filter((r) => (r == null ? void 0 : r.key) === "dialogConfig")) == null ? void 0 : y.flatMap((r) => r == null ? void 0 : r.data)) == null ? void 0 : w.map((r) => r == null ? void 0 : r.id), o = m(n, u), c = m(s, a);
|
|
500
|
-
console.log("clickSubmitForm1", o, c, e);
|
|
501
|
-
const d = ee("dialogConfig", o), i = ee("contentConfig", c), p = [...d, ...i];
|
|
502
|
-
await Promise.all(p).then((r) => {
|
|
503
|
-
var M;
|
|
504
|
-
const B = r == null ? void 0 : r.every((v) => v.status);
|
|
505
|
-
if (console.log("clickSubmitForm3Promise:", r, p, C.value, f.type), !B) return;
|
|
506
|
-
const P = (M = r == null ? void 0 : r.flatMap((v) => v == null ? void 0 : v.data)) == null ? void 0 : M.filter((v) => (v == null ? void 0 : v.id) !== null && (v == null ? void 0 : v.id) !== void 0);
|
|
507
|
-
pe({
|
|
508
|
-
...e,
|
|
509
|
-
structureIds: P
|
|
510
|
-
}, f.type);
|
|
511
|
-
}).catch((r) => {
|
|
512
|
-
N.error(r);
|
|
513
|
-
});
|
|
514
|
-
}, pe = async (t, e) => {
|
|
515
|
-
var n, u;
|
|
516
|
-
let a, s;
|
|
517
|
-
e === "create" ? (a = {
|
|
518
|
-
key: {
|
|
519
|
-
type: "menuConfigData",
|
|
520
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
521
|
-
pageKey: z.value + "/" + ((n = h.value) == null ? void 0 : n.path),
|
|
522
|
-
tableId: ""
|
|
523
|
-
},
|
|
524
|
-
value: {
|
|
525
|
-
tableData: t
|
|
526
|
-
}
|
|
527
|
-
}, s = oe) : e === "update" ? (a = {
|
|
528
|
-
id: t == null ? void 0 : t.id,
|
|
529
|
-
// key: {
|
|
530
|
-
// type: "menuConfigData",
|
|
531
|
-
// systemKey: sessionStorage.getItem("systemKey"),
|
|
532
|
-
// pageKey: activeMenuPath.value + '/' + clickNode.value?.path,
|
|
533
|
-
// tableId: '',
|
|
534
|
-
// },
|
|
535
|
-
value: {
|
|
536
|
-
tableData: t
|
|
537
|
-
}
|
|
538
|
-
}, s = ne) : e === "delete" && (a = {
|
|
539
|
-
ids: [t.id, ...(u = t == null ? void 0 : t.structureIds) == null ? void 0 : u.map((o) => o.id)]
|
|
540
|
-
}, s = ye), De(s, a, e).then((o) => {
|
|
541
|
-
e === "create" && W.value.push({
|
|
542
|
-
...t,
|
|
543
|
-
id: o
|
|
544
|
-
}), e && o && N.success("响应成功"), R(h.value);
|
|
545
|
-
});
|
|
546
|
-
}, je = async () => {
|
|
547
|
-
var a, s, n, u, o;
|
|
548
|
-
const t = E(S.value);
|
|
549
|
-
await L();
|
|
550
|
-
const e = f.type === "create" ? {
|
|
551
|
-
...F.value,
|
|
552
|
-
rootNodePath: (s = (a = h.value) == null ? void 0 : a.rootNode) == null ? void 0 : s.path
|
|
553
|
-
} : {
|
|
554
|
-
...F.value,
|
|
555
|
-
rootNodePath: (u = (n = h.value) == null ? void 0 : n.rootNode) == null ? void 0 : u.path,
|
|
556
|
-
id: (o = C.value) == null ? void 0 : o.id
|
|
557
|
-
};
|
|
558
|
-
await Ve(t, e), T.value = {}, f.show = !1, await R(h.value);
|
|
559
|
-
}, Le = () => {
|
|
560
|
-
f.show = !1;
|
|
561
|
-
}, $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
562
|
-
__proto__: null,
|
|
563
|
-
beforeDialogDestroy: Le,
|
|
564
|
-
buttonValue: Be,
|
|
565
|
-
changeTrigger: Re,
|
|
566
|
-
changedRow: Fe,
|
|
567
|
-
clickNodeTrigger: xe,
|
|
568
|
-
clickRowButton: Ee,
|
|
569
|
-
clickSubmitForm: je,
|
|
570
|
-
clickTrigger: Oe,
|
|
571
|
-
dialogInfo: f,
|
|
572
|
-
formatFormData: V,
|
|
573
|
-
getTableDataAsync: R,
|
|
574
|
-
handleItemDataChange: Pe,
|
|
575
|
-
handleSubInitialStructure: de,
|
|
576
|
-
inputForm: T,
|
|
577
|
-
menuPageData: Ne,
|
|
578
|
-
operatingForm: Ae,
|
|
579
|
-
pageData: Se,
|
|
580
|
-
renderFormData: ue,
|
|
581
|
-
tableLoading: U,
|
|
582
|
-
treeData: ie
|
|
583
|
-
}, Symbol.toStringTag, { value: "Module" })), ze = { class: "menu-module" }, Ue = { class: "tree-wrap" }, We = {
|
|
584
|
-
class: "table-wrap",
|
|
585
|
-
"element-loading-text": "加载中..."
|
|
586
|
-
}, qe = { class: "module-dialog-default" }, Ge = /* @__PURE__ */ ge({
|
|
587
|
-
__name: "index",
|
|
588
|
-
setup(t) {
|
|
589
|
-
const e = te({ ...$e }), a = b(null), s = ae(K), { configMenu: n } = le(s);
|
|
590
|
-
return fe(() => {
|
|
591
|
-
var u;
|
|
592
|
-
e.formatFormData(n.value), console.log(12345, n.value), L(() => {
|
|
593
|
-
var o, c;
|
|
594
|
-
(c = a.value) == null || c.setCurrentKey((o = n.value) == null ? void 0 : o.path);
|
|
595
|
-
}), n.value && e.handleSubInitialStructure((u = n.value) == null ? void 0 : u.path);
|
|
596
|
-
}), (u, o) => {
|
|
597
|
-
const c = J("el-tree"), d = J("el-button"), i = ve("loading");
|
|
598
|
-
return X(), Q("div", ze, [
|
|
599
|
-
A("div", Ue, [
|
|
600
|
-
D(c, {
|
|
601
|
-
ref_key: "treeRef",
|
|
602
|
-
ref: a,
|
|
603
|
-
data: e.treeData,
|
|
604
|
-
"expand-on-click-node": !1,
|
|
605
|
-
"node-key": "path",
|
|
606
|
-
props: { children: "children", label: "label", path: "path" },
|
|
607
|
-
"highlight-current": "",
|
|
608
|
-
"default-expand-all": "",
|
|
609
|
-
"check-on-click-leaf": !1,
|
|
610
|
-
"check-strictly": "",
|
|
611
|
-
onNodeClick: e.clickNodeTrigger
|
|
612
|
-
}, null, 8, ["data", "onNodeClick"])
|
|
613
|
-
]),
|
|
614
|
-
he((X(), Q("div", We, [
|
|
615
|
-
D(Te, {
|
|
616
|
-
itemData: e.menuPageData,
|
|
617
|
-
changedContent: e.changedRow,
|
|
618
|
-
operatingForm: e.operatingForm,
|
|
619
|
-
onOnFormChange: e.changeTrigger,
|
|
620
|
-
onChange: e.handleItemDataChange,
|
|
621
|
-
onClickTrigger: e.clickTrigger,
|
|
622
|
-
onOnButtonClick: e.clickRowButton
|
|
623
|
-
}, null, 8, ["itemData", "changedContent", "operatingForm", "onOnFormChange", "onChange", "onClickTrigger", "onOnButtonClick"])
|
|
624
|
-
])), [
|
|
625
|
-
[i, e.tableLoading]
|
|
626
|
-
]),
|
|
627
|
-
D(_e, {
|
|
628
|
-
class: "module-dialog",
|
|
629
|
-
title: e.dialogInfo.title,
|
|
630
|
-
visible: e.dialogInfo.show,
|
|
631
|
-
width: e.dialogInfo.width,
|
|
632
|
-
onBeforeDestroy: e.beforeDialogDestroy
|
|
633
|
-
}, {
|
|
634
|
-
default: x(() => [
|
|
635
|
-
A("div", qe, [
|
|
636
|
-
D(we, {
|
|
637
|
-
rowContents: e.renderFormData,
|
|
638
|
-
isEnableWrap: !1,
|
|
639
|
-
isEdit: !0,
|
|
640
|
-
onChange: e.changeTrigger,
|
|
641
|
-
onClickTrigger: e.clickTrigger
|
|
642
|
-
}, null, 8, ["rowContents", "onChange", "onClickTrigger"])
|
|
643
|
-
])
|
|
644
|
-
]),
|
|
645
|
-
footer: x(() => [
|
|
646
|
-
A("div", null, [
|
|
647
|
-
D(d, {
|
|
648
|
-
onClick: e.beforeDialogDestroy,
|
|
649
|
-
id: "themeBorderButton"
|
|
650
|
-
}, {
|
|
651
|
-
default: x(() => o[0] || (o[0] = [
|
|
652
|
-
Y("取消")
|
|
653
|
-
])),
|
|
654
|
-
_: 1,
|
|
655
|
-
__: [0]
|
|
656
|
-
}, 8, ["onClick"]),
|
|
657
|
-
D(d, {
|
|
658
|
-
id: "themeButton",
|
|
659
|
-
onClick: e.clickSubmitForm
|
|
660
|
-
}, {
|
|
661
|
-
default: x(() => o[1] || (o[1] = [
|
|
662
|
-
Y(" 确认 ")
|
|
663
|
-
])),
|
|
664
|
-
_: 1,
|
|
665
|
-
__: [1]
|
|
666
|
-
}, 8, ["onClick"])
|
|
667
|
-
])
|
|
668
|
-
]),
|
|
669
|
-
_: 1
|
|
670
|
-
}, 8, ["title", "visible", "width", "onBeforeDestroy"])
|
|
671
|
-
]);
|
|
672
|
-
};
|
|
673
|
-
}
|
|
674
|
-
}), at = /* @__PURE__ */ Me(Ge, [["__scopeId", "data-v-541cf007"]]);
|
|
675
|
-
export {
|
|
676
|
-
at as default
|
|
677
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("vue");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-x_oCFRtr.cjs");const ae=require("./index-BJitBJZu.cjs"),z=require("./menu-B-Z5KAh5.cjs"),re=require("./index-C8jmJvXd.cjs"),oe=require("vue-router"),ue=require("./index-3dpRV7yS.cjs"),le=require("./threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CBBWsMHp.cjs"),se=require("./index-Dnq8JVuW.cjs"),y=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C8jmJvXd.cjs")).then(v=>v.index));y.install=v=>{v.component("ssMenu",y)};const q={__name:"index",props:{name:String},setup(v){const s=v,C=t.computed(()=>ae.ElIcons[s.name]);return t.onMounted(()=>{}),(F,g)=>{const D=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(D,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(C.value)))]),_:1})}}},W=[{name:"--vertical-menu-bg",value:"transparent"},{name:"--vertical-submenu-hover-bg",value:"#3356E8"},{name:"--vertical-submenu-open-bg",value:"#3356E8"},{name:"--vertical-submenu-open-inline-bg",value:"#F6F6F6"},{name:"--vertical-submenu-menuitem-color",value:"#051E37"},{name:"--vertical-submenu-menuitem-active-color",value:"#3356E8"},{name:"--vertical-submenu-color",value:"#051E37"},{name:"--vertical-submenu-active-color",value:"#ffffff"},{name:"--vertical-menuitem-hover-bg",value:"#3356E8"},{name:"--vertical-menuitem-active-bg",value:"#3356E8"},{name:"--vertical-menuitem-color",value:"#051E37"},{name:"--vertical-menuitem-active-color",value:"#ffffff"},{name:"--vertical-menuitem-fontSize",value:"1rem"},{name:"--vertical-menuitem-fontWeight",value:"400"},{name:"--vertical-menuitem-active-fontWeight",value:"600"},{name:"--vertical-menuitem-font",value:"SourceHanSansCN, SourceHanSansCN"},{name:"--vertical-menuitem-radius",value:"8px"},{name:"--vertical-menu-padding",value:"0.5rem"}],ie=[{name:"--horizontal-menu-bg",value:"#051E37"},{name:"--horizontal-submenu-hover-bg",value:"#3356E8"},{name:"--horizontal-submenu-open-bg",value:"#3356E8"},{name:"--horizontal-submenu-open-inline-bg",value:"#3356E8"},{name:"--horizontal-menuitem-hover-bg",value:"#3356E8"},{name:"--horizontal-menuitem-active-bg",value:"#3356E8"},{name:"--horizontal-menuitem-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-active-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-fontSize",value:"1.25rem"},{name:"--horizontal-menuitem-fontWeight",value:"400"},{name:"--horizontal-menuitem-active-fontWeight",value:"600"},{name:"--horizontal-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"}],N=[{name:"--vertical-menu-bg",value:"transparent"},{name:"--vertical-submenu-hover-bg",value:"#72B02D"},{name:"--vertical-submenu-active-color",value:"#323333"},{name:"--vertical-submenu-open-bg",value:"#72B02D"},{name:"--vertical-submenu-open-inline-bg",value:"#F6F6F6"},{name:"--vertical-submenu-color",value:"#323333"},{name:"--vertical-submenu-menuitem-color",value:"#323333"},{name:"--vertical-submenu-menuitem-active-color",value:"#72B02D"},{name:"--vertical-menuitem-hover-bg",value:"#72B02D"},{name:"--vertical-menuitem-active-bg",value:"#72B02D"},{name:"--vertical-menuitem-color",value:"#323333"},{name:"--vertical-menuitem-active-color",value:"#323333"},{name:"--vertical-menuitem-fontSize",value:"1rem"},{name:"--vertical-menuitem-fontWeight",value:"400"},{name:"--vertical-menuitem-active-fontWeight",value:"600"},{name:"--vertical-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"},{name:"--vertical-menuitem-radius",value:"8px"},{name:"--vertical-menu-padding",value:"0"}],O=[{name:"--horizontal-menu-bg",value:"#323333"},{name:"--horizontal-submenu-hover-bg",value:"#FFFFFF"},{name:"--horizontal-submenu-open-bg",value:"#72B02D"},{name:"--horizontal-submenu-open-inline-bg",value:"#1C4275"},{name:"--horizontal-menuitem-hover-bg",value:"#72B02D"},{name:"--horizontal-menuitem-active-bg",value:"#72B02D"},{name:"--horizontal-menuitem-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-active-color",value:"#323333"},{name:"--horizontal-menuitem-fontSize",value:"1.25rem"},{name:"--horizontal-menuitem-fontWeight",value:"400"},{name:"--horizontal-menuitem-active-fontWeight",value:"600"},{name:"--horizontal-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"}],ce=[{name:"--ssbutton-theme-color",value:"#FFFFFF"},{name:"--ssbutton-theme-bg",value:"#3356E8"},{name:"--ssbutton-special-bg",value:"rgba(255,255,255,0.2)"},{name:"--ssgroup-background",value:"linear-gradient(to right, #D6DDFA, #ffffff)"},{name:"--ssComponent-theme-color",value:"#3356E8"},{name:"--ssComponent-theme-watermark",value:"url('/public/icons/img/watermark-blue.png')"}],me=[{name:"--ssbutton-theme-color",value:"#323333"},{name:"--ssbutton-theme-bg",value:"#72B02D"},{name:"--ssbutton-special-bg",value:"rgba(255, 255, 255, 0.2)"},{name:"--ssgroup-background",value:"linear-gradient(to right, #ddf6e0, #ffffff)"},{name:"--ssComponent-theme-color",value:"#72B02D"},{name:"--ssComponent-theme-watermark",value:"url('/public/icons/img/watermark.png')"}],ve=t.defineComponent({name:"menu",components:{ssMenu:y,DynamicIcon:q,ssDialog:re.ssDialog},setup(){const v=t.defineProps({mode:{type:String,default:"vertical"}}),s=z.useMenuState(),C=le.useModelComp(z.pinia),F=t.ref(0),g=oe.useRouter(),{asideMenus:D,menuTriggerType:V,platform:U}=z.storeToRefs(s),J=t.computed(()=>v==null?void 0:v.mode),_=t.computed(()=>{let e=[...D.value];if((e==null?void 0:e.length)===0)return g.push("/"),[];const n=Q(e,j.value);return n.isFlag||(e=n==null?void 0:n.data),e}),K=async e=>{C.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(e==null?void 0:e.path),s.setActiveAsideMenu(e),e.isRouter?g.push(e.path):g.push("/")},L=async e=>{s.setActiveMenuPath(e);const n=findNodeByPropInTree(_.value,"path",e);s.setActiveAsideMenu(n),C.setRouteToChildPath(""),V.value==="click"?F.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(e):s.setMenuTriggerType("click"),e!=null&&e.startsWith("/")?g.push(e):g.push("/"),F.value++},$=e=>{s.setActiveMenuPath(e)},M=e=>{const n=document.documentElement;e==null||e.forEach(o=>{n.style.setProperty(o.name,o.value)})};t.onMounted(()=>{F.value=1});const j=t.computed(()=>{const e=sessionStorage.getItem("authority");return e?JSON.parse(e):[]});t.watch(()=>U.value,e=>{e==="browser"?M(W):e==="client"&&(M(O),M(N))},{immediate:!0});const G=(e,n)=>{function o(l){l==null||l.forEach(i=>{i.show=n==null?void 0:n.some(u=>u==null?void 0:u.includes(i.path)),i.children&&o(i.children)})}return o(e),e},Q=(e,n)=>{if(Array.isArray(n)){const o=Array.from(new Set(n==null?void 0:n.map(l=>l.substring(0,l.lastIndexOf("/")))));return{data:G(e,o),isFlag:!1}}else return{isFlag:(n==null?void 0:n.toUpperCase())==="SUPERADMIN"}},c=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),X=e=>ue.getComponent(e),Y=t.ref({}),w=t.ref([]),Z=async(e,n,o)=>{var A,B,x;if(((A=e==null?void 0:e.structureIds)==null?void 0:A.length)===0)return;const l=(x=(B=e==null?void 0:e.structureIds)==null?void 0:B.filter(a=>(a==null?void 0:a.key)==="dialogConfig"))==null?void 0:x.map(a=>a==null?void 0:a.id);let i=l==null?void 0:l.map(a=>z.getInsofDataApi({id:a}));const u=await Promise.all(i);if(u==null?void 0:u.every(a=>{var r;return((r=a==null?void 0:a.data)==null?void 0:r.code)===200})){const a=u==null?void 0:u.map(r=>{var f,b,m,d,S,P,H,R;return{id:(m=(b=(f=r==null?void 0:r.data)==null?void 0:f.result)==null?void 0:b[0])==null?void 0:m.id,...(R=(H=(P=(S=(d=r==null?void 0:r.data)==null?void 0:d.result)==null?void 0:S[0])==null?void 0:P.value)==null?void 0:H.pageData)==null?void 0:R.structure}});n==="create"&&(w.value=a),n==="update"&&(w.value=a==null?void 0:a.map(r=>{var f,b;return((f=r==null?void 0:r.comp)==null?void 0:f.toUpperCase())==="FORM"?{...r,compData:(b=r==null?void 0:r.compData)==null?void 0:b.map(m=>{var d;return(m==null?void 0:m.key)==="formContent"?{...m,contents:(d=m==null?void 0:m.contents)==null?void 0:d.map(S=>({...S,value:o==null?void 0:o.title}))}:m})}:r}))}},h=t.ref({}),p=t.ref({}),I=e=>{switch(e){case"新增":return"create";case"编辑":return"update";case"删除":return"delete"}},E=t.ref({}),T=e=>{s.setIsRefreshMenus(!0),s.setCacheInputMenu({type:c.type,data:e})},ee=async(e,n)=>{c.type=I(n==null?void 0:n.operateType),await Z(n,c.type,e),s.setIsRefreshMenus(!1),p.value=e,E.value=n,(n==null?void 0:n.operateType)!=="删除"?(c.show=(n==null?void 0:n.trigger)==="openDialog",c.title=(n==null?void 0:n.operateType)+"菜单"):se.ElMessageBox.confirm(`是否确认要删除【${e==null?void 0:e.title}】`,"",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{T(e)}),console.log("clickMenuIcon",e,n,c)},ne=()=>{c.show=!1},te=e=>e==null?void 0:e.filter(n=>n.allowInherit);return{handleCompChange:e=>{var o,l;const n=(o=e==null?void 0:e.contents)==null?void 0:o.find(i=>i.key==="formContent");n&&(h.value=(l=n==null?void 0:n.contents)==null?void 0:l.reduce((i,u)=>(i[u.key]=u.value,i.prop=u.key,i),{}))},dialogForm:Y,dialogRenderComps:w,getComponents:X,clickSubmitForm:()=>{var o,l,i,u,k;let e;c.type==="create"&&(e=((o=p.value)==null?void 0:o.path)+"/"+h.value[(l=h.value)==null?void 0:l.prop]),c.type==="update"&&(e=(i=p.value)==null?void 0:i.path);const n={...p.value,config:te((u=p.value)==null?void 0:u.config),children:[],childMenus:[],title:h.value[(k=h.value)==null?void 0:k.prop],path:e};console.log("clickSubmitForm",E.value,p.value),T(n),c.show=!1},dialogInfo:c,beforeDialogDestroy:ne,clickMenuIcon:ee,mode:J,renderMenuList:_,clickMenu:K,openMenu:L,closeMenu:$,changeMenuStyle:M}}});exports._sfc_main=ve;exports._sfc_main$1=q;exports.browserHorizontalMenuClasses=ie;exports.browserThemeConfig=ce;exports.browserVerticalMenuClasses=W;exports.clientHorizontalMenuClasses=O;exports.clientThemeConfig=me;exports.clientVerticalMenuClasses=N;exports.ssMenu=y;
|