xto-fronted 0.4.84 → 0.4.86

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 (303) hide show
  1. package/dist/assets/404-BNfk6aVM.js +1 -0
  2. package/dist/assets/404-ByYjFnhI.js +1 -0
  3. package/dist/assets/404-CH5_LdtS.css +1 -0
  4. package/dist/assets/404-sqW80Hc-.css +1 -0
  5. package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
  6. package/dist/assets/index-BBhC8PX4.js +1 -0
  7. package/dist/assets/index-BOEFG4lP.css +1 -0
  8. package/dist/assets/index-BRR97dc6.js +1 -0
  9. package/dist/assets/index-BSa4SMHI.js +1 -0
  10. package/dist/assets/index-BihVoviB.js +1 -0
  11. package/dist/assets/index-Bmux4tGG.js +1 -0
  12. package/dist/assets/index-BrvR0Fn_.css +1 -0
  13. package/dist/assets/index-C4ZCZoPp.js +1 -0
  14. package/dist/assets/index-CMgRqiaT.js +1 -0
  15. package/dist/assets/index-CUh_s55Z.css +1 -0
  16. package/dist/assets/index-CV768Wu1.js +1 -0
  17. package/dist/assets/index-D0OnMilp.js +1 -0
  18. package/dist/assets/index-D9wlAuR_.js +1 -0
  19. package/dist/assets/index-DPkO-STg.js +1 -0
  20. package/dist/assets/index-DawJb02s.css +1 -0
  21. package/dist/assets/index-DcFOybjo.js +1 -0
  22. package/dist/assets/index-DiHSZ6SJ.js +2 -0
  23. package/dist/assets/index-GDP-IkXE.css +1 -0
  24. package/dist/assets/index-Gx75raue.js +2 -0
  25. package/dist/assets/index-JsZ6rkQj.js +1 -0
  26. package/dist/assets/index-PfV8pzQz.css +1 -0
  27. package/dist/assets/index-Swfu6yvD.css +1 -0
  28. package/dist/assets/index-eQ-JQMk3.css +1 -0
  29. package/dist/assets/vendor-42ANG6Sg.js +6 -0
  30. package/dist/assets/vite-Dw-pgLOX.js +1 -0
  31. package/dist/assets/vue-vendor-05sbU7Th.js +29 -0
  32. package/dist/assets/vue-vendor-Br-l7wbK.js +29 -0
  33. package/dist/assets/xto-base-BSTP-Yn2.js +1 -0
  34. package/dist/assets/xto-base-C-IBqjVs.js +1 -0
  35. package/dist/assets/xto-base-C6eqMPdO.css +1 -0
  36. package/dist/assets/xto-base-CL2NKZJJ.css +1 -0
  37. package/dist/assets/xto-business--V1F5Gwb.css +1 -0
  38. package/dist/assets/xto-core-DZK7Cyg0.js +1 -0
  39. package/dist/assets/xto-core-cL8BAdce.js +1 -0
  40. package/dist/assets/xto-data-BFpiDgJi.js +1 -0
  41. package/dist/assets/xto-data-CnAQAQH2.css +1 -0
  42. package/dist/assets/xto-data-Cw0dv5K5.js +1 -0
  43. package/dist/assets/xto-data-MxZsiJgi.css +1 -0
  44. package/dist/assets/xto-feedback-B2M02fn3.js +1 -0
  45. package/dist/assets/xto-feedback-Bxx38c3P.css +1 -0
  46. package/dist/assets/xto-feedback-ByaS-C7_.css +1 -0
  47. package/dist/assets/xto-feedback-CTk0sMCW.js +1 -0
  48. package/dist/assets/xto-form-C5i2lk3C.js +1 -0
  49. package/dist/assets/xto-form-CrsyAjyr.css +1 -0
  50. package/dist/assets/xto-form-Cu6q3VLG.css +1 -0
  51. package/dist/assets/xto-form-NRjKKNcY.js +1 -0
  52. package/dist/assets/xto-layout-BDD6sSlM.css +1 -0
  53. package/dist/assets/xto-layout-D1stVnJI.css +1 -0
  54. package/dist/assets/xto-navigation-BuRQVoD8.css +1 -0
  55. package/dist/assets/xto-navigation-DHsTg0WG.js +1 -0
  56. package/dist/assets/xto-navigation-XfpyMpEo.css +1 -0
  57. package/dist/assets/xto-navigation-qLRTxo68.js +1 -0
  58. package/dist/index-0h_oG71z.js +345 -0
  59. package/dist/index-1EEezXR3.js +142 -0
  60. package/dist/index-1EkaJDoD.js +142 -0
  61. package/dist/index-1VN-SSaj.js +2873 -0
  62. package/dist/index-23nX2t9j.js +142 -0
  63. package/dist/index-2RwL0s53.js +142 -0
  64. package/dist/index-2tvOdd6w.js +372 -0
  65. package/dist/index-3zeoNaqT.js +345 -0
  66. package/dist/index-8oCLh51t.js +475 -0
  67. package/dist/index-AF5JN8Up.js +142 -0
  68. package/dist/index-B02xiP9g.js +372 -0
  69. package/dist/index-B05xso4D.js +345 -0
  70. package/dist/index-B1VS4tRU.js +475 -0
  71. package/dist/index-B3_VQZ-d.js +372 -0
  72. package/dist/index-B3kL6i_g.js +345 -0
  73. package/dist/index-B4Wny0vt.js +345 -0
  74. package/dist/index-B5RdBQ-f.js +475 -0
  75. package/dist/index-B5rbuoWS.js +2835 -0
  76. package/dist/index-BAFpPlnI.js +475 -0
  77. package/dist/index-BAJakzRz.js +142 -0
  78. package/dist/index-BAOHlfVd.js +142 -0
  79. package/dist/index-BAzJWzWG.js +2852 -0
  80. package/dist/index-BEIxh_R3.js +2982 -0
  81. package/dist/index-BEWrRNps.js +475 -0
  82. package/dist/index-BFtKVmzo.js +142 -0
  83. package/dist/index-BHPrW1wN.js +142 -0
  84. package/dist/index-BHQIqN1E.js +372 -0
  85. package/dist/index-BHZ_y8lp.js +2067 -0
  86. package/dist/index-BHvnTk5Z.js +475 -0
  87. package/dist/index-BIf7CYCW.js +475 -0
  88. package/dist/index-BK1Y1z9_.js +142 -0
  89. package/dist/index-BK8qDl14.js +372 -0
  90. package/dist/index-BKnta6nv.js +372 -0
  91. package/dist/index-BLIem13z.js +345 -0
  92. package/dist/index-BNBv_FCu.js +142 -0
  93. package/dist/index-BNwtCm83.js +345 -0
  94. package/dist/index-BOEMA7WH.js +345 -0
  95. package/dist/index-BOwDukt-.js +2346 -0
  96. package/dist/index-BR9WVjrV.js +2851 -0
  97. package/dist/index-BRMkw154.js +475 -0
  98. package/dist/index-BRQBannD.js +345 -0
  99. package/dist/index-BShKtLTm.js +475 -0
  100. package/dist/index-BVpqTdd2.js +3132 -0
  101. package/dist/index-BWGQANAN.js +2851 -0
  102. package/dist/index-BZKw7U60.js +475 -0
  103. package/dist/index-BadGWG4q.js +475 -0
  104. package/dist/index-BbeWpCd3.js +345 -0
  105. package/dist/index-BeUYNx5P.js +475 -0
  106. package/dist/index-BgiGtxRr.js +142 -0
  107. package/dist/index-BhKJLk9M.js +2824 -0
  108. package/dist/index-BijsKQ3r.js +475 -0
  109. package/dist/index-BjEfspqP.js +475 -0
  110. package/dist/index-BjEnT8WQ.js +372 -0
  111. package/dist/index-BpOcz1m4.js +142 -0
  112. package/dist/index-BrRdLbLB.js +142 -0
  113. package/dist/index-BsHOXfCq.js +372 -0
  114. package/dist/index-Bt5ocakb.js +475 -0
  115. package/dist/index-BtE24Mt4.js +142 -0
  116. package/dist/index-BvcBQjw6.js +2836 -0
  117. package/dist/index-C0krZRWf.js +2859 -0
  118. package/dist/index-C1cKUqmA.js +372 -0
  119. package/dist/index-C3ANmIDM.js +475 -0
  120. package/dist/index-C5JrEkwD.js +345 -0
  121. package/dist/index-C5m4qNMQ.js +2851 -0
  122. package/dist/index-C69vu_ot.js +3147 -0
  123. package/dist/index-C6Um6eFy.js +475 -0
  124. package/dist/index-C75ePQYC.js +372 -0
  125. package/dist/index-C7wKLGhC.js +142 -0
  126. package/dist/index-C8DBDnxx.js +2836 -0
  127. package/dist/index-CAnqlIjX.js +475 -0
  128. package/dist/index-CB36fztK.js +345 -0
  129. package/dist/index-CBKo6Enz.js +345 -0
  130. package/dist/index-CBcuyFIa.js +2326 -0
  131. package/dist/index-CCxIu4ex.js +372 -0
  132. package/dist/index-CD1ZEMzL.js +2836 -0
  133. package/dist/index-CDx-6tvY.js +345 -0
  134. package/dist/index-CGrvOpdb.js +372 -0
  135. package/dist/index-CHJWNf3f.js +475 -0
  136. package/dist/index-CIb06BxE.js +372 -0
  137. package/dist/index-CLiJcB9v.js +142 -0
  138. package/dist/index-CNS6Ohfw.js +2853 -0
  139. package/dist/index-COkjB5Jm.js +142 -0
  140. package/dist/index-CS5h1O5W.js +345 -0
  141. package/dist/index-CT0deRSL.js +372 -0
  142. package/dist/index-CTQQBaf4.js +345 -0
  143. package/dist/index-CUAC0ZFB.js +475 -0
  144. package/dist/index-CVMV9Tfg.js +142 -0
  145. package/dist/index-CWOx59Vc.js +142 -0
  146. package/dist/index-CWdSR99B.js +372 -0
  147. package/dist/index-CWvOcS8Y.js +345 -0
  148. package/dist/index-C_8yJlf1.js +475 -0
  149. package/dist/index-C_MzXmh2.js +2830 -0
  150. package/dist/index-Cb7HXiBR.js +372 -0
  151. package/dist/index-CbA8oUvZ.js +142 -0
  152. package/dist/index-CbEIzXG9.js +475 -0
  153. package/dist/index-Cb_m0zz1.js +475 -0
  154. package/dist/index-Cc6HgGzc.js +142 -0
  155. package/dist/index-CcWdW9Mj.js +372 -0
  156. package/dist/index-CdAqkP8L.js +345 -0
  157. package/dist/index-CeVUHSt9.js +2847 -0
  158. package/dist/index-CejRpy0a.js +475 -0
  159. package/dist/index-Cg5wO_jJ.js +372 -0
  160. package/dist/index-CgZM1vHq.js +372 -0
  161. package/dist/index-CgofFg1D.js +372 -0
  162. package/dist/index-ChheXGDK.js +372 -0
  163. package/dist/index-ChuFHoI0.js +372 -0
  164. package/dist/index-CiOJZ6_b.js +372 -0
  165. package/dist/index-ClCWmz_7.js +2844 -0
  166. package/dist/index-CmajGrKA.js +142 -0
  167. package/dist/index-Cn_4o3fi.js +345 -0
  168. package/dist/index-CoJBI1vE.js +345 -0
  169. package/dist/index-CqLLaQ-P.js +372 -0
  170. package/dist/index-CsRhLwmR.js +475 -0
  171. package/dist/index-CttJvDTG.js +475 -0
  172. package/dist/index-Cu3m9UeX.js +345 -0
  173. package/dist/index-CyQbOMHa.js +2859 -0
  174. package/dist/index-D-NcbLKL.js +345 -0
  175. package/dist/index-D0gstkiI.js +2836 -0
  176. package/dist/index-D0krzDtx.js +475 -0
  177. package/dist/index-D1moFd4V.js +372 -0
  178. package/dist/index-D2Hs4bZj.js +345 -0
  179. package/dist/index-D4QhrTZs.js +475 -0
  180. package/dist/index-D6CC02F-.js +372 -0
  181. package/dist/index-D6s7Za5s.js +142 -0
  182. package/dist/index-D7i5bck2.js +3132 -0
  183. package/dist/index-D8YBeNfn.js +345 -0
  184. package/dist/index-D93bv6lU.js +372 -0
  185. package/dist/index-DAX_bFj5.js +142 -0
  186. package/dist/index-DBii9cjr.js +475 -0
  187. package/dist/index-DBzpSkNi.js +345 -0
  188. package/dist/index-DCuKNBck.js +3153 -0
  189. package/dist/index-DE3uKf0K.js +142 -0
  190. package/dist/index-DGAqp0QX.js +372 -0
  191. package/dist/index-DGh_w_v1.js +475 -0
  192. package/dist/index-DItKvJyI.js +475 -0
  193. package/dist/index-DKAyB0fv.js +345 -0
  194. package/dist/index-DKN4xsXi.js +2851 -0
  195. package/dist/index-DN_iIn8V.js +345 -0
  196. package/dist/index-DONIBpuJ.js +345 -0
  197. package/dist/index-DPDK8Ht4.js +2851 -0
  198. package/dist/index-DPr3ldST.js +2354 -0
  199. package/dist/index-DS1wfdxM.js +142 -0
  200. package/dist/index-DUW5cCh8.js +372 -0
  201. package/dist/index-DUv28uVd.js +142 -0
  202. package/dist/index-DVS-5SZn.js +475 -0
  203. package/dist/index-DWI51JAp.js +372 -0
  204. package/dist/index-DWVmEexu.js +475 -0
  205. package/dist/index-DXf9wUqQ.js +142 -0
  206. package/dist/index-DXmB-sjP.js +345 -0
  207. package/dist/index-DY_e_Dxv.js +372 -0
  208. package/dist/index-DZar-us7.js +142 -0
  209. package/dist/index-D_nwqVrw.js +2847 -0
  210. package/dist/index-DbEeir7h.js +2834 -0
  211. package/dist/index-Dbf5ypbh.js +142 -0
  212. package/dist/index-DcSK-2pt.js +345 -0
  213. package/dist/index-DclK-Mc7.js +2864 -0
  214. package/dist/index-DcnzaxVi.js +142 -0
  215. package/dist/index-Dd8PlF0M.js +2857 -0
  216. package/dist/index-DdkVT39s.js +345 -0
  217. package/dist/index-DeLbU1t-.js +345 -0
  218. package/dist/index-DfV_J8Te.js +345 -0
  219. package/dist/index-DgPnNd8U.js +475 -0
  220. package/dist/index-Dg_JLa7s.js +345 -0
  221. package/dist/index-Di2VPQjn.js +345 -0
  222. package/dist/index-DibHUbqc.js +372 -0
  223. package/dist/index-DjCVSrpw.js +475 -0
  224. package/dist/index-Djdb936p.js +142 -0
  225. package/dist/index-DmFL_GSt.js +142 -0
  226. package/dist/index-DmP4X2k0.js +372 -0
  227. package/dist/index-DmtmRd1r.js +372 -0
  228. package/dist/index-Dn8MA3kh.js +475 -0
  229. package/dist/index-Do7uXDSi.js +2071 -0
  230. package/dist/index-Dpv1M9Hu.js +372 -0
  231. package/dist/index-DqUuZC8f.js +372 -0
  232. package/dist/index-DtEXQIjn.js +372 -0
  233. package/dist/index-Dtw-qZ0V.js +372 -0
  234. package/dist/index-Dv3hIz8H.js +345 -0
  235. package/dist/index-Dv9jnaWp.js +345 -0
  236. package/dist/index-Dw8KZwGJ.js +2354 -0
  237. package/dist/index-DwJILh-Q.js +3149 -0
  238. package/dist/index-DwzGV3B9.js +142 -0
  239. package/dist/index-DyybaRkK.js +345 -0
  240. package/dist/index-DzerABZq.js +372 -0
  241. package/dist/index-F53NVkhc.js +142 -0
  242. package/dist/index-Fl0_k4XF.js +475 -0
  243. package/dist/index-HMYRCPrs.js +2326 -0
  244. package/dist/index-I49wpmT-.js +372 -0
  245. package/dist/index-IPv1O8Zq.js +345 -0
  246. package/dist/index-JLqnaery.js +372 -0
  247. package/dist/index-JRCQ1CYj.js +142 -0
  248. package/dist/index-L86-iO8O.js +345 -0
  249. package/dist/index-Q56EoFor.js +142 -0
  250. package/dist/index-QxKMr6p0.js +2829 -0
  251. package/dist/index-THRvW9Xm.js +2856 -0
  252. package/dist/index-WIUmTlfL.js +345 -0
  253. package/dist/index-WRrsK0pR.js +475 -0
  254. package/dist/index-Wq652QGf.js +2836 -0
  255. package/dist/index-YnSLCdjP.js +475 -0
  256. package/dist/index-Ynf0lvBE.js +142 -0
  257. package/dist/index-_OtTmb9i.js +142 -0
  258. package/dist/index-_oqoy_3D.js +142 -0
  259. package/dist/index-cl4Y-BWw.js +475 -0
  260. package/dist/index-d_eHJkDW.js +475 -0
  261. package/dist/index-dnmEyUWB.js +372 -0
  262. package/dist/index-dz6CwD6A.js +142 -0
  263. package/dist/index-g4rkaRry.js +475 -0
  264. package/dist/index-g9bRMdAX.js +142 -0
  265. package/dist/index-h4z4-a2p.js +2852 -0
  266. package/dist/index-h7BhcQYM.js +475 -0
  267. package/dist/index-hI3qofTF.js +345 -0
  268. package/dist/index-iyQQumAA.js +372 -0
  269. package/dist/index-js_OhKON.js +345 -0
  270. package/dist/index-kgb4MdHr.js +475 -0
  271. package/dist/index-logKl0VM.js +3144 -0
  272. package/dist/index-lrFMrOlR.js +3132 -0
  273. package/dist/index-mEHxtQWj.js +372 -0
  274. package/dist/index-mNm1BV3n.js +2857 -0
  275. package/dist/index-oOzAFXfr.js +142 -0
  276. package/dist/index-s3vGq0ro.js +345 -0
  277. package/dist/index-wt7AbUqc.js +2342 -0
  278. package/dist/index.es.js +1 -1
  279. package/dist/index.html +28 -0
  280. package/dist/index.umd.js +1 -8
  281. package/dist/style.css +1 -1
  282. package/package.json +87 -91
  283. package/src/App.vue +1 -30
  284. package/src/assets/styles/_root.scss +97 -141
  285. package/src/assets/styles/_variables.scss +19 -44
  286. package/src/assets/styles/index.scss +42 -267
  287. package/src/components/Layout/Sidebar.vue +2 -43
  288. package/src/components/Layout/TopMenu.vue +12 -37
  289. package/src/components/Layout/index.vue +0 -1
  290. package/src/utils/request.ts +1 -18
  291. package/src/views/dashboard/index.vue +155 -417
  292. package/src/views/error/403.vue +56 -251
  293. package/src/views/error/404.vue +56 -253
  294. package/src/views/login/index.vue +194 -586
  295. package/src/views/system/menu/index.vue +94 -403
  296. package/src/views/system/role/index.vue +69 -348
  297. package/src/views/system/user/index.vue +73 -402
  298. package/dist/index-BZaqYObA.js +0 -479
  299. package/dist/index-CbwOysFI.js +0 -641
  300. package/dist/index-Jynxhhda.js +0 -189
  301. package/dist/index-XgzSS-fV.js +0 -515
  302. package/dist/index-_iZKFlCa.js +0 -4178
  303. package/src/types/json-bigint.d.ts +0 -18
@@ -0,0 +1,2836 @@
1
+ import { ref as g, computed as k, watch as Ae, defineComponent as ee, openBlock as i, createElementBlock as m, normalizeClass as F, createElementVNode as e, withDirectives as tt, toDisplayString as C, unref as n, vShow as pt, createCommentVNode as B, createVNode as h, withCtx as M, Fragment as j, renderList as H, createBlock as K, createTextVNode as pe, onMounted as Pe, onUnmounted as Oe, withModifiers as Te, Transition as Le, withKeys as st, vModelText as vt, normalizeStyle as ke, resolveComponent as _t, reactive as Ve } from "vue";
2
+ import { defineStore as Ee } from "pinia";
3
+ import { useRoute as ve, useRouter as ne, createRouter as Fe, createWebHistory as Be } from "vue-router";
4
+ import { Menu as Ke, SubMenu as ot, MenuItem as we, Tabs as ht, TabPane as ft } from "@xto/navigation";
5
+ import { Icon as L, Button as Ue } from "@xto/base";
6
+ import { Drawer as je, Message as oe } from "@xto/feedback";
7
+ import { Form as gt, FormItem as xe, Input as Ze, Checkbox as yt } from "@xto/form";
8
+ import kt from "axios";
9
+ const ge = "xto_", nt = (t) => ({
10
+ get(o) {
11
+ const a = t.getItem(ge + o);
12
+ if (!a) return null;
13
+ try {
14
+ return JSON.parse(a);
15
+ } catch {
16
+ return a;
17
+ }
18
+ },
19
+ set(o, a) {
20
+ if (a == null) {
21
+ t.removeItem(ge + o);
22
+ return;
23
+ }
24
+ const r = typeof a == "string" ? a : JSON.stringify(a);
25
+ t.setItem(ge + o, r);
26
+ },
27
+ remove(o) {
28
+ t.removeItem(ge + o);
29
+ },
30
+ clear() {
31
+ Object.keys(t).forEach((a) => {
32
+ a.startsWith(ge) && t.removeItem(a);
33
+ });
34
+ }
35
+ }), Ce = nt(window.localStorage), $e = nt(window.sessionStorage), b = {
36
+ get: Ce.get,
37
+ set: Ce.set,
38
+ remove: Ce.remove,
39
+ clear: Ce.clear
40
+ }, ia = {
41
+ get: $e.get,
42
+ set: $e.set,
43
+ remove: $e.remove,
44
+ clear: $e.clear
45
+ }, ae = Ee("app", () => {
46
+ const t = g(b.get("appName") || "XTO App"), o = g(b.get("indexPath") || "/dashboard"), a = g(b.get("isDark") || !1), r = g(b.get("theme") || "light"), l = g(b.get("layout") || "sidebar"), u = g(b.get("isCollapsed") || !1), $ = g(b.get("showTabs") ?? !0), d = g(b.get("showFooter") ?? !0), f = g(b.get("showBreadcrumb") ?? !0), p = g(b.get("primaryColor") || "#409eff"), _ = g([]), v = g([]), w = k(() => a.value ? "dark" : "light"), q = (I) => {
47
+ t.value = I, b.set("appName", I);
48
+ }, U = (I) => {
49
+ o.value = I, b.set("indexPath", I);
50
+ }, R = () => {
51
+ a.value = !a.value, r.value = a.value ? "dark" : "light", A();
52
+ }, O = (I) => {
53
+ r.value = I, a.value = I === "dark", A();
54
+ }, A = () => {
55
+ const I = document.documentElement;
56
+ a.value ? I.classList.add("dark") : I.classList.remove("dark"), b.set("isDark", a.value), b.set("theme", r.value);
57
+ }, z = () => {
58
+ u.value = !u.value, b.set("isCollapsed", u.value);
59
+ }, V = (I) => {
60
+ l.value = I, b.set("layout", I);
61
+ }, N = () => {
62
+ $.value = !$.value, b.set("showTabs", $.value);
63
+ }, W = () => {
64
+ d.value = !d.value, b.set("showFooter", d.value);
65
+ }, D = () => {
66
+ f.value = !f.value, b.set("showBreadcrumb", f.value);
67
+ }, Y = (I) => {
68
+ p.value = I, document.documentElement.style.setProperty("--color-primary", I), b.set("primaryColor", I);
69
+ }, le = (I) => {
70
+ _.value.includes(I) || _.value.push(I);
71
+ }, X = (I) => {
72
+ const se = _.value.indexOf(I);
73
+ se > -1 && _.value.splice(se, 1);
74
+ }, te = () => {
75
+ _.value = [];
76
+ }, re = (I) => {
77
+ v.value = I;
78
+ }, J = () => {
79
+ A(), p.value !== "#409eff" && document.documentElement.style.setProperty("--color-primary", p.value);
80
+ };
81
+ return Ae(a, A), {
82
+ appName: t,
83
+ indexPath: o,
84
+ isDark: a,
85
+ theme: r,
86
+ layout: l,
87
+ isCollapsed: u,
88
+ showTabs: $,
89
+ showFooter: d,
90
+ showBreadcrumb: f,
91
+ primaryColor: p,
92
+ cachedViews: _,
93
+ mixSubMenus: v,
94
+ themeClass: w,
95
+ setAppName: q,
96
+ setIndexPath: U,
97
+ toggleTheme: R,
98
+ toggleCollapse: z,
99
+ setTheme: O,
100
+ setLayout: V,
101
+ toggleTabs: N,
102
+ toggleFooter: W,
103
+ toggleBreadcrumb: D,
104
+ setPrimaryColor: Y,
105
+ addCachedView: le,
106
+ removeCachedView: X,
107
+ clearCachedViews: te,
108
+ setMixSubMenus: re,
109
+ initTheme: J
110
+ };
111
+ }), ze = "menu_list", wt = {
112
+ menuCode: "home",
113
+ menuName: "首页",
114
+ menuUrl: "/dashboard",
115
+ icon: "home",
116
+ closable: !1,
117
+ isDefault: !1,
118
+ isOut: !1
119
+ }, ue = Ee("menu", () => {
120
+ const t = g(b.get(ze) || []), o = k(() => t.value.length > 0);
121
+ return {
122
+ menuList: t,
123
+ hasMenu: o,
124
+ setMenuList: (l) => {
125
+ t.value = [wt, ...l], b.set(ze, t.value);
126
+ },
127
+ clearMenu: () => {
128
+ t.value = [], b.remove(ze);
129
+ }
130
+ };
131
+ }), Ne = "/vite.svg", Re = "user_info", G = Ee("user", () => {
132
+ const t = g(b.get(Re)), o = k(() => !!t.value), a = k(() => {
133
+ var v;
134
+ return ((v = t.value) == null ? void 0 : v.userId) || "";
135
+ }), r = k(() => {
136
+ var v;
137
+ return ((v = t.value) == null ? void 0 : v.userName) || "";
138
+ }), l = k(() => {
139
+ var v;
140
+ return ((v = t.value) == null ? void 0 : v.departmentName) || "";
141
+ }), u = k(() => {
142
+ var v;
143
+ return ((v = t.value) == null ? void 0 : v.email) || "";
144
+ }), $ = k(() => {
145
+ var v;
146
+ return ((v = t.value) == null ? void 0 : v.mobilePhone) || "";
147
+ }), d = k(() => {
148
+ var v;
149
+ return ((v = t.value) == null ? void 0 : v.positionName) || "";
150
+ }), f = k(() => {
151
+ var v;
152
+ return ((v = t.value) == null ? void 0 : v.avatar) || "";
153
+ });
154
+ return {
155
+ userInfo: t,
156
+ isLoggedIn: o,
157
+ userId: a,
158
+ userName: r,
159
+ departmentName: l,
160
+ email: u,
161
+ mobilePhone: $,
162
+ positionName: d,
163
+ avatar: f,
164
+ setUserInfo: (v) => {
165
+ t.value = v, b.set(Re, v);
166
+ },
167
+ clearUserInfo: () => {
168
+ t.value = null, b.remove(Re);
169
+ }
170
+ };
171
+ }), qe = "token", Ye = "token_type", We = "refresh_token", He = "expires_time", Ge = "refresh_time", Xe = "code", De = () => b.get(qe), bt = (t) => {
172
+ b.set(qe, t);
173
+ }, xt = () => b.get(Ye), Ct = (t) => {
174
+ b.set(Ye, t);
175
+ }, ua = () => b.get(We), $t = (t) => {
176
+ b.set(We, t);
177
+ }, Lt = () => b.get(He), St = (t) => {
178
+ b.set(He, t);
179
+ }, ca = () => b.get(Ge), Mt = (t) => {
180
+ b.set(Ge, t);
181
+ }, da = () => b.get(Xe), It = (t) => {
182
+ b.set(Xe, t);
183
+ }, at = (t) => {
184
+ bt(t.access_token), Ct(t.token_type || "Bearer"), $t(t.refresh_token), St(t.expires_time), Mt(t.refresh_time), t.code && It(t.code);
185
+ }, lt = () => {
186
+ b.remove(qe), b.remove(Ye), b.remove(We), b.remove(He), b.remove(Ge), b.remove(Xe);
187
+ }, Tt = () => {
188
+ const t = Lt();
189
+ return t ? Date.now() > t : !0;
190
+ }, rt = () => !!De() && !Tt(), be = Ee("auth", () => {
191
+ const t = g(De()), o = k(() => rt()), a = g(""), r = g(""), l = g(""), u = g("/login");
192
+ return {
193
+ token: t,
194
+ isLoggedIn: o,
195
+ baseUrl: a,
196
+ appId: r,
197
+ clientId: l,
198
+ loginPath: u,
199
+ login: (w) => {
200
+ t.value = w.access_token, at(w);
201
+ },
202
+ logout: () => {
203
+ t.value = null, lt();
204
+ },
205
+ setBaseUrl: (w) => {
206
+ a.value = w;
207
+ },
208
+ setAppId: (w) => {
209
+ r.value = w;
210
+ },
211
+ setClientId: (w) => {
212
+ l.value = w;
213
+ },
214
+ setLoginPath: (w) => {
215
+ u.value = w;
216
+ }
217
+ };
218
+ }), Et = {
219
+ key: 0,
220
+ class: "sidebar__logo"
221
+ }, Ut = { class: "sidebar__menu-content" }, Nt = { class: "sidebar__menu-icon" }, Dt = {
222
+ key: 1,
223
+ class: "sidebar__menu-char"
224
+ }, zt = { class: "sidebar__menu-text" }, Rt = { class: "sidebar__menu-content" }, At = { class: "sidebar__menu-icon" }, Pt = {
225
+ key: 1,
226
+ class: "sidebar__menu-char"
227
+ }, Ot = { class: "sidebar__menu-text" }, Vt = { class: "sidebar__menu-content" }, Ft = { class: "sidebar__menu-icon" }, Bt = {
228
+ key: 1,
229
+ class: "sidebar__menu-char"
230
+ }, Kt = { class: "sidebar__menu-text" }, jt = {
231
+ key: 1,
232
+ class: "sidebar__user"
233
+ }, qt = { class: "sidebar__user-info" }, Yt = { class: "sidebar__user-name" }, Wt = { class: "sidebar__user-role" }, Ht = /* @__PURE__ */ ee({
234
+ __name: "Sidebar",
235
+ props: {
236
+ menuList: { default: () => [] },
237
+ showLogo: { type: Boolean, default: !0 },
238
+ showUser: { type: Boolean, default: !0 }
239
+ },
240
+ setup(t) {
241
+ const o = t, a = ve(), r = ne(), l = ue(), u = G(), $ = be(), d = ae(), f = k(() => o.menuList.length > 0 ? o.menuList : l.menuList), p = k(() => d.isCollapsed), _ = k(() => a.path), v = k(() => d.isDark ? "#1d1e1f" : "#fff"), w = k(() => d.isDark ? "#cfd3dc" : "#303133"), q = k(() => "#409eff"), U = (N) => {
242
+ N && N !== a.path && r.push(N);
243
+ }, R = () => {
244
+ $.logout(), u.clearUserInfo(), l.clearMenu(), r.push("/login");
245
+ }, O = /* @__PURE__ */ new Set([
246
+ "arrow-up",
247
+ "arrow-down",
248
+ "arrow-left",
249
+ "arrow-right",
250
+ "caret-down",
251
+ "caret-right",
252
+ "plus",
253
+ "minus",
254
+ "close",
255
+ "check",
256
+ "edit",
257
+ "delete",
258
+ "copy",
259
+ "download",
260
+ "upload",
261
+ "refresh",
262
+ "search",
263
+ "filter",
264
+ "more",
265
+ "setting",
266
+ "share",
267
+ "loading",
268
+ "info",
269
+ "success",
270
+ "warning",
271
+ "error",
272
+ "question",
273
+ "user",
274
+ "user-add",
275
+ "user-group",
276
+ "logout",
277
+ "login",
278
+ "file",
279
+ "folder",
280
+ "folder-open",
281
+ "document",
282
+ "image",
283
+ "video",
284
+ "music",
285
+ "camera",
286
+ "mail",
287
+ "phone",
288
+ "chat",
289
+ "bell",
290
+ "message",
291
+ "eye",
292
+ "eye-off",
293
+ "calendar",
294
+ "clock",
295
+ "history",
296
+ "timer",
297
+ "location",
298
+ "map",
299
+ "globe",
300
+ "star",
301
+ "heart",
302
+ "thumb-up",
303
+ "link",
304
+ "external-link",
305
+ "lock",
306
+ "unlock",
307
+ "key",
308
+ "home",
309
+ "menu",
310
+ "menu-fold",
311
+ "menu-unfold",
312
+ "sidebar-fold",
313
+ "sidebar-expand",
314
+ "sidebar-left",
315
+ "dashboard",
316
+ "chart",
317
+ "chart-pie",
318
+ "chart-line",
319
+ "report",
320
+ "analytics",
321
+ "system",
322
+ "permission",
323
+ "role",
324
+ "user-manage",
325
+ "log",
326
+ "notification",
327
+ "app",
328
+ "list",
329
+ "grid",
330
+ "fullscreen",
331
+ "fullscreen-exit",
332
+ "zoom-in",
333
+ "zoom-out",
334
+ "print",
335
+ "bookmark",
336
+ "tag",
337
+ "code",
338
+ "terminal",
339
+ "database",
340
+ "server",
341
+ "cloud",
342
+ "gift",
343
+ "moon",
344
+ "sun",
345
+ "theme",
346
+ "skin"
347
+ ]), A = (N) => {
348
+ if (!N || N === "") return "";
349
+ if (N.startsWith("tineco-icon-")) {
350
+ const D = N.replace("tineco-icon-", "");
351
+ return {
352
+ home: "home",
353
+ dashboard: "dashboard",
354
+ system: "system",
355
+ user: "user",
356
+ role: "role",
357
+ menu: "list",
358
+ setting: "setting",
359
+ file: "file",
360
+ folder: "folder",
361
+ chart: "chart",
362
+ report: "report",
363
+ analytics: "analytics"
364
+ }[D] || D;
365
+ }
366
+ return {
367
+ dashboard: "dashboard",
368
+ system: "system",
369
+ user: "user",
370
+ role: "role",
371
+ menu: "list",
372
+ setting: "setting",
373
+ home: "home",
374
+ chart: "chart",
375
+ report: "report",
376
+ analytics: "analytics",
377
+ permission: "permission",
378
+ log: "log",
379
+ notification: "notification",
380
+ app: "app",
381
+ list: "list",
382
+ grid: "grid"
383
+ }[N] || N;
384
+ }, z = (N) => N ? N.charAt(0) : "", V = (N) => O.has(N);
385
+ return (N, W) => (i(), m("div", {
386
+ class: F(["sidebar", { "sidebar--collapsed": p.value }])
387
+ }, [
388
+ o.showLogo ? (i(), m("div", Et, [
389
+ W[0] || (W[0] = e("img", {
390
+ src: Ne,
391
+ alt: "Logo",
392
+ class: "sidebar__logo-img"
393
+ }, null, -1)),
394
+ tt(e("span", { class: "sidebar__logo-text" }, C(n(d).appName), 513), [
395
+ [pt, !p.value]
396
+ ])
397
+ ])) : B("", !0),
398
+ h(n(Ke), {
399
+ "default-active": _.value,
400
+ mode: "vertical",
401
+ collapse: p.value,
402
+ "collapse-transition": !1,
403
+ "background-color": v.value,
404
+ "text-color": w.value,
405
+ "active-text-color": q.value,
406
+ class: "sidebar__menu",
407
+ onSelect: U
408
+ }, {
409
+ default: M(() => [
410
+ (i(!0), m(j, null, H(f.value, (D) => (i(), m(j, {
411
+ key: D.menuUrl
412
+ }, [
413
+ D.children && D.children.length > 0 ? (i(), K(n(ot), {
414
+ key: 0,
415
+ index: D.menuUrl
416
+ }, {
417
+ title: M(() => [
418
+ e("span", Ut, [
419
+ e("span", Nt, [
420
+ V(A(D.icon)) ? (i(), K(n(L), {
421
+ key: 0,
422
+ name: A(D.icon),
423
+ size: 16
424
+ }, null, 8, ["name"])) : (i(), m("span", Dt, C(z(D.menuName)), 1))
425
+ ]),
426
+ e("span", zt, C(D.menuName), 1)
427
+ ])
428
+ ]),
429
+ default: M(() => [
430
+ (i(!0), m(j, null, H(D.children, (Y) => (i(), K(n(we), {
431
+ key: Y.menuUrl,
432
+ index: Y.menuUrl
433
+ }, {
434
+ default: M(() => [
435
+ e("span", Rt, [
436
+ e("span", At, [
437
+ V(A(Y.icon)) ? (i(), K(n(L), {
438
+ key: 0,
439
+ name: A(Y.icon),
440
+ size: 16
441
+ }, null, 8, ["name"])) : (i(), m("span", Pt, C(z(Y.menuName)), 1))
442
+ ]),
443
+ e("span", Ot, C(Y.menuName), 1)
444
+ ])
445
+ ]),
446
+ _: 2
447
+ }, 1032, ["index"]))), 128))
448
+ ]),
449
+ _: 2
450
+ }, 1032, ["index"])) : (i(), K(n(we), {
451
+ key: 1,
452
+ index: D.menuUrl
453
+ }, {
454
+ default: M(() => [
455
+ e("span", Vt, [
456
+ e("span", Ft, [
457
+ V(A(D.icon)) ? (i(), K(n(L), {
458
+ key: 0,
459
+ name: A(D.icon),
460
+ size: 16
461
+ }, null, 8, ["name"])) : (i(), m("span", Bt, C(z(D.menuName)), 1))
462
+ ]),
463
+ e("span", Kt, C(D.menuName), 1)
464
+ ])
465
+ ]),
466
+ _: 2
467
+ }, 1032, ["index"]))
468
+ ], 64))), 128))
469
+ ]),
470
+ _: 1
471
+ }, 8, ["default-active", "collapse", "background-color", "text-color", "active-text-color"]),
472
+ o.showUser && !p.value ? (i(), m("div", jt, [
473
+ e("div", qt, [
474
+ e("span", Yt, C(n(u).userName), 1),
475
+ e("span", Wt, C(n(u).departmentName), 1)
476
+ ]),
477
+ h(n(Ue), {
478
+ type: "text",
479
+ size: "small",
480
+ onClick: R
481
+ }, {
482
+ default: M(() => [...W[1] || (W[1] = [
483
+ pe("退出", -1)
484
+ ])]),
485
+ _: 1
486
+ })
487
+ ])) : B("", !0)
488
+ ], 2));
489
+ }
490
+ }), Q = (t, o) => {
491
+ const a = t.__vccOpts || t;
492
+ for (const [r, l] of o)
493
+ a[r] = l;
494
+ return a;
495
+ }, et = /* @__PURE__ */ Q(Ht, [["__scopeId", "data-v-bd32db7f"]]), Gt = { class: "header" }, Xt = { class: "header__left" }, Jt = {
496
+ key: 0,
497
+ class: "header__breadcrumb"
498
+ }, Qt = {
499
+ key: 0,
500
+ class: "breadcrumb-separator"
501
+ }, Zt = { class: "header__right" }, es = ["title"], ts = { class: "header__avatar" }, ss = { class: "header__user-name" }, os = {
502
+ key: 0,
503
+ class: "header__dropdown"
504
+ }, ns = { class: "header__dropdown-header" }, as = { class: "header__dropdown-avatar" }, ls = { class: "header__dropdown-info" }, rs = { class: "header__dropdown-name" }, is = { class: "header__dropdown-role" }, us = { class: "header__dropdown-menu" }, cs = { class: "search-container" }, ds = { class: "search-input-wrapper" }, ms = {
505
+ key: 0,
506
+ class: "search-results"
507
+ }, ps = ["onClick"], vs = { class: "search-result-info" }, _s = { class: "search-result-title" }, hs = {
508
+ key: 0,
509
+ class: "search-result-parent"
510
+ }, fs = {
511
+ key: 1,
512
+ class: "search-empty"
513
+ }, gs = { class: "settings-drawer" }, ys = { class: "settings-section" }, ks = { class: "settings-layout-options" }, ws = ["onClick"], bs = { class: "layout-option__preview" }, xs = {
514
+ key: 0,
515
+ class: "layout-preview-sidebar"
516
+ }, Cs = {
517
+ key: 1,
518
+ class: "layout-preview-top"
519
+ }, $s = {
520
+ key: 2,
521
+ class: "layout-preview-mix"
522
+ }, Ls = { class: "layout-option__label" }, Ss = { class: "settings-section" }, Ms = { class: "settings-color-options" }, Is = ["title", "onClick"], Ts = { class: "settings-section" }, Es = { class: "settings-switch-list" }, Us = { class: "settings-switch-item" }, Ns = { class: "settings-switch-item" }, Ds = /* @__PURE__ */ ee({
523
+ __name: "Header",
524
+ setup(t) {
525
+ const o = ve(), a = ne(), r = ae(), l = G(), u = be(), $ = ue(), d = g(!1), f = g(!1), p = g(null), _ = g(!1), v = g(!1), w = g(""), q = g(null), U = g(!1), R = [
526
+ { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
527
+ { value: "top", label: "顶部菜单", icon: "menu" },
528
+ { value: "mix", label: "混合菜单", icon: "grid" }
529
+ ], O = [
530
+ { value: "#409eff", label: "默认蓝" },
531
+ { value: "#1890ff", label: "科技蓝" },
532
+ { value: "#52c41a", label: "极光绿" },
533
+ { value: "#faad14", label: "日落橙" },
534
+ { value: "#f5222d", label: "薄暮红" },
535
+ { value: "#722ed1", label: "酱紫" }
536
+ ], A = k(() => o.matched.filter((s) => s.meta && s.meta.title).map((s) => ({
537
+ title: s.meta.title,
538
+ path: s.path
539
+ }))), z = (T, s = "") => {
540
+ const c = [];
541
+ return T.forEach((y) => {
542
+ y.children && y.children.length > 0 ? c.push(...z(y.children, y.title)) : c.push({ ...y, parentTitle: s });
543
+ }), c;
544
+ }, V = k(() => w.value.trim() ? z($.menuList).filter(
545
+ (s) => s.title.toLowerCase().includes(w.value.toLowerCase())
546
+ ) : []), N = k(() => r.layout), W = () => {
547
+ r.toggleCollapse();
548
+ }, D = () => {
549
+ r.toggleTheme();
550
+ }, Y = () => {
551
+ f.value = !0;
552
+ }, le = (T) => {
553
+ r.setLayout(T), f.value = !1;
554
+ }, X = (T) => {
555
+ U.value = T;
556
+ const s = document.documentElement;
557
+ T ? s.classList.add("grey-mode") : s.classList.remove("grey-mode");
558
+ }, te = () => {
559
+ X(!U.value), f.value = !1;
560
+ }, re = () => {
561
+ r.toggleTheme(), f.value = !1;
562
+ }, J = () => {
563
+ document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
564
+ }, I = () => {
565
+ _.value = !!document.fullscreenElement;
566
+ }, se = () => {
567
+ d.value = !d.value;
568
+ }, Z = () => {
569
+ d.value = !1;
570
+ }, ce = () => {
571
+ v.value = !0;
572
+ }, ie = () => {
573
+ v.value = !1, w.value = "";
574
+ }, de = (T) => {
575
+ a.push(T), ie();
576
+ }, _e = (T) => {
577
+ r.setPrimaryColor(T), f.value = !1;
578
+ }, he = () => {
579
+ Z(), a.push("/profile");
580
+ }, fe = () => {
581
+ Z(), a.push("/change-password");
582
+ }, me = () => {
583
+ Z(), u.logout(), l.clearUserInfo(), $.clearMenu(), a.push("/login");
584
+ }, E = (T) => {
585
+ p.value && !p.value.contains(T.target) && Z(), q.value && !q.value.contains(T.target) && ie();
586
+ }, x = (T) => {
587
+ T.key === "Escape" && (ie(), Z()), (T.ctrlKey || T.metaKey) && T.key === "k" && (T.preventDefault(), ce());
588
+ };
589
+ return Pe(() => {
590
+ document.addEventListener("click", E), document.addEventListener("fullscreenchange", I), document.addEventListener("keydown", x), r.initTheme(), U.value = document.documentElement.classList.contains("grey-mode");
591
+ }), Oe(() => {
592
+ document.removeEventListener("click", E), document.removeEventListener("fullscreenchange", I), document.removeEventListener("keydown", x);
593
+ }), (T, s) => {
594
+ var c;
595
+ return i(), m("div", Gt, [
596
+ e("div", Xt, [
597
+ e("div", {
598
+ class: "header__collapse",
599
+ onClick: W
600
+ }, [
601
+ h(n(L), {
602
+ name: n(r).isCollapsed ? "menu-unfold" : "menu-fold",
603
+ size: 18
604
+ }, null, 8, ["name"])
605
+ ]),
606
+ n(r).showBreadcrumb ? (i(), m("div", Jt, [
607
+ (i(!0), m(j, null, H(A.value, (y, S) => (i(), m("span", {
608
+ key: y.path
609
+ }, [
610
+ S > 0 ? (i(), m("span", Qt, "/")) : B("", !0),
611
+ e("span", {
612
+ class: F({ "is-current": S === A.value.length - 1 })
613
+ }, C(y.title), 3)
614
+ ]))), 128))
615
+ ])) : B("", !0)
616
+ ]),
617
+ e("div", Zt, [
618
+ e("div", {
619
+ class: "header__action",
620
+ onClick: ce,
621
+ title: "搜索 (Ctrl+K)"
622
+ }, [
623
+ h(n(L), {
624
+ name: "search",
625
+ size: 16
626
+ })
627
+ ]),
628
+ e("div", {
629
+ class: "header__action",
630
+ onClick: J,
631
+ title: _.value ? "退出全屏" : "全屏"
632
+ }, [
633
+ h(n(L), {
634
+ name: _.value ? "fullscreen-exit" : "fullscreen",
635
+ size: 16
636
+ }, null, 8, ["name"])
637
+ ], 8, es),
638
+ e("div", {
639
+ class: "header__action",
640
+ onClick: Y,
641
+ title: "换肤设置"
642
+ }, [
643
+ h(n(L), {
644
+ name: "skin",
645
+ size: 16
646
+ })
647
+ ]),
648
+ e("div", {
649
+ class: "header__action",
650
+ onClick: D,
651
+ title: "切换主题"
652
+ }, [
653
+ h(n(L), {
654
+ name: n(r).isDark ? "sun" : "moon",
655
+ size: 16
656
+ }, null, 8, ["name"])
657
+ ]),
658
+ e("div", {
659
+ class: "header__user",
660
+ ref_key: "dropdownRef",
661
+ ref: p
662
+ }, [
663
+ e("div", {
664
+ class: "header__user-trigger",
665
+ onClick: Te(se, ["stop"])
666
+ }, [
667
+ e("div", ts, [
668
+ e("span", null, C(((c = n(l).userName) == null ? void 0 : c.charAt(0)) || "U"), 1)
669
+ ]),
670
+ e("span", ss, C(n(l).userName), 1),
671
+ e("span", {
672
+ class: F(["header__user-arrow", { "is-active": d.value }])
673
+ }, "▼", 2)
674
+ ]),
675
+ h(Le, { name: "dropdown" }, {
676
+ default: M(() => {
677
+ var y;
678
+ return [
679
+ d.value ? (i(), m("div", os, [
680
+ e("div", ns, [
681
+ e("div", as, [
682
+ e("span", null, C(((y = n(l).userName) == null ? void 0 : y.charAt(0)) || "U"), 1)
683
+ ]),
684
+ e("div", ls, [
685
+ e("div", rs, C(n(l).userName), 1),
686
+ e("div", is, C(n(l).departmentName), 1)
687
+ ])
688
+ ]),
689
+ s[7] || (s[7] = e("div", { class: "header__dropdown-divider" }, null, -1)),
690
+ e("div", us, [
691
+ e("div", {
692
+ class: "header__dropdown-item",
693
+ onClick: he
694
+ }, [
695
+ h(n(L), {
696
+ name: "user",
697
+ size: 16
698
+ }),
699
+ s[3] || (s[3] = e("span", null, "个人信息", -1))
700
+ ]),
701
+ e("div", {
702
+ class: "header__dropdown-item",
703
+ onClick: fe
704
+ }, [
705
+ h(n(L), {
706
+ name: "lock",
707
+ size: 16
708
+ }),
709
+ s[4] || (s[4] = e("span", null, "修改密码", -1))
710
+ ]),
711
+ s[6] || (s[6] = e("div", { class: "header__dropdown-divider" }, null, -1)),
712
+ e("div", {
713
+ class: "header__dropdown-item header__dropdown-item--danger",
714
+ onClick: me
715
+ }, [
716
+ h(n(L), {
717
+ name: "logout",
718
+ size: 16
719
+ }),
720
+ s[5] || (s[5] = e("span", null, "退出登录", -1))
721
+ ])
722
+ ])
723
+ ])) : B("", !0)
724
+ ];
725
+ }),
726
+ _: 1
727
+ })
728
+ ], 512)
729
+ ]),
730
+ h(Le, { name: "search" }, {
731
+ default: M(() => [
732
+ v.value ? (i(), m("div", {
733
+ key: 0,
734
+ class: "header__search-modal",
735
+ ref_key: "searchRef",
736
+ ref: q
737
+ }, [
738
+ e("div", cs, [
739
+ e("div", ds, [
740
+ h(n(L), {
741
+ class: "search-icon",
742
+ name: "search",
743
+ size: 20
744
+ }),
745
+ tt(e("input", {
746
+ "onUpdate:modelValue": s[0] || (s[0] = (y) => w.value = y),
747
+ type: "text",
748
+ class: "search-input",
749
+ placeholder: "搜索菜单...",
750
+ autofocus: "",
751
+ onKeyup: s[1] || (s[1] = st((y) => V.value[0] && de(V.value[0].path), ["enter"]))
752
+ }, null, 544), [
753
+ [vt, w.value]
754
+ ]),
755
+ s[8] || (s[8] = e("span", { class: "search-shortcut" }, "ESC 关闭", -1))
756
+ ]),
757
+ V.value.length > 0 ? (i(), m("div", ms, [
758
+ (i(!0), m(j, null, H(V.value, (y, S) => (i(), m("div", {
759
+ key: y.path,
760
+ class: F(["search-result-item", { "is-first": S === 0 }]),
761
+ onClick: (Qe) => de(y.path)
762
+ }, [
763
+ h(n(L), {
764
+ class: "search-result-icon",
765
+ name: y.icon || "file",
766
+ size: 20
767
+ }, null, 8, ["name"]),
768
+ e("div", vs, [
769
+ e("span", _s, C(y.title), 1),
770
+ y.parentTitle ? (i(), m("span", hs, C(y.parentTitle), 1)) : B("", !0)
771
+ ])
772
+ ], 10, ps))), 128))
773
+ ])) : w.value ? (i(), m("div", fs, " 未找到匹配的菜单 ")) : B("", !0)
774
+ ])
775
+ ], 512)) : B("", !0)
776
+ ]),
777
+ _: 1
778
+ }),
779
+ h(n(je), {
780
+ modelValue: f.value,
781
+ "onUpdate:modelValue": s[2] || (s[2] = (y) => f.value = y),
782
+ title: "换肤设置",
783
+ direction: "rtl",
784
+ size: "320px"
785
+ }, {
786
+ default: M(() => [
787
+ e("div", gs, [
788
+ e("div", ys, [
789
+ s[12] || (s[12] = e("div", { class: "settings-title" }, "布局模式", -1)),
790
+ e("div", ks, [
791
+ (i(), m(j, null, H(R, (y) => e("div", {
792
+ key: y.value,
793
+ class: F(["layout-option", { "is-active": N.value === y.value }]),
794
+ onClick: (S) => le(y.value)
795
+ }, [
796
+ e("div", bs, [
797
+ y.value === "sidebar" ? (i(), m("div", xs, [...s[9] || (s[9] = [
798
+ e("div", { class: "preview-aside" }, null, -1),
799
+ e("div", { class: "preview-main" }, [
800
+ e("div", { class: "preview-header" }),
801
+ e("div", { class: "preview-content" })
802
+ ], -1)
803
+ ])])) : y.value === "top" ? (i(), m("div", Cs, [...s[10] || (s[10] = [
804
+ e("div", { class: "preview-header-full" }, null, -1),
805
+ e("div", { class: "preview-content-full" }, null, -1)
806
+ ])])) : (i(), m("div", $s, [...s[11] || (s[11] = [
807
+ e("div", { class: "preview-header-mix" }, [
808
+ e("div", { class: "preview-mix-left" })
809
+ ], -1),
810
+ e("div", { class: "preview-mix-body" }, [
811
+ e("div", { class: "preview-mix-aside" }),
812
+ e("div", { class: "preview-mix-content" })
813
+ ], -1)
814
+ ])]))
815
+ ]),
816
+ e("span", Ls, C(y.label), 1)
817
+ ], 10, ws)), 64))
818
+ ])
819
+ ]),
820
+ e("div", Ss, [
821
+ s[13] || (s[13] = e("div", { class: "settings-title" }, "主题色", -1)),
822
+ e("div", Ms, [
823
+ (i(), m(j, null, H(O, (y) => e("div", {
824
+ key: y.value,
825
+ class: F(["color-option", { "is-active": n(r).primaryColor === y.value }]),
826
+ style: ke({ backgroundColor: y.value }),
827
+ title: y.label,
828
+ onClick: (S) => _e(y.value)
829
+ }, [
830
+ n(r).primaryColor === y.value ? (i(), K(n(L), {
831
+ key: 0,
832
+ name: "check",
833
+ size: 12,
834
+ color: "#fff"
835
+ })) : B("", !0)
836
+ ], 14, Is)), 64))
837
+ ])
838
+ ]),
839
+ e("div", Ts, [
840
+ s[18] || (s[18] = e("div", { class: "settings-title" }, "功能设置", -1)),
841
+ e("div", Es, [
842
+ e("div", Us, [
843
+ s[15] || (s[15] = e("span", null, "灰色模式", -1)),
844
+ e("div", {
845
+ class: F(["switch-wrapper", { "is-checked": U.value }]),
846
+ onClick: te
847
+ }, [...s[14] || (s[14] = [
848
+ e("span", { class: "switch-core" }, null, -1)
849
+ ])], 2)
850
+ ]),
851
+ e("div", Ns, [
852
+ s[17] || (s[17] = e("span", null, "暗黑模式", -1)),
853
+ e("div", {
854
+ class: F(["switch-wrapper", { "is-checked": n(r).isDark }]),
855
+ onClick: re
856
+ }, [...s[16] || (s[16] = [
857
+ e("span", { class: "switch-core" }, null, -1)
858
+ ])], 2)
859
+ ])
860
+ ])
861
+ ])
862
+ ])
863
+ ]),
864
+ _: 1
865
+ }, 8, ["modelValue"])
866
+ ]);
867
+ };
868
+ }
869
+ }), zs = /* @__PURE__ */ Q(Ds, [["__scopeId", "data-v-702ab2d7"]]), Rs = { class: "top-menu" }, As = { class: "top-menu__logo" }, Ps = { class: "top-menu__logo-text" }, Os = { class: "top-menu__menu-content" }, Vs = { class: "top-menu__menu-icon" }, Fs = {
870
+ key: 1,
871
+ class: "top-menu__menu-char"
872
+ }, Bs = { class: "top-menu__menu-text" }, Ks = { class: "top-menu__menu-content" }, js = { class: "top-menu__menu-icon" }, qs = {
873
+ key: 1,
874
+ class: "top-menu__menu-char"
875
+ }, Ys = { class: "top-menu__menu-text" }, Ws = { class: "top-menu__menu-content" }, Hs = { class: "top-menu__menu-icon" }, Gs = {
876
+ key: 1,
877
+ class: "top-menu__menu-char"
878
+ }, Xs = { class: "top-menu__menu-text" }, Js = { class: "top-menu__actions" }, Qs = ["title"], Zs = { class: "top-menu__avatar" }, eo = { class: "top-menu__user-name" }, to = {
879
+ key: 0,
880
+ class: "top-menu__dropdown"
881
+ }, so = { class: "top-menu__dropdown-header" }, oo = { class: "top-menu__dropdown-avatar" }, no = { class: "top-menu__dropdown-info" }, ao = { class: "top-menu__dropdown-name" }, lo = { class: "top-menu__dropdown-role" }, ro = { class: "top-menu__dropdown-menu" }, io = { class: "settings-drawer" }, uo = { class: "settings-section" }, co = { class: "settings-layout-options" }, mo = ["onClick"], po = { class: "layout-option__preview" }, vo = {
882
+ key: 0,
883
+ class: "layout-preview-sidebar"
884
+ }, _o = {
885
+ key: 1,
886
+ class: "layout-preview-top"
887
+ }, ho = {
888
+ key: 2,
889
+ class: "layout-preview-mix"
890
+ }, fo = { class: "layout-option__label" }, go = { class: "settings-section" }, yo = { class: "settings-color-options" }, ko = ["title", "onClick"], wo = { class: "settings-section" }, bo = { class: "settings-switch-list" }, xo = { class: "settings-switch-item" }, Co = { class: "settings-switch-item" }, $o = /* @__PURE__ */ ee({
891
+ __name: "TopMenu",
892
+ setup(t) {
893
+ const o = ve(), a = ne(), r = ue(), l = ae(), u = G(), $ = be(), d = k(() => o.path), f = k(() => l.isDark ? "#1d1e1f" : "#fff"), p = k(() => l.isDark ? "#cfd3dc" : "#303133"), _ = k(() => "#409eff"), v = g(!1), w = g(null), q = g(!1), U = g(!1), R = g(!1), O = (E) => {
894
+ E && E !== o.path && a.push(E);
895
+ }, A = /* @__PURE__ */ new Set([
896
+ "arrow-up",
897
+ "arrow-down",
898
+ "arrow-left",
899
+ "arrow-right",
900
+ "caret-down",
901
+ "caret-right",
902
+ "plus",
903
+ "minus",
904
+ "close",
905
+ "check",
906
+ "edit",
907
+ "delete",
908
+ "copy",
909
+ "download",
910
+ "upload",
911
+ "refresh",
912
+ "search",
913
+ "filter",
914
+ "more",
915
+ "setting",
916
+ "share",
917
+ "loading",
918
+ "info",
919
+ "success",
920
+ "warning",
921
+ "error",
922
+ "question",
923
+ "user",
924
+ "user-add",
925
+ "user-group",
926
+ "logout",
927
+ "login",
928
+ "file",
929
+ "folder",
930
+ "folder-open",
931
+ "document",
932
+ "image",
933
+ "video",
934
+ "music",
935
+ "camera",
936
+ "mail",
937
+ "phone",
938
+ "chat",
939
+ "bell",
940
+ "message",
941
+ "eye",
942
+ "eye-off",
943
+ "calendar",
944
+ "clock",
945
+ "history",
946
+ "timer",
947
+ "location",
948
+ "map",
949
+ "globe",
950
+ "star",
951
+ "heart",
952
+ "thumb-up",
953
+ "link",
954
+ "external-link",
955
+ "lock",
956
+ "unlock",
957
+ "key",
958
+ "home",
959
+ "menu",
960
+ "menu-fold",
961
+ "menu-unfold",
962
+ "sidebar-fold",
963
+ "sidebar-expand",
964
+ "sidebar-left",
965
+ "dashboard",
966
+ "chart",
967
+ "chart-pie",
968
+ "chart-line",
969
+ "report",
970
+ "analytics",
971
+ "system",
972
+ "permission",
973
+ "role",
974
+ "user-manage",
975
+ "log",
976
+ "notification",
977
+ "app",
978
+ "list",
979
+ "grid",
980
+ "fullscreen",
981
+ "fullscreen-exit",
982
+ "zoom-in",
983
+ "zoom-out",
984
+ "print",
985
+ "bookmark",
986
+ "tag",
987
+ "code",
988
+ "terminal",
989
+ "database",
990
+ "server",
991
+ "cloud",
992
+ "gift",
993
+ "moon",
994
+ "sun",
995
+ "theme",
996
+ "skin"
997
+ ]), z = (E) => {
998
+ if (!E || E === "") return "";
999
+ if (E.startsWith("tineco-icon-")) {
1000
+ const T = E.replace("tineco-icon-", "");
1001
+ return {
1002
+ home: "home",
1003
+ dashboard: "dashboard",
1004
+ system: "system",
1005
+ user: "user",
1006
+ role: "role",
1007
+ menu: "list",
1008
+ setting: "setting",
1009
+ file: "file",
1010
+ folder: "folder",
1011
+ chart: "chart",
1012
+ report: "report",
1013
+ analytics: "analytics"
1014
+ }[T] || T;
1015
+ }
1016
+ return {
1017
+ dashboard: "dashboard",
1018
+ system: "system",
1019
+ user: "user",
1020
+ role: "role",
1021
+ menu: "list",
1022
+ setting: "setting",
1023
+ home: "home",
1024
+ chart: "chart",
1025
+ report: "report",
1026
+ analytics: "analytics",
1027
+ permission: "permission",
1028
+ log: "log",
1029
+ notification: "notification",
1030
+ app: "app",
1031
+ list: "list",
1032
+ grid: "grid"
1033
+ }[E] || E;
1034
+ }, V = (E) => E ? E.charAt(0) : "", N = (E) => A.has(E), W = () => {
1035
+ l.toggleTheme(), U.value = !1;
1036
+ }, D = () => {
1037
+ document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1038
+ }, Y = () => {
1039
+ q.value = !!document.fullscreenElement;
1040
+ }, le = () => {
1041
+ v.value = !v.value;
1042
+ }, X = () => {
1043
+ v.value = !1;
1044
+ }, te = () => {
1045
+ U.value = !0;
1046
+ }, re = (E) => {
1047
+ R.value = E;
1048
+ const x = document.documentElement;
1049
+ E ? x.classList.add("grey-mode") : x.classList.remove("grey-mode");
1050
+ }, J = () => {
1051
+ re(!R.value), U.value = !1;
1052
+ }, I = () => {
1053
+ l.toggleTheme(), U.value = !1;
1054
+ }, se = [
1055
+ { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1056
+ { value: "top", label: "顶部菜单", icon: "menu" },
1057
+ { value: "mix", label: "混合菜单", icon: "grid" }
1058
+ ], Z = k(() => l.layout), ce = (E) => {
1059
+ l.setLayout(E), U.value = !1;
1060
+ }, ie = [
1061
+ { value: "#409eff", label: "默认蓝" },
1062
+ { value: "#1890ff", label: "科技蓝" },
1063
+ { value: "#52c41a", label: "极光绿" },
1064
+ { value: "#faad14", label: "日落橙" },
1065
+ { value: "#f5222d", label: "薄暮红" },
1066
+ { value: "#722ed1", label: "酱紫" }
1067
+ ], de = (E) => {
1068
+ l.setPrimaryColor(E), U.value = !1;
1069
+ }, _e = () => {
1070
+ X(), a.push("/profile");
1071
+ }, he = () => {
1072
+ X(), a.push("/change-password");
1073
+ }, fe = () => {
1074
+ X(), $.logout(), u.clearUserInfo(), r.clearMenu(), a.push("/login");
1075
+ }, me = (E) => {
1076
+ w.value && !w.value.contains(E.target) && X();
1077
+ };
1078
+ return Pe(() => {
1079
+ document.addEventListener("click", me), document.addEventListener("fullscreenchange", Y), R.value = document.documentElement.classList.contains("grey-mode");
1080
+ }), Oe(() => {
1081
+ document.removeEventListener("click", me), document.removeEventListener("fullscreenchange", Y);
1082
+ }), (E, x) => {
1083
+ var T;
1084
+ return i(), m("div", Rs, [
1085
+ e("div", As, [
1086
+ x[1] || (x[1] = e("img", {
1087
+ src: Ne,
1088
+ alt: "Logo",
1089
+ class: "top-menu__logo-img"
1090
+ }, null, -1)),
1091
+ e("span", Ps, C(n(l).appName), 1)
1092
+ ]),
1093
+ h(n(Ke), {
1094
+ "default-active": d.value,
1095
+ mode: "horizontal",
1096
+ "background-color": f.value,
1097
+ "text-color": p.value,
1098
+ "active-text-color": _.value,
1099
+ class: "top-menu__menu",
1100
+ onSelect: O
1101
+ }, {
1102
+ default: M(() => [
1103
+ (i(!0), m(j, null, H(n(r).menuList, (s) => (i(), m(j, {
1104
+ key: s.menuUrl
1105
+ }, [
1106
+ s.children && s.children.length > 0 ? (i(), K(n(ot), {
1107
+ key: 0,
1108
+ index: s.menuUrl
1109
+ }, {
1110
+ title: M(() => [
1111
+ e("span", Os, [
1112
+ e("span", Vs, [
1113
+ N(z(s.icon)) ? (i(), K(n(L), {
1114
+ key: 0,
1115
+ name: z(s.icon),
1116
+ size: 16
1117
+ }, null, 8, ["name"])) : (i(), m("span", Fs, C(V(s.menuName)), 1))
1118
+ ]),
1119
+ e("span", Bs, C(s.menuName), 1)
1120
+ ])
1121
+ ]),
1122
+ default: M(() => [
1123
+ (i(!0), m(j, null, H(s.children, (c) => (i(), K(n(we), {
1124
+ key: c.menuUrl,
1125
+ index: c.menuUrl
1126
+ }, {
1127
+ default: M(() => [
1128
+ e("span", Ks, [
1129
+ e("span", js, [
1130
+ N(z(c.icon)) ? (i(), K(n(L), {
1131
+ key: 0,
1132
+ name: z(c.icon),
1133
+ size: 16
1134
+ }, null, 8, ["name"])) : (i(), m("span", qs, C(V(c.menuName)), 1))
1135
+ ]),
1136
+ e("span", Ys, C(c.menuName), 1)
1137
+ ])
1138
+ ]),
1139
+ _: 2
1140
+ }, 1032, ["index"]))), 128))
1141
+ ]),
1142
+ _: 2
1143
+ }, 1032, ["index"])) : (i(), K(n(we), {
1144
+ key: 1,
1145
+ index: s.menuUrl
1146
+ }, {
1147
+ default: M(() => [
1148
+ e("span", Ws, [
1149
+ e("span", Hs, [
1150
+ N(z(s.icon)) ? (i(), K(n(L), {
1151
+ key: 0,
1152
+ name: z(s.icon),
1153
+ size: 16
1154
+ }, null, 8, ["name"])) : (i(), m("span", Gs, C(V(s.menuName)), 1))
1155
+ ]),
1156
+ e("span", Xs, C(s.menuName), 1)
1157
+ ])
1158
+ ]),
1159
+ _: 2
1160
+ }, 1032, ["index"]))
1161
+ ], 64))), 128))
1162
+ ]),
1163
+ _: 1
1164
+ }, 8, ["default-active", "background-color", "text-color", "active-text-color"]),
1165
+ e("div", Js, [
1166
+ e("div", {
1167
+ class: "top-menu__action",
1168
+ onClick: D,
1169
+ title: q.value ? "退出全屏" : "全屏"
1170
+ }, [
1171
+ h(n(L), {
1172
+ name: q.value ? "fullscreen-exit" : "fullscreen",
1173
+ size: 16
1174
+ }, null, 8, ["name"])
1175
+ ], 8, Qs),
1176
+ e("div", {
1177
+ class: "top-menu__action",
1178
+ onClick: te,
1179
+ title: "换肤设置"
1180
+ }, [
1181
+ h(n(L), {
1182
+ name: "skin",
1183
+ size: 16
1184
+ })
1185
+ ]),
1186
+ e("div", {
1187
+ class: "top-menu__action",
1188
+ onClick: W,
1189
+ title: "切换主题"
1190
+ }, [
1191
+ h(n(L), {
1192
+ name: n(l).isDark ? "sun" : "moon",
1193
+ size: 16
1194
+ }, null, 8, ["name"])
1195
+ ]),
1196
+ e("div", {
1197
+ class: "top-menu__user",
1198
+ ref_key: "dropdownRef",
1199
+ ref: w
1200
+ }, [
1201
+ e("div", {
1202
+ class: "top-menu__user-trigger",
1203
+ onClick: Te(le, ["stop"])
1204
+ }, [
1205
+ e("div", Zs, [
1206
+ e("span", null, C(((T = n(u).userName) == null ? void 0 : T.charAt(0)) || "U"), 1)
1207
+ ]),
1208
+ e("span", eo, C(n(u).userName), 1),
1209
+ e("span", {
1210
+ class: F(["top-menu__user-arrow", { "is-active": v.value }])
1211
+ }, "▼", 2)
1212
+ ]),
1213
+ h(Le, { name: "dropdown" }, {
1214
+ default: M(() => {
1215
+ var s;
1216
+ return [
1217
+ v.value ? (i(), m("div", to, [
1218
+ e("div", so, [
1219
+ e("div", oo, [
1220
+ e("span", null, C(((s = n(u).userName) == null ? void 0 : s.charAt(0)) || "U"), 1)
1221
+ ]),
1222
+ e("div", no, [
1223
+ e("div", ao, C(n(u).userName), 1),
1224
+ e("div", lo, C(n(u).departmentName), 1)
1225
+ ])
1226
+ ]),
1227
+ x[6] || (x[6] = e("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1228
+ e("div", ro, [
1229
+ e("div", {
1230
+ class: "top-menu__dropdown-item",
1231
+ onClick: _e
1232
+ }, [
1233
+ h(n(L), {
1234
+ name: "user",
1235
+ size: 16
1236
+ }),
1237
+ x[2] || (x[2] = e("span", null, "个人信息", -1))
1238
+ ]),
1239
+ e("div", {
1240
+ class: "top-menu__dropdown-item",
1241
+ onClick: he
1242
+ }, [
1243
+ h(n(L), {
1244
+ name: "lock",
1245
+ size: 16
1246
+ }),
1247
+ x[3] || (x[3] = e("span", null, "修改密码", -1))
1248
+ ]),
1249
+ x[5] || (x[5] = e("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1250
+ e("div", {
1251
+ class: "top-menu__dropdown-item top-menu__dropdown-item--danger",
1252
+ onClick: fe
1253
+ }, [
1254
+ h(n(L), {
1255
+ name: "logout",
1256
+ size: 16
1257
+ }),
1258
+ x[4] || (x[4] = e("span", null, "退出登录", -1))
1259
+ ])
1260
+ ])
1261
+ ])) : B("", !0)
1262
+ ];
1263
+ }),
1264
+ _: 1
1265
+ })
1266
+ ], 512)
1267
+ ]),
1268
+ h(n(je), {
1269
+ modelValue: U.value,
1270
+ "onUpdate:modelValue": x[0] || (x[0] = (s) => U.value = s),
1271
+ title: "换肤设置",
1272
+ direction: "rtl",
1273
+ size: "320px"
1274
+ }, {
1275
+ default: M(() => [
1276
+ e("div", io, [
1277
+ e("div", uo, [
1278
+ x[10] || (x[10] = e("div", { class: "settings-title" }, "布局模式", -1)),
1279
+ e("div", co, [
1280
+ (i(), m(j, null, H(se, (s) => e("div", {
1281
+ key: s.value,
1282
+ class: F(["layout-option", { "is-active": Z.value === s.value }]),
1283
+ onClick: (c) => ce(s.value)
1284
+ }, [
1285
+ e("div", po, [
1286
+ s.value === "sidebar" ? (i(), m("div", vo, [...x[7] || (x[7] = [
1287
+ e("div", { class: "preview-aside" }, null, -1),
1288
+ e("div", { class: "preview-main" }, [
1289
+ e("div", { class: "preview-header" }),
1290
+ e("div", { class: "preview-content" })
1291
+ ], -1)
1292
+ ])])) : s.value === "top" ? (i(), m("div", _o, [...x[8] || (x[8] = [
1293
+ e("div", { class: "preview-header-full" }, null, -1),
1294
+ e("div", { class: "preview-content-full" }, null, -1)
1295
+ ])])) : (i(), m("div", ho, [...x[9] || (x[9] = [
1296
+ e("div", { class: "preview-header-mix" }, [
1297
+ e("div", { class: "preview-mix-left" })
1298
+ ], -1),
1299
+ e("div", { class: "preview-mix-body" }, [
1300
+ e("div", { class: "preview-mix-aside" }),
1301
+ e("div", { class: "preview-mix-content" })
1302
+ ], -1)
1303
+ ])]))
1304
+ ]),
1305
+ e("span", fo, C(s.label), 1)
1306
+ ], 10, mo)), 64))
1307
+ ])
1308
+ ]),
1309
+ e("div", go, [
1310
+ x[11] || (x[11] = e("div", { class: "settings-title" }, "主题色", -1)),
1311
+ e("div", yo, [
1312
+ (i(), m(j, null, H(ie, (s) => e("div", {
1313
+ key: s.value,
1314
+ class: F(["color-option", { "is-active": n(l).primaryColor === s.value }]),
1315
+ style: ke({ backgroundColor: s.value }),
1316
+ title: s.label,
1317
+ onClick: (c) => de(s.value)
1318
+ }, [
1319
+ n(l).primaryColor === s.value ? (i(), K(n(L), {
1320
+ key: 0,
1321
+ name: "check",
1322
+ size: 12,
1323
+ color: "#fff"
1324
+ })) : B("", !0)
1325
+ ], 14, ko)), 64))
1326
+ ])
1327
+ ]),
1328
+ e("div", wo, [
1329
+ x[16] || (x[16] = e("div", { class: "settings-title" }, "功能设置", -1)),
1330
+ e("div", bo, [
1331
+ e("div", xo, [
1332
+ x[13] || (x[13] = e("span", null, "灰色模式", -1)),
1333
+ e("div", {
1334
+ class: F(["switch-wrapper", { "is-checked": R.value }]),
1335
+ onClick: J
1336
+ }, [...x[12] || (x[12] = [
1337
+ e("span", { class: "switch-core" }, null, -1)
1338
+ ])], 2)
1339
+ ]),
1340
+ e("div", Co, [
1341
+ x[15] || (x[15] = e("span", null, "暗黑模式", -1)),
1342
+ e("div", {
1343
+ class: F(["switch-wrapper", { "is-checked": n(l).isDark }]),
1344
+ onClick: I
1345
+ }, [...x[14] || (x[14] = [
1346
+ e("span", { class: "switch-core" }, null, -1)
1347
+ ])], 2)
1348
+ ])
1349
+ ])
1350
+ ])
1351
+ ])
1352
+ ]),
1353
+ _: 1
1354
+ }, 8, ["modelValue"])
1355
+ ]);
1356
+ };
1357
+ }
1358
+ }), Lo = /* @__PURE__ */ Q($o, [["__scopeId", "data-v-94be9db4"]]), So = { class: "mix-top-menu" }, Mo = { class: "mix-top-menu__logo" }, Io = { class: "mix-top-menu__logo-text" }, To = { class: "mix-top-menu__menu-content" }, Eo = { class: "mix-top-menu__menu-icon" }, Uo = {
1359
+ key: 1,
1360
+ class: "mix-top-menu__menu-char"
1361
+ }, No = { class: "mix-top-menu__menu-text" }, Do = { class: "mix-top-menu__actions" }, zo = ["title"], Ro = { class: "mix-top-menu__avatar" }, Ao = { class: "mix-top-menu__user-name" }, Po = {
1362
+ key: 0,
1363
+ class: "mix-top-menu__dropdown"
1364
+ }, Oo = { class: "mix-top-menu__dropdown-header" }, Vo = { class: "mix-top-menu__dropdown-avatar" }, Fo = { class: "mix-top-menu__dropdown-info" }, Bo = { class: "mix-top-menu__dropdown-name" }, Ko = { class: "mix-top-menu__dropdown-role" }, jo = { class: "mix-top-menu__dropdown-menu" }, qo = { class: "settings-drawer" }, Yo = { class: "settings-section" }, Wo = { class: "settings-layout-options" }, Ho = ["onClick"], Go = { class: "layout-option__preview" }, Xo = {
1365
+ key: 0,
1366
+ class: "layout-preview-sidebar"
1367
+ }, Jo = {
1368
+ key: 1,
1369
+ class: "layout-preview-top"
1370
+ }, Qo = {
1371
+ key: 2,
1372
+ class: "layout-preview-mix"
1373
+ }, Zo = { class: "layout-option__label" }, en = { class: "settings-section" }, tn = { class: "settings-color-options" }, sn = ["title", "onClick"], on = { class: "settings-section" }, nn = { class: "settings-switch-list" }, an = { class: "settings-switch-item" }, ln = { class: "settings-switch-item" }, rn = /* @__PURE__ */ ee({
1374
+ __name: "MixTopMenu",
1375
+ setup(t) {
1376
+ const o = ve(), a = ne(), r = ue(), l = ae(), u = G(), $ = be(), d = g(""), f = k(() => {
1377
+ const s = r.menuList.find((c) => c.menuUrl === d.value);
1378
+ return (s == null ? void 0 : s.children) || [];
1379
+ }), p = k(() => r.menuList.find((s) => !!(o.path === s.menuUrl || s.children && s.children.some((c) => o.path.startsWith(c.menuUrl) || o.path === c.menuUrl)))), _ = () => {
1380
+ p.value ? d.value = p.value.menuUrl : r.menuList.length > 0 && (d.value = r.menuList[0].menuUrl);
1381
+ }, v = (s) => {
1382
+ d.value = s;
1383
+ const c = r.menuList.find((y) => y.menuUrl === s);
1384
+ if (c)
1385
+ if (c.children && c.children.length > 0) {
1386
+ const y = c.children[0].menuUrl;
1387
+ o.path !== y && a.push(y);
1388
+ } else
1389
+ o.path !== s && a.push(s);
1390
+ }, w = k(() => l.isDark ? "#1d1e1f" : "#fff"), q = k(() => l.isDark ? "#cfd3dc" : "#303133"), U = k(() => "#409eff"), R = g(!1), O = g(null), A = g(!1), z = g(!1), V = g(!1);
1391
+ Ae(() => o.path, () => {
1392
+ _(), l.setMixSubMenus(f.value);
1393
+ }), Ae(() => r.menuList, (s) => {
1394
+ s && s.length > 0 && (_(), l.setMixSubMenus(f.value));
1395
+ }, { immediate: !0 });
1396
+ const N = /* @__PURE__ */ new Set([
1397
+ "arrow-up",
1398
+ "arrow-down",
1399
+ "arrow-left",
1400
+ "arrow-right",
1401
+ "caret-down",
1402
+ "caret-right",
1403
+ "plus",
1404
+ "minus",
1405
+ "close",
1406
+ "check",
1407
+ "edit",
1408
+ "delete",
1409
+ "copy",
1410
+ "download",
1411
+ "upload",
1412
+ "refresh",
1413
+ "search",
1414
+ "filter",
1415
+ "more",
1416
+ "setting",
1417
+ "share",
1418
+ "loading",
1419
+ "info",
1420
+ "success",
1421
+ "warning",
1422
+ "error",
1423
+ "question",
1424
+ "user",
1425
+ "user-add",
1426
+ "user-group",
1427
+ "logout",
1428
+ "login",
1429
+ "file",
1430
+ "folder",
1431
+ "folder-open",
1432
+ "document",
1433
+ "image",
1434
+ "video",
1435
+ "music",
1436
+ "camera",
1437
+ "mail",
1438
+ "phone",
1439
+ "chat",
1440
+ "bell",
1441
+ "message",
1442
+ "eye",
1443
+ "eye-off",
1444
+ "calendar",
1445
+ "clock",
1446
+ "history",
1447
+ "timer",
1448
+ "location",
1449
+ "map",
1450
+ "globe",
1451
+ "star",
1452
+ "heart",
1453
+ "thumb-up",
1454
+ "link",
1455
+ "external-link",
1456
+ "lock",
1457
+ "unlock",
1458
+ "key",
1459
+ "home",
1460
+ "menu",
1461
+ "menu-fold",
1462
+ "menu-unfold",
1463
+ "sidebar-fold",
1464
+ "sidebar-expand",
1465
+ "sidebar-left",
1466
+ "dashboard",
1467
+ "chart",
1468
+ "chart-pie",
1469
+ "chart-line",
1470
+ "report",
1471
+ "analytics",
1472
+ "system",
1473
+ "permission",
1474
+ "role",
1475
+ "user-manage",
1476
+ "log",
1477
+ "notification",
1478
+ "app",
1479
+ "list",
1480
+ "grid",
1481
+ "fullscreen",
1482
+ "fullscreen-exit",
1483
+ "zoom-in",
1484
+ "zoom-out",
1485
+ "print",
1486
+ "bookmark",
1487
+ "tag",
1488
+ "code",
1489
+ "terminal",
1490
+ "database",
1491
+ "server",
1492
+ "cloud",
1493
+ "gift",
1494
+ "moon",
1495
+ "sun",
1496
+ "theme",
1497
+ "skin"
1498
+ ]), W = (s) => {
1499
+ if (!s || s === "") return "";
1500
+ if (s.startsWith("tineco-icon-")) {
1501
+ const y = s.replace("tineco-icon-", "");
1502
+ return {
1503
+ home: "home",
1504
+ dashboard: "dashboard",
1505
+ system: "system",
1506
+ user: "user",
1507
+ role: "role",
1508
+ menu: "list",
1509
+ setting: "setting",
1510
+ file: "file",
1511
+ folder: "folder",
1512
+ chart: "chart",
1513
+ report: "report",
1514
+ analytics: "analytics"
1515
+ }[y] || y;
1516
+ }
1517
+ return {
1518
+ dashboard: "dashboard",
1519
+ system: "system",
1520
+ user: "user",
1521
+ role: "role",
1522
+ menu: "list",
1523
+ setting: "setting",
1524
+ home: "home",
1525
+ chart: "chart",
1526
+ report: "report",
1527
+ analytics: "analytics",
1528
+ permission: "permission",
1529
+ log: "log",
1530
+ notification: "notification",
1531
+ app: "app",
1532
+ list: "list",
1533
+ grid: "grid"
1534
+ }[s] || s;
1535
+ }, D = (s) => s ? s.charAt(0) : "", Y = (s) => N.has(s), le = () => {
1536
+ l.toggleTheme(), z.value = !1;
1537
+ }, X = () => {
1538
+ document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1539
+ }, te = () => {
1540
+ A.value = !!document.fullscreenElement;
1541
+ }, re = () => {
1542
+ R.value = !R.value;
1543
+ }, J = () => {
1544
+ R.value = !1;
1545
+ }, I = () => {
1546
+ z.value = !0;
1547
+ }, se = (s) => {
1548
+ V.value = s;
1549
+ const c = document.documentElement;
1550
+ s ? c.classList.add("grey-mode") : c.classList.remove("grey-mode");
1551
+ }, Z = () => {
1552
+ se(!V.value), z.value = !1;
1553
+ }, ce = () => {
1554
+ l.toggleTheme(), z.value = !1;
1555
+ }, ie = [
1556
+ { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1557
+ { value: "top", label: "顶部菜单", icon: "menu" },
1558
+ { value: "mix", label: "混合菜单", icon: "grid" }
1559
+ ], de = k(() => l.layout), _e = (s) => {
1560
+ l.setLayout(s), z.value = !1;
1561
+ }, he = [
1562
+ { value: "#409eff", label: "默认蓝" },
1563
+ { value: "#1890ff", label: "科技蓝" },
1564
+ { value: "#52c41a", label: "极光绿" },
1565
+ { value: "#faad14", label: "日落橙" },
1566
+ { value: "#f5222d", label: "薄暮红" },
1567
+ { value: "#722ed1", label: "酱紫" }
1568
+ ], fe = (s) => {
1569
+ l.setPrimaryColor(s), z.value = !1;
1570
+ }, me = () => {
1571
+ J(), a.push("/profile");
1572
+ }, E = () => {
1573
+ J(), a.push("/change-password");
1574
+ }, x = () => {
1575
+ J(), $.logout(), u.clearUserInfo(), r.clearMenu(), a.push("/login");
1576
+ }, T = (s) => {
1577
+ O.value && !O.value.contains(s.target) && J();
1578
+ };
1579
+ return Pe(() => {
1580
+ document.addEventListener("click", T), document.addEventListener("fullscreenchange", te), V.value = document.documentElement.classList.contains("grey-mode"), _();
1581
+ }), Oe(() => {
1582
+ document.removeEventListener("click", T), document.removeEventListener("fullscreenchange", te);
1583
+ }), (s, c) => {
1584
+ var y;
1585
+ return i(), m("div", So, [
1586
+ e("div", Mo, [
1587
+ c[1] || (c[1] = e("img", {
1588
+ src: Ne,
1589
+ alt: "Logo",
1590
+ class: "mix-top-menu__logo-img"
1591
+ }, null, -1)),
1592
+ e("span", Io, C(n(l).appName), 1)
1593
+ ]),
1594
+ h(n(Ke), {
1595
+ "default-active": d.value,
1596
+ mode: "horizontal",
1597
+ "background-color": w.value,
1598
+ "text-color": q.value,
1599
+ "active-text-color": U.value,
1600
+ class: "mix-top-menu__menu",
1601
+ onSelect: v
1602
+ }, {
1603
+ default: M(() => [
1604
+ (i(!0), m(j, null, H(n(r).menuList, (S) => (i(), K(n(we), {
1605
+ key: S.menuUrl,
1606
+ index: S.menuUrl
1607
+ }, {
1608
+ default: M(() => [
1609
+ e("span", To, [
1610
+ e("span", Eo, [
1611
+ Y(W(S.icon)) ? (i(), K(n(L), {
1612
+ key: 0,
1613
+ name: W(S.icon),
1614
+ size: 16
1615
+ }, null, 8, ["name"])) : (i(), m("span", Uo, C(D(S.menuName)), 1))
1616
+ ]),
1617
+ e("span", No, C(S.menuName), 1)
1618
+ ])
1619
+ ]),
1620
+ _: 2
1621
+ }, 1032, ["index"]))), 128))
1622
+ ]),
1623
+ _: 1
1624
+ }, 8, ["default-active", "background-color", "text-color", "active-text-color"]),
1625
+ e("div", Do, [
1626
+ e("div", {
1627
+ class: "mix-top-menu__action",
1628
+ onClick: X,
1629
+ title: A.value ? "退出全屏" : "全屏"
1630
+ }, [
1631
+ h(n(L), {
1632
+ name: A.value ? "fullscreen-exit" : "fullscreen",
1633
+ size: 16
1634
+ }, null, 8, ["name"])
1635
+ ], 8, zo),
1636
+ e("div", {
1637
+ class: "mix-top-menu__action",
1638
+ onClick: I,
1639
+ title: "换肤设置"
1640
+ }, [
1641
+ h(n(L), {
1642
+ name: "skin",
1643
+ size: 16
1644
+ })
1645
+ ]),
1646
+ e("div", {
1647
+ class: "mix-top-menu__action",
1648
+ onClick: le,
1649
+ title: "切换主题"
1650
+ }, [
1651
+ h(n(L), {
1652
+ name: n(l).isDark ? "sun" : "moon",
1653
+ size: 16
1654
+ }, null, 8, ["name"])
1655
+ ]),
1656
+ e("div", {
1657
+ class: "mix-top-menu__user",
1658
+ ref_key: "dropdownRef",
1659
+ ref: O
1660
+ }, [
1661
+ e("div", {
1662
+ class: "mix-top-menu__user-trigger",
1663
+ onClick: Te(re, ["stop"])
1664
+ }, [
1665
+ e("div", Ro, [
1666
+ e("span", null, C(((y = n(u).userName) == null ? void 0 : y.charAt(0)) || "U"), 1)
1667
+ ]),
1668
+ e("span", Ao, C(n(u).userName), 1),
1669
+ e("span", {
1670
+ class: F(["mix-top-menu__user-arrow", { "is-active": R.value }])
1671
+ }, "▼", 2)
1672
+ ]),
1673
+ h(Le, { name: "dropdown" }, {
1674
+ default: M(() => {
1675
+ var S;
1676
+ return [
1677
+ R.value ? (i(), m("div", Po, [
1678
+ e("div", Oo, [
1679
+ e("div", Vo, [
1680
+ e("span", null, C(((S = n(u).userName) == null ? void 0 : S.charAt(0)) || "U"), 1)
1681
+ ]),
1682
+ e("div", Fo, [
1683
+ e("div", Bo, C(n(u).userName), 1),
1684
+ e("div", Ko, C(n(u).departmentName), 1)
1685
+ ])
1686
+ ]),
1687
+ c[6] || (c[6] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
1688
+ e("div", jo, [
1689
+ e("div", {
1690
+ class: "mix-top-menu__dropdown-item",
1691
+ onClick: me
1692
+ }, [
1693
+ h(n(L), {
1694
+ name: "user",
1695
+ size: 16
1696
+ }),
1697
+ c[2] || (c[2] = e("span", null, "个人信息", -1))
1698
+ ]),
1699
+ e("div", {
1700
+ class: "mix-top-menu__dropdown-item",
1701
+ onClick: E
1702
+ }, [
1703
+ h(n(L), {
1704
+ name: "lock",
1705
+ size: 16
1706
+ }),
1707
+ c[3] || (c[3] = e("span", null, "修改密码", -1))
1708
+ ]),
1709
+ c[5] || (c[5] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
1710
+ e("div", {
1711
+ class: "mix-top-menu__dropdown-item mix-top-menu__dropdown-item--danger",
1712
+ onClick: x
1713
+ }, [
1714
+ h(n(L), {
1715
+ name: "logout",
1716
+ size: 16
1717
+ }),
1718
+ c[4] || (c[4] = e("span", null, "退出登录", -1))
1719
+ ])
1720
+ ])
1721
+ ])) : B("", !0)
1722
+ ];
1723
+ }),
1724
+ _: 1
1725
+ })
1726
+ ], 512)
1727
+ ]),
1728
+ h(n(je), {
1729
+ modelValue: z.value,
1730
+ "onUpdate:modelValue": c[0] || (c[0] = (S) => z.value = S),
1731
+ title: "换肤设置",
1732
+ direction: "rtl",
1733
+ size: "320px"
1734
+ }, {
1735
+ default: M(() => [
1736
+ e("div", qo, [
1737
+ e("div", Yo, [
1738
+ c[10] || (c[10] = e("div", { class: "settings-title" }, "布局模式", -1)),
1739
+ e("div", Wo, [
1740
+ (i(), m(j, null, H(ie, (S) => e("div", {
1741
+ key: S.value,
1742
+ class: F(["layout-option", { "is-active": de.value === S.value }]),
1743
+ onClick: (Qe) => _e(S.value)
1744
+ }, [
1745
+ e("div", Go, [
1746
+ S.value === "sidebar" ? (i(), m("div", Xo, [...c[7] || (c[7] = [
1747
+ e("div", { class: "preview-aside" }, null, -1),
1748
+ e("div", { class: "preview-main" }, [
1749
+ e("div", { class: "preview-header" }),
1750
+ e("div", { class: "preview-content" })
1751
+ ], -1)
1752
+ ])])) : S.value === "top" ? (i(), m("div", Jo, [...c[8] || (c[8] = [
1753
+ e("div", { class: "preview-header-full" }, null, -1),
1754
+ e("div", { class: "preview-content-full" }, null, -1)
1755
+ ])])) : (i(), m("div", Qo, [...c[9] || (c[9] = [
1756
+ e("div", { class: "preview-header-mix" }, [
1757
+ e("div", { class: "preview-mix-left" })
1758
+ ], -1),
1759
+ e("div", { class: "preview-mix-body" }, [
1760
+ e("div", { class: "preview-mix-aside" }),
1761
+ e("div", { class: "preview-mix-content" })
1762
+ ], -1)
1763
+ ])]))
1764
+ ]),
1765
+ e("span", Zo, C(S.label), 1)
1766
+ ], 10, Ho)), 64))
1767
+ ])
1768
+ ]),
1769
+ e("div", en, [
1770
+ c[11] || (c[11] = e("div", { class: "settings-title" }, "主题色", -1)),
1771
+ e("div", tn, [
1772
+ (i(), m(j, null, H(he, (S) => e("div", {
1773
+ key: S.value,
1774
+ class: F(["color-option", { "is-active": n(l).primaryColor === S.value }]),
1775
+ style: ke({ backgroundColor: S.value }),
1776
+ title: S.label,
1777
+ onClick: (Qe) => fe(S.value)
1778
+ }, [
1779
+ n(l).primaryColor === S.value ? (i(), K(n(L), {
1780
+ key: 0,
1781
+ name: "check",
1782
+ size: 12,
1783
+ color: "#fff"
1784
+ })) : B("", !0)
1785
+ ], 14, sn)), 64))
1786
+ ])
1787
+ ]),
1788
+ e("div", on, [
1789
+ c[16] || (c[16] = e("div", { class: "settings-title" }, "功能设置", -1)),
1790
+ e("div", nn, [
1791
+ e("div", an, [
1792
+ c[13] || (c[13] = e("span", null, "灰色模式", -1)),
1793
+ e("div", {
1794
+ class: F(["switch-wrapper", { "is-checked": V.value }]),
1795
+ onClick: Z
1796
+ }, [...c[12] || (c[12] = [
1797
+ e("span", { class: "switch-core" }, null, -1)
1798
+ ])], 2)
1799
+ ]),
1800
+ e("div", ln, [
1801
+ c[15] || (c[15] = e("span", null, "暗黑模式", -1)),
1802
+ e("div", {
1803
+ class: F(["switch-wrapper", { "is-checked": n(l).isDark }]),
1804
+ onClick: ce
1805
+ }, [...c[14] || (c[14] = [
1806
+ e("span", { class: "switch-core" }, null, -1)
1807
+ ])], 2)
1808
+ ])
1809
+ ])
1810
+ ])
1811
+ ])
1812
+ ]),
1813
+ _: 1
1814
+ }, 8, ["modelValue"])
1815
+ ]);
1816
+ };
1817
+ }
1818
+ }), un = /* @__PURE__ */ Q(rn, [["__scopeId", "data-v-99952c48"]]), cn = {
1819
+ key: 0,
1820
+ class: "layout layout--sidebar"
1821
+ }, dn = { class: "layout__main" }, mn = { class: "layout__header" }, pn = { class: "layout__content" }, vn = {
1822
+ key: 1,
1823
+ class: "layout layout--top"
1824
+ }, _n = { class: "layout__top-menu" }, hn = { class: "layout__main" }, fn = { class: "layout__content" }, gn = {
1825
+ key: 2,
1826
+ class: "layout layout--mix"
1827
+ }, yn = { class: "layout__mix-top-menu" }, kn = { class: "layout__mix-body" }, wn = { class: "layout__content" }, bn = /* @__PURE__ */ ee({
1828
+ __name: "index",
1829
+ setup(t) {
1830
+ const o = ae(), a = ue(), r = k(
1831
+ () => o.isCollapsed ? "64px" : "210px"
1832
+ ), l = k(() => o.layout), u = k(() => l.value === "mix"), $ = k(() => l.value === "sidebar" ? a.menuList : l.value === "mix" ? o.mixSubMenus : []), d = k(() => u.value ? $.value.length > 0 : !1);
1833
+ return (f, p) => {
1834
+ const _ = _t("router-view");
1835
+ return i(), m(j, null, [
1836
+ l.value === "sidebar" ? (i(), m("div", cn, [
1837
+ e("aside", {
1838
+ class: "layout__aside",
1839
+ style: ke({ width: r.value })
1840
+ }, [
1841
+ h(et, {
1842
+ "menu-list": $.value,
1843
+ "show-logo": !0,
1844
+ "show-user": !0
1845
+ }, null, 8, ["menu-list"])
1846
+ ], 4),
1847
+ e("div", dn, [
1848
+ e("header", mn, [
1849
+ h(zs)
1850
+ ]),
1851
+ e("main", pn, [
1852
+ h(_)
1853
+ ])
1854
+ ])
1855
+ ])) : B("", !0),
1856
+ l.value === "top" ? (i(), m("div", vn, [
1857
+ e("div", _n, [
1858
+ h(Lo)
1859
+ ]),
1860
+ e("div", hn, [
1861
+ e("main", fn, [
1862
+ h(_)
1863
+ ])
1864
+ ])
1865
+ ])) : B("", !0),
1866
+ l.value === "mix" ? (i(), m("div", gn, [
1867
+ e("div", yn, [
1868
+ h(un)
1869
+ ]),
1870
+ e("div", kn, [
1871
+ d.value ? (i(), m("aside", {
1872
+ key: 0,
1873
+ class: "layout__aside",
1874
+ style: ke({ width: r.value })
1875
+ }, [
1876
+ h(et, {
1877
+ "menu-list": $.value,
1878
+ "show-logo": !1,
1879
+ "show-user": !1
1880
+ }, null, 8, ["menu-list"])
1881
+ ], 4)) : B("", !0),
1882
+ e("main", wn, [
1883
+ h(_)
1884
+ ])
1885
+ ])
1886
+ ])) : B("", !0)
1887
+ ], 64);
1888
+ };
1889
+ }
1890
+ }), it = /* @__PURE__ */ Q(bn, [["__scopeId", "data-v-820ea22e"]]), xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1891
+ __proto__: null,
1892
+ default: it
1893
+ }, Symbol.toStringTag, { value: "Module" })), Cn = { class: "tabs-wrapper" }, $n = { class: "tab-label" }, Ln = ["onClick"], Sn = /* @__PURE__ */ ee({
1894
+ __name: "Tabs",
1895
+ setup(t) {
1896
+ const o = ve(), a = ne(), r = k(() => {
1897
+ const d = [];
1898
+ return o.matched.forEach((f) => {
1899
+ var p;
1900
+ (p = f.meta) != null && p.affix && d.push({
1901
+ name: f.name,
1902
+ title: f.meta.title,
1903
+ path: f.path,
1904
+ affix: !0
1905
+ });
1906
+ }), d;
1907
+ }), l = k(() => o.path), u = (d) => {
1908
+ a.push(d);
1909
+ }, $ = (d) => {
1910
+ const f = r.value.find((p) => p.path === d);
1911
+ if (!(f != null && f.affix) && d === l.value) {
1912
+ const p = r.value.findIndex((v) => v.path === d), _ = r.value[p - 1] || r.value[p + 1];
1913
+ _ && a.push(_.path);
1914
+ }
1915
+ };
1916
+ return (d, f) => (i(), m("div", Cn, [
1917
+ h(n(ht), {
1918
+ modelValue: l.value,
1919
+ "onUpdate:modelValue": f[0] || (f[0] = (p) => l.value = p),
1920
+ type: "card",
1921
+ onTabClick: u
1922
+ }, {
1923
+ default: M(() => [
1924
+ (i(!0), m(j, null, H(r.value, (p) => (i(), K(n(ft), {
1925
+ key: p.path,
1926
+ name: p.path,
1927
+ label: p.title,
1928
+ closable: !p.affix
1929
+ }, {
1930
+ label: M(() => [
1931
+ e("span", $n, [
1932
+ pe(C(p.title) + " ", 1),
1933
+ p.affix ? B("", !0) : (i(), m("span", {
1934
+ key: 0,
1935
+ class: "tab-close",
1936
+ onClick: Te((_) => $(p.path), ["stop"])
1937
+ }, " ✕ ", 8, Ln))
1938
+ ])
1939
+ ]),
1940
+ _: 2
1941
+ }, 1032, ["name", "label", "closable"]))), 128))
1942
+ ]),
1943
+ _: 1
1944
+ }, 8, ["modelValue"])
1945
+ ]));
1946
+ }
1947
+ }), ma = /* @__PURE__ */ Q(Sn, [["__scopeId", "data-v-9156d8cd"]]), Mn = {}, In = { class: "footer" };
1948
+ function Tn(t, o) {
1949
+ return i(), m("div", In, [...o[0] || (o[0] = [
1950
+ e("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
1951
+ ])]);
1952
+ }
1953
+ const pa = /* @__PURE__ */ Q(Mn, [["render", Tn], ["__scopeId", "data-v-4852826a"]]), En = () => {
1954
+ const t = kt.create({
1955
+ baseURL: void 0,
1956
+ timeout: 3e4,
1957
+ headers: {
1958
+ "Content-Type": "application/json"
1959
+ }
1960
+ });
1961
+ return t.interceptors.request.use(
1962
+ (o) => {
1963
+ const a = De(), r = xt() || "Bearer";
1964
+ return a && (o.headers.Authorization = `${r} ${a}`), o;
1965
+ },
1966
+ (o) => Promise.reject(o)
1967
+ ), t.interceptors.response.use(
1968
+ (o) => {
1969
+ const { data: a } = o;
1970
+ return a.code === 200 || a.code === 0 ? a.data : (oe.error(a.message || "请求失败"), Promise.reject(new Error(a.message || "请求失败")));
1971
+ },
1972
+ (o) => {
1973
+ var r;
1974
+ const { response: a } = o;
1975
+ if (a)
1976
+ switch (a.status) {
1977
+ case 401:
1978
+ oe.error("登录已过期,请重新登录"), lt(), window.location.href = "/login";
1979
+ break;
1980
+ case 403:
1981
+ oe.error("没有权限访问");
1982
+ break;
1983
+ case 404:
1984
+ oe.error("请求资源不存在");
1985
+ break;
1986
+ case 500:
1987
+ oe.error("服务器错误");
1988
+ break;
1989
+ default:
1990
+ oe.error(((r = a.data) == null ? void 0 : r.message) || "请求失败");
1991
+ }
1992
+ else
1993
+ oe.error("网络连接失败");
1994
+ return Promise.reject(o);
1995
+ }
1996
+ ), t;
1997
+ }, ye = En(), P = {
1998
+ get(t, o) {
1999
+ return ye.get(t, o);
2000
+ },
2001
+ post(t, o, a) {
2002
+ return ye.post(t, o, a);
2003
+ },
2004
+ put(t, o, a) {
2005
+ return ye.put(t, o, a);
2006
+ },
2007
+ patch(t, o, a) {
2008
+ return ye.patch(t, o, a);
2009
+ },
2010
+ delete(t, o) {
2011
+ return ye.delete(t, o);
2012
+ }
2013
+ };
2014
+ function Un(t) {
2015
+ return P.post("/user/v1.0/login/by-domain", t);
2016
+ }
2017
+ function va() {
2018
+ return P.put("/user/v1.0/user/logout");
2019
+ }
2020
+ function Nn() {
2021
+ return P.get("/user/v1.0/user/get-me");
2022
+ }
2023
+ function _a(t) {
2024
+ return P.post("/user/v1.0/refresh", { refreshToken: t });
2025
+ }
2026
+ const Se = g(""), Me = g(""), Ie = g("");
2027
+ function ha(t) {
2028
+ t.appId && (Se.value = t.appId), t.clientId && (Me.value = t.clientId), t.apiBaseUrl && (Ie.value = t.apiBaseUrl);
2029
+ }
2030
+ function Je() {
2031
+ if (Se.value)
2032
+ return Se.value;
2033
+ try {
2034
+ return "";
2035
+ } catch {
2036
+ return "";
2037
+ }
2038
+ }
2039
+ function Dn() {
2040
+ if (Me.value)
2041
+ return Me.value;
2042
+ try {
2043
+ return "";
2044
+ } catch {
2045
+ return "";
2046
+ }
2047
+ }
2048
+ function fa() {
2049
+ if (Ie.value)
2050
+ return Ie.value;
2051
+ try {
2052
+ return "";
2053
+ } catch {
2054
+ return "";
2055
+ }
2056
+ }
2057
+ const ga = {
2058
+ appId: Se,
2059
+ clientId: Me,
2060
+ apiBaseUrl: Ie
2061
+ }, zn = { class: "login" }, Rn = { class: "login__container" }, An = /* @__PURE__ */ ee({
2062
+ __name: "index",
2063
+ setup(t) {
2064
+ const o = ne(), a = ve(), r = g(!1), l = g(!1), u = Ve({
2065
+ uid: "",
2066
+ password: ""
2067
+ }), $ = {
2068
+ uid: [
2069
+ { required: !0, message: "请输入用户名", trigger: "blur" }
2070
+ ],
2071
+ password: [
2072
+ { required: !0, message: "请输入密码", trigger: "blur" },
2073
+ { min: 6, message: "密码长度至少6位", trigger: "blur" }
2074
+ ]
2075
+ }, d = g(), f = async () => {
2076
+ var p;
2077
+ try {
2078
+ await ((p = d.value) == null ? void 0 : p.validate()), r.value = !0;
2079
+ const _ = await Un({
2080
+ appId: Je(),
2081
+ clientId: Dn(),
2082
+ uid: u.uid,
2083
+ password: u.password,
2084
+ code: !0
2085
+ });
2086
+ at(_), oe.success("登录成功");
2087
+ const v = a.query.redirect || "/";
2088
+ o.push(v);
2089
+ } catch (_) {
2090
+ console.error("登录失败:", _);
2091
+ } finally {
2092
+ r.value = !1;
2093
+ }
2094
+ };
2095
+ return (p, _) => (i(), m("div", zn, [
2096
+ e("div", Rn, [
2097
+ _[5] || (_[5] = e("div", { class: "login__header" }, [
2098
+ e("img", {
2099
+ src: Ne,
2100
+ alt: "Logo",
2101
+ class: "login__logo"
2102
+ }),
2103
+ e("h1", { class: "login__title" }, "Xto Demo"),
2104
+ e("p", { class: "login__subtitle" }, "后台管理系统")
2105
+ ], -1)),
2106
+ h(n(gt), {
2107
+ ref_key: "formRef",
2108
+ ref: d,
2109
+ model: u,
2110
+ rules: $,
2111
+ class: "login__form",
2112
+ "label-width": "0"
2113
+ }, {
2114
+ default: M(() => [
2115
+ h(n(xe), { prop: "uid" }, {
2116
+ default: M(() => [
2117
+ h(n(Ze), {
2118
+ modelValue: u.uid,
2119
+ "onUpdate:modelValue": _[0] || (_[0] = (v) => u.uid = v),
2120
+ placeholder: "用户名",
2121
+ size: "large"
2122
+ }, {
2123
+ prefix: M(() => [
2124
+ h(n(L), {
2125
+ name: "user",
2126
+ size: 18
2127
+ })
2128
+ ]),
2129
+ _: 1
2130
+ }, 8, ["modelValue"])
2131
+ ]),
2132
+ _: 1
2133
+ }),
2134
+ h(n(xe), { prop: "password" }, {
2135
+ default: M(() => [
2136
+ h(n(Ze), {
2137
+ modelValue: u.password,
2138
+ "onUpdate:modelValue": _[1] || (_[1] = (v) => u.password = v),
2139
+ type: "password",
2140
+ placeholder: "密码",
2141
+ size: "large",
2142
+ "show-password": "",
2143
+ onKeyup: st(f, ["enter"])
2144
+ }, {
2145
+ prefix: M(() => [
2146
+ h(n(L), {
2147
+ name: "lock",
2148
+ size: 18
2149
+ })
2150
+ ]),
2151
+ _: 1
2152
+ }, 8, ["modelValue"])
2153
+ ]),
2154
+ _: 1
2155
+ }),
2156
+ h(n(xe), null, {
2157
+ default: M(() => [
2158
+ h(n(yt), {
2159
+ modelValue: l.value,
2160
+ "onUpdate:modelValue": _[2] || (_[2] = (v) => l.value = v)
2161
+ }, {
2162
+ default: M(() => [..._[3] || (_[3] = [
2163
+ pe("记住我", -1)
2164
+ ])]),
2165
+ _: 1
2166
+ }, 8, ["modelValue"])
2167
+ ]),
2168
+ _: 1
2169
+ }),
2170
+ h(n(xe), null, {
2171
+ default: M(() => [
2172
+ h(n(Ue), {
2173
+ type: "primary",
2174
+ size: "large",
2175
+ loading: r.value,
2176
+ class: "login__submit",
2177
+ onClick: f
2178
+ }, {
2179
+ default: M(() => [..._[4] || (_[4] = [
2180
+ pe(" 登录 ", -1)
2181
+ ])]),
2182
+ _: 1
2183
+ }, 8, ["loading"])
2184
+ ]),
2185
+ _: 1
2186
+ })
2187
+ ]),
2188
+ _: 1
2189
+ }, 8, ["model"]),
2190
+ _[6] || (_[6] = e("div", { class: "login__footer" }, [
2191
+ e("p", null, "请输入您的用户名和密码")
2192
+ ], -1))
2193
+ ])
2194
+ ]));
2195
+ }
2196
+ }), Pn = /* @__PURE__ */ Q(An, [["__scopeId", "data-v-f3e724b6"]]), On = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2197
+ __proto__: null,
2198
+ default: Pn
2199
+ }, Symbol.toStringTag, { value: "Module" })), Vn = { class: "error-page" }, Fn = { class: "error-page__content" }, Bn = /* @__PURE__ */ ee({
2200
+ __name: "404",
2201
+ setup(t) {
2202
+ const o = ne(), a = () => {
2203
+ o.push("/");
2204
+ };
2205
+ return (r, l) => (i(), m("div", Vn, [
2206
+ e("div", Fn, [
2207
+ l[1] || (l[1] = e("div", { class: "error-page__code" }, "404", -1)),
2208
+ l[2] || (l[2] = e("div", { class: "error-page__title" }, "页面不存在", -1)),
2209
+ l[3] || (l[3] = e("div", { class: "error-page__desc" }, "抱歉,您访问的页面不存在或已被删除", -1)),
2210
+ h(n(Ue), {
2211
+ type: "primary",
2212
+ onClick: a
2213
+ }, {
2214
+ default: M(() => [...l[0] || (l[0] = [
2215
+ pe("返回首页", -1)
2216
+ ])]),
2217
+ _: 1
2218
+ })
2219
+ ])
2220
+ ]));
2221
+ }
2222
+ }), Kn = /* @__PURE__ */ Q(Bn, [["__scopeId", "data-v-54fcac4c"]]), ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2223
+ __proto__: null,
2224
+ default: Kn
2225
+ }, Symbol.toStringTag, { value: "Module" })), jn = { class: "error-page" }, qn = { class: "error-page__content" }, Yn = /* @__PURE__ */ ee({
2226
+ __name: "403",
2227
+ setup(t) {
2228
+ const o = ne(), a = () => {
2229
+ o.push("/");
2230
+ };
2231
+ return (r, l) => (i(), m("div", jn, [
2232
+ e("div", qn, [
2233
+ l[1] || (l[1] = e("div", { class: "error-page__code" }, "403", -1)),
2234
+ l[2] || (l[2] = e("div", { class: "error-page__title" }, "无访问权限", -1)),
2235
+ l[3] || (l[3] = e("div", { class: "error-page__desc" }, "抱歉,您没有权限访问此页面", -1)),
2236
+ h(n(Ue), {
2237
+ type: "primary",
2238
+ onClick: a
2239
+ }, {
2240
+ default: M(() => [...l[0] || (l[0] = [
2241
+ pe("返回首页", -1)
2242
+ ])]),
2243
+ _: 1
2244
+ })
2245
+ ])
2246
+ ]));
2247
+ }
2248
+ }), ya = /* @__PURE__ */ Q(Yn, [["__scopeId", "data-v-b2ff9b3e"]]);
2249
+ function ka() {
2250
+ const t = ae(), o = G(), a = be(), r = k(() => o.userName || ""), l = k(() => o.userInfo), u = k(() => t.appName), $ = k(() => a.isLoggedIn), d = k(() => t.isDark), f = k(() => t.theme), p = k(() => t.isCollapsed), _ = k(() => t.layout);
2251
+ return {
2252
+ userName: r,
2253
+ userInfo: l,
2254
+ appName: u,
2255
+ isLoggedIn: $,
2256
+ isDark: d,
2257
+ theme: f,
2258
+ isCollapsed: p,
2259
+ layout: _,
2260
+ toggleTheme: () => {
2261
+ t.toggleTheme();
2262
+ },
2263
+ toggleCollapse: () => {
2264
+ t.toggleCollapse();
2265
+ }
2266
+ };
2267
+ }
2268
+ function wa() {
2269
+ const t = G();
2270
+ return {
2271
+ isLoggedIn: k(() => t.isLoggedIn)
2272
+ };
2273
+ }
2274
+ function ba(t, o = {}) {
2275
+ const { rules: a, onSubmit: r } = o, l = g(), u = Ve({ ...t }), $ = g(!1), d = g(!1), f = g(!1), p = () => {
2276
+ w(), f.value = !1, d.value = !0;
2277
+ }, _ = (U) => {
2278
+ Object.assign(u, U), f.value = !0, d.value = !0;
2279
+ }, v = () => {
2280
+ d.value = !1, w();
2281
+ }, w = () => {
2282
+ var U;
2283
+ Object.keys(t).forEach((R) => {
2284
+ u[R] = t[R];
2285
+ }), (U = l.value) == null || U.resetFields();
2286
+ };
2287
+ return {
2288
+ formRef: l,
2289
+ formData: u,
2290
+ rules: a,
2291
+ loading: $,
2292
+ visible: d,
2293
+ isEdit: f,
2294
+ openAdd: p,
2295
+ openEdit: _,
2296
+ close: v,
2297
+ resetForm: w,
2298
+ handleSubmit: async () => {
2299
+ var U;
2300
+ try {
2301
+ await ((U = l.value) == null ? void 0 : U.validate()), $.value = !0, await (r == null ? void 0 : r(u)), v();
2302
+ } catch (R) {
2303
+ console.error(R);
2304
+ } finally {
2305
+ $.value = !1;
2306
+ }
2307
+ }
2308
+ };
2309
+ }
2310
+ function xa(t) {
2311
+ const { fetchData: o, defaultPageSize: a = 10 } = t, r = g(!1), l = g([]), u = g(0), $ = g(1), d = g(a), f = Ve({}), p = async () => {
2312
+ r.value = !0;
2313
+ try {
2314
+ const O = {
2315
+ ...f,
2316
+ page: $.value,
2317
+ pageSize: d.value
2318
+ }, A = await o(O);
2319
+ l.value = A.list, u.value = A.total;
2320
+ } catch (O) {
2321
+ console.error(O);
2322
+ } finally {
2323
+ r.value = !1;
2324
+ }
2325
+ }, _ = () => {
2326
+ $.value = 1, p();
2327
+ }, v = () => {
2328
+ Object.keys(f).forEach((O) => {
2329
+ f[O] = void 0;
2330
+ }), $.value = 1, p();
2331
+ }, w = (O) => {
2332
+ $.value = O, p();
2333
+ }, q = (O) => {
2334
+ d.value = O, $.value = 1, p();
2335
+ }, U = () => {
2336
+ p();
2337
+ }, R = k(() => ({
2338
+ current: $.value,
2339
+ pageSize: d.value,
2340
+ total: u.value
2341
+ }));
2342
+ return {
2343
+ loading: r,
2344
+ data: l,
2345
+ total: u,
2346
+ currentPage: $,
2347
+ pageSize: d,
2348
+ searchParams: f,
2349
+ pagination: R,
2350
+ getData: p,
2351
+ handleSearch: _,
2352
+ handleReset: v,
2353
+ handlePageChange: w,
2354
+ handleSizeChange: q,
2355
+ refresh: U
2356
+ };
2357
+ }
2358
+ function Ca(t) {
2359
+ return G().isLoggedIn;
2360
+ }
2361
+ function $a(t) {
2362
+ return G().isLoggedIn;
2363
+ }
2364
+ function La() {
2365
+ return !0;
2366
+ }
2367
+ const ct = [
2368
+ {
2369
+ path: "/login",
2370
+ name: "Login",
2371
+ component: () => Promise.resolve().then(() => On),
2372
+ meta: {
2373
+ title: "登录",
2374
+ hidden: !0
2375
+ }
2376
+ }
2377
+ ], dt = {
2378
+ path: "/",
2379
+ name: "Layout",
2380
+ component: () => Promise.resolve().then(() => xn),
2381
+ redirect: "/dashboard",
2382
+ children: [
2383
+ {
2384
+ path: "/dashboard",
2385
+ name: "Dashboard",
2386
+ component: () => import("./index-DmFL_GSt.js"),
2387
+ meta: {
2388
+ title: "仪表盘",
2389
+ icon: "dashboard",
2390
+ keepAlive: !0,
2391
+ affix: !0
2392
+ }
2393
+ },
2394
+ {
2395
+ path: "/system/user",
2396
+ name: "SystemUser",
2397
+ component: () => import("./index-DqUuZC8f.js"),
2398
+ meta: {
2399
+ title: "用户管理",
2400
+ icon: "user",
2401
+ keepAlive: !0
2402
+ }
2403
+ },
2404
+ {
2405
+ path: "/system/role",
2406
+ name: "SystemRole",
2407
+ component: () => import("./index-hI3qofTF.js"),
2408
+ meta: {
2409
+ title: "角色管理",
2410
+ icon: "role",
2411
+ keepAlive: !0
2412
+ }
2413
+ },
2414
+ {
2415
+ path: "/system/menu",
2416
+ name: "SystemMenu",
2417
+ component: () => import("./index-B5RdBQ-f.js"),
2418
+ meta: {
2419
+ title: "菜单管理",
2420
+ icon: "menu",
2421
+ keepAlive: !0
2422
+ }
2423
+ },
2424
+ // catch-all 路由:让 404 在 Layout 内部渲染,保持左侧菜单显示
2425
+ {
2426
+ path: "/:pathMatch(.*)*",
2427
+ name: "CatchAll",
2428
+ component: () => Promise.resolve().then(() => ut),
2429
+ meta: {
2430
+ title: "404",
2431
+ hidden: !0
2432
+ }
2433
+ }
2434
+ ]
2435
+ }, Sa = [
2436
+ {
2437
+ path: "/dashboard",
2438
+ name: "Dashboard",
2439
+ component: () => import("./index-DmFL_GSt.js"),
2440
+ meta: {
2441
+ title: "仪表盘",
2442
+ icon: "dashboard",
2443
+ keepAlive: !0,
2444
+ affix: !0
2445
+ }
2446
+ },
2447
+ {
2448
+ path: "/system",
2449
+ name: "System",
2450
+ redirect: "/system/user",
2451
+ meta: {
2452
+ title: "系统管理",
2453
+ icon: "setting"
2454
+ },
2455
+ children: [
2456
+ {
2457
+ path: "user",
2458
+ name: "SystemUser",
2459
+ component: () => import("./index-DqUuZC8f.js"),
2460
+ meta: {
2461
+ title: "用户管理",
2462
+ icon: "user",
2463
+ keepAlive: !0
2464
+ }
2465
+ },
2466
+ {
2467
+ path: "role",
2468
+ name: "SystemRole",
2469
+ component: () => import("./index-hI3qofTF.js"),
2470
+ meta: {
2471
+ title: "角色管理",
2472
+ icon: "role",
2473
+ keepAlive: !0
2474
+ }
2475
+ },
2476
+ {
2477
+ path: "menu",
2478
+ name: "SystemMenu",
2479
+ component: () => import("./index-B5RdBQ-f.js"),
2480
+ meta: {
2481
+ title: "菜单管理",
2482
+ icon: "menu",
2483
+ keepAlive: !0
2484
+ }
2485
+ }
2486
+ ]
2487
+ }
2488
+ ], Wn = [
2489
+ {
2490
+ menuCode: "dashboard",
2491
+ menuName: "仪表盘",
2492
+ menuUrl: "/dashboard",
2493
+ icon: "dashboard",
2494
+ closable: !0,
2495
+ isDefault: !0,
2496
+ isOut: !1
2497
+ },
2498
+ {
2499
+ menuCode: "system",
2500
+ menuName: "系统管理",
2501
+ menuUrl: "/system",
2502
+ icon: "setting",
2503
+ closable: !1,
2504
+ isDefault: !1,
2505
+ isOut: !1,
2506
+ children: [
2507
+ {
2508
+ menuCode: "system_user",
2509
+ menuName: "用户管理",
2510
+ menuUrl: "/system/user",
2511
+ icon: "user",
2512
+ closable: !0,
2513
+ isDefault: !1,
2514
+ isOut: !1
2515
+ },
2516
+ {
2517
+ menuCode: "system_role",
2518
+ menuName: "角色管理",
2519
+ menuUrl: "/system/role",
2520
+ icon: "role",
2521
+ closable: !0,
2522
+ isDefault: !1,
2523
+ isOut: !1
2524
+ },
2525
+ {
2526
+ menuCode: "system_menu",
2527
+ menuName: "菜单管理",
2528
+ menuUrl: "/system/menu",
2529
+ icon: "menu",
2530
+ closable: !0,
2531
+ isDefault: !1,
2532
+ isOut: !1
2533
+ }
2534
+ ]
2535
+ }
2536
+ ], mt = Fe({
2537
+ history: Be(),
2538
+ routes: [...ct, dt],
2539
+ scrollBehavior: () => ({ left: 0, top: 0 })
2540
+ }), Hn = ["/login"];
2541
+ mt.beforeEach(async (t, o, a) => {
2542
+ const r = ae();
2543
+ if (r.initTheme(), rt())
2544
+ if (t.path === "/login")
2545
+ a({ path: "/" });
2546
+ else {
2547
+ const l = G();
2548
+ l.isLoggedIn || (l.setUserInfo({
2549
+ appId: Je(),
2550
+ userId: "1",
2551
+ userName: "管理员",
2552
+ departmentName: "技术部",
2553
+ email: "admin@example.com",
2554
+ mobilePhone: "13800138000",
2555
+ positionName: "管理员",
2556
+ avatar: ""
2557
+ }), ue().setMenuList(Wn)), t.name && t.meta.keepAlive && r.addCachedView(t.name), a();
2558
+ }
2559
+ else
2560
+ Hn.includes(t.path) ? a() : a("/login");
2561
+ });
2562
+ function Ma() {
2563
+ const t = Fe({
2564
+ history: Be(),
2565
+ routes: [...ct, dt]
2566
+ });
2567
+ mt.matcher = t.matcher;
2568
+ }
2569
+ function Ia(t, o = {}) {
2570
+ const a = o.indexPath || "/dashboard", r = {
2571
+ path: "/:pathMatch(.*)*",
2572
+ name: "CatchAll",
2573
+ component: () => Promise.resolve().then(() => ut),
2574
+ meta: {
2575
+ title: "404"
2576
+ }
2577
+ };
2578
+ return {
2579
+ path: "/",
2580
+ name: "Layout",
2581
+ component: it,
2582
+ redirect: a,
2583
+ children: [...t, r]
2584
+ };
2585
+ }
2586
+ function Ta(t) {
2587
+ return Fe({
2588
+ history: Be(),
2589
+ routes: t,
2590
+ scrollBehavior: () => ({ left: 0, top: 0 })
2591
+ });
2592
+ }
2593
+ function Ea(t) {
2594
+ return P.get("/role/list", { params: t });
2595
+ }
2596
+ function Ua(t) {
2597
+ return P.get(`/role/${t}`);
2598
+ }
2599
+ function Na(t) {
2600
+ return P.post("/role", t);
2601
+ }
2602
+ function Da(t, o) {
2603
+ return P.put(`/role/${t}`, o);
2604
+ }
2605
+ function za(t) {
2606
+ return P.delete(`/role/${t}`);
2607
+ }
2608
+ function Ra(t, o) {
2609
+ return P.patch(`/role/${t}/status`, { status: o });
2610
+ }
2611
+ function Aa() {
2612
+ return P.get("/user/v1.0/menu/list");
2613
+ }
2614
+ function Gn(t) {
2615
+ const o = t || Je();
2616
+ return P.get(`/user/v1.0/menu/get-menu?appId=${o}`);
2617
+ }
2618
+ function Pa(t) {
2619
+ return P.post("/menu", t);
2620
+ }
2621
+ function Oa(t, o) {
2622
+ return P.put(`/menu/${t}`, o);
2623
+ }
2624
+ function Va(t) {
2625
+ return P.delete(`/menu/${t}`);
2626
+ }
2627
+ const Xn = ["/login", "/404", "/403"];
2628
+ function Fa(t, o = {}) {
2629
+ const a = o.whiteList || Xn, r = o.loginPath || "/login", l = o.homePath || "/";
2630
+ t.beforeEach(async (u, $, d) => {
2631
+ const f = ae(), p = G(), _ = ue();
2632
+ if (f.initTheme(), De())
2633
+ if (u.path === r)
2634
+ d({ path: l });
2635
+ else if (p.isLoggedIn)
2636
+ u.name && u.meta.keepAlive && f.addCachedView(u.name), d();
2637
+ else
2638
+ try {
2639
+ if (o.fetchUserInfo) {
2640
+ const w = await o.fetchUserInfo();
2641
+ p.setUserInfo(w);
2642
+ } else {
2643
+ const w = await Nn();
2644
+ p.setUserInfo(w);
2645
+ }
2646
+ if (o.fetchMenu) {
2647
+ const w = await o.fetchMenu();
2648
+ _.setMenuList(w);
2649
+ } else {
2650
+ const w = await Gn(o.appId);
2651
+ _.setMenuList(w);
2652
+ }
2653
+ o.onLoginSuccess && o.onLoginSuccess(), u.name && u.meta.keepAlive && f.addCachedView(u.name), d({ ...u, replace: !0 });
2654
+ } catch (w) {
2655
+ console.error("获取用户信息失败:", w), p.clearUserInfo(), _.clearMenu(), localStorage.removeItem("token"), localStorage.removeItem("token_type"), localStorage.removeItem("refresh_token"), d({ path: r, query: { redirect: u.fullPath } });
2656
+ }
2657
+ else
2658
+ a.includes(u.path) ? d() : d({ path: r, query: { redirect: u.fullPath } });
2659
+ }), t.afterEach(() => {
2660
+ });
2661
+ }
2662
+ function Ba(t) {
2663
+ return P.get("/user/list", { params: t });
2664
+ }
2665
+ function Ka(t) {
2666
+ return P.get(`/user/${t}`);
2667
+ }
2668
+ function ja(t) {
2669
+ return P.post("/user", t);
2670
+ }
2671
+ function qa(t, o) {
2672
+ return P.put(`/user/${t}`, o);
2673
+ }
2674
+ function Ya(t) {
2675
+ return P.delete(`/user/${t}`);
2676
+ }
2677
+ function Wa(t) {
2678
+ return P.post("/user/batch-delete", { ids: t });
2679
+ }
2680
+ function Ha(t, o) {
2681
+ return P.patch(`/user/${t}/status`, { status: o });
2682
+ }
2683
+ function Ga(t) {
2684
+ return P.post(`/user/${t}/reset-password`);
2685
+ }
2686
+ var Jn = /* @__PURE__ */ ((t) => (t[t.ENABLED = 1] = "ENABLED", t[t.DISABLED = 0] = "DISABLED", t))(Jn || {}), Qn = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.MALE = 1] = "MALE", t[t.FEMALE = 2] = "FEMALE", t))(Qn || {}), Zn = /* @__PURE__ */ ((t) => (t[t.DIRECTORY = 0] = "DIRECTORY", t[t.MENU = 1] = "MENU", t[t.BUTTON = 2] = "BUTTON", t))(Zn || {});
2687
+ const Xa = {
2688
+ 1: "启用",
2689
+ 0: "禁用"
2690
+ }, Ja = {
2691
+ 0: "未知",
2692
+ 1: "男",
2693
+ 2: "女"
2694
+ }, Qa = {
2695
+ 0: "目录",
2696
+ 1: "菜单",
2697
+ 2: "按钮"
2698
+ }, Za = [
2699
+ {
2700
+ label: "启用",
2701
+ value: 1
2702
+ /* ENABLED */
2703
+ },
2704
+ {
2705
+ label: "禁用",
2706
+ value: 0
2707
+ /* DISABLED */
2708
+ }
2709
+ ], el = [
2710
+ {
2711
+ label: "未知",
2712
+ value: 0
2713
+ /* UNKNOWN */
2714
+ },
2715
+ {
2716
+ label: "男",
2717
+ value: 1
2718
+ /* MALE */
2719
+ },
2720
+ {
2721
+ label: "女",
2722
+ value: 2
2723
+ /* FEMALE */
2724
+ }
2725
+ ], tl = [
2726
+ {
2727
+ label: "目录",
2728
+ value: 0
2729
+ /* DIRECTORY */
2730
+ },
2731
+ {
2732
+ label: "菜单",
2733
+ value: 1
2734
+ /* MENU */
2735
+ },
2736
+ {
2737
+ label: "按钮",
2738
+ value: 2
2739
+ /* BUTTON */
2740
+ }
2741
+ ], sl = {
2742
+ mounted(t, o) {
2743
+ var r;
2744
+ G().isLoggedIn || (r = t.parentNode) == null || r.removeChild(t);
2745
+ }
2746
+ };
2747
+ export {
2748
+ dt as $,
2749
+ Aa as A,
2750
+ Gn as B,
2751
+ ca as C,
2752
+ ua as D,
2753
+ Ua as E,
2754
+ pa as F,
2755
+ Qn as G,
2756
+ zs as H,
2757
+ Ea as I,
2758
+ De as J,
2759
+ Lt as K,
2760
+ it as L,
2761
+ Zn as M,
2762
+ xt as N,
2763
+ Ka as O,
2764
+ Nn as P,
2765
+ Ba as Q,
2766
+ Ca as R,
2767
+ Jn as S,
2768
+ ma as T,
2769
+ $a as U,
2770
+ rt as V,
2771
+ P as W,
2772
+ ha as X,
2773
+ La as Y,
2774
+ Tt as Z,
2775
+ Q as _,
2776
+ Za as a,
2777
+ b as a0,
2778
+ Ce as a1,
2779
+ Un as a2,
2780
+ va as a3,
2781
+ Wn as a4,
2782
+ sl as a5,
2783
+ _a as a6,
2784
+ Ga as a7,
2785
+ Ma as a8,
2786
+ mt as a9,
2787
+ ia as aa,
2788
+ $e as ab,
2789
+ It as ac,
2790
+ Mt as ad,
2791
+ $t as ae,
2792
+ bt as af,
2793
+ St as ag,
2794
+ at as ah,
2795
+ Ct as ai,
2796
+ Fa as aj,
2797
+ ct as ak,
2798
+ Oa as al,
2799
+ Da as am,
2800
+ Ra as an,
2801
+ qa as ao,
2802
+ Ha as ap,
2803
+ ka as aq,
2804
+ ae as ar,
2805
+ wa as as,
2806
+ be as at,
2807
+ ba as au,
2808
+ ue as av,
2809
+ xa as aw,
2810
+ G as ax,
2811
+ tl as b,
2812
+ ya as c,
2813
+ el as d,
2814
+ Ja as e,
2815
+ Qa as f,
2816
+ Kn as g,
2817
+ et as h,
2818
+ Pn as i,
2819
+ Xa as j,
2820
+ ga as k,
2821
+ Wa as l,
2822
+ lt as m,
2823
+ Ia as n,
2824
+ Pa as o,
2825
+ Na as p,
2826
+ Ta as q,
2827
+ ja as r,
2828
+ Sa as s,
2829
+ Va as t,
2830
+ za as u,
2831
+ Ya as v,
2832
+ fa as w,
2833
+ Je as x,
2834
+ Dn as y,
2835
+ da as z
2836
+ };