ss-component-new 1.3.301 → 1.3.302

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 (111) hide show
  1. package/dist/{MTLLoader-RDE-ZA7R.js → MTLLoader-BrEAUYmm.js} +1 -1
  2. package/dist/{MTLLoader-CLDHKsuZ.cjs → MTLLoader-DqRiQxtb.cjs} +1 -1
  3. package/dist/{OrbitControls-BdotT7Cg.cjs → OrbitControls-DjWgA8Ek.cjs} +1 -1
  4. package/dist/{OrbitControls-BMOJWSL-.js → OrbitControls-Xm3TiWSm.js} +1 -1
  5. package/dist/{URDFLoader-Y4l_xAEg.cjs → URDFLoader-BG8UBoRV.cjs} +1 -1
  6. package/dist/{URDFLoader-emHFNLHl.js → URDFLoader-BVq4-_nm.js} +2 -2
  7. package/dist/{animationData-BHoj-1LD.js → animationData-CKnGxrwv.js} +3 -3
  8. package/dist/{animationData-CQdthirF.cjs → animationData-CvSQOLjD.cjs} +1 -1
  9. package/dist/{array-P5J-DgMu.cjs → array-BWgfvvzW.cjs} +1 -1
  10. package/dist/{array-Cio8S2Pj.js → array-BpsLG-qe.js} +4 -4
  11. package/dist/clone-BkXJ1f6m.cjs +1 -0
  12. package/dist/{clone-DlNyA_zn.js → clone-DXbbt8Hm.js} +1 -1
  13. package/dist/{dayjs.min-73fIR1V_.cjs → dayjs.min-C_98bw1w.cjs} +1 -1
  14. package/dist/{dayjs.min-E1ZLJ-8j.js → dayjs.min-DuspkzAg.js} +1 -1
  15. package/dist/{iconfont-Cp7o4QAt.cjs → iconfont-Bh5e2p75.cjs} +1 -1
  16. package/dist/{iconfont-Cg9QlUoy.js → iconfont-CI2ln_lz.js} +2 -2
  17. package/dist/{index-BdGKsSb2.cjs → index--9RSY5nc.cjs} +1 -1
  18. package/dist/{index-Co-U8J6E.cjs → index-1hSToJw_.cjs} +1 -1
  19. package/dist/{index-CQY6ageG.cjs → index-92G6p6-P.cjs} +1 -1
  20. package/dist/{index-fAnqtn_m.cjs → index-B6OWlCN4.cjs} +1 -1
  21. package/dist/{index-0hpStIBH.js → index-B7B9vl_S.js} +4 -4
  22. package/dist/{index-D1vYje_p.cjs → index-BHp_Rra2.cjs} +1 -1
  23. package/dist/{index-6teHdmr0.js → index-BMj0wGQ5.js} +1 -1
  24. package/dist/{index-tT9c2s2F.js → index-BR5mRxoX.js} +47 -38
  25. package/dist/{index-CwOB279v.cjs → index-BVbA0cHb.cjs} +1 -1
  26. package/dist/{index-H8n2KFLX.cjs → index-BY-jyYWy.cjs} +1 -1
  27. package/dist/{index-B846yqBS.js → index-BbRiCABC.js} +2 -2
  28. package/dist/{index-BkOJA3nu.cjs → index-BcTkU3nu.cjs} +1 -1
  29. package/dist/{index-CwZs4rIC.js → index-BezhZle5.js} +6 -6
  30. package/dist/{index-CEwg_zdl.js → index-Bwv7RY5s.js} +1 -1
  31. package/dist/{index-DsUMFNuA.js → index-BzX1r1DQ.js} +6 -6
  32. package/dist/index-CAHcIkx6.cjs +1 -0
  33. package/dist/{index-BEEOZ_LN.js → index-CDVaGIeb.js} +1 -1
  34. package/dist/{index-cC0isUDx.cjs → index-CNFkoqud.cjs} +1 -1
  35. package/dist/index-CR2bMJxC.js +9785 -0
  36. package/dist/index-CR4U-WNu.cjs +2 -0
  37. package/dist/{index-DXKzYxhw.js → index-CT0_6X-e.js} +2 -2
  38. package/dist/{index-rjTawDw6.js → index-C_dda12R.js} +2 -2
  39. package/dist/{index-DmMl7DkC.js → index-CbuRLwLx.js} +4 -4
  40. package/dist/index-CcybWQ0a.cjs +25 -0
  41. package/dist/{index-PAFvx19H.cjs → index-D3Lc8UUG.cjs} +1 -1
  42. package/dist/{index-CkXAOjdK.js → index-D4rNc1Ug.js} +2 -2
  43. package/dist/{index-sqfOcL_Q.cjs → index-D6rBwYFi.cjs} +1 -1
  44. package/dist/{index-Cro-IzQv.cjs → index-D9VN9VwZ.cjs} +1 -1
  45. package/dist/{index-D58LRV4j.js → index-D9jDJTOl.js} +9 -9
  46. package/dist/{index-yXqsfBiR.cjs → index-DB7w6WMF.cjs} +1 -1
  47. package/dist/{index-DoQ2DjBA.js → index-DF7jIWvH.js} +2 -2
  48. package/dist/{index-BS23fm8I.js → index-DGknSo3g.js} +9 -9
  49. package/dist/{index-BJQ12PRZ.cjs → index-DIgF229o.cjs} +1 -1
  50. package/dist/{index-8VjHjOci.cjs → index-DJEST34U.cjs} +1 -1
  51. package/dist/{index-CtBrDQiG.cjs → index-DKl62QNQ.cjs} +1 -1
  52. package/dist/{index-BGYRY71Y.cjs → index-DOou0S80.cjs} +1 -1
  53. package/dist/{index-6egNZH3a.js → index-DPbLX2EM.js} +3 -3
  54. package/dist/{index-CEuh0_6n.js → index-DRSO21bq.js} +1 -1
  55. package/dist/index-DT8J-Un0.js +481 -0
  56. package/dist/index-De7jtHBb.cjs +1 -0
  57. package/dist/{index-C3RYFBPK.cjs → index-DliVCzLT.cjs} +1 -1
  58. package/dist/{index-C4Dlzm7P.js → index-DmmlczJa.js} +4 -4
  59. package/dist/{index-CPz5Q62a.js → index-DnqpKHUZ.js} +1 -1
  60. package/dist/{index-BohJ0pIH.cjs → index-DrZ2rTX6.cjs} +1 -1
  61. package/dist/{index-CagHv4za.js → index-DvF67cFp.js} +1 -1
  62. package/dist/{index-BREFniPq.js → index-DxKAizLR.js} +4 -4
  63. package/dist/{index-Ba_o-vqP.cjs → index-DzS8TUJx.cjs} +1 -1
  64. package/dist/{index-CsBViUVV.js → index-MM7KiUTF.js} +3 -3
  65. package/dist/{index-DsIkRvPS.cjs → index-Q9XfSrZY.cjs} +1 -1
  66. package/dist/{index-BxEBUPI0.cjs → index-R66yOvAG.cjs} +1 -1
  67. package/dist/{index-CAIY8beW.js → index-SQ7v5v4-.js} +3 -3
  68. package/dist/{index-CkTFRGxB.js → index-WrlsRfB9.js} +1 -1
  69. package/dist/{index-CqiskI7e.js → index-Y6ou98p7.js} +1 -1
  70. package/dist/{index-Dkvr_yZQ.cjs → index-apX7jShx.cjs} +1 -1
  71. package/dist/{index-d3eamXNt.js → index-fChGNUaV.js} +2 -2
  72. package/dist/{index-Cq0IbX2g.cjs → index-g7Wgp9gu.cjs} +1 -1
  73. package/dist/{index-Cck4n4WY.cjs → index-ucDLs-jz.cjs} +1 -1
  74. package/dist/{index-B47-vpvz.js → index-xocA7N1o.js} +7912 -7900
  75. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-_g-HLUBE.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CA4D5g5S.cjs} +1 -1
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Dmtv1jQ3.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Ct_Gif7C.js} +4 -4
  77. package/dist/{main-C5mcsbRd.js → main-SWG15a-I.js} +4 -4
  78. package/dist/{main-D8ovrBi2.cjs → main-Yz4Oqt7r.cjs} +1 -1
  79. package/dist/{menu-BMAZOS2j.js → menu-BzDsNPVM.js} +648 -560
  80. package/dist/{menu-DopnPfbG.cjs → menu-DUkDo01b.cjs} +5 -6
  81. package/dist/{menuIndex-DhpobxSC.cjs → menuIndex-BkBrPObt.cjs} +1 -1
  82. package/dist/{menuIndex-DuWSagQ-.js → menuIndex-yuvNAovT.js} +1 -1
  83. package/dist/ss-component.cjs +1 -1
  84. package/dist/ss-component.css +1 -1
  85. package/dist/ss-component.js +12 -12
  86. package/dist/ss-component2.cjs +1 -1
  87. package/dist/ss-component2.js +12 -12
  88. package/dist/{threeModel-D3UmXNUb.cjs → threeModel-C63Sjop5.cjs} +1 -1
  89. package/dist/{threeModel-3JirGS2j.js → threeModel-b1yjN3xi.js} +4 -4
  90. package/dist/{threePreview-diIAbbKf.js → threePreview-EMOU8ESj.js} +4 -4
  91. package/dist/{threePreview-_Pa_rEAW.cjs → threePreview-T5JQIpIE.cjs} +1 -1
  92. package/dist/{threeSceneView-B5pQXPj7.cjs → threeSceneView-CVnwcWw9.cjs} +1 -1
  93. package/dist/{threeSceneView-DINMkVVz.js → threeSceneView-zDdeQECN.js} +14 -14
  94. package/dist/{threeSceneViewForCPMPIP-DqzjXWdH.js → threeSceneViewForCPMPIP-Cy9q2ndz.js} +8 -8
  95. package/dist/{threeSceneViewForCPMPIP-k5RanDHf.cjs → threeSceneViewForCPMPIP-DXVojXop.cjs} +1 -1
  96. package/dist/{threeTrackPathView-DFuI3kE-.cjs → threeTrackPathView-ewxBf_AV.cjs} +1 -1
  97. package/dist/{threeTrackPathView-CmGiZRgE.js → threeTrackPathView-jXEBNcpF.js} +4 -4
  98. package/dist/{threeViewerHost-B-HsQ66C.js → threeViewerHost-CQeDys9O.js} +3 -3
  99. package/dist/{threeViewerHost-msa4WUeH.cjs → threeViewerHost-WO0px6I6.cjs} +1 -1
  100. package/dist/{urdfTree-DwmC3WSP.js → urdfTree-BRwS94Xs.js} +1 -1
  101. package/dist/{urdfTree-CeTWjJ2Y.cjs → urdfTree-BVYJZhPX.cjs} +1 -1
  102. package/dist/{workpieceTreePanel-MbzDAYJO.js → workpieceTreePanel-D29Boj5S.js} +4 -4
  103. package/dist/{workpieceTreePanel-BjTo7Vbi.cjs → workpieceTreePanel-FDRKfo7x.cjs} +1 -1
  104. package/package.json +1 -1
  105. package/dist/clone-DZsVSfvJ.cjs +0 -1
  106. package/dist/index-5rsqoznF.cjs +0 -1
  107. package/dist/index-BWfqrsaY.cjs +0 -2
  108. package/dist/index-Br8-OQ_d.js +0 -679
  109. package/dist/index-BwyBfUCz.cjs +0 -1
  110. package/dist/index-D6yEF8Ru.js +0 -9698
  111. package/dist/index-DOCsP0-B.cjs +0 -25
@@ -1,7 +1,7 @@
1
1
  import { watch as be, ref as w, computed as we } from "vue";
2
- import { i as E, f as B, w as Le } from "./index-B846yqBS.js";
3
- import { s as Te, b as V, p as C, u as Re, n as De, c as A, g as Ee, V as Be, W as Ae, X as Pe, Y as Ue, Z as xe, _ as Se } from "./menu-BMAZOS2j.js";
4
- import { f as N, E as ke } from "./index-CkXAOjdK.js";
2
+ import { i as E, f as B, w as Le } from "./index-BbRiCABC.js";
3
+ import { s as Te, b as V, p as C, u as Re, n as De, c as A, g as Ee, V as Be, W as Ae, X as Pe, Y as Ue, Z as xe, _ as Se } from "./menu-BzDsNPVM.js";
4
+ import { f as N, E as ke } from "./index-D4rNc1Ug.js";
5
5
  import { s as z } from "./request-CoGtW0Ux.js";
6
6
  const qe = V(C), { systemUrl: f } = Te(qe);
7
7
  let P = f.value === "" || !f.value ? "http://222.92.178.198:63002" : f.value;
@@ -1,6 +1,6 @@
1
1
  import { ref as A, computed as c, onMounted as _ } from "vue";
2
2
  import { useRouter as g } from "vue-router";
3
- import { u as C, p as h, n as R, c as b, g as S, j as E } from "./menu-BMAZOS2j.js";
3
+ import { u as C, p as h, n as R, c as b, g as S, j as E } from "./menu-BzDsNPVM.js";
4
4
  const l = {
5
5
  ALLOW: {
6
6
  value: "允许"
@@ -0,0 +1,481 @@
1
+ import { createElementBlock as R, openBlock as V, createElementVNode as c, renderSlot as T, defineComponent as K, ref as F, resolveComponent as E, createVNode as b, withCtx as r, unref as U, reactive as Y, watch as j, onBeforeUnmount as ee, computed as te, onMounted as ae, createCommentVNode as oe, toDisplayString as A, createTextVNode as M } from "vue";
2
+ import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ import { b as P, p as q, l as ne, d as se, u as ie, s as le, e as ce } from "./menu-BzDsNPVM.js";
4
+ import "./index-Bwv7RY5s.js";
5
+ import { u as re } from "./index-Y6ou98p7.js";
6
+ import { E as H } from "./request-CoGtW0Ux.js";
7
+ import { useRouter as de } from "vue-router";
8
+ import { u as ue, l as me, v as ge } from "./index-D4rNc1Ug.js";
9
+ const fe = {}, pe = { class: "left-wrap" }, _e = { class: "left-bg" };
10
+ function ve(y, m) {
11
+ return V(), R("div", pe, [
12
+ c("div", _e, [
13
+ T(y.$slots, "img", {}, void 0, !0)
14
+ ])
15
+ ]);
16
+ }
17
+ const be = /* @__PURE__ */ B(fe, [["render", ve], ["__scopeId", "data-v-9b7ee6c9"]]), x = {
18
+ ACCOUNT: "account",
19
+ FACE: "face"
20
+ }, he = { class: "right-wrap" }, ye = { class: "tab-content" }, Ce = { class: "tab-tips" }, we = { class: "tab-content" }, Le = { class: "tab-tips" }, Te = /* @__PURE__ */ K({
21
+ __name: "index",
22
+ props: {
23
+ tabList: {
24
+ type: Array,
25
+ default: []
26
+ },
27
+ loading: {
28
+ type: Boolean,
29
+ default: !1
30
+ }
31
+ },
32
+ emits: ["clickLogin", "handleTabChange"],
33
+ setup(y, { emit: m }) {
34
+ const t = F(x.ACCOUNT), e = m, C = () => {
35
+ e("clickLogin", t.value);
36
+ }, d = (s) => {
37
+ e("handleTabChange", s);
38
+ };
39
+ return (s, g) => {
40
+ const o = E("el-button"), i = E("el-tab-pane"), p = E("el-tabs");
41
+ return V(), R("div", he, [
42
+ b(p, {
43
+ modelValue: t.value,
44
+ "onUpdate:modelValue": g[0] || (g[0] = (l) => t.value = l),
45
+ class: "right-tabs",
46
+ onTabChange: d
47
+ }, {
48
+ default: r(() => [
49
+ b(i, {
50
+ name: U(x).ACCOUNT
51
+ }, {
52
+ label: r(() => [
53
+ T(s.$slots, "tabLabel1", {}, void 0, !0)
54
+ ]),
55
+ default: r(() => [
56
+ c("div", ye, [
57
+ T(s.$slots, "tabContent1", {}, void 0, !0)
58
+ ]),
59
+ c("div", {
60
+ class: "tab-button special",
61
+ onClick: C
62
+ }, [
63
+ b(o, { loading: y.loading }, {
64
+ default: r(() => [
65
+ T(s.$slots, "tabButton1", {}, void 0, !0)
66
+ ]),
67
+ _: 3
68
+ }, 8, ["loading"])
69
+ ]),
70
+ c("div", Ce, [
71
+ T(s.$slots, "tabTips1", {}, void 0, !0)
72
+ ])
73
+ ]),
74
+ _: 3
75
+ }, 8, ["name"]),
76
+ b(i, {
77
+ name: U(x).FACE
78
+ }, {
79
+ label: r(() => [
80
+ T(s.$slots, "tabLabel2", {}, void 0, !0)
81
+ ]),
82
+ default: r(() => [
83
+ c("div", we, [
84
+ T(s.$slots, "tabContent2", {}, void 0, !0)
85
+ ]),
86
+ c("div", Le, [
87
+ T(s.$slots, "tabTips2", {}, void 0, !0)
88
+ ])
89
+ ]),
90
+ _: 3
91
+ }, 8, ["name"])
92
+ ]),
93
+ _: 3
94
+ }, 8, ["modelValue"])
95
+ ]);
96
+ };
97
+ }
98
+ }), ke = /* @__PURE__ */ B(Te, [["__scopeId", "data-v-8b1962f0"]]), Ne = { class: "account-wrap" }, $e = /* @__PURE__ */ K({
99
+ __name: "index",
100
+ props: {
101
+ activeTabName: {
102
+ type: String,
103
+ default: ""
104
+ },
105
+ isClickLogin: {
106
+ type: Boolean,
107
+ default: !1
108
+ }
109
+ },
110
+ emits: ["handleLoginFormChange"],
111
+ setup(y, { emit: m }) {
112
+ const t = y, e = Y({
113
+ account: "",
114
+ password: ""
115
+ }), C = Y({
116
+ account: [
117
+ { required: !0, message: "请输入账号", trigger: "blur" }
118
+ ],
119
+ password: [
120
+ { required: !0, message: "请输入密码", trigger: "blur" }
121
+ ]
122
+ }), d = F(null), s = m;
123
+ return j(() => t.isClickLogin, (g) => {
124
+ var o;
125
+ g && (t == null ? void 0 : t.activeTabName) === "account" && ((o = d.value) == null || o.validate((i) => {
126
+ var p;
127
+ for (let l in e)
128
+ e.hasOwnProperty(l) && (e[l] = (p = e[l]) == null ? void 0 : p.trim());
129
+ s("handleLoginFormChange", i, i ? e : null);
130
+ }));
131
+ }, {
132
+ immediate: !0
133
+ }), j(() => t.activeTabName, (g) => {
134
+ var o;
135
+ g === "account" && ((o = d.value) == null || o.resetFields());
136
+ }), (g, o) => {
137
+ const i = E("svg-icon"), p = E("el-input"), l = E("el-form-item"), w = E("el-form");
138
+ return V(), R("div", Ne, [
139
+ b(w, {
140
+ model: e,
141
+ rules: C,
142
+ ref_key: "formRef",
143
+ ref: d
144
+ }, {
145
+ default: r(() => [
146
+ b(l, {
147
+ label: "",
148
+ prop: "account"
149
+ }, {
150
+ default: r(() => [
151
+ b(p, {
152
+ class: "account-input",
153
+ modelValue: e.account,
154
+ "onUpdate:modelValue": o[0] || (o[0] = (_) => e.account = _),
155
+ placeholder: "请输入账号",
156
+ clearable: ""
157
+ }, {
158
+ prefix: r(() => [
159
+ b(i, {
160
+ name: "account",
161
+ style: { width: "15px", height: "15px" }
162
+ })
163
+ ]),
164
+ _: 1
165
+ }, 8, ["modelValue"])
166
+ ]),
167
+ _: 1
168
+ }),
169
+ b(l, {
170
+ label: "",
171
+ prop: "password"
172
+ }, {
173
+ default: r(() => [
174
+ b(p, {
175
+ class: "account-input",
176
+ modelValue: e.password,
177
+ "onUpdate:modelValue": o[1] || (o[1] = (_) => e.password = _),
178
+ type: "password",
179
+ placeholder: "请输入密码",
180
+ "show-password": "",
181
+ clearable: ""
182
+ }, {
183
+ prefix: r(() => [
184
+ b(i, {
185
+ name: "password",
186
+ style: { width: "15px", height: "15px" }
187
+ })
188
+ ]),
189
+ _: 1
190
+ }, 8, ["modelValue"])
191
+ ]),
192
+ _: 1
193
+ })
194
+ ]),
195
+ _: 1
196
+ }, 8, ["model", "rules"])
197
+ ]);
198
+ };
199
+ }
200
+ }), Fe = /* @__PURE__ */ B($e, [["__scopeId", "data-v-48037c0f"]]), Se = { class: "account-wrap" }, Ae = { class: "video-wrap" }, Ee = /* @__PURE__ */ K({
201
+ __name: "index",
202
+ props: {
203
+ systemKey: { default: "" },
204
+ activeTabName: { default: "" },
205
+ isClickLogin: { type: Boolean, default: !1 }
206
+ },
207
+ emits: ["handleLoginFormChange"],
208
+ setup(y, { emit: m }) {
209
+ const t = y, e = m;
210
+ P(q);
211
+ const { initVerify: C } = re(), d = F(null), s = F(null);
212
+ let g = !1, o = null;
213
+ const i = async (a) => {
214
+ if (!a)
215
+ return;
216
+ const u = await C(a), { data: f } = u || {}, { account: h, password: L } = (f == null ? void 0 : f.data) || {}, v = f == null ? void 0 : f.msg;
217
+ if (!h) {
218
+ H.warning(v || "识别失败,请重新识别!");
219
+ return;
220
+ }
221
+ e("handleLoginFormChange", !0, {
222
+ account: h,
223
+ password: L
224
+ });
225
+ }, p = () => {
226
+ if (!s.value || !d.value)
227
+ return;
228
+ const a = s.value, u = a.getContext("2d"), f = d.value;
229
+ a.width = 200, a.height = 200;
230
+ const h = f.videoWidth || 640, L = f.videoHeight || 480, v = Math.min(200 / h, 200 / L), k = h * v, n = L * v, N = (200 - k) / 2, $ = (200 - n) / 2;
231
+ u == null || u.drawImage(f, 0, 0, h, L, N, $, k, n), a.toBlob((S) => {
232
+ if (S) {
233
+ const O = new File([S], "face.png", { type: "image/png" });
234
+ i(O);
235
+ }
236
+ }, "image/png");
237
+ }, l = async () => {
238
+ if (!d.value || g)
239
+ return;
240
+ const a = d.value;
241
+ try {
242
+ if (o = await navigator.mediaDevices.getUserMedia({
243
+ video: { facingMode: "user" },
244
+ // 前置;后置用 'environment'
245
+ audio: !1
246
+ }), a) {
247
+ const u = a;
248
+ u.srcObject = o, g = !0;
249
+ }
250
+ } catch {
251
+ H.warning("摄像头启动失败");
252
+ }
253
+ };
254
+ function w(a) {
255
+ if (a && (a.getTracks().forEach((u) => u.stop()), d.value)) {
256
+ const u = d.value;
257
+ u.srcObject = null;
258
+ }
259
+ }
260
+ const _ = () => {
261
+ w(o), g = !1;
262
+ };
263
+ return j(() => t.activeTabName, (a) => {
264
+ if (a !== x.FACE) {
265
+ _();
266
+ return;
267
+ }
268
+ if (a === x.FACE && !g) {
269
+ l();
270
+ return;
271
+ }
272
+ }), ee(() => {
273
+ _();
274
+ }), (a, u) => (V(), R("div", Se, [
275
+ c("div", Ae, [
276
+ c("video", {
277
+ class: "face-video",
278
+ ref_key: "videoRef",
279
+ ref: d,
280
+ id: "v",
281
+ autoplay: "",
282
+ playsinline: ""
283
+ }, null, 512)
284
+ ]),
285
+ T(a.$slots, "default", {}, () => [
286
+ c("button", {
287
+ class: "face-screenshot",
288
+ onClick: p
289
+ }, "人脸识别")
290
+ ], !0),
291
+ c("canvas", {
292
+ ref_key: "canvasRef",
293
+ ref: s,
294
+ id: "canvas"
295
+ }, null, 512)
296
+ ]));
297
+ }
298
+ }), Re = /* @__PURE__ */ B(Ee, [["__scopeId", "data-v-b64bc91c"]]), Z = P(q), { isDefaultModel: Ve } = ue(), Me = async (y, m) => {
299
+ var C, d, s, g, o, i, p, l, w, _, a, u, f, h;
300
+ let t = Object.values(y), e = await ne({
301
+ userName: (C = t == null ? void 0 : t[0]) == null ? void 0 : C.trim(),
302
+ password: (d = t == null ? void 0 : t[1]) == null ? void 0 : d.trim()
303
+ });
304
+ if (((s = e == null ? void 0 : e.data) == null ? void 0 : s.status) === 200 && ((o = (g = e == null ? void 0 : e.data) == null ? void 0 : g.result) == null ? void 0 : o.length) <= 0 && (e = await se({
305
+ userName: (i = t == null ? void 0 : t[0]) == null ? void 0 : i.trim(),
306
+ password: (p = t == null ? void 0 : t[1]) == null ? void 0 : p.trim(),
307
+ path: "系统管理/用户管理",
308
+ platId: m
309
+ })), ((l = e == null ? void 0 : e.data) == null ? void 0 : l.status) === 200 && ((_ = (w = e == null ? void 0 : e.data) == null ? void 0 : w.result) == null ? void 0 : _.length) > 0) {
310
+ const v = ((u = (a = e == null ? void 0 : e.data) == null ? void 0 : a.result) == null ? void 0 : u.find((n) => Ve(n))) || ((h = (f = e == null ? void 0 : e.data) == null ? void 0 : f.result) == null ? void 0 : h[0]);
311
+ sessionStorage.setItem("systemKey", m && m !== "" ? m : v == null ? void 0 : v.plat_id);
312
+ let k = v;
313
+ return k.plat_id = k.plat_id ?? m, Z.setLoginUserInfo(k), Z.setSystemKey(m && m !== "" ? m : v == null ? void 0 : v.plat_id), !0;
314
+ } else
315
+ return H.error("输入的密码错误,请重新输入"), !1;
316
+ }, xe = { class: "login-wrap" }, Be = { class: "login-body" }, Ie = { class: "login-body-item left" }, Ue = { class: "title" }, je = { class: "first-level" }, qe = {
317
+ key: 0,
318
+ class: "logo"
319
+ }, Ke = ["src"], Oe = { class: "english-name" }, He = { class: "login-body-item right" }, Pe = /* @__PURE__ */ K({
320
+ __name: "index",
321
+ props: {
322
+ oldSystemKey: {},
323
+ loginContent: {}
324
+ },
325
+ emits: ["change", "projectLogin"],
326
+ setup(y, { emit: m }) {
327
+ const t = y, e = de(), C = m, d = ie(q), s = P(q), { systemKey: g, systemInfo: o, loginUserInfo: i } = le(s), p = te(() => {
328
+ var n;
329
+ return ((n = o.value) == null ? void 0 : n.logo) || me;
330
+ }), l = F({
331
+ // sysCTitle: 'INSOFWORKS',
332
+ sysCTitle: "",
333
+ sysETitle: "",
334
+ // sysETitle: 'Dynamic Test Information System',
335
+ loginTitle: "账户密码登录",
336
+ tabs: [
337
+ {
338
+ name: "密码登录",
339
+ btnLabel: "登录",
340
+ tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
341
+ },
342
+ {
343
+ name: "人脸识别",
344
+ btnLabel: "人脸识别",
345
+ tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
346
+ },
347
+ {
348
+ name: "刷卡登录",
349
+ btnLabel: "登录",
350
+ tips: "温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"
351
+ }
352
+ ]
353
+ }), w = F("account"), _ = F(!1), a = F(!1), u = () => {
354
+ _.value = !0;
355
+ }, f = (n, N) => {
356
+ _.value = !1, n && v(N);
357
+ }, h = async () => (sessionStorage.setItem("loginToken", "111"), !0), L = async () => (sessionStorage.setItem("magicToken", "123456"), !0);
358
+ ae(async () => {
359
+ await h();
360
+ });
361
+ const v = async (n) => {
362
+ var D, J, W, z, G, Q, X;
363
+ a.value = !0;
364
+ let N = [Me(n, (D = o.value) == null ? void 0 : D.plat_id), h(), L()];
365
+ const $ = await Promise.all(N), S = $ == null ? void 0 : $.every((I) => I);
366
+ let O = [
367
+ {
368
+ id: "1",
369
+ request_method: "Post",
370
+ request_url: "/platform/getdata",
371
+ request_param: JSON.stringify({
372
+ userName: "hjj",
373
+ password: "1"
374
+ }),
375
+ request_result: "{}",
376
+ is_delete: !1,
377
+ request_table: "admin_user",
378
+ request_type: "login"
379
+ }
380
+ ];
381
+ try {
382
+ const I = ((J = i == null ? void 0 : i.value) == null ? void 0 : J.plat_id) || ((W = o.value) == null ? void 0 : W.plat_id);
383
+ await ce({
384
+ platId: parseInt(I),
385
+ changeContents: [{
386
+ tableName: "log",
387
+ tableContents: O
388
+ }]
389
+ });
390
+ } catch {
391
+ }
392
+ S ? (C("projectLogin", n), await ge(), e.push("/"), s.setLogRecordAsync({
393
+ type: "登录",
394
+ data: {
395
+ account: ((z = i.value) == null ? void 0 : z.account) ?? ((G = i.value) == null ? void 0 : G.账号),
396
+ userName: ((Q = i.value) == null ? void 0 : Q.姓名) || ((X = i.value) == null ? void 0 : X.userName) || "未知"
397
+ }
398
+ }, "/login", "login"), d.setHasClickEditComp(!1)) : a.value = !1, a.value = !1;
399
+ };
400
+ j(
401
+ () => t == null ? void 0 : t.loginContent,
402
+ () => {
403
+ let n = t == null ? void 0 : t.loginContent;
404
+ n != null && n.account && (n != null && n.password) && v(n);
405
+ },
406
+ { deep: !0, immediate: !0 }
407
+ );
408
+ const k = (n) => {
409
+ w.value = n, _.value = !1, a.value = !1;
410
+ };
411
+ return (n, N) => (V(), R("div", xe, [
412
+ c("div", Be, [
413
+ c("div", Ie, [
414
+ b(be, { class: "login-left-bg" }, {
415
+ img: r(() => {
416
+ var $, S;
417
+ return [
418
+ c("div", Ue, [
419
+ c("div", je, [
420
+ p.value ? (V(), R("div", qe, [
421
+ c("img", {
422
+ src: p.value,
423
+ alt: ""
424
+ }, null, 8, Ke)
425
+ ])) : oe("", !0),
426
+ c("div", Oe, A((($ = U(o)) == null ? void 0 : $.EnglishName) || "Insofworks"), 1)
427
+ ]),
428
+ c("div", null, A(((S = U(o)) == null ? void 0 : S.chineseName) || "工业软件建模与开发系统"), 1)
429
+ ]),
430
+ N[0] || (N[0] = c("div", { class: "divide-line" }, null, -1))
431
+ ];
432
+ }),
433
+ _: 1
434
+ })
435
+ ]),
436
+ c("div", He, [
437
+ b(ke, {
438
+ loading: a.value,
439
+ onClickLogin: u,
440
+ onHandleTabChange: k
441
+ }, {
442
+ title: r(() => [
443
+ M(A(l.value.loginTitle), 1)
444
+ ]),
445
+ tabLabel1: r(() => [
446
+ M(A(l.value.tabs[0].name), 1)
447
+ ]),
448
+ tabContent1: r(() => [
449
+ b(Fe, {
450
+ activeTabName: w.value,
451
+ isClickLogin: _.value,
452
+ onHandleLoginFormChange: f
453
+ }, null, 8, ["activeTabName", "isClickLogin"])
454
+ ]),
455
+ tabButton1: r(() => [
456
+ M(A(l.value.tabs[0].btnLabel), 1)
457
+ ]),
458
+ tabLabel2: r(() => [
459
+ M(A(l.value.tabs[1].name), 1)
460
+ ]),
461
+ tabContent2: r(() => [
462
+ b(Re, {
463
+ systemKey: n.oldSystemKey,
464
+ activeTabName: w.value,
465
+ isClickLogin: _.value,
466
+ onHandleLoginFormChange: f
467
+ }, null, 8, ["systemKey", "activeTabName", "isClickLogin"])
468
+ ]),
469
+ tabButton2: r(() => [
470
+ M(A(l.value.tabs[1].btnLabel), 1)
471
+ ]),
472
+ _: 1
473
+ }, 8, ["loading"])
474
+ ])
475
+ ])
476
+ ]));
477
+ }
478
+ }), Ze = /* @__PURE__ */ B(Pe, [["__scopeId", "data-v-233316bd"]]);
479
+ export {
480
+ Ze as default
481
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),f=require("./menu-DUkDo01b.cjs"),j=require("./index-92G6p6-P.cjs"),B=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),L=n.defineComponent({__name:"index",props:{windowConfig:{type:Object,default:()=>{}},systemInfo:{type:Object,default:()=>{}},systemKey:{type:String,default:""},pathContent:{type:String,default:""},mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!1},nodeDev:{type:String,default:""},pageKey:{type:String,default:""},interfaceContent:{type:Array,default:()=>[]},loginContent:{type:Object,default:()=>{}}},emits:["buildContent","openThreeBuild","threeData","setLoginInfo","projectLogin"],setup(s,{emit:m}){const c=f.useLoginState(f.pinia),{loginUserInfo:r}=f.storeToRefs(c),{initSystemInfo:g}=j.useModelManagement(),e=s,a=m,w=n.computed(()=>{var t,o;return(e==null?void 0:e.showButton)||((o=(t=r.value)==null?void 0:t.layer)==null?void 0:o.toUpperCase())==="SUPERADMIN"}),C=t=>{a("projectLogin",t)};n.watch(()=>[e==null?void 0:e.systemKey,e==null?void 0:e.systemInfo],async([t,o])=>{c.setSystemKey(t),t!==""&&sessionStorage.setItem("systemKey",t)},{immediate:!0}),n.watch(()=>e==null?void 0:e.interfaceContent,()=>{var o,i,u;if(!(e!=null&&e.interfaceContent)||Array.isArray(e==null?void 0:e.interfaceContent)&&((o=e==null?void 0:e.interfaceContent)==null?void 0:o.length)===0)return;let t=(i=e==null?void 0:e.interfaceContent)==null?void 0:i.find(d=>d==null?void 0:d.includes("VITE_API_NEW_URL"));t=(u=t==null?void 0:t.split("="))==null?void 0:u[1],t=t==null?void 0:t.trim(),c.setSystemUrl(t??"")},{immediate:!0,deep:!0}),n.onMounted(async()=>{e.systemInfo?c.setSystemInfo(e.systemInfo):await g()});const h=()=>{a("buildContent")},S=()=>{a("setLoginInfo")},I=t=>{a("openThreeBuild",t)},v=t=>{a("threeData",t)},l=()=>{var y;const t=e!=null&&e.windowConfig?(y=e==null?void 0:e.windowConfig)==null?void 0:y.width:window.innerWidth,o=1920,i=16,u=t/o,d=i*u;document.documentElement.style.fontSize=`${d}px`};return n.onMounted(()=>{l(),window.addEventListener("resize",l)}),n.onUnmounted(()=>{window.removeEventListener("resize",l)}),(t,o)=>{const i=n.resolveComponent("router-view");return n.openBlock(),n.createElementBlock("div",null,[n.createVNode(i,{mode:e==null?void 0:e.mode,content:e==null?void 0:e.content,jsonContents:e==null?void 0:e.jsonContents,pathContent:e==null?void 0:e.pathContent,showButton:w.value,nodeDev:e==null?void 0:e.nodeDev,windowConfig:s.windowConfig,systemInfo:s.systemInfo,"old-systemKey":s.systemKey,onBuildContent:h,onProjectLogin:C,onOpenThreeBuild:I,pageKey:s.pageKey,onThreeData:v,onSetLoginInfo:S,loginContent:e==null?void 0:e.loginContent},null,8,["mode","content","jsonContents","pathContent","showButton","nodeDev","windowConfig","systemInfo","old-systemKey","pageKey","loginContent"])])}}}),_=B._export_sfc(L,[["__scopeId","data-v-c2972e64"]]);exports.default=_;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),_=require("./index-Cro-IzQv.cjs"),r=require("./menu-DopnPfbG.cjs"),f=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=(t,l,a)=>{var n,u,p,g;let e=l;e.title.text=(a==null?void 0:a.chartName)??"",e.xAxis.data=(n=r.cloneDeep(t))==null?void 0:n.map(i=>i.x),e.legend.data=(p=(u=r.cloneDeep(t))==null?void 0:u[0])!=null&&p.y?Object.keys(r.cloneDeep(t)[0].y):[];let o=[];return((g=e.legend.data)==null?void 0:g.length)>0&&r.cloneDeep(e.legend.data).forEach(i=>{var h;const y=(h=r.cloneDeep(t))==null?void 0:h.map(c=>{var x;return(x=c==null?void 0:c.y)==null?void 0:x[i]});o.push({name:i,type:"line",data:y})}),e.series=o,e},d=[{key:"折线图",value:{title:{text:"",left:"center",top:25,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},legend:{data:[]},grid:{left:"6%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}],C={class:"eCharts"},D={__name:"index",props:{eChartContents:Array},setup(t){const l=t,a=s.ref({});return s.onMounted(()=>{var o;const e=l==null?void 0:l.eChartContents;a.value=m(r.cloneDeep(e==null?void 0:e.compData),(o=d==null?void 0:d.find(n=>(n==null?void 0:n.key)===(e==null?void 0:e.name)))==null?void 0:o.value,e==null?void 0:e.extraContent)}),(e,o)=>(s.openBlock(),s.createElementBlock("div",C,[s.createVNode(_.ssChart,{optionContents:a.value},null,8,["optionContents"])]))}},b=f._export_sfc(D,[["__scopeId","data-v-0440fac3"]]);exports.default=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),_=require("./index-D9VN9VwZ.cjs"),r=require("./menu-DUkDo01b.cjs"),f=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=(t,l,a)=>{var n,u,p,g;let e=l;e.title.text=(a==null?void 0:a.chartName)??"",e.xAxis.data=(n=r.cloneDeep(t))==null?void 0:n.map(i=>i.x),e.legend.data=(p=(u=r.cloneDeep(t))==null?void 0:u[0])!=null&&p.y?Object.keys(r.cloneDeep(t)[0].y):[];let o=[];return((g=e.legend.data)==null?void 0:g.length)>0&&r.cloneDeep(e.legend.data).forEach(i=>{var h;const y=(h=r.cloneDeep(t))==null?void 0:h.map(c=>{var x;return(x=c==null?void 0:c.y)==null?void 0:x[i]});o.push({name:i,type:"line",data:y})}),e.series=o,e},d=[{key:"折线图",value:{title:{text:"",left:"center",top:25,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},legend:{data:[]},grid:{left:"6%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}],C={class:"eCharts"},D={__name:"index",props:{eChartContents:Array},setup(t){const l=t,a=s.ref({});return s.onMounted(()=>{var o;const e=l==null?void 0:l.eChartContents;a.value=m(r.cloneDeep(e==null?void 0:e.compData),(o=d==null?void 0:d.find(n=>(n==null?void 0:n.key)===(e==null?void 0:e.name)))==null?void 0:o.value,e==null?void 0:e.extraContent)}),(e,o)=>(s.openBlock(),s.createElementBlock("div",C,[s.createVNode(_.ssChart,{optionContents:a.value},null,8,["optionContents"])]))}},b=f._export_sfc(D,[["__scopeId","data-v-0440fac3"]]);exports.default=b;
@@ -1,9 +1,9 @@
1
1
  import { watch as ze, ref as v, computed as qe, defineComponent as Ue, onMounted as Ae, reactive as $e, resolveComponent as p, createElementBlock as ue, openBlock as pe, createElementVNode as i, createVNode as a, unref as f, withCtx as l, createTextVNode as C, toDisplayString as we, Fragment as Fe, renderList as Re, withModifiers as Me } from "vue";
2
2
  import { s as G, u as Ge, g as Qe } from "./request-CoGtW0Ux.js";
3
- import { f as de, w as Oe } from "./index-B846yqBS.js";
4
- import { s as je, b as He, p as he, n as Je, g as Ke, c as We, u as Xe } from "./menu-BMAZOS2j.js";
5
- import { E as Ye, f as be } from "./index-CkXAOjdK.js";
6
- import { f as Ze, i as et, e as tt, a as ot } from "./index-6egNZH3a.js";
3
+ import { f as de, w as Oe } from "./index-BbRiCABC.js";
4
+ import { s as je, b as He, p as he, n as Je, g as Ke, c as We, u as Xe } from "./menu-BzDsNPVM.js";
5
+ import { E as Ye, f as be } from "./index-D4rNc1Ug.js";
6
+ import { f as Ze, i as et, e as tt, a as ot } from "./index-DPbLX2EM.js";
7
7
  import { _ as ce } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
8
8
  import { s as at } from "./index-CnjGqJZS.js";
9
9
  import { _ as nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as x, ref as I, reactive as T, resolveComponent as v, createElementBlock as U, openBlock as E, createVNode as u, withCtx as d, createElementVNode as l, createTextVNode as h, toDisplayString as N, nextTick as q, Fragment as z, withDirectives as H, renderSlot as $, vShow as M } from "vue";
2
- import { al as V } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Dmtv1jQ3.js";
2
+ import { al as V } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Ct_Gif7C.js";
3
3
  import { O as X, P as J, Q as D, R as c, T as R, U as g } from "./request-CoGtW0Ux.js";
4
4
  import { i as Q } from "./isNil-CjWwlQS3.js";
5
5
  import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";const t=require("vue"),U=require("./menu-DopnPfbG.cjs"),gt=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-_g-HLUBE.cjs");const kt=require("./request-BC2w2vGr.cjs"),Ct=require("./index-CUw6nGTo.cjs"),Dt=require("./index-BGYRY71Y.cjs"),It=require("vue-router"),Ke=require("./index-RoXicHV9.cjs"),N=require("./index-CW4qJdP8.cjs"),St=require("./index-DOCsP0-B.cjs"),_t=require("./menuIndex-DhpobxSC.cjs"),m=require("./index-BkOJA3nu.cjs"),Pe=require("./index-CQY6ageG.cjs"),Bt=require("./index-Cq0IbX2g.cjs"),bt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),je=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BGYRY71Y.cjs")).then(n=>n.index));je.install=n=>{n.component("ssMenu",je)};const Ye={__name:"index",props:{name:String},setup(n){const p=n,T=t.computed(()=>kt.Icons[p.name]);return t.onMounted(()=>{}),(h,r)=>{const l=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(l,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(T.value)))]),_:1})}}},Re=(n,p,T=0)=>{let h=n;return h!=null&&h.every(r=>Array.isArray(r))&&(h!=null&&h.every(r=>Array.isArray(r)&&r.length===1)?h=h==null?void 0:h.filter(r=>(r==null?void 0:r[0])!==(p==null?void 0:p[T])):h=h==null?void 0:h.map(r=>{if(r!=null&&r.find(l=>l===(p==null?void 0:p[T]))&&(p==null?void 0:p.length)!==1){let l=U.cloneDeep(p),c=r==null?void 0:r.filter(I=>I!==(l==null?void 0:l[T])),w=T+1,x=Re(c,l,w),E=[];E.push(r==null?void 0:r[0]),x==null||x.forEach(I=>{E.push(I)}),r=E}return r})),h},Oe=(n,p,T,h=0)=>{let r=n;return r!=null&&r.every(l=>Array.isArray(l))&&(r!=null&&r.every(l=>Array.isArray(l)&&l.length===1)?r.push([T]):r=r==null?void 0:r.map(l=>{if(l!=null&&l.find(c=>c===(p==null?void 0:p[h]))&&(p==null?void 0:p.length)!==1){let c=U.cloneDeep(p),w=l==null?void 0:l.filter(q=>q!==(c==null?void 0:c[h])),x=h+1,E=Oe(w,c,T,x),I=[];I.push(l==null?void 0:l[0]),E==null||E.forEach(q=>{I.push(q)}),l=I}return l})),r},ze=(n,p,T,h,r=0)=>{let l=n;return l!=null&&l.every(c=>Array.isArray(c))&&(l!=null&&l.every(c=>Array.isArray(c)&&c.length===1)?l=l==null?void 0:l.map(c=>((c==null?void 0:c[0])===T&&(c=[h]),c)):l=l==null?void 0:l.map(c=>{if(c!=null&&c.find(w=>w===(p==null?void 0:p[r]))&&(p==null?void 0:p.length)!==1){let w=U.cloneDeep(p),x=c==null?void 0:c.filter(P=>P!==(w==null?void 0:w[r])),E=r+1,I=ze(x,w,T,h,E),q=[];q.push(c==null?void 0:c[0]),I==null||I.forEach(P=>{q.push(P)}),c=q}return c})),l};function Ze(n="menu"){return{name:n,components:{SvgIcon:gt.SvgIcon,ssMenu:je,DynamicIcon:Ye,ssDialog:Ct.ssDialog,ssInput:Dt.ssInput},setup(p,{emit:T}){const h=t.defineProps({mode:{type:String,default:"vertical"}}),r=t.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),l=U.useMenuState(),c=U.useModelComp(U.pinia),w=U.useLoginState(U.pinia),{loginUserInfo:x}=U.storeToRefs(w),E=t.ref(0),I=It.useRouter(),q=t.ref(),{asideMenus:P,menuTriggerType:s,platform:Ve}=U.storeToRefs(l),{fixMenuStatus:Fe}=U.storeToRefs(c),{isSuperAdmin:Le}=Bt.useRole(),Ne=t.computed(()=>h==null?void 0:h.mode),A=o=>o==null?void 0:o.map(e=>{var k,C;return!(e!=null&&e.children)||((k=e==null?void 0:e.children)==null?void 0:k.length)===0?e.config=r.value:e!=null&&e.children&&((C=e==null?void 0:e.children)==null?void 0:C.length)>0&&(e.children=A(e.children)),e}),Ue=t.computed(()=>{let o=[...P.value];if((o==null?void 0:o.length)===0)return I.push("/"),[];const a=lt(o,ot.value);return a.isFlag||(o=a==null?void 0:a.data),o=o==null?void 0:o.map(e=>{var k,C;return!(e!=null&&e.children)||((k=e==null?void 0:e.children)==null?void 0:k.length)===0?e.config=r.value:e!=null&&e.children&&((C=e==null?void 0:e.children)==null?void 0:C.length)>0&&(e.children=A(e.children)),e}),o}),me=async(o,a)=>{c.setRouteToChildPath(""),l.setMenuTriggerType("click"),l.setActiveMenuPath(o==null?void 0:o.path),l.setActiveAsideMenu(o),o.isRouter?I.push(o.path):I.push("/"),T("node-click",o,a)},et=async o=>{const a=_t.findNodeByPropInTree(Ue.value,"path",o);l.setActiveAsideMenu(a),c.setRouteToChildPath(""),Fe.value?c.setFixMenuStatus(!1):(Z.value&&(s.value="open"),s.value==="click"?E.value===1?l.setActiveMenuPath(sessionStorage.getItem("pageKey")):l.setActiveMenuPath(o):Z.value||(l.setMenuTriggerType("click"),l.setActiveMenuPath(o))),o!=null&&o.startsWith("/")?I.push(o):I.push("/"),E.value++},tt=o=>{Z.value||l.setActiveMenuPath(o)},X=o=>{const a=document.documentElement;o==null||o.forEach(e=>{a.style.setProperty(e.name,e.value)})};t.onMounted(()=>{E.value=1});const ot=t.computed(()=>{const o=sessionStorage.getItem("authority");return o?JSON.parse(o):[]});t.watch(()=>Ve.value,o=>{o==="browser"?X(Ke.browserVerticalMenuClasses):o==="client"?(X(Ke.clientHorizontalMenuClasses),X(Ke.clientVerticalMenuClasses)):o==="three"&&(X(Ke.threeHorizontalMenuClasses),X(Ke.threeVerticalMenuClasses))},{immediate:!0});const lt=(o,a)=>({isFlag:!0}),R=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),at=o=>St.getComponent(o),st=t.ref({}),it=t.ref([]),ee=t.ref({}),Y=t.ref({}),rt=o=>{switch(o){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Je=t.ref({}),nt=o=>{l.setCacheInputMenu({type:R.type,data:o}),l.setIsRefreshMenus(!0)},ct=async(o,a,e)=>{var k,C,_,z,M,H,j,te,oe,le,ae,se,ie,re,ne,ce,pe,de,fe,he,ye,ve,ge,ke,Ce,De,Ie,Se,_e,Be,be,we,Te,Ee,Me,ue,xe,qe,y,K,V,B;if(a==="create"){let d=(e==null?void 0:e.title)+"(1)",u=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(C=(k=u==null?void 0:u.data)==null?void 0:k.result)==null?void 0:C[0],J=(_=S==null?void 0:S.value)==null?void 0:_.pageData;J.compData=(z=J.compData)==null?void 0:z.map(i=>{var f;return(i==null?void 0:i.key)==="menuContents"&&(i.contents=Oe(i.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"),d)),i}),await N.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:J}});let F=(H=(M=e==null?void 0:e.path)==null?void 0:M.split("/"))==null?void 0:H.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}),L=await m.getItemData((oe=(te=(j=e==null?void 0:e.path)==null?void 0:j.split("/"))==null?void 0:te.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:oe.join("/"),sessionStorage.getItem("systemKey"),"");if(F.push(d),F=F==null?void 0:F.join("/"),(L==null?void 0:L.length)>0){let i=L==null?void 0:L[0],f=(ae=(le=i==null?void 0:i.compData)==null?void 0:le.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:ae.contents;if(((se=f==null?void 0:f[0])==null?void 0:se.directiveLabel)==="#isMain"){let g=(ie=f==null?void 0:f[0])==null?void 0:ie.prop,D=(ne=(re=i==null?void 0:i.compData)==null?void 0:re.find(b=>(b==null?void 0:b.key)==="tableContents"))==null?void 0:ne.contents,W;D==null||D.forEach(b=>{var G,O;if(b.length===1)((G=b==null?void 0:b[0])==null?void 0:G[g])===(e==null?void 0:e.title)&&(W=b==null?void 0:b[0],W[g]=d);else{let Q=(O=f==null?void 0:f.filter($=>$!=="操作"))==null?void 0:O.map($=>$==null?void 0:$.prop),$e=b==null?void 0:b.filter($=>!($!=null&&$.id)),Ae=m.getValueToObjectValue($e,Q);Ae[g]=d,W=Ae}}),await N.createInsofDataApi({key:{type:"data",pageKey:(de=(pe=(ce=e==null?void 0:e.path)==null?void 0:ce.split("/"))==null?void 0:pe.filter((b,G)=>{var O,Q;return G!==((Q=(O=e==null?void 0:e.path)==null?void 0:O.split("/"))==null?void 0:Q.length)-1}))==null?void 0:de.join("/"),tableId:i==null?void 0:i.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(fe=x.value)==null?void 0:fe.id,createUserLayer:((he=x.value)==null?void 0:he.dept)||((ye=x.value)==null?void 0:ye.部门名称)},value:{tableData:W}})}}await m.newLoadingConstruct(e==null?void 0:e.path,F),l.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),l.setActiveMenuPath((ke=(ge=(ve=e==null?void 0:e.path)==null?void 0:ve.split("/"))==null?void 0:ge.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:ke.join("/")),l.setActiveTopMenuPath((De=(Ce=e==null?void 0:e.path)==null?void 0:Ce.split("/"))==null?void 0:De[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}else if(a==="update")q.value=e;else if(a==="delete"){let d=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:e==null?void 0:e.path}}),u=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(Se=(Ie=u==null?void 0:u.data)==null?void 0:Ie.result)==null?void 0:Se[0],J=(_e=S==null?void 0:S.value)==null?void 0:_e.pageData;if(J.compData=(Be=J.compData)==null?void 0:Be.map(i=>{var f;return(i==null?void 0:i.key)==="menuContents"&&(i.contents=Re(i.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"))),i}),await N.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:J}}),((we=(be=d==null?void 0:d.data)==null?void 0:be.result)==null?void 0:we.length)>0){let i=(Ee=(Te=d==null?void 0:d.data)==null?void 0:Te.result)==null?void 0:Ee.map(f=>f==null?void 0:f.id);(i==null?void 0:i.length)>0&&await N.batchDeleteInsofDataApi({ids:i})}let F=await m.getItemData((xe=(ue=(Me=e==null?void 0:e.path)==null?void 0:Me.split("/"))==null?void 0:ue.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:xe.join("/"),sessionStorage.getItem("systemKey"),""),L=[];(F==null?void 0:F.length)>0&&(F==null||F.forEach(i=>{var g,D,W,b,G,O,Q,$e,Ae,$,We;let f=(b=(W=(D=(g=i==null?void 0:i.compData)==null?void 0:g.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:D.contents)==null?void 0:W[0])==null?void 0:b.prop;(($e=(Q=(O=(G=i==null?void 0:i.compData)==null?void 0:G.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:O.contents)==null?void 0:Q[0])==null?void 0:$e.directiveLabel)==="#isMain"&&((We=($=(Ae=i==null?void 0:i.compData)==null?void 0:Ae.find(v=>(v==null?void 0:v.key)==="tableContents"))==null?void 0:$.contents)==null||We.forEach(v=>{var Ge,Qe,Xe;(v==null?void 0:v.length)>1?(v==null?void 0:v[1])===(e==null?void 0:e.title)&&L.push((Ge=v==null?void 0:v[0])==null?void 0:Ge.id):((Qe=v==null?void 0:v[0])==null?void 0:Qe[f])===(e==null?void 0:e.title)&&L.push((Xe=v==null?void 0:v[0])==null?void 0:Xe.id)}))})),(L==null?void 0:L.length)>0&&await N.batchDeleteInsofDataApi({ids:L}),l.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),l.setActiveMenuPath((K=(y=(qe=e==null?void 0:e.path)==null?void 0:qe.split("/"))==null?void 0:y.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:K.join("/")),l.setActiveTopMenuPath((B=(V=e==null?void 0:e.path)==null?void 0:V.split("/"))==null?void 0:B[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}},pt=async(o,a)=>{var te,oe,le,ae,se,ie,re,ne,ce,pe,de,fe,he,ye,ve,ge,ke,Ce,De,Ie,Se,_e,Be,be,we,Te,Ee,Me,ue,xe,qe;let e=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),k=(oe=(te=e==null?void 0:e.data)==null?void 0:te.result)==null?void 0:oe[0],C=(le=k==null?void 0:k.value)==null?void 0:le.pageData;C.compData=(ae=C.compData)==null?void 0:ae.map(y=>{var K,V;return(y==null?void 0:y.key)==="menuContents"&&(y.contents=ze(y.contents,(K=a==null?void 0:a.path)==null?void 0:K.split("/"),a==null?void 0:a.title,(V=o==null?void 0:o.target)==null?void 0:V.value)),y}),k!=null&&k.id&&await N.updateInsofDataApi({id:k==null?void 0:k.id,value:{pageData:C}});let _=(ie=(se=a==null?void 0:a.path)==null?void 0:se.split("/"))==null?void 0:ie.filter((y,K)=>{var V,B;return K!==((B=(V=a==null?void 0:a.path)==null?void 0:V.split("/"))==null?void 0:B.length)-1}),z=_==null?void 0:_.join("/");_.push((re=o==null?void 0:o.target)==null?void 0:re.value),_=_==null?void 0:_.join("/");let M=await m.getItemData(z,sessionStorage.getItem("systemKey"),"");if(((fe=(de=(pe=(ce=(ne=M==null?void 0:M[0])==null?void 0:ne.compData)==null?void 0:ce.find(y=>(y==null?void 0:y.key)==="header"))==null?void 0:pe.contents)==null?void 0:de[0])==null?void 0:fe.directiveLabel)==="#isMain"){let y=(ke=(ge=(ve=(ye=(he=M==null?void 0:M[0])==null?void 0:he.compData)==null?void 0:ye.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:ve.contents)==null?void 0:ge[0])==null?void 0:ke.prop,K=(Ie=(De=(Ce=M==null?void 0:M[0])==null?void 0:Ce.compData)==null?void 0:De.find(d=>(d==null?void 0:d.key)==="tableContents"))==null?void 0:Ie.contents,V=(be=(Be=(_e=(Se=M==null?void 0:M[0])==null?void 0:Se.compData)==null?void 0:_e.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:Be.contents)==null?void 0:be.map(d=>d==null?void 0:d.prop),B;if(K==null||K.forEach(d=>{var S;let u=m.getValueToObjectValue(d,V);(u==null?void 0:u[y])===a.title&&(B=u,B[y]=(S=o==null?void 0:o.target)==null?void 0:S.value)}),B){let d={};for(let S in B)S!=="id"&&(d[S]=B==null?void 0:B[S]);let u=[{id:B==null?void 0:B.id,value:{tableData:d}}];await N.batchUpdateInsofDataApi({dataList:u})}}let H=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:a==null?void 0:a.path}}),j=(Te=(we=H==null?void 0:H.data)==null?void 0:we.result)==null?void 0:Te.map(y=>({id:y==null?void 0:y.id,key:y==null?void 0:y.key}));j=j==null?void 0:j.map(y=>(y.key.pageKey=_,y)),(j==null?void 0:j.length)>0&&await N.batchUpdateInsofDataApi({dataList:j}),l.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),l.setActiveMenuPath((ue=(Me=(Ee=a==null?void 0:a.path)==null?void 0:Ee.split("/"))==null?void 0:Me.filter((y,K)=>{var V,B;return K!==((B=(V=a==null?void 0:a.path)==null?void 0:V.split("/"))==null?void 0:B.length)-1}))==null?void 0:ue.join("/")),l.setActiveTopMenuPath((qe=(xe=a==null?void 0:a.path)==null?void 0:xe.split("/"))==null?void 0:qe[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0),q.value=void 0},dt=async(o,a)=>{R.type=rt(a==null?void 0:a.operateType),await ct(a,R.type,o),Y.value=o,Je.value=a},ft=()=>{R.show=!1},ht=o=>o==null?void 0:o.filter(a=>a.allowInherit),yt=()=>{var e,k,C,_,z;let o;R.type==="create"&&(o=((e=Y.value)==null?void 0:e.path)+"/"+ee.value[(k=ee.value)==null?void 0:k.prop]),R.type==="update"&&(o=(C=Y.value)==null?void 0:C.path);const a={...Y.value,config:ht((_=Y.value)==null?void 0:_.config),children:[],childMenus:[],title:ee.value[(z=ee.value)==null?void 0:z.prop],path:o};console.log("clickSubmitForm",Je.value,Y.value,a),nt(a),R.show=!1},vt=o=>{var e,k;const a=(e=o==null?void 0:o.contents)==null?void 0:e.find(C=>C.key==="formContent");a&&(ee.value=(k=a==null?void 0:a.contents)==null?void 0:k.reduce((C,_)=>(C[_.key]=_.value,C.prop=_.key,C),{}))},Z=t.ref(!1);return{isCollapse:Z,handleMenuCollapse:()=>{Z.value=!Z.value},handleCompChange:vt,dialogForm:st,dialogRenderComps:it,getComponents:at,clickSubmitForm:yt,dialogInfo:R,beforeDialogDestroy:ft,clickMenuIcon:dt,mode:Ne,renderMenuList:Ue,clickMenu:me,openMenu:et,closeMenu:tt,changeMenuStyle:X,fixElement:q,onBlur:pt,isSuperAdmin:Le}}}}const wt=t.defineComponent(Ze()),Tt=["title"],Et={key:1,class:"menu-title",style:{display:"flex",width:"100px"}},Mt={key:2,class:"menu-operate-icon"},ut={class:"menu-config-wrap"},xt=["onClick"],qt={class:"module-dialog-content"};function At(n,p,T,h,r,l){var P;const c=t.resolveComponent("ss-input"),w=t.resolveComponent("svg-icon"),x=t.resolveComponent("el-popover"),E=t.resolveComponent("ss-menu"),I=t.resolveComponent("el-button"),q=t.resolveComponent("ss-dialog");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(E,{class:"vertical-menu",mode:n.mode,menuList:n.renderMenuList,isCollapse:n.isCollapse,uniqueOpened:!0,onClickMenu:n.clickMenu,onOpenMenu:n.openMenu,onCloseMenu:n.closeMenu},{title:t.withCtx(({menu:s})=>{var Ve,Fe,Le,Ne;return[!n.fixElement||(s==null?void 0:s.path)!==((Ve=n.fixElement)==null?void 0:Ve.path)?(t.openBlock(),t.createElementBlock("span",{key:0,title:s.title,class:"menu-title",style:t.normalizeStyle({marginRight:s!=null&&s.config&&((Fe=s==null?void 0:s.config)==null?void 0:Fe.length)>0?"25px":"1px"})},t.toDisplayString(s.title??""),13,Tt)):t.createCommentVNode("",!0),n.fixElement&&(s==null?void 0:s.path)===((Le=n.fixElement)==null?void 0:Le.path)?(t.openBlock(),t.createElementBlock("span",Et,[t.createVNode(c,{value:s.title,onBlur:A=>n.onBlur(A,s)},null,8,["value","onBlur"])])):t.createCommentVNode("",!0),s!=null&&s.config&&((Ne=s==null?void 0:s.config)==null?void 0:Ne.length)>0&&n.isSuperAdmin?(t.openBlock(),t.createElementBlock("span",Mt,[t.createVNode(x,{title:"",placement:"bottom-start",trigger:"hover","popper-class":"menu-operate-popover"},{reference:t.withCtx(()=>[t.createVNode(w,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:t.withCtx(()=>[t.createElementVNode("div",ut,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s==null?void 0:s.config,A=>(t.openBlock(),t.createElementBlock("div",{class:"menu-config-item",key:A.id,onClick:Ue=>n.clickMenuIcon(s,A)},[t.createVNode(w,{name:A==null?void 0:A.operateIcon,style:{width:"15px",height:"15px","margin-right":"8px"}},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(A==null?void 0:A.operateType),1)],8,xt))),128))])]),_:2},1024)])):t.createCommentVNode("",!0)]}),_:1},8,["mode","menuList","isCollapse","onClickMenu","onOpenMenu","onCloseMenu"]),((P=n.renderMenuList)==null?void 0:P.length)>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fold-icon",onClick:p[0]||(p[0]=(...s)=>n.handleMenuCollapse&&n.handleMenuCollapse(...s))},[t.createVNode(w,{name:n.isCollapse?"expand":"pack",style:{width:"15px",height:"15px"}},null,8,["name"])])):t.createCommentVNode("",!0),t.createVNode(q,{class:"module-dialog",title:n.dialogInfo.title,visible:n.dialogInfo.show,width:n.dialogInfo.width,onBeforeDestroy:n.beforeDialogDestroy},{default:t.withCtx(()=>[t.createElementVNode("div",qt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.dialogRenderComps,s=>(t.openBlock(),t.createElementBlock("div",{key:s.id},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.getComponents((s==null?void 0:s.comp)??"Input")),{itemData:s==null?void 0:s.compData,key:s==null?void 0:s.id,content:(s==null?void 0:s.contents)??[],config:s==null?void 0:s.config,onContentChange:n.handleCompChange},null,40,["itemData","content","config","onContentChange"]))]))),128))])]),footer:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(I,{id:"themeBorderButton",onClick:n.beforeDialogDestroy},{default:t.withCtx(()=>p[1]||(p[1]=[t.createTextVNode("取消")])),_:1,__:[1]},8,["onClick"]),t.createVNode(I,{id:"themeButton",onClick:n.clickSubmitForm},{default:t.withCtx(()=>p[2]||(p[2]=[t.createTextVNode(" 确认 ")])),_:1,__:[2]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])],64)}const He=bt._export_sfc(wt,[["render",At],["__scopeId","data-v-b8641e04"]]),Kt=Object.freeze(Object.defineProperty({__proto__:null,addSelectMenu:Oe,default:He,deleteSelectMenu:Re,fixSelectMenu:ze,setComponent:Ze},Symbol.toStringTag,{value:"Module"}));exports._sfc_main=Ye;exports.index=Kt;exports.ssMenu=je;exports.ssVMenu=He;
1
+ "use strict";const t=require("vue"),U=require("./menu-DUkDo01b.cjs"),gt=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CA4D5g5S.cjs");const kt=require("./request-BC2w2vGr.cjs"),Ct=require("./index-CUw6nGTo.cjs"),Dt=require("./index-DOou0S80.cjs"),It=require("vue-router"),Ke=require("./index-RoXicHV9.cjs"),N=require("./index-CW4qJdP8.cjs"),St=require("./index-CcybWQ0a.cjs"),_t=require("./menuIndex-BkBrPObt.cjs"),m=require("./index-BcTkU3nu.cjs"),Pe=require("./index-92G6p6-P.cjs"),Bt=require("./index-g7Wgp9gu.cjs"),bt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),je=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DOou0S80.cjs")).then(n=>n.index));je.install=n=>{n.component("ssMenu",je)};const Ye={__name:"index",props:{name:String},setup(n){const p=n,T=t.computed(()=>kt.Icons[p.name]);return t.onMounted(()=>{}),(h,r)=>{const l=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(l,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(T.value)))]),_:1})}}},Re=(n,p,T=0)=>{let h=n;return h!=null&&h.every(r=>Array.isArray(r))&&(h!=null&&h.every(r=>Array.isArray(r)&&r.length===1)?h=h==null?void 0:h.filter(r=>(r==null?void 0:r[0])!==(p==null?void 0:p[T])):h=h==null?void 0:h.map(r=>{if(r!=null&&r.find(l=>l===(p==null?void 0:p[T]))&&(p==null?void 0:p.length)!==1){let l=U.cloneDeep(p),c=r==null?void 0:r.filter(I=>I!==(l==null?void 0:l[T])),w=T+1,x=Re(c,l,w),E=[];E.push(r==null?void 0:r[0]),x==null||x.forEach(I=>{E.push(I)}),r=E}return r})),h},Oe=(n,p,T,h=0)=>{let r=n;return r!=null&&r.every(l=>Array.isArray(l))&&(r!=null&&r.every(l=>Array.isArray(l)&&l.length===1)?r.push([T]):r=r==null?void 0:r.map(l=>{if(l!=null&&l.find(c=>c===(p==null?void 0:p[h]))&&(p==null?void 0:p.length)!==1){let c=U.cloneDeep(p),w=l==null?void 0:l.filter(q=>q!==(c==null?void 0:c[h])),x=h+1,E=Oe(w,c,T,x),I=[];I.push(l==null?void 0:l[0]),E==null||E.forEach(q=>{I.push(q)}),l=I}return l})),r},ze=(n,p,T,h,r=0)=>{let l=n;return l!=null&&l.every(c=>Array.isArray(c))&&(l!=null&&l.every(c=>Array.isArray(c)&&c.length===1)?l=l==null?void 0:l.map(c=>((c==null?void 0:c[0])===T&&(c=[h]),c)):l=l==null?void 0:l.map(c=>{if(c!=null&&c.find(w=>w===(p==null?void 0:p[r]))&&(p==null?void 0:p.length)!==1){let w=U.cloneDeep(p),x=c==null?void 0:c.filter(P=>P!==(w==null?void 0:w[r])),E=r+1,I=ze(x,w,T,h,E),q=[];q.push(c==null?void 0:c[0]),I==null||I.forEach(P=>{q.push(P)}),c=q}return c})),l};function Ze(n="menu"){return{name:n,components:{SvgIcon:gt.SvgIcon,ssMenu:je,DynamicIcon:Ye,ssDialog:Ct.ssDialog,ssInput:Dt.ssInput},setup(p,{emit:T}){const h=t.defineProps({mode:{type:String,default:"vertical"}}),r=t.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),l=U.useMenuState(),c=U.useModelComp(U.pinia),w=U.useLoginState(U.pinia),{loginUserInfo:x}=U.storeToRefs(w),E=t.ref(0),I=It.useRouter(),q=t.ref(),{asideMenus:P,menuTriggerType:s,platform:Ve}=U.storeToRefs(l),{fixMenuStatus:Fe}=U.storeToRefs(c),{isSuperAdmin:Le}=Bt.useRole(),Ne=t.computed(()=>h==null?void 0:h.mode),A=o=>o==null?void 0:o.map(e=>{var k,C;return!(e!=null&&e.children)||((k=e==null?void 0:e.children)==null?void 0:k.length)===0?e.config=r.value:e!=null&&e.children&&((C=e==null?void 0:e.children)==null?void 0:C.length)>0&&(e.children=A(e.children)),e}),Ue=t.computed(()=>{let o=[...P.value];if((o==null?void 0:o.length)===0)return I.push("/"),[];const a=lt(o,ot.value);return a.isFlag||(o=a==null?void 0:a.data),o=o==null?void 0:o.map(e=>{var k,C;return!(e!=null&&e.children)||((k=e==null?void 0:e.children)==null?void 0:k.length)===0?e.config=r.value:e!=null&&e.children&&((C=e==null?void 0:e.children)==null?void 0:C.length)>0&&(e.children=A(e.children)),e}),o}),me=async(o,a)=>{c.setRouteToChildPath(""),l.setMenuTriggerType("click"),l.setActiveMenuPath(o==null?void 0:o.path),l.setActiveAsideMenu(o),o.isRouter?I.push(o.path):I.push("/"),T("node-click",o,a)},et=async o=>{const a=_t.findNodeByPropInTree(Ue.value,"path",o);l.setActiveAsideMenu(a),c.setRouteToChildPath(""),Fe.value?c.setFixMenuStatus(!1):(Z.value&&(s.value="open"),s.value==="click"?E.value===1?l.setActiveMenuPath(sessionStorage.getItem("pageKey")):l.setActiveMenuPath(o):Z.value||(l.setMenuTriggerType("click"),l.setActiveMenuPath(o))),o!=null&&o.startsWith("/")?I.push(o):I.push("/"),E.value++},tt=o=>{Z.value||l.setActiveMenuPath(o)},X=o=>{const a=document.documentElement;o==null||o.forEach(e=>{a.style.setProperty(e.name,e.value)})};t.onMounted(()=>{E.value=1});const ot=t.computed(()=>{const o=sessionStorage.getItem("authority");return o?JSON.parse(o):[]});t.watch(()=>Ve.value,o=>{o==="browser"?X(Ke.browserVerticalMenuClasses):o==="client"?(X(Ke.clientHorizontalMenuClasses),X(Ke.clientVerticalMenuClasses)):o==="three"&&(X(Ke.threeHorizontalMenuClasses),X(Ke.threeVerticalMenuClasses))},{immediate:!0});const lt=(o,a)=>({isFlag:!0}),R=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),at=o=>St.getComponent(o),st=t.ref({}),it=t.ref([]),ee=t.ref({}),Y=t.ref({}),rt=o=>{switch(o){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Je=t.ref({}),nt=o=>{l.setCacheInputMenu({type:R.type,data:o}),l.setIsRefreshMenus(!0)},ct=async(o,a,e)=>{var k,C,_,z,M,H,j,te,oe,le,ae,se,ie,re,ne,ce,pe,de,fe,he,ye,ve,ge,ke,Ce,De,Ie,Se,_e,Be,be,we,Te,Ee,Me,ue,xe,qe,y,K,V,B;if(a==="create"){let d=(e==null?void 0:e.title)+"(1)",u=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(C=(k=u==null?void 0:u.data)==null?void 0:k.result)==null?void 0:C[0],J=(_=S==null?void 0:S.value)==null?void 0:_.pageData;J.compData=(z=J.compData)==null?void 0:z.map(i=>{var f;return(i==null?void 0:i.key)==="menuContents"&&(i.contents=Oe(i.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"),d)),i}),await N.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:J}});let F=(H=(M=e==null?void 0:e.path)==null?void 0:M.split("/"))==null?void 0:H.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}),L=await m.getItemData((oe=(te=(j=e==null?void 0:e.path)==null?void 0:j.split("/"))==null?void 0:te.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:oe.join("/"),sessionStorage.getItem("systemKey"),"");if(F.push(d),F=F==null?void 0:F.join("/"),(L==null?void 0:L.length)>0){let i=L==null?void 0:L[0],f=(ae=(le=i==null?void 0:i.compData)==null?void 0:le.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:ae.contents;if(((se=f==null?void 0:f[0])==null?void 0:se.directiveLabel)==="#isMain"){let g=(ie=f==null?void 0:f[0])==null?void 0:ie.prop,D=(ne=(re=i==null?void 0:i.compData)==null?void 0:re.find(b=>(b==null?void 0:b.key)==="tableContents"))==null?void 0:ne.contents,W;D==null||D.forEach(b=>{var G,O;if(b.length===1)((G=b==null?void 0:b[0])==null?void 0:G[g])===(e==null?void 0:e.title)&&(W=b==null?void 0:b[0],W[g]=d);else{let Q=(O=f==null?void 0:f.filter($=>$!=="操作"))==null?void 0:O.map($=>$==null?void 0:$.prop),$e=b==null?void 0:b.filter($=>!($!=null&&$.id)),Ae=m.getValueToObjectValue($e,Q);Ae[g]=d,W=Ae}}),await N.createInsofDataApi({key:{type:"data",pageKey:(de=(pe=(ce=e==null?void 0:e.path)==null?void 0:ce.split("/"))==null?void 0:pe.filter((b,G)=>{var O,Q;return G!==((Q=(O=e==null?void 0:e.path)==null?void 0:O.split("/"))==null?void 0:Q.length)-1}))==null?void 0:de.join("/"),tableId:i==null?void 0:i.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(fe=x.value)==null?void 0:fe.id,createUserLayer:((he=x.value)==null?void 0:he.dept)||((ye=x.value)==null?void 0:ye.部门名称)},value:{tableData:W}})}}await m.newLoadingConstruct(e==null?void 0:e.path,F),l.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),l.setActiveMenuPath((ke=(ge=(ve=e==null?void 0:e.path)==null?void 0:ve.split("/"))==null?void 0:ge.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:ke.join("/")),l.setActiveTopMenuPath((De=(Ce=e==null?void 0:e.path)==null?void 0:Ce.split("/"))==null?void 0:De[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}else if(a==="update")q.value=e;else if(a==="delete"){let d=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:e==null?void 0:e.path}}),u=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(Se=(Ie=u==null?void 0:u.data)==null?void 0:Ie.result)==null?void 0:Se[0],J=(_e=S==null?void 0:S.value)==null?void 0:_e.pageData;if(J.compData=(Be=J.compData)==null?void 0:Be.map(i=>{var f;return(i==null?void 0:i.key)==="menuContents"&&(i.contents=Re(i.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"))),i}),await N.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:J}}),((we=(be=d==null?void 0:d.data)==null?void 0:be.result)==null?void 0:we.length)>0){let i=(Ee=(Te=d==null?void 0:d.data)==null?void 0:Te.result)==null?void 0:Ee.map(f=>f==null?void 0:f.id);(i==null?void 0:i.length)>0&&await N.batchDeleteInsofDataApi({ids:i})}let F=await m.getItemData((xe=(ue=(Me=e==null?void 0:e.path)==null?void 0:Me.split("/"))==null?void 0:ue.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:xe.join("/"),sessionStorage.getItem("systemKey"),""),L=[];(F==null?void 0:F.length)>0&&(F==null||F.forEach(i=>{var g,D,W,b,G,O,Q,$e,Ae,$,We;let f=(b=(W=(D=(g=i==null?void 0:i.compData)==null?void 0:g.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:D.contents)==null?void 0:W[0])==null?void 0:b.prop;(($e=(Q=(O=(G=i==null?void 0:i.compData)==null?void 0:G.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:O.contents)==null?void 0:Q[0])==null?void 0:$e.directiveLabel)==="#isMain"&&((We=($=(Ae=i==null?void 0:i.compData)==null?void 0:Ae.find(v=>(v==null?void 0:v.key)==="tableContents"))==null?void 0:$.contents)==null||We.forEach(v=>{var Ge,Qe,Xe;(v==null?void 0:v.length)>1?(v==null?void 0:v[1])===(e==null?void 0:e.title)&&L.push((Ge=v==null?void 0:v[0])==null?void 0:Ge.id):((Qe=v==null?void 0:v[0])==null?void 0:Qe[f])===(e==null?void 0:e.title)&&L.push((Xe=v==null?void 0:v[0])==null?void 0:Xe.id)}))})),(L==null?void 0:L.length)>0&&await N.batchDeleteInsofDataApi({ids:L}),l.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),l.setActiveMenuPath((K=(y=(qe=e==null?void 0:e.path)==null?void 0:qe.split("/"))==null?void 0:y.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:K.join("/")),l.setActiveTopMenuPath((B=(V=e==null?void 0:e.path)==null?void 0:V.split("/"))==null?void 0:B[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}},pt=async(o,a)=>{var te,oe,le,ae,se,ie,re,ne,ce,pe,de,fe,he,ye,ve,ge,ke,Ce,De,Ie,Se,_e,Be,be,we,Te,Ee,Me,ue,xe,qe;let e=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),k=(oe=(te=e==null?void 0:e.data)==null?void 0:te.result)==null?void 0:oe[0],C=(le=k==null?void 0:k.value)==null?void 0:le.pageData;C.compData=(ae=C.compData)==null?void 0:ae.map(y=>{var K,V;return(y==null?void 0:y.key)==="menuContents"&&(y.contents=ze(y.contents,(K=a==null?void 0:a.path)==null?void 0:K.split("/"),a==null?void 0:a.title,(V=o==null?void 0:o.target)==null?void 0:V.value)),y}),k!=null&&k.id&&await N.updateInsofDataApi({id:k==null?void 0:k.id,value:{pageData:C}});let _=(ie=(se=a==null?void 0:a.path)==null?void 0:se.split("/"))==null?void 0:ie.filter((y,K)=>{var V,B;return K!==((B=(V=a==null?void 0:a.path)==null?void 0:V.split("/"))==null?void 0:B.length)-1}),z=_==null?void 0:_.join("/");_.push((re=o==null?void 0:o.target)==null?void 0:re.value),_=_==null?void 0:_.join("/");let M=await m.getItemData(z,sessionStorage.getItem("systemKey"),"");if(((fe=(de=(pe=(ce=(ne=M==null?void 0:M[0])==null?void 0:ne.compData)==null?void 0:ce.find(y=>(y==null?void 0:y.key)==="header"))==null?void 0:pe.contents)==null?void 0:de[0])==null?void 0:fe.directiveLabel)==="#isMain"){let y=(ke=(ge=(ve=(ye=(he=M==null?void 0:M[0])==null?void 0:he.compData)==null?void 0:ye.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:ve.contents)==null?void 0:ge[0])==null?void 0:ke.prop,K=(Ie=(De=(Ce=M==null?void 0:M[0])==null?void 0:Ce.compData)==null?void 0:De.find(d=>(d==null?void 0:d.key)==="tableContents"))==null?void 0:Ie.contents,V=(be=(Be=(_e=(Se=M==null?void 0:M[0])==null?void 0:Se.compData)==null?void 0:_e.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:Be.contents)==null?void 0:be.map(d=>d==null?void 0:d.prop),B;if(K==null||K.forEach(d=>{var S;let u=m.getValueToObjectValue(d,V);(u==null?void 0:u[y])===a.title&&(B=u,B[y]=(S=o==null?void 0:o.target)==null?void 0:S.value)}),B){let d={};for(let S in B)S!=="id"&&(d[S]=B==null?void 0:B[S]);let u=[{id:B==null?void 0:B.id,value:{tableData:d}}];await N.batchUpdateInsofDataApi({dataList:u})}}let H=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:a==null?void 0:a.path}}),j=(Te=(we=H==null?void 0:H.data)==null?void 0:we.result)==null?void 0:Te.map(y=>({id:y==null?void 0:y.id,key:y==null?void 0:y.key}));j=j==null?void 0:j.map(y=>(y.key.pageKey=_,y)),(j==null?void 0:j.length)>0&&await N.batchUpdateInsofDataApi({dataList:j}),l.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),l.setActiveMenuPath((ue=(Me=(Ee=a==null?void 0:a.path)==null?void 0:Ee.split("/"))==null?void 0:Me.filter((y,K)=>{var V,B;return K!==((B=(V=a==null?void 0:a.path)==null?void 0:V.split("/"))==null?void 0:B.length)-1}))==null?void 0:ue.join("/")),l.setActiveTopMenuPath((qe=(xe=a==null?void 0:a.path)==null?void 0:xe.split("/"))==null?void 0:qe[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0),q.value=void 0},dt=async(o,a)=>{R.type=rt(a==null?void 0:a.operateType),await ct(a,R.type,o),Y.value=o,Je.value=a},ft=()=>{R.show=!1},ht=o=>o==null?void 0:o.filter(a=>a.allowInherit),yt=()=>{var e,k,C,_,z;let o;R.type==="create"&&(o=((e=Y.value)==null?void 0:e.path)+"/"+ee.value[(k=ee.value)==null?void 0:k.prop]),R.type==="update"&&(o=(C=Y.value)==null?void 0:C.path);const a={...Y.value,config:ht((_=Y.value)==null?void 0:_.config),children:[],childMenus:[],title:ee.value[(z=ee.value)==null?void 0:z.prop],path:o};console.log("clickSubmitForm",Je.value,Y.value,a),nt(a),R.show=!1},vt=o=>{var e,k;const a=(e=o==null?void 0:o.contents)==null?void 0:e.find(C=>C.key==="formContent");a&&(ee.value=(k=a==null?void 0:a.contents)==null?void 0:k.reduce((C,_)=>(C[_.key]=_.value,C.prop=_.key,C),{}))},Z=t.ref(!1);return{isCollapse:Z,handleMenuCollapse:()=>{Z.value=!Z.value},handleCompChange:vt,dialogForm:st,dialogRenderComps:it,getComponents:at,clickSubmitForm:yt,dialogInfo:R,beforeDialogDestroy:ft,clickMenuIcon:dt,mode:Ne,renderMenuList:Ue,clickMenu:me,openMenu:et,closeMenu:tt,changeMenuStyle:X,fixElement:q,onBlur:pt,isSuperAdmin:Le}}}}const wt=t.defineComponent(Ze()),Tt=["title"],Et={key:1,class:"menu-title",style:{display:"flex",width:"100px"}},Mt={key:2,class:"menu-operate-icon"},ut={class:"menu-config-wrap"},xt=["onClick"],qt={class:"module-dialog-content"};function At(n,p,T,h,r,l){var P;const c=t.resolveComponent("ss-input"),w=t.resolveComponent("svg-icon"),x=t.resolveComponent("el-popover"),E=t.resolveComponent("ss-menu"),I=t.resolveComponent("el-button"),q=t.resolveComponent("ss-dialog");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(E,{class:"vertical-menu",mode:n.mode,menuList:n.renderMenuList,isCollapse:n.isCollapse,uniqueOpened:!0,onClickMenu:n.clickMenu,onOpenMenu:n.openMenu,onCloseMenu:n.closeMenu},{title:t.withCtx(({menu:s})=>{var Ve,Fe,Le,Ne;return[!n.fixElement||(s==null?void 0:s.path)!==((Ve=n.fixElement)==null?void 0:Ve.path)?(t.openBlock(),t.createElementBlock("span",{key:0,title:s.title,class:"menu-title",style:t.normalizeStyle({marginRight:s!=null&&s.config&&((Fe=s==null?void 0:s.config)==null?void 0:Fe.length)>0?"25px":"1px"})},t.toDisplayString(s.title??""),13,Tt)):t.createCommentVNode("",!0),n.fixElement&&(s==null?void 0:s.path)===((Le=n.fixElement)==null?void 0:Le.path)?(t.openBlock(),t.createElementBlock("span",Et,[t.createVNode(c,{value:s.title,onBlur:A=>n.onBlur(A,s)},null,8,["value","onBlur"])])):t.createCommentVNode("",!0),s!=null&&s.config&&((Ne=s==null?void 0:s.config)==null?void 0:Ne.length)>0&&n.isSuperAdmin?(t.openBlock(),t.createElementBlock("span",Mt,[t.createVNode(x,{title:"",placement:"bottom-start",trigger:"hover","popper-class":"menu-operate-popover"},{reference:t.withCtx(()=>[t.createVNode(w,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:t.withCtx(()=>[t.createElementVNode("div",ut,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s==null?void 0:s.config,A=>(t.openBlock(),t.createElementBlock("div",{class:"menu-config-item",key:A.id,onClick:Ue=>n.clickMenuIcon(s,A)},[t.createVNode(w,{name:A==null?void 0:A.operateIcon,style:{width:"15px",height:"15px","margin-right":"8px"}},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(A==null?void 0:A.operateType),1)],8,xt))),128))])]),_:2},1024)])):t.createCommentVNode("",!0)]}),_:1},8,["mode","menuList","isCollapse","onClickMenu","onOpenMenu","onCloseMenu"]),((P=n.renderMenuList)==null?void 0:P.length)>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fold-icon",onClick:p[0]||(p[0]=(...s)=>n.handleMenuCollapse&&n.handleMenuCollapse(...s))},[t.createVNode(w,{name:n.isCollapse?"expand":"pack",style:{width:"15px",height:"15px"}},null,8,["name"])])):t.createCommentVNode("",!0),t.createVNode(q,{class:"module-dialog",title:n.dialogInfo.title,visible:n.dialogInfo.show,width:n.dialogInfo.width,onBeforeDestroy:n.beforeDialogDestroy},{default:t.withCtx(()=>[t.createElementVNode("div",qt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.dialogRenderComps,s=>(t.openBlock(),t.createElementBlock("div",{key:s.id},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.getComponents((s==null?void 0:s.comp)??"Input")),{itemData:s==null?void 0:s.compData,key:s==null?void 0:s.id,content:(s==null?void 0:s.contents)??[],config:s==null?void 0:s.config,onContentChange:n.handleCompChange},null,40,["itemData","content","config","onContentChange"]))]))),128))])]),footer:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(I,{id:"themeBorderButton",onClick:n.beforeDialogDestroy},{default:t.withCtx(()=>p[1]||(p[1]=[t.createTextVNode("取消")])),_:1,__:[1]},8,["onClick"]),t.createVNode(I,{id:"themeButton",onClick:n.clickSubmitForm},{default:t.withCtx(()=>p[2]||(p[2]=[t.createTextVNode(" 确认 ")])),_:1,__:[2]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])],64)}const He=bt._export_sfc(wt,[["render",At],["__scopeId","data-v-b8641e04"]]),Kt=Object.freeze(Object.defineProperty({__proto__:null,addSelectMenu:Oe,default:He,deleteSelectMenu:Re,fixSelectMenu:ze,setComponent:Ze},Symbol.toStringTag,{value:"Module"}));exports._sfc_main=Ye;exports.index=Kt;exports.ssMenu=je;exports.ssVMenu=He;
@@ -1,5 +1,5 @@
1
1
  import { ref as l, defineComponent as m, createElementBlock as f, openBlock as p, createElementVNode as e, createVNode as u, unref as t } from "vue";
2
- import { Z as C } from "./index-B47-vpvz.js";
2
+ import { Z as C } from "./index-xocA7N1o.js";
3
3
  import { _ as g } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const b = () => {
5
5
  const i = l("日志管理"), o = l(), a = l([