ss-component-new 1.1.231 → 1.1.232

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 (76) hide show
  1. package/dist/{array-C5HGTxrq.cjs → array-CX_klfYT.cjs} +1 -1
  2. package/dist/{array-CN5NUB-T.js → array-CcAct9KU.js} +10 -10
  3. package/dist/{cloneDeep-BxbMZD3z.cjs → cloneDeep-CktvOFQx.cjs} +1 -1
  4. package/dist/{cloneDeep-D3DwnHwP.js → cloneDeep-Dof88Xfu.js} +1 -1
  5. package/dist/{index-D4mH3gQk.js → index-1AAX7OWr.js} +1 -1
  6. package/dist/{index-BA8udoNI.cjs → index-6i92JFtr.cjs} +1 -1
  7. package/dist/{index-Bv6vr2Zd.cjs → index-B1ACt1r8.cjs} +1 -1
  8. package/dist/{index-DT8Ga96z.cjs → index-B1DkFC1_.cjs} +1 -1
  9. package/dist/{index-DKXGxMWO.cjs → index-B27v9fmq.cjs} +1 -1
  10. package/dist/{index-pdGS_R2F.cjs → index-B5ixqHZB.cjs} +1 -1
  11. package/dist/{index-j17TZ-pk.js → index-BHOafXrq.js} +6 -6
  12. package/dist/index-BNG8jvzJ.js +662 -0
  13. package/dist/{index-ACYchtYG.js → index-BP9e1URk.js} +7 -7
  14. package/dist/{index-C0oVM0ot.cjs → index-BS-dYA6V.cjs} +1 -1
  15. package/dist/{index-Ct4-iIdT.js → index-BS5q4oAa.js} +5 -5
  16. package/dist/{index-DP4wALaA.cjs → index-BaGt6aM0.cjs} +1 -1
  17. package/dist/{index-DySgK9CB.js → index-BdcivI0n.js} +9 -9
  18. package/dist/{index-DGeD_5JY.js → index-BhkmOuOr.js} +1 -1
  19. package/dist/{index-HqapK2sv.cjs → index-BoSTyMal.cjs} +1 -1
  20. package/dist/{index-C8daGuuW.js → index-By2WyWxQ.js} +3 -3
  21. package/dist/{index-xXjNoBIK.cjs → index-CD_V87KZ.cjs} +1 -1
  22. package/dist/{index-gyd-xWZ0.js → index-CFrZVme4.js} +4 -4
  23. package/dist/{index-CjXn7HNp.cjs → index-CP1rxlQW.cjs} +1 -1
  24. package/dist/{index-Bkx6PRMs.cjs → index-CRxtHDjt.cjs} +1 -1
  25. package/dist/{index-6wiLm5Bk.js → index-CRzDMz2f.js} +7 -7
  26. package/dist/{index-5hutjDp5.js → index-CTDvgz6D.js} +4 -4
  27. package/dist/{index-CGCYmU9-.js → index-CXHQlToy.js} +4 -4
  28. package/dist/{index-C5qD66VY.js → index-CewL0ZVN.js} +4 -4
  29. package/dist/{index-Bbs7Ne8f.js → index-CiGPupSC.js} +1 -1
  30. package/dist/{index-w5px5KSb.cjs → index-CpL7Ek4u.cjs} +1 -1
  31. package/dist/{index-_bbASESv.cjs → index-CrBfrGyt.cjs} +1 -1
  32. package/dist/{index-CGw505w9.cjs → index-Cy8P0O9s.cjs} +1 -1
  33. package/dist/{index-B63Pn6Hg.js → index-Cz4RyK4P.js} +5 -5
  34. package/dist/{index-CBHdhAzJ.cjs → index-D672QpxY.cjs} +1 -1
  35. package/dist/{index-CfhO79uP.js → index-D7bfd1SP.js} +6 -6
  36. package/dist/{index-Ck55iwwl.js → index-DAUiPeRo.js} +7 -7
  37. package/dist/{index-DfGXlHPF.js → index-DBVoOuwx.js} +5 -5
  38. package/dist/{index-D7mvse4R.js → index-DEdZZ43j.js} +1 -1
  39. package/dist/{index-BIFlJb7L.cjs → index-DFsguBq1.cjs} +1 -1
  40. package/dist/{index-CVChu-C7.cjs → index-DJkyWXUQ.cjs} +1 -1
  41. package/dist/{index-C9mooaGU.js → index-DTl2kpLh.js} +5 -5
  42. package/dist/{index-BQQAONK4.cjs → index-DXmlMdoB.cjs} +1 -1
  43. package/dist/{index-DrvDNl0B.cjs → index-Dt26RGyl.cjs} +1 -1
  44. package/dist/{index-zXisGnmY.js → index-DtJQBHbx.js} +1 -1
  45. package/dist/{index-C2kuvDNq.js → index-DvpoH0CQ.js} +7 -7
  46. package/dist/{index-CnOFaZqX.cjs → index-KAxfvpFC.cjs} +1 -1
  47. package/dist/{index-Bnn1Ry6O.cjs → index-MHmvswgz.cjs} +1 -1
  48. package/dist/{index-BUYADLGc.js → index-Q_XvzZ_1.js} +3 -3
  49. package/dist/index-SZd8Ei1D.cjs +1 -0
  50. package/dist/{index-CQqWo_KW.js → index-Z1xr-ejC.js} +1 -1
  51. package/dist/{index-P4pnokyn.cjs → index-kkjIPdQ2.cjs} +1 -1
  52. package/dist/{index-CfR5OTPe.cjs → index-sjkdiuXH.cjs} +1 -1
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-DE_ZH7hU.js → index.vue_vue_type_script_setup_true_lang-BTS3qCYJ.js} +4 -4
  54. package/dist/{index.vue_vue_type_script_setup_true_lang-DX22PCtX.cjs → index.vue_vue_type_script_setup_true_lang-Bg0LXFmQ.cjs} +1 -1
  55. package/dist/{index.vue_vue_type_script_setup_true_lang-J6OxPOrB.js → index.vue_vue_type_script_setup_true_lang-CHN4GMRq.js} +1 -1
  56. package/dist/{index.vue_vue_type_script_setup_true_lang-h50Jk1OD.cjs → index.vue_vue_type_script_setup_true_lang-D3T3IoTp.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-CGTiivri.cjs → index.vue_vue_type_style_index_0_scoped_997b1786_lang-BdYMXloP.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-3kijaVi0.js → index.vue_vue_type_style_index_0_scoped_997b1786_lang-BmL8jkus.js} +6 -6
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-CHhY6FTi.js → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Ctz7x3hQ.js} +8 -8
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-B_wYdLVt.cjs → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Du4fk0u8.cjs} +1 -1
  61. package/dist/{login-DVqNuHre.js → login-DnqNwFzD.js} +2 -2
  62. package/dist/{login-Cqx7cGxv.cjs → login-TVZKm0bS.cjs} +1 -1
  63. package/dist/{main-zSU9LSQS.js → main-DqSAQJ-I.js} +6 -6
  64. package/dist/{main-CgE6H5s8.cjs → main-jkBzFk0x.cjs} +1 -1
  65. package/dist/{menu-Dpw1TOij.js → menu-DNjiqLiy.js} +1 -1
  66. package/dist/{menu-Dk7fArRs.cjs → menu-xHRrBcoq.cjs} +1 -1
  67. package/dist/{modelComp-9fow02FC.js → modelComp-BZYWE77x.js} +1 -1
  68. package/dist/{modelComp-DkIXje_8.cjs → modelComp-Dq1Brxk6.cjs} +1 -1
  69. package/dist/ss-component.cjs +1 -1
  70. package/dist/ss-component.css +1 -1
  71. package/dist/ss-component.js +7 -7
  72. package/dist/ss-component3.cjs +1 -1
  73. package/dist/ss-component3.js +1 -1
  74. package/package.json +1 -1
  75. package/dist/index-CJvDpy4J.js +0 -653
  76. package/dist/index-D9GLl0Bb.cjs +0 -1
@@ -0,0 +1,662 @@
1
+ import { ref as T, onMounted as Se, watch as X, createElementBlock as w, openBlock as g, Fragment as ve, renderList as ge, createElementVNode as S, createCommentVNode as U, normalizeStyle as pe, toDisplayString as q, resolveComponent as z, resolveDirective as be, withDirectives as Pe, createBlock as H, withCtx as J, createVNode as I, unref as $, createTextVNode as de, renderSlot as $e, resolveDynamicComponent as he } from "vue";
2
+ import { m as me, a as Ie, b as xe } from "./index-CRzDMz2f.js";
3
+ import Ne from "./index-BhkmOuOr.js";
4
+ import { p as ee, g as Ee, c as Ke, u as Oe } from "./index-DtJQBHbx.js";
5
+ import { u as Ae } from "./modelComp-BZYWE77x.js";
6
+ import { s as Q, u as Te, E as ce } from "./menu-DNjiqLiy.js";
7
+ import { i as Fe, e as Me, b as _e, c as Ce, g as je, a as Be } from "./array-CcAct9KU.js";
8
+ import { u as Je, a as Ue, g as ne, f as Ve, d as ze, b as Le, c as We } from "./index-BP9e1URk.js";
9
+ import { s as qe } from "./index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Ctz7x3hQ.js";
10
+ import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ import { v as Ge } from "./index-By2WyWxQ.js";
12
+ import { u as He } from "./login-DnqNwFzD.js";
13
+ import { g as we } from "./index-DAUiPeRo.js";
14
+ import { d as ke } from "./crypto-BRyGpjGR.js";
15
+ import { S as De } from "./index-BHtNKL1L.js";
16
+ import { E as Qe } from "./index-DvpoH0CQ.js";
17
+ import { c as W } from "./cloneDeep-Dof88Xfu.js";
18
+ const Xe = { class: "bread-content" }, Ye = ["onClick"], Ze = {
19
+ key: 0,
20
+ class: "split-title"
21
+ }, Re = {
22
+ __name: "index",
23
+ props: {
24
+ breadArray: {
25
+ type: Array,
26
+ default: () => []
27
+ }
28
+ },
29
+ emits: ["click"],
30
+ setup(Y, { emit: ae }) {
31
+ const o = Y, b = T([]), N = ae;
32
+ Se(() => {
33
+ b.value = o == null ? void 0 : o.breadArray;
34
+ }), X(
35
+ () => o == null ? void 0 : o.breadArray,
36
+ () => {
37
+ b.value = o == null ? void 0 : o.breadArray;
38
+ },
39
+ { deep: !0, immediate: !0 }
40
+ );
41
+ const d = (y) => {
42
+ N("click", y);
43
+ };
44
+ return (y, Z) => (g(), w("div", Xe, [
45
+ (g(!0), w(ve, null, ge(b.value, (V, L) => {
46
+ var O;
47
+ return g(), w("div", {
48
+ key: L,
49
+ class: "bread-item"
50
+ }, [
51
+ S("div", {
52
+ class: "bread-title",
53
+ onClick: (p) => d(V),
54
+ style: pe({ opacity: ((O = b.value) == null ? void 0 : O.length) - 1 === L ? "0.7" : "1" })
55
+ }, q(V.value), 13, Ye),
56
+ L !== b.value.length - 1 && Array.isArray(b.value) ? (g(), w("div", Ze, q("/"))) : U("", !0)
57
+ ]);
58
+ }), 128))
59
+ ]));
60
+ }
61
+ }, ea = /* @__PURE__ */ ye(Re, [["__scopeId", "data-v-ded7e2bd"]]), aa = () => {
62
+ }, ta = { class: "system-wrap" }, sa = { class: "item-menu-content" }, na = { class: "item-left-content" }, la = {
63
+ key: 0,
64
+ class: "page-icon"
65
+ }, ra = { class: "avatar" }, oa = { style: { display: "flex" } }, ia = { class: "select-icon" }, ua = {
66
+ key: 0,
67
+ class: "model-operate"
68
+ }, da = { class: "model-select" }, ca = { class: "model-fill" }, va = {
69
+ key: 1,
70
+ class: "show-main-content"
71
+ }, ga = { class: "show-content" }, ya = { class: "item-view-group" }, fa = { class: "show-item-content" }, ha = { class: "item-view-group" }, _a = {
72
+ key: 2,
73
+ class: "show-main-content"
74
+ }, Ca = {
75
+ __name: "index",
76
+ props: {
77
+ content: String,
78
+ jsonContents: Array
79
+ },
80
+ emits: ["change", "contentChange"],
81
+ setup(Y, { emit: ae }) {
82
+ const o = He(), { loginUserInfo: b, cryptoInfo: N } = Q(o);
83
+ Se(() => {
84
+ Qe({
85
+ title: "温馨提示:",
86
+ type: "success",
87
+ message: "欢迎使用系统",
88
+ duration: 1e3
89
+ });
90
+ });
91
+ const d = Y, y = Ae(ee);
92
+ Je(ee);
93
+ const Z = T(!0), V = Te();
94
+ T(!0);
95
+ const { itemData: L, isEdit: O } = Q(y), p = Ue(ee), { activeMenuPath: E, menus: le } = Q(V), { selectIndex: re, selectTitle: P } = Q(p);
96
+ T([]);
97
+ const G = T(!1), f = T([]), oe = () => {
98
+ y.setIsEdit("edit");
99
+ }, ie = () => {
100
+ y.setIsEdit("view");
101
+ }, ue = async () => {
102
+ var a;
103
+ const e = await Ee({
104
+ key: {
105
+ systemKey: sessionStorage.getItem("systemKey"),
106
+ type: "structure",
107
+ pageKey: E.value
108
+ }
109
+ });
110
+ return ((a = e == null ? void 0 : e.data) == null ? void 0 : a.code) === 200 ? e.data.result : [];
111
+ }, te = async (e, a) => {
112
+ var c;
113
+ try {
114
+ let r, i;
115
+ a === "create" ? (r = {
116
+ key: {
117
+ systemKey: sessionStorage.getItem("systemKey"),
118
+ pageKey: E.value,
119
+ type: "structure",
120
+ parentTable: "",
121
+ version: 1
122
+ }
123
+ }, i = Ke) : a === "update" && (r = {
124
+ id: e == null ? void 0 : e.id,
125
+ key: {
126
+ systemKey: sessionStorage.getItem("systemKey"),
127
+ pageKey: E.value,
128
+ type: "structure",
129
+ parentTable: "",
130
+ version: 1
131
+ }
132
+ }, i = Oe);
133
+ const n = await i({
134
+ ...r,
135
+ value: {
136
+ pageData: e
137
+ }
138
+ });
139
+ return ((c = n == null ? void 0 : n.data) == null ? void 0 : c.code) === 200 ? (ce.success("保存成功"), n.data.result) : (ce.success("保存响应失败"), []);
140
+ } catch {
141
+ ce.success("保存响应失败");
142
+ }
143
+ }, h = async () => {
144
+ const e = await ue(), a = e == null ? void 0 : e.map((n) => n.id);
145
+ console.log("clickSavePage1", a);
146
+ const c = JSON.parse(W(JSON.stringify(L.value)));
147
+ console.log("clickSavePage2", c);
148
+ const r = c == null ? void 0 : c.filter((n) => !n.id), i = c == null ? void 0 : c.filter((n) => n.id);
149
+ console.log("clickSavePage3", r), console.log("clickSavePage4", i), r == null || r.forEach((n, u) => {
150
+ te(n, "create");
151
+ }), i == null || i.forEach((n) => {
152
+ a != null && a.includes(n.id) && (console.log("clickSavePage5", "包含"), te(n, "update"));
153
+ });
154
+ }, k = async (e, a = "data") => {
155
+ var r, i, n, u, F, _;
156
+ if ((e == null ? void 0 : e.type) === "delete")
157
+ await ze((r = e == null ? void 0 : e.singleContent) == null ? void 0 : r.id);
158
+ else if ((e == null ? void 0 : e.buttonName) === "新增") {
159
+ let x = {};
160
+ for (let v in e == null ? void 0 : e.singleContent)
161
+ v !== "id" && v !== "index" && (x[v] = e == null ? void 0 : e.singleContent[v]);
162
+ await Le(
163
+ a,
164
+ E.value,
165
+ e == null ? void 0 : e.index,
166
+ sessionStorage.getItem("systemKey"),
167
+ Object.values(x),
168
+ e == null ? void 0 : e.column
169
+ );
170
+ } else if ((e == null ? void 0 : e.buttonName) === "编辑") {
171
+ let x = {}, v = (i = e == null ? void 0 : e.singleContent) == null ? void 0 : i.id;
172
+ for (let l in e == null ? void 0 : e.singleContent)
173
+ l !== "id" && l !== "index" && (x[l] = e == null ? void 0 : e.singleContent[l]);
174
+ await We(
175
+ a,
176
+ E.value,
177
+ e == null ? void 0 : e.index,
178
+ v,
179
+ sessionStorage.getItem("systemKey"),
180
+ Object.values(x),
181
+ e == null ? void 0 : e.column
182
+ );
183
+ }
184
+ let c = (u = (n = P.value) == null ? void 0 : n[P.value.length - 1]) != null && u.key ? parseInt((_ = (F = P.value) == null ? void 0 : F[P.value.length - 1]) == null ? void 0 : _.key) : "";
185
+ f.value = await ne(E.value, sessionStorage.getItem("systemKey"), c), y.setItemData(f.value), y.setOriginalData(f.value);
186
+ }, j = (e) => {
187
+ f.value = e, y.setItemData(f.value), y.setOriginalData(f.value);
188
+ }, D = async (e) => {
189
+ var c, r;
190
+ await Ve(e == null ? void 0 : e.index, {
191
+ comp: "Form",
192
+ compData: (c = W(e == null ? void 0 : e.contents)) == null ? void 0 : c.filter((i) => i.contents),
193
+ name: ""
194
+ });
195
+ const a = (r = W(f.value)) == null ? void 0 : r.map((i) => ((i == null ? void 0 : i.id) === (e == null ? void 0 : e.index) && (i.compData = e == null ? void 0 : e.contents), i));
196
+ y.setItemData(a), y.setOriginalData(a);
197
+ }, B = async (e) => {
198
+ var a;
199
+ if ((e == null ? void 0 : e.key) === "main" || P.value.length === 1)
200
+ f.value = await ne(E.value, sessionStorage.getItem("systemKey")), p.setSelectIndex(""), p.setSelectMenu(""), p.setSelectTitle([]);
201
+ else {
202
+ const c = [], r = (e == null ? void 0 : e.key) === "" || !(e != null && e.key) ? "" : parseInt(e == null ? void 0 : e.key);
203
+ f.value = await ne(E.value, sessionStorage.getItem("systemKey"), r);
204
+ let i = -1;
205
+ (a = P.value) == null || a.forEach((n, u) => {
206
+ (n == null ? void 0 : n.key) === (e == null ? void 0 : e.key) && (i = u), (i === -1 || i >= u) && c.push(n);
207
+ }), p.setSelectTitle(c), r !== "" ? p.setSelectMenu(e == null ? void 0 : e.key) : (p.setSelectIndex(""), p.setSelectMenu(""));
208
+ }
209
+ y.setItemData(f.value), y.setOriginalData(f.value);
210
+ }, A = (e) => {
211
+ var a, c, r;
212
+ return ((c = (a = b.value) == null ? void 0 : a.layer) == null ? void 0 : c.toUpperCase()) === "SUPERADMIN" || ((r = b.value) == null ? void 0 : r.account) === (e == null ? void 0 : e.account);
213
+ }, R = async (e, a = [], c) => {
214
+ const r = we("/系统管理/角色管理"), i = we("/系统管理/部门管理");
215
+ return await Promise.all([r, i]).then((u) => {
216
+ var x, v;
217
+ const F = (x = u == null ? void 0 : u[0]) == null ? void 0 : x.map((l) => ({
218
+ label: l == null ? void 0 : l.roleName,
219
+ value: l == null ? void 0 : l.roleName
220
+ })), _ = (v = u == null ? void 0 : u[1]) == null ? void 0 : v.map((l) => ({
221
+ label: l == null ? void 0 : l.deptName,
222
+ value: l == null ? void 0 : l.deptName
223
+ }));
224
+ return c ? e == null ? void 0 : e.map((l) => {
225
+ var M;
226
+ return {
227
+ ...l,
228
+ compData: (M = l == null ? void 0 : l.compData) == null ? void 0 : M.map((t) => {
229
+ var s, K;
230
+ return (t == null ? void 0 : t.key) === "header" ? {
231
+ ...t,
232
+ contents: (s = t == null ? void 0 : t.contents) == null ? void 0 : s.map((m) => m.prop === "userDept" ? {
233
+ ...m,
234
+ options: _
235
+ } : m.prop === "userRoles" ? {
236
+ ...m,
237
+ options: F
238
+ } : m)
239
+ } : (t == null ? void 0 : t.key) === "tableContents" ? {
240
+ ...t,
241
+ contents: (K = t == null ? void 0 : t.contents) == null ? void 0 : K.map((m) => {
242
+ var C;
243
+ return {
244
+ ...m,
245
+ password: A(m) ? ke(m == null ? void 0 : m.password, (C = N == null ? void 0 : N.value) == null ? void 0 : C.privateKey) : m == null ? void 0 : m.password
246
+ };
247
+ })
248
+ } : t;
249
+ })
250
+ };
251
+ }) : e == null ? void 0 : e.map((l) => {
252
+ var M;
253
+ return {
254
+ ...l,
255
+ compData: (M = l == null ? void 0 : l.compData) == null ? void 0 : M.map((t) => {
256
+ var s, K, m;
257
+ return (t == null ? void 0 : t.key) === "rowButton" || (t == null ? void 0 : t.key) === "extraButton" ? {
258
+ ...t,
259
+ contents: (s = t == null ? void 0 : t.contents) == null ? void 0 : s.filter((C) => a == null ? void 0 : a.includes(C == null ? void 0 : C.label))
260
+ } : (t == null ? void 0 : t.key) === "header" ? {
261
+ ...t,
262
+ contents: (K = t == null ? void 0 : t.contents) == null ? void 0 : K.map((C) => C.prop === "userDept" ? {
263
+ ...C,
264
+ options: _
265
+ } : C.prop === "userRoles" ? {
266
+ ...C,
267
+ options: F
268
+ } : C)
269
+ } : (t == null ? void 0 : t.key) === "tableContents" ? {
270
+ ...t,
271
+ contents: (m = t == null ? void 0 : t.contents) == null ? void 0 : m.map((C) => {
272
+ var fe;
273
+ return {
274
+ ...C,
275
+ password: A(C) ? ke(C == null ? void 0 : C.password, (fe = N == null ? void 0 : N.value) == null ? void 0 : fe.privateKey) : C == null ? void 0 : C.password
276
+ };
277
+ })
278
+ } : t;
279
+ })
280
+ };
281
+ });
282
+ });
283
+ };
284
+ X(
285
+ () => [E.value, O.value],
286
+ async (e) => {
287
+ const a = e == null ? void 0 : e[0], c = e == null ? void 0 : e[1];
288
+ if (a || c === "view") {
289
+ Ge(), sessionStorage.setItem("pageKey", E.value);
290
+ const r = await ne(a, sessionStorage.getItem("systemKey"), "", E.value);
291
+ y.setExtraContents([]);
292
+ const i = sessionStorage.getItem("authority"), n = JSON.parse(i || "");
293
+ if (Array.isArray(n)) {
294
+ const u = Array.isArray(n) && (n == null ? void 0 : n.filter((_) => _ == null ? void 0 : _.includes(a))), F = u == null ? void 0 : u.map((_) => {
295
+ var x;
296
+ return ((x = _ == null ? void 0 : _.split("/")) == null ? void 0 : x.pop()) || "";
297
+ });
298
+ f.value = a === "/系统管理/用户管理" ? await R(r, F, !1) : r == null ? void 0 : r.map((_) => {
299
+ var x;
300
+ return {
301
+ ..._,
302
+ compData: (x = _ == null ? void 0 : _.compData) == null ? void 0 : x.map((v) => {
303
+ var l;
304
+ return (v == null ? void 0 : v.key) === "rowButton" || (v == null ? void 0 : v.key) === "extraButton" ? {
305
+ ...v,
306
+ contents: (l = v == null ? void 0 : v.contents) == null ? void 0 : l.filter((M) => F == null ? void 0 : F.includes(M == null ? void 0 : M.label))
307
+ } : v;
308
+ })
309
+ };
310
+ });
311
+ } else typeof n == "string" && (n == null ? void 0 : n.toUpperCase()) === "SUPERADMIN" ? f.value = a === "/系统管理/用户管理" ? await R(r, null, !0) : r : f.value = [];
312
+ p.setSelectTitle([]), p.setSelectIndex(""), p.setSelectMenu(""), y.setItemData(f.value), y.setOriginalData(f.value), P.value = E.value.split("/").filter((u) => u !== "").map((u) => ({ value: u.trim() }));
313
+ }
314
+ },
315
+ {
316
+ immediate: !0
317
+ }
318
+ ), X(
319
+ () => [d == null ? void 0 : d.content, d == null ? void 0 : d.jsonContents],
320
+ async () => {
321
+ var c, r, i, n;
322
+ if (((c = d == null ? void 0 : d.jsonContents) == null ? void 0 : c.length) > 0) {
323
+ y.setOriginalData(d == null ? void 0 : d.jsonContents);
324
+ return;
325
+ }
326
+ if (!(d != null && d.content) || ((r = d == null ? void 0 : d.content) == null ? void 0 : r.length) === 0) return;
327
+ G.value = !0, Z.value = !0;
328
+ let e = [], a = [];
329
+ p.setSelectTitle([]), p.setSelectIndex(""), p.setSelectMenu(""), (n = (i = d == null ? void 0 : d.content) == null ? void 0 : i.filter((u) => u !== "")) == null || n.forEach((u) => {
330
+ Fe(u) ? a.push(Me(u)) : _e(u) ? a.push(_e(u)) : Ce(u) ? a.push(Ce(u)) : a.push(aa());
331
+ }), e = a == null ? void 0 : a[0], await qe(e), y.setOriginalData(e), G.value = !1;
332
+ },
333
+ { deep: !0, immediate: !0 }
334
+ );
335
+ const se = (e) => je(e);
336
+ return (e, a) => {
337
+ const c = z("el-aside"), r = z("el-button"), i = z("el-avatar"), n = z("el-header"), u = z("router-view"), F = z("el-main"), _ = z("el-container"), x = be("loading");
338
+ return g(), w("div", ta, [
339
+ Pe((g(), H(_, { "element-loading-text": "正在加载页面数据..." }, {
340
+ default: J(() => [
341
+ $(O) === "view" ? (g(), H(c, {
342
+ key: 0,
343
+ width: "250px"
344
+ }, {
345
+ default: J(() => [
346
+ I(Ne)
347
+ ]),
348
+ _: 1
349
+ })) : U("", !0),
350
+ I(_, null, {
351
+ default: J(() => [
352
+ I(n, null, {
353
+ default: J(() => {
354
+ var v;
355
+ return [
356
+ S("div", sa, [
357
+ S("div", na, [
358
+ $(O) === "edit" ? (g(), w("div", la, [
359
+ I(r, {
360
+ text: "",
361
+ onClick: ie
362
+ }, {
363
+ default: J(() => a[0] || (a[0] = [
364
+ de(" 返回页面 ")
365
+ ])),
366
+ _: 1,
367
+ __: [0]
368
+ }),
369
+ I(r, {
370
+ text: "",
371
+ onClick: h
372
+ }, {
373
+ icon: J(() => [
374
+ I(De, { name: "Store" })
375
+ ]),
376
+ default: J(() => [
377
+ a[1] || (a[1] = de(" 保存页面 "))
378
+ ]),
379
+ _: 1,
380
+ __: [1]
381
+ })
382
+ ])) : U("", !0),
383
+ (g(), H(ea, {
384
+ key: $(P),
385
+ breadArray: $(P),
386
+ onClick: B
387
+ }, null, 8, ["breadArray"]))
388
+ ]),
389
+ S("div", ra, [
390
+ $(O) === "view" ? (g(), w("div", {
391
+ key: 0,
392
+ class: "select-icon",
393
+ onClick: oe
394
+ }, [
395
+ S("div", oa, [
396
+ I(De, {
397
+ name: "write",
398
+ style: { width: "16px", height: "16px" }
399
+ })
400
+ ]),
401
+ a[2] || (a[2] = S("div", null, q("修改布局"), -1))
402
+ ])) : U("", !0),
403
+ S("div", ia, [
404
+ $e(e.$slots, "default", {}, void 0, !0)
405
+ ]),
406
+ I(i, {
407
+ size: 35,
408
+ src: (v = $(b)) == null ? void 0 : v.avatarUrl
409
+ }, {
410
+ default: J(() => {
411
+ var l;
412
+ return [
413
+ de(q(((l = $(b)) == null ? void 0 : l.account) ?? "未知"), 1)
414
+ ];
415
+ }),
416
+ _: 1
417
+ }, 8, ["src"])
418
+ ])
419
+ ])
420
+ ];
421
+ }),
422
+ _: 3
423
+ }),
424
+ I(F, {
425
+ style: pe({ display: $(O) === "edit" ? "block" : "flex" })
426
+ }, {
427
+ default: J(() => {
428
+ var v, l, M, t;
429
+ return [
430
+ $(O) === "edit" ? (g(), w("div", ua, [
431
+ S("div", da, [
432
+ I(me)
433
+ ]),
434
+ (g(), w("div", {
435
+ class: "model-show",
436
+ key: e.innerWidth
437
+ }, [
438
+ I(Ie)
439
+ ])),
440
+ S("div", ca, [
441
+ I(xe)
442
+ ])
443
+ ])) : e.$route.path === "/" && ((v = f.value) == null ? void 0 : v.length) > 0 && $(O) === "view" ? (g(), w("div", va, [
444
+ S("div", ga, [
445
+ (l = $(W)(f.value)) != null && l.find((s) => s.comp === "FormTop") ? (g(), w("div", {
446
+ class: "show-header",
447
+ key: e.index
448
+ }, [
449
+ (g(!0), w(ve, null, ge((M = $(W)(f.value)) == null ? void 0 : M.filter((s) => s.comp === "FormTop"), (s, K) => (g(), w("div", {
450
+ class: "item-content",
451
+ key: K
452
+ }, [
453
+ S("div", ya, q(s.name), 1),
454
+ (g(), H(he(se(s.comp)), {
455
+ itemData: s == null ? void 0 : s.compData,
456
+ childItemData: s == null ? void 0 : s.itemChildData,
457
+ key: (s == null ? void 0 : s.id) ?? K,
458
+ onChange: k,
459
+ index: (s == null ? void 0 : s.id) ?? K,
460
+ onContentChange: D,
461
+ onPageChange: j
462
+ }, null, 40, ["itemData", "childItemData", "index"]))
463
+ ]))), 128))
464
+ ])) : U("", !0),
465
+ S("div", fa, [
466
+ (g(!0), w(ve, null, ge((t = $(W)(f.value)) == null ? void 0 : t.filter((s) => s.comp !== "FormTop"), (s, K) => (g(), w("div", {
467
+ class: "item-content",
468
+ key: K
469
+ }, [
470
+ S("div", ha, q(s.name), 1),
471
+ (g(), H(he(se(s.comp)), {
472
+ itemData: s == null ? void 0 : s.compData,
473
+ childItemData: s == null ? void 0 : s.itemChildData,
474
+ key: (s == null ? void 0 : s.id) ?? K,
475
+ onChange: k,
476
+ index: (s == null ? void 0 : s.id) ?? K,
477
+ onContentChange: D,
478
+ onPageChange: j
479
+ }, null, 40, ["itemData", "childItemData", "index"]))
480
+ ]))), 128))
481
+ ])
482
+ ])
483
+ ])) : $(O) === "view" ? (g(), w("div", _a, [
484
+ I(u)
485
+ ])) : U("", !0)
486
+ ];
487
+ }),
488
+ _: 1
489
+ }, 8, ["style"])
490
+ ]),
491
+ _: 3
492
+ })
493
+ ]),
494
+ _: 3
495
+ })), [
496
+ [x, G.value]
497
+ ])
498
+ ]);
499
+ };
500
+ }
501
+ }, wa = /* @__PURE__ */ ye(Ca, [["__scopeId", "data-v-1dbb2025"]]), ka = { class: "add-model-content" }, Da = {
502
+ key: 0,
503
+ class: "model-operate"
504
+ }, Sa = { class: "model-select" }, pa = { class: "model-fill" }, ma = {
505
+ key: 1,
506
+ class: "model-view"
507
+ }, Ia = {
508
+ key: 0,
509
+ class: "model-import-data"
510
+ }, xa = { class: "import-button" }, Aa = {
511
+ __name: "index",
512
+ props: {
513
+ mode: {
514
+ type: String,
515
+ default: "view"
516
+ },
517
+ content: {
518
+ type: String,
519
+ default: ""
520
+ },
521
+ jsonContents: {
522
+ type: Array,
523
+ default: () => []
524
+ },
525
+ showButton: {
526
+ type: Boolean,
527
+ default: !0
528
+ }
529
+ },
530
+ emits: ["change", "contentChange"],
531
+ setup(Y, { emit: ae }) {
532
+ const o = Y, b = ae, N = T([]), d = T([]), y = T([]), Z = T(0), V = Ae(ee), L = Te(ee), { itemData: O, originalData: p } = Q(V), { activeMenuPath: E } = Q(L), le = T(null), re = T(0), P = T([]);
533
+ T("");
534
+ const G = T(0), f = (h) => {
535
+ b("contentChange", h);
536
+ }, oe = (h) => {
537
+ var j;
538
+ const k = (j = W(h == null ? void 0 : h.wholeValue)) == null ? void 0 : j.map((D) => {
539
+ var B;
540
+ return (D == null ? void 0 : D.comp) === "Form" && (D.compData = (B = D.compData) == null ? void 0 : B.map((A) => ((A == null ? void 0 : A.key) === "formContent" && (A.contents = Be(A == null ? void 0 : A.contents)), A))), D;
541
+ });
542
+ b("change", {
543
+ originalContents: p.value,
544
+ currentContents: h == null ? void 0 : h.wholeValue,
545
+ editContent: h == null ? void 0 : h.editValue,
546
+ arrayToContents: k
547
+ });
548
+ };
549
+ X(
550
+ () => d.value,
551
+ () => {
552
+ G.value === d.value.length && d.value.length !== 0 && (N.value = d.value);
553
+ },
554
+ { deep: !0, immediate: !0 }
555
+ );
556
+ const ie = () => {
557
+ le.value.click();
558
+ }, ue = async (h) => {
559
+ const k = h.target.files;
560
+ if (!k) return;
561
+ new FileReader(), N.value = [], d.value = [], G.value = k.length;
562
+ const j = Array.from(k).map(async (D) => await new Promise((B) => {
563
+ const A = new FileReader();
564
+ A.onload = (R) => {
565
+ try {
566
+ d.value.push(R.target.result), P.value = te(R.target.result), re.value++;
567
+ } catch (se) {
568
+ console.error("解析失败:", se);
569
+ return;
570
+ }
571
+ }, A.onerror = () => B(`读取 ${D.name} 失败`), A.readAsText(D);
572
+ }));
573
+ await Promise.all(j);
574
+ };
575
+ X(
576
+ () => [o == null ? void 0 : o.content, o == null ? void 0 : o.jsonContents],
577
+ () => {
578
+ N.value = o.content, y.value = o == null ? void 0 : o.jsonContents;
579
+ },
580
+ { deep: !0, immediate: !0 }
581
+ ), X(
582
+ () => re.value,
583
+ () => {
584
+ var h;
585
+ ((h = P.value) == null ? void 0 : h.length) !== 0 && (V.setOriginalData(P.value), V.setItemData(P.value));
586
+ },
587
+ { deep: !0, immediate: !0 }
588
+ );
589
+ const te = (h) => {
590
+ let k = h.replace(/,/g, ",").replace(/;/g, ";").replace(/:/g, ":");
591
+ k = k.replace(/(\w+)\s*:/g, "$1:"), k = k.replace(/\r\n/g, "").replace(/\n/g, "").replace(/\t/g, "").replace(/\s+/g, " ").trim(), k = k.replace(/,\s*([}\]])/g, "$1"), k = k.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g, ": $2$4");
592
+ try {
593
+ return JSON.parse(k);
594
+ } catch (j) {
595
+ try {
596
+ const B = new Function(`return ${k}`)();
597
+ if (Array.isArray(B) || typeof B == "object")
598
+ return B;
599
+ throw new Error(`解析结果不是有效的数组或对象: ${j}`);
600
+ } catch (D) {
601
+ throw new Error(`无法解析JSON: ${D.message}`);
602
+ }
603
+ }
604
+ };
605
+ return (h, k) => {
606
+ const j = z("svg-icon");
607
+ return g(), w("div", ka, [
608
+ (o == null ? void 0 : o.mode) === "edit" ? (g(), w("div", Da, [
609
+ S("div", Sa, [
610
+ I(me)
611
+ ]),
612
+ (g(), w("div", {
613
+ class: "model-show",
614
+ key: Z.value
615
+ }, [
616
+ I(Ie)
617
+ ])),
618
+ S("div", pa, [
619
+ I(xe)
620
+ ])
621
+ ])) : U("", !0),
622
+ (o == null ? void 0 : o.mode) === "view" ? (g(), w("div", ma, [
623
+ (g(), H(wa, {
624
+ content: N.value,
625
+ onChange: oe,
626
+ jsonContents: y.value,
627
+ onContentChange: f,
628
+ key: Z.value
629
+ }, {
630
+ default: J(() => {
631
+ var D;
632
+ return [
633
+ ((D = o == null ? void 0 : o.jsonContents) == null ? void 0 : D.length) === 0 && (o != null && o.showButton) ? (g(), w("div", Ia, [
634
+ S("div", xa, [
635
+ S("input", {
636
+ type: "file",
637
+ ref_key: "fileInput",
638
+ ref: le,
639
+ accept: ".txt, .inm",
640
+ onChange: ue,
641
+ style: { display: "none" },
642
+ multiple: ""
643
+ }, null, 544),
644
+ I(j, {
645
+ name: "import",
646
+ style: { width: "16px", height: "16px" }
647
+ }),
648
+ S("div", { onClick: ie }, q("导入文件"))
649
+ ])
650
+ ])) : U("", !0)
651
+ ];
652
+ }),
653
+ _: 1
654
+ }, 8, ["content", "jsonContents"]))
655
+ ])) : U("", !0)
656
+ ]);
657
+ };
658
+ }
659
+ }, Wa = /* @__PURE__ */ ye(Aa, [["__scopeId", "data-v-cea2aaad"]]);
660
+ export {
661
+ Wa as default
662
+ };
@@ -1,12 +1,12 @@
1
1
  import { ref as st, watch as Ei, nextTick as Mc, resolveComponent as xl, createBlock as Aa, openBlock as Ht, withCtx as en, createElementVNode as Yt, renderSlot as Va, onMounted as wa, createElementBlock as mn, createCommentVNode as Ml, Fragment as Sl, renderList as yl, normalizeStyle as El, toDisplayString as Pr, createVNode as Pn, unref as Sc, onBeforeUnmount as yc, createSlots as Ec } from "vue";
2
- import { p as Dr, c as fn, g as gi, u as kr, d as Tc } from "./index-zXisGnmY.js";
3
- import { u as Tl } from "./modelComp-9fow02FC.js";
4
- import { a2 as bc, S as Ga, a3 as Ac, i as Wa, a4 as Xa, a5 as wc } from "./index-C2kuvDNq.js";
5
- import { s as bl, d as Rc, a as qa } from "./index-B63Pn6Hg.js";
6
- import { U as Ya, g as ja, h as Ka, j as Za, S as ns, k as Cc, c as Ie } from "./cloneDeep-D3DwnHwP.js";
2
+ import { p as Dr, c as fn, g as gi, u as kr, d as Tc } from "./index-DtJQBHbx.js";
3
+ import { u as Tl } from "./modelComp-BZYWE77x.js";
4
+ import { a2 as bc, S as Ga, a3 as Ac, i as Wa, a4 as Xa, a5 as wc } from "./index-DvpoH0CQ.js";
5
+ import { s as bl, d as Rc, a as qa } from "./index-Cz4RyK4P.js";
6
+ import { U as Ya, g as ja, h as Ka, j as Za, S as ns, k as Cc, c as Ie } from "./cloneDeep-Dof88Xfu.js";
7
7
  import { _ as Ra } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- import { s as Gi, d as Al, u as Pc } from "./menu-Dpw1TOij.js";
9
- import { d as $a } from "./index-Bbs7Ne8f.js";
8
+ import { s as Gi, d as Al, u as Pc } from "./menu-DNjiqLiy.js";
9
+ import { d as $a } from "./index-CiGPupSC.js";
10
10
  var Dc = "__lodash_hash_undefined__";
11
11
  function Lc(i) {
12
12
  return this.__data__.set(i, Dc), this;