ss-component-new 1.1.509 → 1.1.511

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 (96) hide show
  1. package/dist/{array-BTjyzwbz.js → array-6rfRfZoy.js} +1 -1
  2. package/dist/{array-T-glopHk.cjs → array-BKzrrmWD.cjs} +2 -2
  3. package/dist/{index-BqlWuQ7F.cjs → index-3GfpOmBm.cjs} +1 -1
  4. package/dist/index-9keTbNci.js +1490 -0
  5. package/dist/{index-BPe56KwL.js → index-B72kja43.js} +12 -13
  6. package/dist/{index-B3sFb3ED.js → index-BBFJJ4tl.js} +5 -5
  7. package/dist/index-BBQKck4p.cjs +1 -0
  8. package/dist/index-BBQrfTQg.cjs +1 -0
  9. package/dist/index-BDmXVjP1.cjs +1 -0
  10. package/dist/{index-BC6o_HwA.js → index-BPQ17KYZ.js} +1 -1
  11. package/dist/{index-OUNz_X1-.js → index-BSC7EQfO.js} +15 -15
  12. package/dist/{index-B6WyqdEq.js → index-BY-71neG.js} +27 -28
  13. package/dist/{index-pWCRQCtH.cjs → index-BdCeB39f.cjs} +1 -1
  14. package/dist/{index-0Aj-6Pfy.cjs → index-Bk9CevKt.cjs} +3 -3
  15. package/dist/{index-WupiV34P.js → index-Bsluws3x.js} +1 -1
  16. package/dist/{index-D-3H8d48.js → index-Btfqm3Aj.js} +16 -17
  17. package/dist/index-Bw7fhgWa.js +186 -0
  18. package/dist/{index-BrZj-udo.js → index-Bz3SW9qv.js} +6 -6
  19. package/dist/{index--d0-FcKi.js → index-C-RVIq7e.js} +3 -3
  20. package/dist/{index-BcRfxlOl.cjs → index-C3G2rcyE.cjs} +1 -1
  21. package/dist/{index-18OPgy7M.js → index-C3Lo66u2.js} +4 -4
  22. package/dist/index-C8zdykvt.cjs +1 -0
  23. package/dist/{index-D9fT9K4k.js → index-COMGfNcR.js} +3 -3
  24. package/dist/index-CRSpuXYg.cjs +1 -0
  25. package/dist/index-CT9N59g0.cjs +1 -0
  26. package/dist/{index-cyR-UE9m.cjs → index-CbWlMlxi.cjs} +1 -1
  27. package/dist/{index-DXv077SA.cjs → index-Cd0szVvZ.cjs} +1 -1
  28. package/dist/{index-C17_NPz0.cjs → index-Ci1hpo3R.cjs} +1 -1
  29. package/dist/{index-JqG9oXli.js → index-CmUqS1hN.js} +1 -1
  30. package/dist/{index-MDG-_61i.js → index-CqmGUncB.js} +3 -3
  31. package/dist/index-D42emtHS.cjs +1 -0
  32. package/dist/{index-qlszF_bh.js → index-D5AYFKTM.js} +2 -2
  33. package/dist/{index-B-3rJW5B.cjs → index-D8QyJVl9.cjs} +1 -1
  34. package/dist/{index-Dx6aORao.cjs → index-D9ZIJbHw.cjs} +12 -12
  35. package/dist/{index-DpBfp4fC.js → index-DF8AKNJv.js} +16 -17
  36. package/dist/index-DGHLPooK.js +457 -0
  37. package/dist/{index-BeUJWi0x.js → index-DLfWd1qr.js} +5 -5
  38. package/dist/index-DQxqAo5T.cjs +1 -0
  39. package/dist/index-DRXd1T3-.cjs +1 -0
  40. package/dist/{index-TnYimoKI.cjs → index-DgsMW7lK.cjs} +1 -1
  41. package/dist/{index-B35jXtRb.js → index-DnGhhxPP.js} +5 -5
  42. package/dist/{index-pxmLD5OC.cjs → index-Dw520ieR.cjs} +1 -1
  43. package/dist/{index-uN3j6KsS.cjs → index-Dy4AlOOz.cjs} +1 -1
  44. package/dist/{index-DNQe9fKA.js → index-DzjXzyVN.js} +1 -1
  45. package/dist/{index-OYYGU2YE.js → index-LCDlyiVS.js} +4 -4
  46. package/dist/index-NJKX8un9.js +3995 -0
  47. package/dist/{index-DYRVEBa9.js → index-NkBocgtR.js} +111 -112
  48. package/dist/{index-55yBsyRr.cjs → index-Oixs__9V.cjs} +1 -1
  49. package/dist/{index-Dh39r6dj.cjs → index-XKC9uwi7.cjs} +1 -1
  50. package/dist/{index-DtUmPH3r.cjs → index-YT4yRM1k.cjs} +1 -1
  51. package/dist/{index-CRkYxnL4.cjs → index-lZj2FVM-.cjs} +1 -1
  52. package/dist/{index-DwMyURBu.js → index-t25R8oz_.js} +9 -9
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-Dzi9C_6v.js → index.vue_vue_type_script_setup_true_lang-D0IUrek5.js} +40 -40
  54. package/dist/{index.vue_vue_type_script_setup_true_lang-CGZnYRAf.cjs → index.vue_vue_type_script_setup_true_lang-DWwRe3NO.cjs} +1 -1
  55. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C0_XMLvd.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-0GZj6SDy.js} +9343 -9713
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B40u7Mx6.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BruAa-uD.cjs} +86 -86
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-9V0_8cmZ.js → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang--3mE_B9B.js} +15 -15
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B-GFoPJ9.cjs → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B2bfU2M4.cjs} +1 -1
  59. package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BFaKxxEb.cjs +56 -0
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BSG1ySNA.js → index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BZQSdupd.js} +9759 -9781
  61. package/dist/{login-CW3Tv6wk.cjs → login-BHMBhU8d.cjs} +1 -1
  62. package/dist/{login-Bb_Ovfvl.js → login-CROQ1_RU.js} +4 -4
  63. package/dist/{main-DeaRuNYD.js → main-1yb7Pay5.js} +7 -8
  64. package/dist/main-DkeO8sGR.cjs +1 -0
  65. package/dist/{menu-jWcM5fkr.js → menu-BPLW-L8U.js} +3946 -3581
  66. package/dist/menu-CQ3_ZXwC.cjs +21 -0
  67. package/dist/menuIndex-BJdEj1Et.cjs +1 -0
  68. package/dist/menuIndex-BsKyxgvr.js +60 -0
  69. package/dist/ss-component.cjs +1 -1
  70. package/dist/ss-component.css +1 -1
  71. package/dist/ss-component.js +9 -9
  72. package/dist/ss-component2.cjs +1 -1
  73. package/dist/ss-component2.js +9 -9
  74. package/dist/{threeModel-AKBKLvxK.js → threeModel-CFiMikXU.js} +322 -321
  75. package/dist/{threeModel-CEMnXOw2.cjs → threeModel-Cz-eN53p.cjs} +1 -1
  76. package/dist/{threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-BOOCIUn8.js → threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-DZ9BnDSy.js} +2 -2
  77. package/dist/{threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-C1EygWi0.cjs → threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-MfXPrK37.cjs} +1 -1
  78. package/package.json +1 -1
  79. package/dist/index--3QjFI9W.cjs +0 -1
  80. package/dist/index-BkKYXjJ0.cjs +0 -1
  81. package/dist/index-Bpt6Hcq2.cjs +0 -1
  82. package/dist/index-CI__ZdC-.cjs +0 -1
  83. package/dist/index-CPfseYEB.cjs +0 -1
  84. package/dist/index-CZN1K7bK.js +0 -408
  85. package/dist/index-Cdxp_a8K.js +0 -185
  86. package/dist/index-CxS1YyFs.cjs +0 -1
  87. package/dist/index-DXIV-OAV.cjs +0 -1
  88. package/dist/index-DY4cro4C.js +0 -3995
  89. package/dist/index-DtsLJPQK.js +0 -1493
  90. package/dist/index-jVYlDMIh.cjs +0 -1
  91. package/dist/index-qHbYDYso.cjs +0 -1
  92. package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-Cek8Ghpc.cjs +0 -56
  93. package/dist/main-BrbcMu5X.cjs +0 -1
  94. package/dist/menu-BXTfsfTB.cjs +0 -21
  95. package/dist/menuIndex-BWim3TlH.js +0 -33
  96. package/dist/menuIndex-Cg6xI-jR.cjs +0 -1
@@ -1,22 +1,21 @@
1
1
  import { resolveComponent as y, createBlock as b, openBlock as s, withCtx as o, createVNode as e, createElementVNode as h, toDisplayString as te, ref as c, onMounted as ft, watch as I, createElementBlock as A, Fragment as Ce, renderList as Me, createCommentVNode as D, normalizeStyle as _t, defineComponent as Xe, computed as ke, resolveDirective as qe, withDirectives as Fe, unref as t, createTextVNode as L, renderSlot as he, vShow as Re, resolveDynamicComponent as He } from "vue";
2
- import { m as Pe, a as xe, b as De } from "./index-BPe56KwL.js";
3
- import Je from "./index-WupiV34P.js";
4
- import { _ as vt, o as We, c as Qe, a as Ye, b as Ze, d as et, s as ee, g as tt, e as at, f as ot, h as nt, i as gt, j as yt } from "./index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BSG1ySNA.js";
2
+ import { m as Pe, a as xe, b as De } from "./index-B72kja43.js";
3
+ import Je from "./index-Bsluws3x.js";
4
+ import { _ as vt, o as We, c as Qe, a as Ye, b as Ze, d as et, s as ee, g as tt, e as at, f as ot, h as nt, i as gt, j as yt } from "./index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BZQSdupd.js";
5
5
  import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import { p as X, s as G, u as Te, d as lt, c as ye, g as Ct } from "./menu-jWcM5fkr.js";
7
- import { u as st } from "./login-Bb_Ovfvl.js";
6
+ import { p as X, s as G, u as Te, e as lt, c as be, d as ye, g as Ct } from "./menu-BPLW-L8U.js";
7
+ import { u as st } from "./login-CROQ1_RU.js";
8
8
  import { S as pe } from "./index-BHtNKL1L.js";
9
- import { u as Se } from "./threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-BOOCIUn8.js";
10
- import { u as je, a as wt, l as it } from "./index-DtsLJPQK.js";
11
- import { s as rt, _ as Bt } from "./index-18OPgy7M.js";
12
- import { _ as ut } from "./index.vue_vue_type_script_setup_true_lang-Dzi9C_6v.js";
13
- import { c as be } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C0_XMLvd.js";
14
- import kt from "./threeModel-AKBKLvxK.js";
15
- import { u as Ft } from "./index-DY4cro4C.js";
16
- import { d as Ge } from "./index-DNQe9fKA.js";
9
+ import { u as Se } from "./threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-DZ9BnDSy.js";
10
+ import { u as je, a as wt, l as it } from "./index-9keTbNci.js";
11
+ import { s as rt, _ as Bt } from "./index-C3Lo66u2.js";
12
+ import { _ as ut } from "./index.vue_vue_type_script_setup_true_lang-D0IUrek5.js";
13
+ import kt from "./threeModel-CFiMikXU.js";
14
+ import { u as Ft } from "./index-NJKX8un9.js";
15
+ import { d as Ge } from "./index-DzjXzyVN.js";
17
16
  import "vue-router";
18
- import { a as Rt } from "./array-BTjyzwbz.js";
19
- import { c as bt, b as Tt } from "./index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-9V0_8cmZ.js";
17
+ import { a as Rt } from "./array-6rfRfZoy.js";
18
+ import { c as bt, b as Tt } from "./index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang--3mE_B9B.js";
20
19
  function St(w, W, a, B, S, V) {
21
20
  const n = y("svg-icon"), M = y("ssMenu");
22
21
  return s(), b(M, {
@@ -1130,7 +1129,7 @@ const ct = /* @__PURE__ */ fe(vt, [["render", St], ["__scopeId", "data-v-5c2d7ed
1130
1129
  ]);
1131
1130
  };
1132
1131
  }
1133
- }, xa = /* @__PURE__ */ fe(pa, [["__scopeId", "data-v-f69cf49c"]]);
1132
+ }, Pa = /* @__PURE__ */ fe(pa, [["__scopeId", "data-v-f69cf49c"]]);
1134
1133
  export {
1135
- xa as default
1134
+ Pa as default
1136
1135
  };
@@ -0,0 +1,457 @@
1
+ import { ref as o, computed as T, reactive as M, nextTick as E, watch as F } from "vue";
2
+ import { bR as V, g as N, s as D, E as b, c as P, bO as q, bM as G, bP as H, u as J, p as C } from "./menu-BPLW-L8U.js";
3
+ import { u as X } from "./login-CROQ1_RU.js";
4
+ const Y = V("authorityState", {
5
+ state: () => ({
6
+ routerPageStructures: []
7
+ }),
8
+ actions: {
9
+ setRouterPageStructure(t) {
10
+ this.routerPageStructures = t;
11
+ }
12
+ }
13
+ }), Z = J(C), { activeMenuPath: h, rawMenus: m } = D(Z), O = X(C), { structureData: tt } = D(O), et = Y(C), { routerPageStructures: at } = D(et), st = o([
14
+ {
15
+ label: "角色名称",
16
+ value: "",
17
+ name: "roleName"
18
+ }
19
+ ]), nt = o([
20
+ {
21
+ label: "查询"
22
+ },
23
+ {
24
+ label: "重置"
25
+ }
26
+ ]), I = M({
27
+ isFilter: !1,
28
+ filterForm: {}
29
+ }), ct = o(!1), rt = (t) => {
30
+ console.log("handleQueryChange", t), I.isFilter = !0, I.filterForm = t;
31
+ }, K = o([
32
+ // {
33
+ // key: "extraButton",
34
+ // contents: [
35
+ // {
36
+ // label: "新增"
37
+ // }
38
+ // ]
39
+ // },
40
+ // {
41
+ // key: "rowButton",
42
+ // contents: [
43
+ // {
44
+ // label: "授权",
45
+ // textColor: `blue`
46
+ // }, {
47
+ // label: "编辑"
48
+ // },
49
+ // {
50
+ // label: "删除",
51
+ // textColor: 'red'
52
+ // }
53
+ // ]
54
+ // },
55
+ // // {
56
+ // // key: "tableIndex",
57
+ // // contents: []
58
+ // // },
59
+ // {
60
+ // key: "header",
61
+ // contents: [
62
+ // {
63
+ // label: "角色名称",
64
+ // prop: 'roleName'
65
+ // },
66
+ // {
67
+ // label: "角色状态",
68
+ // formType: 'Radio',
69
+ // prop: 'roleStatus',
70
+ // options: [
71
+ // {
72
+ // label: "启用",
73
+ // value: "启用"
74
+ // },
75
+ // {
76
+ // label: "禁用",
77
+ // value: "禁用"
78
+ // }
79
+ // ]
80
+ // },
81
+ // {
82
+ // label: "角色排序",
83
+ // prop: 'roleOrder',
84
+ // formType: 'Number',
85
+ // }, {
86
+ // label: "备注",
87
+ // prop: 'remark',
88
+ // formType: 'TextArea',
89
+ // }, {
90
+ // label: "权限",
91
+ // prop: 'roleAuthority',
92
+ // isTableColHidden: true,
93
+ // isFormColHidden: true,
94
+ // },
95
+ // {
96
+ // label: "操作"
97
+ // }
98
+ // ]
99
+ // },
100
+ // {
101
+ // key: "tableContents",
102
+ // contents: []
103
+ // // contents: [
104
+ // // [
105
+ // // "超级管理员",
106
+ // // "启动",
107
+ // // 1,
108
+ // // []
109
+ // // // ['元元模型/系统/查询', '元元模型/系统/新增', '元元模型/系统/编辑']
110
+ // // ], [
111
+ // // "普通管理员",
112
+ // // "启动",
113
+ // // 2,
114
+ // // []
115
+ // // // ['元元模型/系统/查询', '元元模型/系统/新增', '元元模型/系统/编辑']
116
+ // // ],
117
+ // // ]
118
+ // }
119
+ ]), x = o([]), lt = T(() => {
120
+ var e, a, s, n, r;
121
+ const t = (e = at.value) == null ? void 0 : e.find((c) => {
122
+ var l;
123
+ return ((l = c == null ? void 0 : c.comp) == null ? void 0 : l.toUpperCase()) === "TABLE";
124
+ });
125
+ return t ? (x.value = (n = (s = (a = t == null ? void 0 : t.compData) == null ? void 0 : a.find((c) => (c == null ? void 0 : c.key) === "header")) == null ? void 0 : s.contents) == null ? void 0 : n.filter((c) => (c == null ? void 0 : c.label) !== "操作"), (r = t == null ? void 0 : t.compData) == null ? void 0 : r.map((c) => {
126
+ if ((c == null ? void 0 : c.key) === "rowButton") {
127
+ const l = [...c == null ? void 0 : c.contents, { label: "授权" }];
128
+ return {
129
+ ...c,
130
+ contents: l
131
+ };
132
+ }
133
+ return c;
134
+ })) : [];
135
+ }), ot = (t) => {
136
+ R(t.singleContent, t.buttonName, B.value);
137
+ }, y = o({}), A = o(), f = async (t, e, a) => {
138
+ var s, n;
139
+ try {
140
+ const r = await t(e);
141
+ return ((s = r == null ? void 0 : r.data) == null ? void 0 : s.code) === 200 ? (a !== "查询" && await O.setLogRecordAsync({
142
+ type: a,
143
+ data: e
144
+ }, h.value), r.data.result || ((n = r == null ? void 0 : r.data) == null ? void 0 : n.code) === 200) : null;
145
+ } catch (r) {
146
+ b.error(r);
147
+ }
148
+ }, L = (t, e) => {
149
+ e == null || e.forEach((a) => {
150
+ t == null || t.forEach((s) => {
151
+ var n;
152
+ s.path == a.path && (s.checkedButtons = a.checkedButtons), s.children && ((n = s.children) == null ? void 0 : n.length) > 0 && L(s.children, e);
153
+ });
154
+ });
155
+ }, $ = (t) => t == null ? void 0 : t.map((e) => {
156
+ var s;
157
+ const a = {
158
+ ...e,
159
+ checkedButtons: []
160
+ };
161
+ return a.children && ((s = a.children) == null ? void 0 : s.length) > 0 && (a.children = $(a.children)), a;
162
+ }), ut = (t) => {
163
+ for (const e in t)
164
+ if (Array.isArray(t[e]))
165
+ return e;
166
+ return null;
167
+ }, _ = (t) => {
168
+ const e = [];
169
+ let a = 0;
170
+ for (; a < t.length; )
171
+ if (typeof t[a] == "string") {
172
+ const s = { title: t[a] };
173
+ a + 1 < t.length && Array.isArray(t[a + 1]) ? (s.children = _(t[a + 1]), a += 2) : a += 1, e.push(s);
174
+ }
175
+ return e;
176
+ }, ht = (t) => {
177
+ const e = [];
178
+ let a = 0;
179
+ for (; a < t.length; ) {
180
+ const s = { title: t[a] };
181
+ a + 1 < t.length && Array.isArray(t[a + 1]) ? (s.children = _(t[a + 1]), a += 2) : a += 1, e.push(s);
182
+ }
183
+ return e;
184
+ }, j = (t, e = "") => t == null ? void 0 : t.map((a) => {
185
+ const s = e ? `${e}/${a.title}` : a.title, n = {
186
+ ...a,
187
+ path: s
188
+ };
189
+ return a.children && a.children.length > 0 && (n.children = j(a.children, s)), n;
190
+ }), it = (t, e) => t.reduce((a, s) => {
191
+ const n = s[e];
192
+ return a[n] || (a[n] = []), a[n].push(s), a;
193
+ }, {}), gt = (t) => {
194
+ const e = [];
195
+ function a(n) {
196
+ !n.children || n.children.length === 0 ? e.push(n) : n.children.forEach((r) => a(r));
197
+ }
198
+ return t.forEach((n) => a(n)), e == null ? void 0 : e.map((n) => {
199
+ var r, c, l;
200
+ return {
201
+ ...n,
202
+ parentPath: (l = (c = (r = n.path) == null ? void 0 : r.split("/")) == null ? void 0 : c.slice(0, -1)) == null ? void 0 : l.join("/")
203
+ };
204
+ });
205
+ }, pt = (t) => Object.entries(t).map(([a, s]) => ({
206
+ path: a,
207
+ checkedButtons: s == null ? void 0 : s.map((n) => n == null ? void 0 : n.path)
208
+ })), yt = async (t, e) => {
209
+ switch (y.value = P(e), t) {
210
+ case "授权":
211
+ const a = ut(e);
212
+ console.log("clickRowButton0", m.value), console.log("clickRowButton1", y.value[a]);
213
+ const s = ht(y.value[a]), n = j(s), r = gt(n), c = it(r, "parentPath"), l = pt(c);
214
+ console.log("clickRowButton2", n), console.log("clickRowButton3", l), g.title = `【${e.roleName}】授权`, g.show = !0, await E(), l && Array.isArray(l) && L(k.value, l);
215
+ break;
216
+ }
217
+ }, ft = () => {
218
+ g.show = !1;
219
+ }, d = o(), dt = async (t) => {
220
+ const e = await f(N, {
221
+ key: {
222
+ systemKey: sessionStorage.getItem("systemKey"),
223
+ type: "data",
224
+ pageKey: t
225
+ }
226
+ }, "查询"), a = e == null ? void 0 : e.map((s) => {
227
+ var n;
228
+ return {
229
+ id: s.id,
230
+ tableData: (n = s == null ? void 0 : s.value) == null ? void 0 : n.tableData
231
+ };
232
+ });
233
+ return a == null ? void 0 : a.map((s) => {
234
+ var n;
235
+ if (Array.isArray(s == null ? void 0 : s.tableData)) {
236
+ let r = { id: s.id };
237
+ return (n = s == null ? void 0 : s.tableData) == null || n.forEach((c, l) => {
238
+ r[`a${l}`] = c;
239
+ }), r;
240
+ } else
241
+ return {
242
+ ...s.tableData,
243
+ id: s.id
244
+ };
245
+ });
246
+ }, z = (t, e) => {
247
+ let a = {};
248
+ return e == null || e.forEach((s, n) => {
249
+ s.label && t && (a[s.label] = (t == null ? void 0 : t[`a${n}`]) ?? null);
250
+ }), a;
251
+ }, vt = (t) => {
252
+ let e = "";
253
+ for (const a in t)
254
+ if (t.hasOwnProperty(a)) {
255
+ const s = t[a];
256
+ Array.isArray(s) && s.forEach((n) => {
257
+ n.hasOwnProperty("checkedButtons") && (e = a);
258
+ });
259
+ }
260
+ return e;
261
+ }, R = (t, e, a) => {
262
+ var c, l, i, p;
263
+ const s = P(t);
264
+ s != null && s.id && delete s.id;
265
+ const n = z(s, x.value), r = vt(s);
266
+ console.log(1222, s, r, B.value), e === "新增" ? f(q, {
267
+ key: {
268
+ type: "data",
269
+ systemKey: sessionStorage.getItem("systemKey"),
270
+ pageKey: (c = h.value) != null && c.startsWith("/") ? (l = h.value) == null ? void 0 : l.substring(1) : h.value,
271
+ tableId: a
272
+ },
273
+ value: {
274
+ tableData: n
275
+ }
276
+ }, e).then((u) => {
277
+ d.value = {
278
+ ...t,
279
+ newId: u
280
+ }, e && u && b.success(e + "成功");
281
+ }) : e === "编辑" ? (console.log("编辑角色", n), f(G, {
282
+ id: t.id,
283
+ key: {
284
+ type: "data",
285
+ systemKey: sessionStorage.getItem("systemKey"),
286
+ pageKey: (i = h.value) != null && i.startsWith("/") ? (p = h.value) == null ? void 0 : p.substring(1) : h.value,
287
+ tableId: a
288
+ },
289
+ value: {
290
+ tableData: n
291
+ }
292
+ }, e).then((u) => {
293
+ e && u && b.success(e + "成功"), g.show = !1;
294
+ })) : e === "删除" && f(H, {
295
+ id: t.id
296
+ }, e).then((u) => {
297
+ e && u && b.success(e + "成功");
298
+ });
299
+ }, U = (t) => {
300
+ let e = [];
301
+ return t == null || t.forEach((a) => {
302
+ var s;
303
+ if (a.checkedButtons && ((s = a.checkedButtons) == null ? void 0 : s.length) > 0) {
304
+ const n = {
305
+ path: a.path,
306
+ checkedButtons: a.checkedButtons
307
+ // isCheckedAll: node.checkedButtons?.length === node.renderButtons?.length
308
+ };
309
+ e = e.concat(n);
310
+ }
311
+ a.children && (e = e.concat(U(a.children)));
312
+ }), e;
313
+ }, kt = () => {
314
+ d.value = {
315
+ ...y.value,
316
+ roleAuthority: U(k.value)
317
+ // ['a' + authorityIndex]: checkedKeys
318
+ }, E(() => {
319
+ console.log("clickSubmitAuthority", d.value, K.value), R(d.value, "编辑", B.value);
320
+ });
321
+ }, g = M({
322
+ show: !1,
323
+ title: "角色授权",
324
+ width: "35%",
325
+ draggable: !0
326
+ }), bt = ({ isPenultimate: t }, e) => {
327
+ var a, s;
328
+ return console.log("isPenultimate", t, e), ((s = (a = e == null ? void 0 : e.data) == null ? void 0 : a.renderButtons) == null ? void 0 : s.length) > 0 ? "is-penultimate" : "";
329
+ }, B = o(0), Bt = async () => {
330
+ var a, s, n, r, c, l, i;
331
+ let t;
332
+ const e = await N({
333
+ key: {
334
+ systemKey: sessionStorage.getItem("systemKey"),
335
+ type: "structure",
336
+ // 路由页面路径前缀会有/,但存储数据或获取数据时是要过滤掉/
337
+ pageKey: (a = h.value) != null && a.startsWith("/") ? (s = h.value) == null ? void 0 : s.substring(1) : h.value
338
+ }
339
+ });
340
+ return ((n = e == null ? void 0 : e.data) == null ? void 0 : n.code) === 200 && (r = e == null ? void 0 : e.data) != null && r.result && ((c = e == null ? void 0 : e.data) == null ? void 0 : c.result.length) > 0 && (t = (i = (l = e == null ? void 0 : e.data.result) == null ? void 0 : l[0]) == null ? void 0 : i.id), t;
341
+ }, k = o([]), At = o([
342
+ {
343
+ path: "资源管理",
344
+ buttons: ["查询", "新增", "编辑", "删除"]
345
+ },
346
+ {
347
+ path: "资源管理/人员",
348
+ buttons: ["查询", "新增", "编辑", "删除"]
349
+ }
350
+ ]), St = (t, e) => {
351
+ var a;
352
+ t.checkedButtons = e ? (a = t.renderButtons) == null ? void 0 : a.map((s) => s.path) : [], console.log("handleNodeCheckChange", t, e);
353
+ }, v = o([]), wt = (t, e) => {
354
+ var a, s, n;
355
+ e.checkedButtons = t, ((a = e.checkedButtons) == null ? void 0 : a.length) === ((s = e.renderButtons) == null ? void 0 : s.length) ? v.value.push(e.path) : (t == null ? void 0 : t.length) === 0 && (v.value = (n = v.value) == null ? void 0 : n.filter((r) => r !== e.path));
356
+ };
357
+ F(() => v.value.length, () => {
358
+ var t, e;
359
+ (t = A.value) == null || t.getCheckedKeys(), (e = A.value) == null || e.setCheckedKeys([...v.value]);
360
+ });
361
+ F(() => g.show, (t) => {
362
+ t || (k.value = $(k.value));
363
+ });
364
+ const S = T(() => {
365
+ var a;
366
+ const t = (a = P(tt.value)) == null ? void 0 : a.filter((s) => {
367
+ var n, r;
368
+ return ((r = (n = s == null ? void 0 : s.key) == null ? void 0 : n.pageKey) == null ? void 0 : r.toUpperCase()) !== "MENU";
369
+ });
370
+ return [...t == null ? void 0 : t.map((s) => {
371
+ var c, l, i, p;
372
+ const n = /button/i;
373
+ let r = (i = (l = (c = s == null ? void 0 : s.value) == null ? void 0 : c.pageData) == null ? void 0 : l.compData) == null ? void 0 : i.filter((u) => n.test(u == null ? void 0 : u.key));
374
+ return r = Array.from(
375
+ new Set(r == null ? void 0 : r.flatMap((u) => u.contents.map((Q) => Q.label)))
376
+ ), {
377
+ path: (p = s == null ? void 0 : s.key) == null ? void 0 : p.pageKey,
378
+ buttons: r
379
+ };
380
+ }), ...W.value];
381
+ }), W = o([]), w = (t, e) => {
382
+ if (Array.isArray(t))
383
+ return t == null ? void 0 : t.map((a) => {
384
+ var n, r;
385
+ const s = e == null ? void 0 : e.find((c) => (c == null ? void 0 : c.path) === (a == null ? void 0 : a.path));
386
+ return a.childMenus && a.childMenus.length > 0 ? {
387
+ ...a,
388
+ renderButtons: a.carryData ? (n = s == null ? void 0 : s.buttons) == null ? void 0 : n.map((c) => ({
389
+ title: c,
390
+ path: a.path + "/" + c
391
+ })) : [],
392
+ checkedButtons: [],
393
+ children: w(a.childMenus, S.value),
394
+ childMenus: w(a.childMenus, S.value)
395
+ } : {
396
+ ...a,
397
+ renderButtons: a.carryData ? (r = s == null ? void 0 : s.buttons) == null ? void 0 : r.map((c) => ({
398
+ title: c,
399
+ path: a.path + "/" + c
400
+ })) : [],
401
+ checkedButtons: []
402
+ };
403
+ });
404
+ }, Dt = {
405
+ comp: "Group",
406
+ name: "/系统管理/角色管理",
407
+ compData: [
408
+ {
409
+ key: "groupContents",
410
+ contents: [
411
+ {
412
+ comp: "Table",
413
+ compData: K.value,
414
+ name: ""
415
+ }
416
+ ]
417
+ }
418
+ ]
419
+ }, Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
420
+ __proto__: null,
421
+ addButtonsToTree: w,
422
+ authorizeDialog: g,
423
+ buttonValue: nt,
424
+ changedRow: d,
425
+ clickRow: y,
426
+ clickRowButton: yt,
427
+ clickSubmitAuthority: kt,
428
+ closeAuthorizeDialog: ft,
429
+ convertIndexToLabel: z,
430
+ customNodeClass: bt,
431
+ getActivePageStructureId: Bt,
432
+ getPageDataAsync: dt,
433
+ handleItemDataChange: ot,
434
+ handleNodeBtnChange: wt,
435
+ handleNodeCheckChange: St,
436
+ handleQueryChange: rt,
437
+ handleSubmitAsync: f,
438
+ isPageDataExist: ct,
439
+ menuData: k,
440
+ menusButtons: At,
441
+ pageData: K,
442
+ pageDataFiltered: lt,
443
+ queryFormData: st,
444
+ structureButtons: S,
445
+ structureId: B,
446
+ submitTableAsyncByVerify: R,
447
+ tempRolePageData: Dt,
448
+ tempSysMenus: W,
449
+ treeRef: A
450
+ }, Symbol.toStringTag, { value: "Module" }));
451
+ export {
452
+ Rt as S,
453
+ g as a,
454
+ z as c,
455
+ Bt as g,
456
+ Y as u
457
+ };
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as t, reactive as a, onMounted as o, createElementBlock as r, openBlock as n, createVNode as m } from "vue";
2
2
  import "./index-BHtNKL1L.js";
3
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C0_XMLvd.js";
4
- import "./menu-jWcM5fkr.js";
5
- import { B as s } from "./index-DtsLJPQK.js";
6
- import { S as c } from "./index--d0-FcKi.js";
7
- import { g as i } from "./index-CZN1K7bK.js";
3
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-0GZj6SDy.js";
4
+ import "./menu-BPLW-L8U.js";
5
+ import { B as s } from "./index-9keTbNci.js";
6
+ import { S as c } from "./index-C-RVIq7e.js";
7
+ import { g as i } from "./index-DGHLPooK.js";
8
8
  const p = { class: "role-wrapper" }, x = /* @__PURE__ */ t({
9
9
  __name: "index",
10
10
  setup(d) {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./menu-CQ3_ZXwC.cjs"),ce=require("./threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-MfXPrK37.cjs"),te=require("./index-CT9N59g0.cjs"),ie=require("./index-BBQKck4p.cjs"),de=require("./menuIndex-BJdEj1Et.cjs"),Z=require("./index-D9ZIJbHw.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=ce.useModelComp(g.pinia),{isEdit:ge}=g.storeToRefs(M),le=te.useUnit(g.pinia),k=g.useMenuState(g.pinia),{menus:oe,configMenu:A,activeMenuPath:O,cacheStructures:S}=g.storeToRefs(k),q=a.ref(!1),fe=a.computed(()=>{var t,e;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(e=(t=g.cloneDeep(oe.value))==null?void 0:t.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:e.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),$=a.ref([]),V=a.ref([{label:"新建"}]),ve=a.computed(()=>[{key:"extraButton",contents:V.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:$.value}]),j=a.ref([]),I=a.ref({}),he=a.ref({}),K=a.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"生成的菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构",isFormColHidden:!1},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),R=t=>{var e;j.value=t?(e=K.value)==null?void 0:e.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l:{...l,value:t?t[l==null?void 0:l.prop]:""}):K.value},ye=a.ref([{label:"查询"},{label:"重置"}]),be=async()=>{},ae=t=>t.map(e=>e.childMenus&&e.childMenus.length>0?{...e,value:e==null?void 0:e.title,label:e==null?void 0:e.title,children:ae(e.childMenus)}:{...e,value:e==null?void 0:e.title,label:e==null?void 0:e.title}),v=a.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),z=a.ref([]),b=a.ref({}),C=a.ref(null),ne=a.ref([]),re=a.computed(()=>{var t;return(t=ae(oe.value))==null?void 0:t.filter(e=>e.title!=="系统管理"&&e.title!=="平台管理")}),se=async t=>{var l,u,r,d,s;const e=await g.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:t,version:1}});if(((l=e==null?void 0:e.data)==null?void 0:l.code)===200&&(u=e.data)!=null&&u.result){const p=(d=(r=e.data)==null?void 0:r.result)==null?void 0:d.map(i=>{var c;return{id:i==null?void 0:i.id,...(c=i==null?void 0:i.value)==null?void 0:c.pageData}});ne.value=p,k.setCacheStructures({key:"contentConfig",data:p}),console.log(9990,(s=e.data)==null?void 0:s.result,p,S.value)}},Ce=async t=>{var e;q.value=!0,C.value={...t,rootNode:de.findRootNodeByPath(re.value,t.path)},k.setCacheStructures(null),(t==null?void 0:t.level)===0?V.value.splice(0):(V.value=[{label:"新建"}],z.value=(e=t==null?void 0:t.path)==null?void 0:e.split("/")),await k.setConfigMenu(null),await se(t==null?void 0:t.path),await E(t)},ke=t=>{switch(t){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},Te=async(t,e)=>{var l,u;if(!C.value)return g.ElMessage.warning("请先选择菜单");if(v.type=ke(t),z.value=[],M.setSubmitCurStructure(!1),le.setSelectTitle([]),b.value=g.cloneDeep(e),v.type!=="delete"){switch(v.type){case"create":R(null),await k.setConfigMenu(null);break;case"update":R(b.value),await k.setConfigMenu(b.value),console.log("clickRowButton",b.value);break}await a.nextTick(),v.title=`【${v.type==="create"?(l=C.value)==null?void 0:l.path:(u=b.value)==null?void 0:u.path}】菜单配置${t}`,v.show=!0}else await ue(b.value,v.type)},H=a.ref(!0),_e=async t=>{var e;I.value=t,await k.setConfigMenu({...I.value,path:(e=C.value)==null?void 0:e.path}),H.value=(t==null?void 0:t.operateType)!=="新增",console.log("7890changeTrigger",H.value)};a.watch(()=>H.value,async t=>{var e;await a.nextTick(),j.value=(e=K.value)==null?void 0:e.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l.prop==="contentConfig"?{...l,isFormColHidden:t}:l:{...l,value:I.value?I.value[l==null?void 0:l.prop]:""}),console.log(7890,t)},{immediate:!0,deep:!0});const Ie=a.ref(null),De=async(t,e)=>{var s,p,i,c,h;if(v.type==="create"){const o=(p=(s=S.value)==null?void 0:s.filter(f=>(f==null?void 0:f.key)===e))==null?void 0:p.flatMap(f=>f==null?void 0:f.data);console.log("clickTrigger",e,S.value,o),M.setItemData(o),k.setCacheStructures({key:e,data:o})}if(console.log("getTriggerStructures1",t==null?void 0:t.structureIds,e),!(t!=null&&t.structureIds)||((i=t==null?void 0:t.structureIds)==null?void 0:i.length)===0)return;const l=(h=(c=t==null?void 0:t.structureIds)==null?void 0:c.filter(o=>(o==null?void 0:o.key)===e))==null?void 0:h.map(o=>o==null?void 0:o.id);let u=l==null?void 0:l.map(o=>{if(o)return g.getInsofDataApi({id:o})});const r=await Promise.all(u),d=r==null?void 0:r.every(o=>{var f;return((f=o==null?void 0:o.data)==null?void 0:f.code)===200});if(console.log("getTriggerStructures2",t==null?void 0:t.structureIds,e,r),d&&(r==null?void 0:r.length)>0){const o=r==null?void 0:r.map(f=>{var T,_,N,x,F,n,B;return{id:(N=(_=(T=f==null?void 0:f.data)==null?void 0:T.result)==null?void 0:_[0])==null?void 0:N.id,...(B=(n=(F=(x=f==null?void 0:f.data)==null?void 0:x.result)==null?void 0:F[0])==null?void 0:n.value)==null?void 0:B.pageData}});M.setItemData(o),k.setCacheStructures({key:e,data:o})}},we=async t=>{var r,d,s,p,i;const e=t==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";k.setButtonTriggerType(e),await De(b.value,e);let l;(r=I.value)!=null&&r.subMenus&&((d=I.value)==null?void 0:d.subMenus.length)>0&&(l=(s=z.value)==null?void 0:s.map(c=>({value:c})),l.unshift({value:(p=b.value)==null?void 0:p.title}));let u;v.type==="create"?u={...I.value,path:(i=C.value)==null?void 0:i.path}:v.type==="update"&&(u=A.value),await k.setConfigMenu(u),le.setSelectTitle(l),M.setIsEdit("edit")},E=async t=>{var l,u,r,d,s,p;const e=await g.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:O.value+"/"+(t==null?void 0:t.path),tableId:""}});((l=e==null?void 0:e.data)==null?void 0:l.code)===200&&(u=e.data)!=null&&u.result&&($.value=((d=(r=e.data)==null?void 0:r.result)==null?void 0:d.length)>0?(p=(s=e.data)==null?void 0:s.result)==null?void 0:p.map(i=>{var c;return{id:i==null?void 0:i.id,...(c=i==null?void 0:i.value)==null?void 0:c.tableData}}):[]),q.value=!1},P=async(t,e,l="contentConfig")=>{var u,r,d,s,p,i;console.log("clickSubmitForm4",t);try{let c,h;e==="create"?(c={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:O.value+"/"+((u=C.value)==null?void 0:u.path),type:"structure",rootNodePath:(d=(r=C.value)==null?void 0:r.rootNode)==null?void 0:d.path,structureBelong:l,parentTable:"",version:1},value:{pageData:t}},h=g.createInsofDataApi):e==="update"?(c={id:t==null?void 0:t.id,value:{pageData:t}},h=g.updateInsofDataApi):e==="delete"&&(c={id:t},h=g.deleteInsofDataApi);const o=await h(c);if(((s=o==null?void 0:o.data)==null?void 0:s.code)!==200)throw g.ElMessage.error("保存响应失败"),new Error("保存响应失败");const f=e==="create"?(p=o==null?void 0:o.data)==null?void 0:p.result:t==null?void 0:t.id;return console.log("查看返回的数据id:",e,f),{status:((i=o==null?void 0:o.data)==null?void 0:i.code)===200,data:{id:f,key:l}}}catch{g.ElMessage.error("保存响应失败")}},m=(t,e)=>{var i,c,h;const l=(i=t==null?void 0:t.flatMap(o=>o==null?void 0:o.data))==null?void 0:i.map(o=>o==null?void 0:o.id),u=e.filter(o=>!(l!=null&&l.includes(o))),r=l==null?void 0:l.filter(o=>!e.includes(o));let d=null,s=null,p=null;return d=[...u,...r].filter(o=>o),s=(c=t==null?void 0:t.flatMap(o=>o==null?void 0:o.data))==null?void 0:c.filter(o=>!(o!=null&&o.id)),p=(h=t==null?void 0:t.flatMap(o=>o==null?void 0:o.data))==null?void 0:h.filter(o=>o==null?void 0:o.id).filter(o=>Object.keys(o).length>1),console.log("getDifferentBusiness",t,d,s,p,b.value),{deleteIds:d,createComps:s,updateComps:p}},ee=(t,e)=>{var u,r,d,s,p,i;let l=[];return((u=e==null?void 0:e.deleteIds)==null?void 0:u.length)>0&&((r=e==null?void 0:e.deleteIds)==null||r.forEach(c=>{l.push(P(c,"delete",t))})),((d=e==null?void 0:e.createComps)==null?void 0:d.length)>0&&((s=e==null?void 0:e.createComps)==null||s.forEach(c=>{l.push(P(c,"create",t))})),((p=e==null?void 0:e.updateComps)==null?void 0:p.length)>0&&((i=e==null?void 0:e.updateComps)==null||i.forEach(c=>{c!=null&&c.id&&l.push(P(c,"update",t))})),l},Se=t=>{const e=new Map;return t.forEach(l=>{e.set(l.id,l)}),Array.from(e.values())},Me=async(t,e)=>{var l,u,r,d,s,p,i;try{console.log("structures",t);const c=t==null?void 0:t.filter(n=>(n==null?void 0:n.key)==="contentConfig"),h=t==null?void 0:t.filter(n=>(n==null?void 0:n.key)==="dialogConfig");await a.nextTick();const o=(r=(u=(l=S.value)==null?void 0:l.filter(n=>(n==null?void 0:n.key)==="dialogConfig"))==null?void 0:u.flatMap(n=>n==null?void 0:n.data))==null?void 0:r.map(n=>n==null?void 0:n.id);let f=(p=(s=(d=S.value)==null?void 0:d.filter(n=>(n==null?void 0:n.key)==="contentConfig"))==null?void 0:s.flatMap(n=>n==null?void 0:n.data))==null?void 0:p.map(n=>n==null?void 0:n.id);console.log("submitMenuStructures",o,f),f=[...f,...(i=ne.value)==null?void 0:i.map(n=>n==null?void 0:n.id)];const T=m(h,o),_=m(c,f);console.log("clickSubmitForm1",h,c,T,_,e);const N=ee("dialogConfig",T),x=ee("contentConfig",_),F=[...N,...x];await Promise.all(F).then(n=>{var L,U,W,G,Q,X,Y;const B=n==null?void 0:n.every(y=>y.status);if(console.log("clickSubmitForm3Promise:",n,b.value,T,_),!B)return;let D=(L=n==null?void 0:n.flatMap(y=>y==null?void 0:y.data))==null?void 0:L.filter(y=>(y==null?void 0:y.id)!==null&&(y==null?void 0:y.id)!==void 0);if(console.log("clickSubmitForm4Promise:",D,T,_,b.value),((U=T==null?void 0:T.updateComps)==null?void 0:U.length)===0&&v.type==="update"){const y=(G=(W=b.value)==null?void 0:W.structureIds)==null?void 0:G.filter(w=>(w==null?void 0:w.key)==="dialogConfig");D=[...D,...y]}if(console.log("clickSubmitForm5Promise:",D),((Q=_==null?void 0:_.updateComps)==null?void 0:Q.length)===0&&v.type==="update"){const y=(Y=(X=b.value)==null?void 0:X.structureIds)==null?void 0:Y.filter(w=>(w==null?void 0:w.key)==="contentConfig");D=[...D,...y]}const J=Se(D);console.log("clickSubmitForm6Promise:",J,D,b.value),ue({...e,isNotInitial:!0,structureIds:J},v.type)}).catch(n=>{g.ElMessage.error(n)})}catch(c){throw g.ElMessage.error(c),new Error(c)}},ue=async(t,e)=>{var r,d;let l,u;e==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:O.value+"/"+((r=C.value)==null?void 0:r.path),tableId:"",rootNodePath:t==null?void 0:t.rootNodePath},value:{tableData:t}},u=g.createInsofDataApi):e==="update"?(l={id:t==null?void 0:t.id,value:{tableData:t}},u=g.updateInsofDataApi):e==="delete"&&(l={ids:[t.id,...(d=t==null?void 0:t.structureIds)==null?void 0:d.map(s=>s.id)]},u=g.batchDeleteInsofDataApi),ie.handleSubmitAsync(u,l,e).then(s=>{e==="create"&&$.value.push({...t,id:s}),e&&s&&g.ElMessage.success("响应成功"),E(C.value)})},Ne=async()=>{var l,u,r,d,s;const t=JSON.parse(g.cloneDeep(JSON.stringify(S.value)));console.log("clickSubmitForm-1",t),await a.nextTick();const e=v.type==="create"?{...A.value,rootNodePath:(u=(l=C.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...A.value,rootNodePath:(d=(r=C.value)==null?void 0:r.rootNode)==null?void 0:d.path,id:(s=b.value)==null?void 0:s.id};await Me(t,e),I.value={},v.show=!1,await E(C.value)},xe=()=>{v.show=!1};a.watch(()=>ge.value,t=>{console.log("返回时查看:",t,S.value)},{immediate:!0});const Fe=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:xe,buttonValue:ye,changeTrigger:_e,changedRow:he,clickNodeTrigger:Ce,clickRowButton:Te,clickSubmitForm:Ne,clickTrigger:we,dialogInfo:v,formatFormData:R,getInitialSubStructure:se,getTableDataAsync:E,handleItemDataChange:be,inputForm:I,menuPageData:ve,operatingForm:Ie,pageData:fe,renderFormData:j,tableLoading:q,treeData:re},Symbol.toStringTag,{value:"Module"})),Be={class:"menu-module"},Ee={class:"table-wrap","element-loading-text":"加载中..."},Pe={class:"module-dialog-default"},Ae=a.defineComponent({__name:"index",setup(t){const e=a.reactive({...Fe}),l=a.ref(null),u=g.useMenuState(g.pinia),{configMenu:r}=g.storeToRefs(u);return a.onMounted(()=>{var d;e.formatFormData(r.value),a.nextTick(()=>{var s,p;(p=l.value)==null||p.setCurrentKey((s=r.value)==null?void 0:s.path),u.setActiveMenuPath("/平台管理/菜单管理")}),r.value&&e.getInitialSubStructure((d=r.value)==null?void 0:d.path)}),(d,s)=>{const p=a.resolveComponent("el-tree"),i=a.resolveComponent("el-splitter-panel"),c=a.resolveComponent("el-splitter"),h=a.resolveComponent("el-button"),o=a.resolveDirective("loading");return a.openBlock(),a.createElementBlock("div",Be,[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(i,{size:208,class:"tree-wrap",min:200},{default:a.withCtx(()=>[a.createVNode(p,{ref_key:"treeRef",ref:l,data:e.treeData,"expand-on-click-node":!1,"node-key":"path",props:{children:"children",label:"label",path:"path"},"highlight-current":"","default-expand-all":"","check-on-click-leaf":!1,"check-strictly":"",onNodeClick:e.clickNodeTrigger},null,8,["data","onNodeClick"])]),_:1}),a.createVNode(i,{min:500},{default:a.withCtx(()=>[a.withDirectives((a.openBlock(),a.createElementBlock("div",Ee,[a.createVNode(te.ssTable,{itemData:e.menuPageData,changedContent:e.changedRow,operatingForm:e.operatingForm,onOnFormChange:e.changeTrigger,onChange:e.handleItemDataChange,onClickTrigger:e.clickTrigger,onOnButtonClick:e.clickRowButton},null,8,["itemData","changedContent","operatingForm","onOnFormChange","onChange","onClickTrigger","onOnButtonClick"])])),[[o,e.tableLoading]])]),_:1})]),_:1}),a.createVNode(Z.ssDialog,{class:"module-dialog",title:e.dialogInfo.title,visible:e.dialogInfo.show,width:e.dialogInfo.width,onBeforeDestroy:e.beforeDialogDestroy},{default:a.withCtx(()=>[a.createElementVNode("div",Pe,[a.createVNode(Z.ssForm,{rowContents:e.renderFormData,isEnableWrap:!1,isEdit:!0,onChange:e.changeTrigger,onClickTrigger:e.clickTrigger},null,8,["rowContents","onChange","onClickTrigger"])])]),footer:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(h,{onClick:e.beforeDialogDestroy,id:"themeBorderButton"},{default:a.withCtx(()=>s[0]||(s[0]=[a.createTextVNode("取消")])),_:1,__:[0]},8,["onClick"]),a.createVNode(h,{id:"themeButton",onClick:e.clickSubmitForm},{default:a.withCtx(()=>s[1]||(s[1]=[a.createTextVNode(" 确认 ")])),_:1,__:[1]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])])}}}),Ve=pe._export_sfc(Ae,[["__scopeId","data-v-74868a06"]]);exports.default=Ve;