xto-fronted 0.4.85 → 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,2067 @@
1
+ import { ref as g, computed as y, watch as nt, defineComponent as H, openBlock as u, createElementBlock as _, normalizeClass as F, createElementVNode as t, withDirectives as Ae, toDisplayString as L, unref as r, vShow as rt, createVNode as S, withCtx as x, Fragment as A, renderList as K, createBlock as P, createTextVNode as G, createCommentVNode as O, onMounted as lt, onUnmounted as it, withModifiers as Be, Transition as ze, withKeys as Ve, vModelText as ut, normalizeStyle as Fe, resolveComponent as ct, reactive as we } from "vue";
2
+ import { defineStore as pe } from "pinia";
3
+ import { useRoute as ae, useRouter as X, createRouter as Ce, createWebHistory as Se } from "vue-router";
4
+ import { Menu as Ke, SubMenu as je, MenuItem as ue, Tabs as dt, TabPane as mt } from "@xto/navigation";
5
+ import { Icon as U, Button as he } from "@xto/base";
6
+ import { Drawer as pt, Message as W } from "@xto/feedback";
7
+ import { Form as ht, FormItem as re, Input as Oe, Checkbox as vt } from "@xto/form";
8
+ import ft from "axios";
9
+ const se = "xto_", qe = (e) => ({
10
+ get(s) {
11
+ const o = e.getItem(se + s);
12
+ if (!o) return null;
13
+ try {
14
+ return JSON.parse(o);
15
+ } catch {
16
+ return o;
17
+ }
18
+ },
19
+ set(s, o) {
20
+ if (o == null) {
21
+ e.removeItem(se + s);
22
+ return;
23
+ }
24
+ const a = typeof o == "string" ? o : JSON.stringify(o);
25
+ e.setItem(se + s, a);
26
+ },
27
+ remove(s) {
28
+ e.removeItem(se + s);
29
+ },
30
+ clear() {
31
+ Object.keys(e).forEach((o) => {
32
+ o.startsWith(se) && e.removeItem(o);
33
+ });
34
+ }
35
+ }), le = qe(window.localStorage), ie = qe(window.sessionStorage), v = {
36
+ get: le.get,
37
+ set: le.set,
38
+ remove: le.remove,
39
+ clear: le.clear
40
+ }, $o = {
41
+ get: ie.get,
42
+ set: ie.set,
43
+ remove: ie.remove,
44
+ clear: ie.clear
45
+ }, J = pe("app", () => {
46
+ const e = g(v.get("appName") || "XTO App"), s = g(v.get("indexPath") || "/dashboard"), o = g(v.get("isDark") || !1), a = g(v.get("theme") || "light"), n = g(v.get("layout") || "sidebar"), d = g(v.get("isCollapsed") || !1), w = g(v.get("showTabs") ?? !0), c = g(v.get("showFooter") ?? !0), h = g(v.get("showBreadcrumb") ?? !0), l = g(v.get("primaryColor") || "#409eff"), p = g([]), i = y(() => o.value ? "dark" : "light"), f = (I) => {
47
+ e.value = I, v.set("appName", I);
48
+ }, R = (I) => {
49
+ s.value = I, v.set("indexPath", I);
50
+ }, C = () => {
51
+ o.value = !o.value, a.value = o.value ? "dark" : "light", b();
52
+ }, D = (I) => {
53
+ a.value = I, o.value = I === "dark", b();
54
+ }, b = () => {
55
+ const I = document.documentElement;
56
+ o.value ? I.classList.add("dark") : I.classList.remove("dark"), v.set("isDark", o.value), v.set("theme", a.value);
57
+ }, E = () => {
58
+ d.value = !d.value, v.set("isCollapsed", d.value);
59
+ }, Y = (I) => {
60
+ n.value = I, v.set("layout", I);
61
+ }, B = () => {
62
+ w.value = !w.value, v.set("showTabs", w.value);
63
+ }, M = () => {
64
+ c.value = !c.value, v.set("showFooter", c.value);
65
+ }, V = () => {
66
+ h.value = !h.value, v.set("showBreadcrumb", h.value);
67
+ }, N = (I) => {
68
+ l.value = I, document.documentElement.style.setProperty("--color-primary", I), v.set("primaryColor", I);
69
+ }, z = (I) => {
70
+ p.value.includes(I) || p.value.push(I);
71
+ }, fe = (I) => {
72
+ const ne = p.value.indexOf(I);
73
+ ne > -1 && p.value.splice(ne, 1);
74
+ }, _e = () => {
75
+ p.value = [];
76
+ }, ge = () => {
77
+ b(), l.value !== "#409eff" && document.documentElement.style.setProperty("--color-primary", l.value);
78
+ };
79
+ return nt(o, b), {
80
+ appName: e,
81
+ indexPath: s,
82
+ isDark: o,
83
+ theme: a,
84
+ layout: n,
85
+ isCollapsed: d,
86
+ showTabs: w,
87
+ showFooter: c,
88
+ showBreadcrumb: h,
89
+ primaryColor: l,
90
+ cachedViews: p,
91
+ themeClass: i,
92
+ setAppName: f,
93
+ setIndexPath: R,
94
+ toggleTheme: C,
95
+ toggleCollapse: E,
96
+ setTheme: D,
97
+ setLayout: Y,
98
+ toggleTabs: B,
99
+ toggleFooter: M,
100
+ toggleBreadcrumb: V,
101
+ setPrimaryColor: N,
102
+ addCachedView: z,
103
+ removeCachedView: fe,
104
+ clearCachedViews: _e,
105
+ initTheme: ge
106
+ };
107
+ }), ke = "menu_list", _t = {
108
+ menuCode: "home",
109
+ menuName: "首页",
110
+ menuUrl: "/dashboard",
111
+ icon: "home",
112
+ closable: !1,
113
+ isDefault: !1,
114
+ isOut: !1
115
+ }, ee = pe("menu", () => {
116
+ const e = g(v.get(ke) || []), s = y(() => e.value.length > 0);
117
+ return {
118
+ menuList: e,
119
+ hasMenu: s,
120
+ setMenuList: (n) => {
121
+ e.value = [_t, ...n], v.set(ke, e.value);
122
+ },
123
+ clearMenu: () => {
124
+ e.value = [], v.remove(ke);
125
+ }
126
+ };
127
+ }), Ye = "/vite.svg", be = "user_info", j = pe("user", () => {
128
+ const e = g(v.get(be)), s = y(() => !!e.value), o = y(() => {
129
+ var i;
130
+ return ((i = e.value) == null ? void 0 : i.userId) || "";
131
+ }), a = y(() => {
132
+ var i;
133
+ return ((i = e.value) == null ? void 0 : i.userName) || "";
134
+ }), n = y(() => {
135
+ var i;
136
+ return ((i = e.value) == null ? void 0 : i.departmentName) || "";
137
+ }), d = y(() => {
138
+ var i;
139
+ return ((i = e.value) == null ? void 0 : i.email) || "";
140
+ }), w = y(() => {
141
+ var i;
142
+ return ((i = e.value) == null ? void 0 : i.mobilePhone) || "";
143
+ }), c = y(() => {
144
+ var i;
145
+ return ((i = e.value) == null ? void 0 : i.positionName) || "";
146
+ }), h = y(() => {
147
+ var i;
148
+ return ((i = e.value) == null ? void 0 : i.avatar) || "";
149
+ });
150
+ return {
151
+ userInfo: e,
152
+ isLoggedIn: s,
153
+ userId: o,
154
+ userName: a,
155
+ departmentName: n,
156
+ email: d,
157
+ mobilePhone: w,
158
+ positionName: c,
159
+ avatar: h,
160
+ setUserInfo: (i) => {
161
+ e.value = i, v.set(be, i);
162
+ },
163
+ clearUserInfo: () => {
164
+ e.value = null, v.remove(be);
165
+ }
166
+ };
167
+ }), xe = "token", Ie = "token_type", Le = "refresh_token", Te = "expires_time", Ee = "refresh_time", Ne = "code", ve = () => v.get(xe), gt = (e) => {
168
+ v.set(xe, e);
169
+ }, yt = () => v.get(Ie), kt = (e) => {
170
+ v.set(Ie, e);
171
+ }, Mo = () => v.get(Le), bt = (e) => {
172
+ v.set(Le, e);
173
+ }, wt = () => v.get(Te), Ct = (e) => {
174
+ v.set(Te, e);
175
+ }, Uo = () => v.get(Ee), St = (e) => {
176
+ v.set(Ee, e);
177
+ }, Ro = () => v.get(Ne), xt = (e) => {
178
+ v.set(Ne, e);
179
+ }, We = (e) => {
180
+ gt(e.access_token), kt(e.token_type || "Bearer"), bt(e.refresh_token), Ct(e.expires_time), St(e.refresh_time), e.code && xt(e.code);
181
+ }, He = () => {
182
+ v.remove(xe), v.remove(Ie), v.remove(Le), v.remove(Te), v.remove(Ee), v.remove(Ne);
183
+ }, It = () => {
184
+ const e = wt();
185
+ return e ? Date.now() > e : !0;
186
+ }, Xe = () => !!ve() && !It(), $e = pe("auth", () => {
187
+ const e = g(ve()), s = y(() => Xe()), o = g(""), a = g(""), n = g(""), d = g("/login");
188
+ return {
189
+ token: e,
190
+ isLoggedIn: s,
191
+ baseUrl: o,
192
+ appId: a,
193
+ clientId: n,
194
+ loginPath: d,
195
+ login: (f) => {
196
+ e.value = f.access_token, We(f);
197
+ },
198
+ logout: () => {
199
+ e.value = null, He();
200
+ },
201
+ setBaseUrl: (f) => {
202
+ o.value = f;
203
+ },
204
+ setAppId: (f) => {
205
+ a.value = f;
206
+ },
207
+ setClientId: (f) => {
208
+ n.value = f;
209
+ },
210
+ setLoginPath: (f) => {
211
+ d.value = f;
212
+ }
213
+ };
214
+ }), Lt = { class: "sidebar__logo" }, Tt = { class: "sidebar__menu-icon" }, Et = {
215
+ key: 1,
216
+ class: "sidebar__menu-char"
217
+ }, Nt = { class: "sidebar__menu-icon" }, $t = {
218
+ key: 1,
219
+ class: "sidebar__menu-char"
220
+ }, Mt = { class: "sidebar__menu-icon" }, Ut = {
221
+ key: 1,
222
+ class: "sidebar__menu-char"
223
+ }, Rt = {
224
+ key: 0,
225
+ class: "sidebar__user"
226
+ }, Dt = { class: "sidebar__user-info" }, Pt = { class: "sidebar__user-name" }, zt = { class: "sidebar__user-role" }, Ot = /* @__PURE__ */ H({
227
+ __name: "Sidebar",
228
+ props: {
229
+ menuList: { default: () => [] }
230
+ },
231
+ setup(e) {
232
+ const s = e, o = ae(), a = X(), n = ee(), d = j(), w = $e(), c = J(), h = y(() => s.menuList.length > 0 ? s.menuList : n.menuList), l = y(() => c.isCollapsed), p = y(() => o.path), i = y(() => c.isDark ? "#1d1e1f" : "#fff"), f = y(() => c.isDark ? "#cfd3dc" : "#303133"), R = y(() => "#409eff"), C = (M) => {
233
+ M && M !== o.path && a.push(M);
234
+ }, D = () => {
235
+ w.logout(), d.clearUserInfo(), n.clearMenu(), a.push("/login");
236
+ }, b = /* @__PURE__ */ new Set([
237
+ "arrow-up",
238
+ "arrow-down",
239
+ "arrow-left",
240
+ "arrow-right",
241
+ "caret-down",
242
+ "caret-right",
243
+ "plus",
244
+ "minus",
245
+ "close",
246
+ "check",
247
+ "edit",
248
+ "delete",
249
+ "copy",
250
+ "download",
251
+ "upload",
252
+ "refresh",
253
+ "search",
254
+ "filter",
255
+ "more",
256
+ "setting",
257
+ "share",
258
+ "loading",
259
+ "info",
260
+ "success",
261
+ "warning",
262
+ "error",
263
+ "question",
264
+ "user",
265
+ "user-add",
266
+ "user-group",
267
+ "logout",
268
+ "login",
269
+ "file",
270
+ "folder",
271
+ "folder-open",
272
+ "document",
273
+ "image",
274
+ "video",
275
+ "music",
276
+ "camera",
277
+ "mail",
278
+ "phone",
279
+ "chat",
280
+ "bell",
281
+ "message",
282
+ "eye",
283
+ "eye-off",
284
+ "calendar",
285
+ "clock",
286
+ "history",
287
+ "timer",
288
+ "location",
289
+ "map",
290
+ "globe",
291
+ "star",
292
+ "heart",
293
+ "thumb-up",
294
+ "link",
295
+ "external-link",
296
+ "lock",
297
+ "unlock",
298
+ "key",
299
+ "home",
300
+ "menu",
301
+ "menu-fold",
302
+ "menu-unfold",
303
+ "sidebar-fold",
304
+ "sidebar-expand",
305
+ "sidebar-left",
306
+ "dashboard",
307
+ "chart",
308
+ "chart-pie",
309
+ "chart-line",
310
+ "report",
311
+ "analytics",
312
+ "system",
313
+ "permission",
314
+ "role",
315
+ "user-manage",
316
+ "log",
317
+ "notification",
318
+ "app",
319
+ "list",
320
+ "grid",
321
+ "fullscreen",
322
+ "fullscreen-exit",
323
+ "zoom-in",
324
+ "zoom-out",
325
+ "print",
326
+ "bookmark",
327
+ "tag",
328
+ "code",
329
+ "terminal",
330
+ "database",
331
+ "server",
332
+ "cloud",
333
+ "gift",
334
+ "moon",
335
+ "sun",
336
+ "theme",
337
+ "skin"
338
+ ]), E = (M) => {
339
+ if (!M || M === "") return "";
340
+ if (M.startsWith("tineco-icon-")) {
341
+ const N = M.replace("tineco-icon-", "");
342
+ return {
343
+ home: "home",
344
+ dashboard: "dashboard",
345
+ system: "system",
346
+ user: "user",
347
+ role: "role",
348
+ menu: "list",
349
+ setting: "setting",
350
+ file: "file",
351
+ folder: "folder",
352
+ chart: "chart",
353
+ report: "report",
354
+ analytics: "analytics"
355
+ }[N] || N;
356
+ }
357
+ return {
358
+ dashboard: "dashboard",
359
+ system: "system",
360
+ user: "user",
361
+ role: "role",
362
+ menu: "list",
363
+ setting: "setting",
364
+ home: "home",
365
+ chart: "chart",
366
+ report: "report",
367
+ analytics: "analytics",
368
+ permission: "permission",
369
+ log: "log",
370
+ notification: "notification",
371
+ app: "app",
372
+ list: "list",
373
+ grid: "grid"
374
+ }[M] || M;
375
+ }, Y = (M) => M ? M.charAt(0) : "", B = (M) => b.has(M);
376
+ return (M, V) => (u(), _("div", {
377
+ class: F(["sidebar", { "sidebar--collapsed": l.value }])
378
+ }, [
379
+ t("div", Lt, [
380
+ V[0] || (V[0] = t("img", {
381
+ src: Ye,
382
+ alt: "Logo",
383
+ class: "sidebar__logo-img"
384
+ }, null, -1)),
385
+ Ae(t("span", { class: "sidebar__logo-text" }, L(r(c).appName), 513), [
386
+ [rt, !l.value]
387
+ ])
388
+ ]),
389
+ S(r(Ke), {
390
+ "default-active": p.value,
391
+ mode: "vertical",
392
+ collapse: l.value,
393
+ "collapse-transition": !1,
394
+ "background-color": i.value,
395
+ "text-color": f.value,
396
+ "active-text-color": R.value,
397
+ class: "sidebar__menu",
398
+ onSelect: C
399
+ }, {
400
+ default: x(() => [
401
+ (u(!0), _(A, null, K(h.value, (N) => (u(), _(A, {
402
+ key: N.menuUrl
403
+ }, [
404
+ N.children && N.children.length > 0 ? (u(), P(r(je), {
405
+ key: 0,
406
+ index: N.menuUrl
407
+ }, {
408
+ title: x(() => [
409
+ t("span", Tt, [
410
+ B(E(N.icon)) ? (u(), P(r(U), {
411
+ key: 0,
412
+ name: E(N.icon),
413
+ size: 16
414
+ }, null, 8, ["name"])) : (u(), _("span", Et, L(Y(N.menuName)), 1))
415
+ ]),
416
+ t("span", null, L(N.menuName), 1)
417
+ ]),
418
+ default: x(() => [
419
+ (u(!0), _(A, null, K(N.children, (z) => (u(), P(r(ue), {
420
+ key: z.menuUrl,
421
+ index: z.menuUrl
422
+ }, {
423
+ default: x(() => [
424
+ t("span", Nt, [
425
+ B(E(z.icon)) ? (u(), P(r(U), {
426
+ key: 0,
427
+ name: E(z.icon),
428
+ size: 16
429
+ }, null, 8, ["name"])) : (u(), _("span", $t, L(Y(z.menuName)), 1))
430
+ ]),
431
+ t("span", null, L(z.menuName), 1)
432
+ ]),
433
+ _: 2
434
+ }, 1032, ["index"]))), 128))
435
+ ]),
436
+ _: 2
437
+ }, 1032, ["index"])) : (u(), P(r(ue), {
438
+ key: 1,
439
+ index: N.menuUrl
440
+ }, {
441
+ default: x(() => [
442
+ t("span", Mt, [
443
+ B(E(N.icon)) ? (u(), P(r(U), {
444
+ key: 0,
445
+ name: E(N.icon),
446
+ size: 16
447
+ }, null, 8, ["name"])) : (u(), _("span", Ut, L(Y(N.menuName)), 1))
448
+ ]),
449
+ t("span", null, L(N.menuName), 1)
450
+ ]),
451
+ _: 2
452
+ }, 1032, ["index"]))
453
+ ], 64))), 128))
454
+ ]),
455
+ _: 1
456
+ }, 8, ["default-active", "collapse", "background-color", "text-color", "active-text-color"]),
457
+ l.value ? O("", !0) : (u(), _("div", Rt, [
458
+ t("div", Dt, [
459
+ t("span", Pt, L(r(d).userName), 1),
460
+ t("span", zt, L(r(d).departmentName), 1)
461
+ ]),
462
+ S(r(he), {
463
+ type: "text",
464
+ size: "small",
465
+ onClick: D
466
+ }, {
467
+ default: x(() => [...V[1] || (V[1] = [
468
+ G("退出", -1)
469
+ ])]),
470
+ _: 1
471
+ })
472
+ ]))
473
+ ], 2));
474
+ }
475
+ }), q = (e, s) => {
476
+ const o = e.__vccOpts || e;
477
+ for (const [a, n] of s)
478
+ o[a] = n;
479
+ return o;
480
+ }, At = /* @__PURE__ */ q(Ot, [["__scopeId", "data-v-480fc818"]]), Bt = { class: "header" }, Vt = { class: "header__left" }, Ft = {
481
+ key: 0,
482
+ class: "header__breadcrumb"
483
+ }, Kt = {
484
+ key: 0,
485
+ class: "breadcrumb-separator"
486
+ }, jt = { class: "header__right" }, qt = ["title"], Yt = { class: "header__avatar" }, Wt = { class: "header__user-name" }, Ht = {
487
+ key: 0,
488
+ class: "header__dropdown"
489
+ }, Xt = { class: "header__dropdown-header" }, Jt = { class: "header__dropdown-avatar" }, Qt = { class: "header__dropdown-info" }, Zt = { class: "header__dropdown-name" }, Gt = { class: "header__dropdown-role" }, es = { class: "header__dropdown-menu" }, ts = { class: "search-container" }, ss = { class: "search-input-wrapper" }, os = {
490
+ key: 0,
491
+ class: "search-results"
492
+ }, as = ["onClick"], ns = { class: "search-result-info" }, rs = { class: "search-result-title" }, ls = {
493
+ key: 0,
494
+ class: "search-result-parent"
495
+ }, is = {
496
+ key: 1,
497
+ class: "search-empty"
498
+ }, us = { class: "settings-drawer" }, cs = { class: "settings-section" }, ds = { class: "settings-layout-options" }, ms = ["onClick"], ps = { class: "layout-option__preview" }, hs = {
499
+ key: 0,
500
+ class: "layout-preview-sidebar"
501
+ }, vs = {
502
+ key: 1,
503
+ class: "layout-preview-top"
504
+ }, fs = {
505
+ key: 2,
506
+ class: "layout-preview-mix"
507
+ }, _s = { class: "layout-option__label" }, gs = { class: "settings-section" }, ys = { class: "settings-color-options" }, ks = ["title", "onClick"], bs = { class: "settings-section" }, ws = { class: "settings-switch-list" }, Cs = { class: "settings-switch-item" }, Ss = { class: "settings-switch-item" }, xs = /* @__PURE__ */ H({
508
+ __name: "Header",
509
+ setup(e) {
510
+ const s = ae(), o = X(), a = J(), n = j(), d = $e(), w = ee(), c = g(!1), h = g(!1), l = g(null), p = g(!1), i = g(!1), f = g(""), R = g(null), C = g(!1), D = [
511
+ { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
512
+ { value: "top", label: "顶部菜单", icon: "menu" },
513
+ { value: "mix", label: "混合菜单", icon: "grid" }
514
+ ], b = [
515
+ { value: "#409eff", label: "默认蓝" },
516
+ { value: "#1890ff", label: "科技蓝" },
517
+ { value: "#52c41a", label: "极光绿" },
518
+ { value: "#faad14", label: "日落橙" },
519
+ { value: "#f5222d", label: "薄暮红" },
520
+ { value: "#722ed1", label: "酱紫" }
521
+ ], E = y(() => s.matched.filter((m) => m.meta && m.meta.title).map((m) => ({
522
+ title: m.meta.title,
523
+ path: m.path
524
+ }))), Y = ($, m = "") => {
525
+ const Q = [];
526
+ return $.forEach((k) => {
527
+ k.children && k.children.length > 0 ? Q.push(...Y(k.children, k.title)) : Q.push({ ...k, parentTitle: m });
528
+ }), Q;
529
+ }, B = y(() => f.value.trim() ? Y(w.menuList).filter(
530
+ (m) => m.title.toLowerCase().includes(f.value.toLowerCase())
531
+ ) : []), M = y(() => a.layout), V = () => {
532
+ a.toggleCollapse();
533
+ }, N = () => {
534
+ a.toggleTheme();
535
+ }, z = () => {
536
+ h.value = !0;
537
+ }, fe = ($) => {
538
+ a.setLayout($);
539
+ }, _e = ($) => {
540
+ C.value = $;
541
+ const m = document.documentElement;
542
+ $ ? m.classList.add("grey-mode") : m.classList.remove("grey-mode");
543
+ }, ge = () => {
544
+ document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
545
+ }, I = () => {
546
+ p.value = !!document.fullscreenElement;
547
+ }, ne = () => {
548
+ c.value = !c.value;
549
+ }, te = () => {
550
+ c.value = !1;
551
+ }, Ue = () => {
552
+ i.value = !0;
553
+ }, ye = () => {
554
+ i.value = !1, f.value = "";
555
+ }, Re = ($) => {
556
+ o.push($), ye();
557
+ }, tt = ($) => {
558
+ a.setPrimaryColor($);
559
+ }, st = () => {
560
+ te(), o.push("/profile");
561
+ }, ot = () => {
562
+ te(), o.push("/change-password");
563
+ }, at = () => {
564
+ te(), d.logout(), n.clearUserInfo(), w.clearMenu(), o.push("/login");
565
+ }, De = ($) => {
566
+ l.value && !l.value.contains($.target) && te(), R.value && !R.value.contains($.target) && ye();
567
+ }, Pe = ($) => {
568
+ $.key === "Escape" && (ye(), te()), ($.ctrlKey || $.metaKey) && $.key === "k" && ($.preventDefault(), Ue());
569
+ };
570
+ return lt(() => {
571
+ document.addEventListener("click", De), document.addEventListener("fullscreenchange", I), document.addEventListener("keydown", Pe), a.initTheme(), C.value = document.documentElement.classList.contains("grey-mode");
572
+ }), it(() => {
573
+ document.removeEventListener("click", De), document.removeEventListener("fullscreenchange", I), document.removeEventListener("keydown", Pe);
574
+ }), ($, m) => {
575
+ var Q;
576
+ return u(), _("div", Bt, [
577
+ t("div", Vt, [
578
+ t("div", {
579
+ class: "header__collapse",
580
+ onClick: V
581
+ }, [
582
+ S(r(U), {
583
+ name: r(a).isCollapsed ? "menu-unfold" : "menu-fold",
584
+ size: 18
585
+ }, null, 8, ["name"])
586
+ ]),
587
+ r(a).showBreadcrumb ? (u(), _("div", Ft, [
588
+ (u(!0), _(A, null, K(E.value, (k, Z) => (u(), _("span", {
589
+ key: k.path
590
+ }, [
591
+ Z > 0 ? (u(), _("span", Kt, "/")) : O("", !0),
592
+ t("span", {
593
+ class: F({ "is-current": Z === E.value.length - 1 })
594
+ }, L(k.title), 3)
595
+ ]))), 128))
596
+ ])) : O("", !0)
597
+ ]),
598
+ t("div", jt, [
599
+ t("div", {
600
+ class: "header__action",
601
+ onClick: Ue,
602
+ title: "搜索 (Ctrl+K)"
603
+ }, [
604
+ S(r(U), {
605
+ name: "search",
606
+ size: 16
607
+ })
608
+ ]),
609
+ t("div", {
610
+ class: "header__action",
611
+ onClick: ge,
612
+ title: p.value ? "退出全屏" : "全屏"
613
+ }, [
614
+ S(r(U), {
615
+ name: p.value ? "fullscreen-exit" : "fullscreen",
616
+ size: 16
617
+ }, null, 8, ["name"])
618
+ ], 8, qt),
619
+ t("div", {
620
+ class: "header__action",
621
+ onClick: z,
622
+ title: "换肤设置"
623
+ }, [
624
+ S(r(U), {
625
+ name: "skin",
626
+ size: 16
627
+ })
628
+ ]),
629
+ t("div", {
630
+ class: "header__action",
631
+ onClick: N,
632
+ title: "切换主题"
633
+ }, [
634
+ S(r(U), {
635
+ name: r(a).isDark ? "sun" : "moon",
636
+ size: 16
637
+ }, null, 8, ["name"])
638
+ ]),
639
+ t("div", {
640
+ class: "header__user",
641
+ ref_key: "dropdownRef",
642
+ ref: l
643
+ }, [
644
+ t("div", {
645
+ class: "header__user-trigger",
646
+ onClick: Be(ne, ["stop"])
647
+ }, [
648
+ t("div", Yt, [
649
+ t("span", null, L(((Q = r(n).userName) == null ? void 0 : Q.charAt(0)) || "U"), 1)
650
+ ]),
651
+ t("span", Wt, L(r(n).userName), 1),
652
+ t("span", {
653
+ class: F(["header__user-arrow", { "is-active": c.value }])
654
+ }, "▼", 2)
655
+ ]),
656
+ S(ze, { name: "dropdown" }, {
657
+ default: x(() => {
658
+ var k;
659
+ return [
660
+ c.value ? (u(), _("div", Ht, [
661
+ t("div", Xt, [
662
+ t("div", Jt, [
663
+ t("span", null, L(((k = r(n).userName) == null ? void 0 : k.charAt(0)) || "U"), 1)
664
+ ]),
665
+ t("div", Qt, [
666
+ t("div", Zt, L(r(n).userName), 1),
667
+ t("div", Gt, L(r(n).departmentName), 1)
668
+ ])
669
+ ]),
670
+ m[8] || (m[8] = t("div", { class: "header__dropdown-divider" }, null, -1)),
671
+ t("div", es, [
672
+ t("div", {
673
+ class: "header__dropdown-item",
674
+ onClick: st
675
+ }, [
676
+ S(r(U), {
677
+ name: "user",
678
+ size: 16
679
+ }),
680
+ m[4] || (m[4] = t("span", null, "个人信息", -1))
681
+ ]),
682
+ t("div", {
683
+ class: "header__dropdown-item",
684
+ onClick: ot
685
+ }, [
686
+ S(r(U), {
687
+ name: "lock",
688
+ size: 16
689
+ }),
690
+ m[5] || (m[5] = t("span", null, "修改密码", -1))
691
+ ]),
692
+ m[7] || (m[7] = t("div", { class: "header__dropdown-divider" }, null, -1)),
693
+ t("div", {
694
+ class: "header__dropdown-item header__dropdown-item--danger",
695
+ onClick: at
696
+ }, [
697
+ S(r(U), {
698
+ name: "logout",
699
+ size: 16
700
+ }),
701
+ m[6] || (m[6] = t("span", null, "退出登录", -1))
702
+ ])
703
+ ])
704
+ ])) : O("", !0)
705
+ ];
706
+ }),
707
+ _: 1
708
+ })
709
+ ], 512)
710
+ ]),
711
+ S(ze, { name: "search" }, {
712
+ default: x(() => [
713
+ i.value ? (u(), _("div", {
714
+ key: 0,
715
+ class: "header__search-modal",
716
+ ref_key: "searchRef",
717
+ ref: R
718
+ }, [
719
+ t("div", ts, [
720
+ t("div", ss, [
721
+ S(r(U), {
722
+ class: "search-icon",
723
+ name: "search",
724
+ size: 20
725
+ }),
726
+ Ae(t("input", {
727
+ "onUpdate:modelValue": m[0] || (m[0] = (k) => f.value = k),
728
+ type: "text",
729
+ class: "search-input",
730
+ placeholder: "搜索菜单...",
731
+ autofocus: "",
732
+ onKeyup: m[1] || (m[1] = Ve((k) => B.value[0] && Re(B.value[0].path), ["enter"]))
733
+ }, null, 544), [
734
+ [ut, f.value]
735
+ ]),
736
+ m[9] || (m[9] = t("span", { class: "search-shortcut" }, "ESC 关闭", -1))
737
+ ]),
738
+ B.value.length > 0 ? (u(), _("div", os, [
739
+ (u(!0), _(A, null, K(B.value, (k, Z) => (u(), _("div", {
740
+ key: k.path,
741
+ class: F(["search-result-item", { "is-first": Z === 0 }]),
742
+ onClick: (wo) => Re(k.path)
743
+ }, [
744
+ S(r(U), {
745
+ class: "search-result-icon",
746
+ name: k.icon || "file",
747
+ size: 20
748
+ }, null, 8, ["name"]),
749
+ t("div", ns, [
750
+ t("span", rs, L(k.title), 1),
751
+ k.parentTitle ? (u(), _("span", ls, L(k.parentTitle), 1)) : O("", !0)
752
+ ])
753
+ ], 10, as))), 128))
754
+ ])) : f.value ? (u(), _("div", is, " 未找到匹配的菜单 ")) : O("", !0)
755
+ ])
756
+ ], 512)) : O("", !0)
757
+ ]),
758
+ _: 1
759
+ }),
760
+ S(r(pt), {
761
+ modelValue: h.value,
762
+ "onUpdate:modelValue": m[3] || (m[3] = (k) => h.value = k),
763
+ title: "换肤设置",
764
+ direction: "rtl",
765
+ size: "320px"
766
+ }, {
767
+ default: x(() => [
768
+ t("div", us, [
769
+ t("div", cs, [
770
+ m[13] || (m[13] = t("div", { class: "settings-title" }, "布局模式", -1)),
771
+ t("div", ds, [
772
+ (u(), _(A, null, K(D, (k) => t("div", {
773
+ key: k.value,
774
+ class: F(["layout-option", { "is-active": M.value === k.value }]),
775
+ onClick: (Z) => fe(k.value)
776
+ }, [
777
+ t("div", ps, [
778
+ k.value === "sidebar" ? (u(), _("div", hs, [...m[10] || (m[10] = [
779
+ t("div", { class: "preview-aside" }, null, -1),
780
+ t("div", { class: "preview-main" }, [
781
+ t("div", { class: "preview-header" }),
782
+ t("div", { class: "preview-content" })
783
+ ], -1)
784
+ ])])) : k.value === "top" ? (u(), _("div", vs, [...m[11] || (m[11] = [
785
+ t("div", { class: "preview-header-full" }, null, -1),
786
+ t("div", { class: "preview-content-full" }, null, -1)
787
+ ])])) : (u(), _("div", fs, [...m[12] || (m[12] = [
788
+ t("div", { class: "preview-header-mix" }, [
789
+ t("div", { class: "preview-mix-left" })
790
+ ], -1),
791
+ t("div", { class: "preview-mix-body" }, [
792
+ t("div", { class: "preview-mix-aside" }),
793
+ t("div", { class: "preview-mix-content" })
794
+ ], -1)
795
+ ])]))
796
+ ]),
797
+ t("span", _s, L(k.label), 1)
798
+ ], 10, ms)), 64))
799
+ ])
800
+ ]),
801
+ t("div", gs, [
802
+ m[14] || (m[14] = t("div", { class: "settings-title" }, "主题色", -1)),
803
+ t("div", ys, [
804
+ (u(), _(A, null, K(b, (k) => t("div", {
805
+ key: k.value,
806
+ class: F(["color-option", { "is-active": r(a).primaryColor === k.value }]),
807
+ style: Fe({ backgroundColor: k.value }),
808
+ title: k.label,
809
+ onClick: (Z) => tt(k.value)
810
+ }, [
811
+ r(a).primaryColor === k.value ? (u(), P(r(U), {
812
+ key: 0,
813
+ name: "check",
814
+ size: 12,
815
+ color: "#fff"
816
+ })) : O("", !0)
817
+ ], 14, ks)), 64))
818
+ ])
819
+ ]),
820
+ t("div", bs, [
821
+ m[19] || (m[19] = t("div", { class: "settings-title" }, "功能设置", -1)),
822
+ t("div", ws, [
823
+ t("div", Cs, [
824
+ m[16] || (m[16] = t("span", null, "灰色模式", -1)),
825
+ t("div", {
826
+ class: F(["switch-wrapper", { "is-checked": C.value }]),
827
+ onClick: m[2] || (m[2] = (k) => _e(!C.value))
828
+ }, [...m[15] || (m[15] = [
829
+ t("span", { class: "switch-core" }, null, -1)
830
+ ])], 2)
831
+ ]),
832
+ t("div", Ss, [
833
+ m[18] || (m[18] = t("span", null, "暗黑模式", -1)),
834
+ t("div", {
835
+ class: F(["switch-wrapper", { "is-checked": r(a).isDark }]),
836
+ onClick: N
837
+ }, [...m[17] || (m[17] = [
838
+ t("span", { class: "switch-core" }, null, -1)
839
+ ])], 2)
840
+ ])
841
+ ])
842
+ ])
843
+ ])
844
+ ]),
845
+ _: 1
846
+ }, 8, ["modelValue"])
847
+ ]);
848
+ };
849
+ }
850
+ }), Is = /* @__PURE__ */ q(xs, [["__scopeId", "data-v-9da60fc6"]]), Ls = { class: "top-menu" }, Ts = { class: "top-menu__menu-icon" }, Es = {
851
+ key: 1,
852
+ class: "top-menu__menu-char"
853
+ }, Ns = { class: "top-menu__menu-icon" }, $s = {
854
+ key: 1,
855
+ class: "top-menu__menu-char"
856
+ }, Ms = { class: "top-menu__menu-icon" }, Us = {
857
+ key: 1,
858
+ class: "top-menu__menu-char"
859
+ }, Rs = /* @__PURE__ */ H({
860
+ __name: "TopMenu",
861
+ setup(e) {
862
+ const s = ae(), o = X(), a = ee(), n = J(), d = y(() => s.path), w = y(() => n.isDark ? "#1d1e1f" : "#fff"), c = y(() => n.isDark ? "#cfd3dc" : "#303133"), h = y(() => "#409eff"), l = (C) => {
863
+ C && C !== s.path && o.push(C);
864
+ }, p = /* @__PURE__ */ new Set([
865
+ "arrow-up",
866
+ "arrow-down",
867
+ "arrow-left",
868
+ "arrow-right",
869
+ "caret-down",
870
+ "caret-right",
871
+ "plus",
872
+ "minus",
873
+ "close",
874
+ "check",
875
+ "edit",
876
+ "delete",
877
+ "copy",
878
+ "download",
879
+ "upload",
880
+ "refresh",
881
+ "search",
882
+ "filter",
883
+ "more",
884
+ "setting",
885
+ "share",
886
+ "loading",
887
+ "info",
888
+ "success",
889
+ "warning",
890
+ "error",
891
+ "question",
892
+ "user",
893
+ "user-add",
894
+ "user-group",
895
+ "logout",
896
+ "login",
897
+ "file",
898
+ "folder",
899
+ "folder-open",
900
+ "document",
901
+ "image",
902
+ "video",
903
+ "music",
904
+ "camera",
905
+ "mail",
906
+ "phone",
907
+ "chat",
908
+ "bell",
909
+ "message",
910
+ "eye",
911
+ "eye-off",
912
+ "calendar",
913
+ "clock",
914
+ "history",
915
+ "timer",
916
+ "location",
917
+ "map",
918
+ "globe",
919
+ "star",
920
+ "heart",
921
+ "thumb-up",
922
+ "link",
923
+ "external-link",
924
+ "lock",
925
+ "unlock",
926
+ "key",
927
+ "home",
928
+ "menu",
929
+ "menu-fold",
930
+ "menu-unfold",
931
+ "sidebar-fold",
932
+ "sidebar-expand",
933
+ "sidebar-left",
934
+ "dashboard",
935
+ "chart",
936
+ "chart-pie",
937
+ "chart-line",
938
+ "report",
939
+ "analytics",
940
+ "system",
941
+ "permission",
942
+ "role",
943
+ "user-manage",
944
+ "log",
945
+ "notification",
946
+ "app",
947
+ "list",
948
+ "grid",
949
+ "fullscreen",
950
+ "fullscreen-exit",
951
+ "zoom-in",
952
+ "zoom-out",
953
+ "print",
954
+ "bookmark",
955
+ "tag",
956
+ "code",
957
+ "terminal",
958
+ "database",
959
+ "server",
960
+ "cloud",
961
+ "gift",
962
+ "moon",
963
+ "sun",
964
+ "theme",
965
+ "skin"
966
+ ]), i = (C) => {
967
+ if (!C || C === "") return "";
968
+ if (C.startsWith("tineco-icon-")) {
969
+ const b = C.replace("tineco-icon-", "");
970
+ return {
971
+ home: "home",
972
+ dashboard: "dashboard",
973
+ system: "system",
974
+ user: "user",
975
+ role: "role",
976
+ menu: "list",
977
+ setting: "setting",
978
+ file: "file",
979
+ folder: "folder",
980
+ chart: "chart",
981
+ report: "report",
982
+ analytics: "analytics"
983
+ }[b] || b;
984
+ }
985
+ return {
986
+ dashboard: "dashboard",
987
+ system: "system",
988
+ user: "user",
989
+ role: "role",
990
+ menu: "list",
991
+ setting: "setting",
992
+ home: "home",
993
+ chart: "chart",
994
+ report: "report",
995
+ analytics: "analytics",
996
+ permission: "permission",
997
+ log: "log",
998
+ notification: "notification",
999
+ app: "app",
1000
+ list: "list",
1001
+ grid: "grid"
1002
+ }[C] || C;
1003
+ }, f = (C) => C ? C.charAt(0) : "", R = (C) => p.has(C);
1004
+ return (C, D) => (u(), _("div", Ls, [
1005
+ S(r(Ke), {
1006
+ "default-active": d.value,
1007
+ mode: "horizontal",
1008
+ "background-color": w.value,
1009
+ "text-color": c.value,
1010
+ "active-text-color": h.value,
1011
+ class: "top-menu__menu",
1012
+ onSelect: l
1013
+ }, {
1014
+ default: x(() => [
1015
+ (u(!0), _(A, null, K(r(a).menuList, (b) => (u(), _(A, {
1016
+ key: b.menuUrl
1017
+ }, [
1018
+ b.children && b.children.length > 0 ? (u(), P(r(je), {
1019
+ key: 0,
1020
+ index: b.menuUrl
1021
+ }, {
1022
+ title: x(() => [
1023
+ t("span", Ts, [
1024
+ R(i(b.icon)) ? (u(), P(r(U), {
1025
+ key: 0,
1026
+ name: i(b.icon),
1027
+ size: 16
1028
+ }, null, 8, ["name"])) : (u(), _("span", Es, L(f(b.menuName)), 1))
1029
+ ]),
1030
+ t("span", null, L(b.menuName), 1)
1031
+ ]),
1032
+ default: x(() => [
1033
+ (u(!0), _(A, null, K(b.children, (E) => (u(), P(r(ue), {
1034
+ key: E.menuUrl,
1035
+ index: E.menuUrl
1036
+ }, {
1037
+ default: x(() => [
1038
+ t("span", Ns, [
1039
+ R(i(E.icon)) ? (u(), P(r(U), {
1040
+ key: 0,
1041
+ name: i(E.icon),
1042
+ size: 16
1043
+ }, null, 8, ["name"])) : (u(), _("span", $s, L(f(E.menuName)), 1))
1044
+ ]),
1045
+ t("span", null, L(E.menuName), 1)
1046
+ ]),
1047
+ _: 2
1048
+ }, 1032, ["index"]))), 128))
1049
+ ]),
1050
+ _: 2
1051
+ }, 1032, ["index"])) : (u(), P(r(ue), {
1052
+ key: 1,
1053
+ index: b.menuUrl
1054
+ }, {
1055
+ default: x(() => [
1056
+ t("span", Ms, [
1057
+ R(i(b.icon)) ? (u(), P(r(U), {
1058
+ key: 0,
1059
+ name: i(b.icon),
1060
+ size: 16
1061
+ }, null, 8, ["name"])) : (u(), _("span", Us, L(f(b.menuName)), 1))
1062
+ ]),
1063
+ t("span", null, L(b.menuName), 1)
1064
+ ]),
1065
+ _: 2
1066
+ }, 1032, ["index"]))
1067
+ ], 64))), 128))
1068
+ ]),
1069
+ _: 1
1070
+ }, 8, ["default-active", "background-color", "text-color", "active-text-color"])
1071
+ ]));
1072
+ }
1073
+ }), Ds = /* @__PURE__ */ q(Rs, [["__scopeId", "data-v-8b571a75"]]), Ps = {
1074
+ key: 1,
1075
+ class: "layout__top-menu"
1076
+ }, zs = { class: "layout__main" }, Os = { class: "layout__header" }, As = { class: "layout__content" }, Bs = /* @__PURE__ */ H({
1077
+ __name: "index",
1078
+ setup(e) {
1079
+ const s = J(), o = ee(), a = y(
1080
+ () => s.isCollapsed ? "64px" : "210px"
1081
+ ), n = y(() => s.layout), d = y(() => n.value === "sidebar" || n.value === "mix"), w = y(() => n.value === "top"), c = y(() => (n.value !== "mix", o.menuList));
1082
+ return (h, l) => {
1083
+ const p = ct("router-view");
1084
+ return u(), _("div", {
1085
+ class: F(["layout", `layout--${n.value}`])
1086
+ }, [
1087
+ d.value ? (u(), _("aside", {
1088
+ key: 0,
1089
+ class: "layout__aside",
1090
+ style: Fe({ width: a.value })
1091
+ }, [
1092
+ S(At, {
1093
+ "menu-list": n.value === "mix" ? c.value : r(o).menuList
1094
+ }, null, 8, ["menu-list"])
1095
+ ], 4)) : O("", !0),
1096
+ w.value ? (u(), _("div", Ps, [
1097
+ S(Ds)
1098
+ ])) : O("", !0),
1099
+ t("div", zs, [
1100
+ t("header", Os, [
1101
+ S(Is)
1102
+ ]),
1103
+ t("main", As, [
1104
+ S(p)
1105
+ ])
1106
+ ])
1107
+ ], 2);
1108
+ };
1109
+ }
1110
+ }), Je = /* @__PURE__ */ q(Bs, [["__scopeId", "data-v-0cb5ef3f"]]), Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1111
+ __proto__: null,
1112
+ default: Je
1113
+ }, Symbol.toStringTag, { value: "Module" })), Fs = { class: "tabs-wrapper" }, Ks = { class: "tab-label" }, js = ["onClick"], qs = /* @__PURE__ */ H({
1114
+ __name: "Tabs",
1115
+ setup(e) {
1116
+ const s = ae(), o = X(), a = y(() => {
1117
+ const c = [];
1118
+ return s.matched.forEach((h) => {
1119
+ var l;
1120
+ (l = h.meta) != null && l.affix && c.push({
1121
+ name: h.name,
1122
+ title: h.meta.title,
1123
+ path: h.path,
1124
+ affix: !0
1125
+ });
1126
+ }), c;
1127
+ }), n = y(() => s.path), d = (c) => {
1128
+ o.push(c);
1129
+ }, w = (c) => {
1130
+ const h = a.value.find((l) => l.path === c);
1131
+ if (!(h != null && h.affix) && c === n.value) {
1132
+ const l = a.value.findIndex((i) => i.path === c), p = a.value[l - 1] || a.value[l + 1];
1133
+ p && o.push(p.path);
1134
+ }
1135
+ };
1136
+ return (c, h) => (u(), _("div", Fs, [
1137
+ S(r(dt), {
1138
+ modelValue: n.value,
1139
+ "onUpdate:modelValue": h[0] || (h[0] = (l) => n.value = l),
1140
+ type: "card",
1141
+ onTabClick: d
1142
+ }, {
1143
+ default: x(() => [
1144
+ (u(!0), _(A, null, K(a.value, (l) => (u(), P(r(mt), {
1145
+ key: l.path,
1146
+ name: l.path,
1147
+ label: l.title,
1148
+ closable: !l.affix
1149
+ }, {
1150
+ label: x(() => [
1151
+ t("span", Ks, [
1152
+ G(L(l.title) + " ", 1),
1153
+ l.affix ? O("", !0) : (u(), _("span", {
1154
+ key: 0,
1155
+ class: "tab-close",
1156
+ onClick: Be((p) => w(l.path), ["stop"])
1157
+ }, " ✕ ", 8, js))
1158
+ ])
1159
+ ]),
1160
+ _: 2
1161
+ }, 1032, ["name", "label", "closable"]))), 128))
1162
+ ]),
1163
+ _: 1
1164
+ }, 8, ["modelValue"])
1165
+ ]));
1166
+ }
1167
+ }), Do = /* @__PURE__ */ q(qs, [["__scopeId", "data-v-9156d8cd"]]), Ys = {}, Ws = { class: "footer" };
1168
+ function Hs(e, s) {
1169
+ return u(), _("div", Ws, [...s[0] || (s[0] = [
1170
+ t("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
1171
+ ])]);
1172
+ }
1173
+ const Po = /* @__PURE__ */ q(Ys, [["render", Hs], ["__scopeId", "data-v-4852826a"]]), Xs = () => {
1174
+ const e = ft.create({
1175
+ baseURL: void 0,
1176
+ timeout: 3e4,
1177
+ headers: {
1178
+ "Content-Type": "application/json"
1179
+ }
1180
+ });
1181
+ return e.interceptors.request.use(
1182
+ (s) => {
1183
+ const o = ve(), a = yt() || "Bearer";
1184
+ return o && (s.headers.Authorization = `${a} ${o}`), s;
1185
+ },
1186
+ (s) => Promise.reject(s)
1187
+ ), e.interceptors.response.use(
1188
+ (s) => {
1189
+ const { data: o } = s;
1190
+ return o.code === 200 || o.code === 0 ? o.data : (W.error(o.message || "请求失败"), Promise.reject(new Error(o.message || "请求失败")));
1191
+ },
1192
+ (s) => {
1193
+ var a;
1194
+ const { response: o } = s;
1195
+ if (o)
1196
+ switch (o.status) {
1197
+ case 401:
1198
+ W.error("登录已过期,请重新登录"), He(), window.location.href = "/login";
1199
+ break;
1200
+ case 403:
1201
+ W.error("没有权限访问");
1202
+ break;
1203
+ case 404:
1204
+ W.error("请求资源不存在");
1205
+ break;
1206
+ case 500:
1207
+ W.error("服务器错误");
1208
+ break;
1209
+ default:
1210
+ W.error(((a = o.data) == null ? void 0 : a.message) || "请求失败");
1211
+ }
1212
+ else
1213
+ W.error("网络连接失败");
1214
+ return Promise.reject(s);
1215
+ }
1216
+ ), e;
1217
+ }, oe = Xs(), T = {
1218
+ get(e, s) {
1219
+ return oe.get(e, s);
1220
+ },
1221
+ post(e, s, o) {
1222
+ return oe.post(e, s, o);
1223
+ },
1224
+ put(e, s, o) {
1225
+ return oe.put(e, s, o);
1226
+ },
1227
+ patch(e, s, o) {
1228
+ return oe.patch(e, s, o);
1229
+ },
1230
+ delete(e, s) {
1231
+ return oe.delete(e, s);
1232
+ }
1233
+ };
1234
+ function Js(e) {
1235
+ return T.post("/user/v1.0/login/by-domain", e);
1236
+ }
1237
+ function zo() {
1238
+ return T.put("/user/v1.0/user/logout");
1239
+ }
1240
+ function Qs() {
1241
+ return T.get("/user/v1.0/user/get-me");
1242
+ }
1243
+ function Oo(e) {
1244
+ return T.post("/user/v1.0/refresh", { refreshToken: e });
1245
+ }
1246
+ const ce = g(""), de = g(""), me = g("");
1247
+ function Ao(e) {
1248
+ e.appId && (ce.value = e.appId), e.clientId && (de.value = e.clientId), e.apiBaseUrl && (me.value = e.apiBaseUrl);
1249
+ }
1250
+ function Me() {
1251
+ if (ce.value)
1252
+ return ce.value;
1253
+ try {
1254
+ return "";
1255
+ } catch {
1256
+ return "";
1257
+ }
1258
+ }
1259
+ function Zs() {
1260
+ if (de.value)
1261
+ return de.value;
1262
+ try {
1263
+ return "";
1264
+ } catch {
1265
+ return "";
1266
+ }
1267
+ }
1268
+ function Bo() {
1269
+ if (me.value)
1270
+ return me.value;
1271
+ try {
1272
+ return "";
1273
+ } catch {
1274
+ return "";
1275
+ }
1276
+ }
1277
+ const Vo = {
1278
+ appId: ce,
1279
+ clientId: de,
1280
+ apiBaseUrl: me
1281
+ }, Gs = { class: "login" }, eo = { class: "login__container" }, to = /* @__PURE__ */ H({
1282
+ __name: "index",
1283
+ setup(e) {
1284
+ const s = X(), o = ae(), a = g(!1), n = g(!1), d = we({
1285
+ uid: "",
1286
+ password: ""
1287
+ }), w = {
1288
+ uid: [
1289
+ { required: !0, message: "请输入用户名", trigger: "blur" }
1290
+ ],
1291
+ password: [
1292
+ { required: !0, message: "请输入密码", trigger: "blur" },
1293
+ { min: 6, message: "密码长度至少6位", trigger: "blur" }
1294
+ ]
1295
+ }, c = g(), h = async () => {
1296
+ var l;
1297
+ try {
1298
+ await ((l = c.value) == null ? void 0 : l.validate()), a.value = !0;
1299
+ const p = await Js({
1300
+ appId: Me(),
1301
+ clientId: Zs(),
1302
+ uid: d.uid,
1303
+ password: d.password,
1304
+ code: !0
1305
+ });
1306
+ We(p), W.success("登录成功");
1307
+ const i = o.query.redirect || "/";
1308
+ s.push(i);
1309
+ } catch (p) {
1310
+ console.error("登录失败:", p);
1311
+ } finally {
1312
+ a.value = !1;
1313
+ }
1314
+ };
1315
+ return (l, p) => (u(), _("div", Gs, [
1316
+ t("div", eo, [
1317
+ p[5] || (p[5] = t("div", { class: "login__header" }, [
1318
+ t("img", {
1319
+ src: Ye,
1320
+ alt: "Logo",
1321
+ class: "login__logo"
1322
+ }),
1323
+ t("h1", { class: "login__title" }, "Xto Demo"),
1324
+ t("p", { class: "login__subtitle" }, "后台管理系统")
1325
+ ], -1)),
1326
+ S(r(ht), {
1327
+ ref_key: "formRef",
1328
+ ref: c,
1329
+ model: d,
1330
+ rules: w,
1331
+ class: "login__form",
1332
+ "label-width": "0"
1333
+ }, {
1334
+ default: x(() => [
1335
+ S(r(re), { prop: "uid" }, {
1336
+ default: x(() => [
1337
+ S(r(Oe), {
1338
+ modelValue: d.uid,
1339
+ "onUpdate:modelValue": p[0] || (p[0] = (i) => d.uid = i),
1340
+ placeholder: "用户名",
1341
+ size: "large"
1342
+ }, {
1343
+ prefix: x(() => [
1344
+ S(r(U), {
1345
+ name: "user",
1346
+ size: 18
1347
+ })
1348
+ ]),
1349
+ _: 1
1350
+ }, 8, ["modelValue"])
1351
+ ]),
1352
+ _: 1
1353
+ }),
1354
+ S(r(re), { prop: "password" }, {
1355
+ default: x(() => [
1356
+ S(r(Oe), {
1357
+ modelValue: d.password,
1358
+ "onUpdate:modelValue": p[1] || (p[1] = (i) => d.password = i),
1359
+ type: "password",
1360
+ placeholder: "密码",
1361
+ size: "large",
1362
+ "show-password": "",
1363
+ onKeyup: Ve(h, ["enter"])
1364
+ }, {
1365
+ prefix: x(() => [
1366
+ S(r(U), {
1367
+ name: "lock",
1368
+ size: 18
1369
+ })
1370
+ ]),
1371
+ _: 1
1372
+ }, 8, ["modelValue"])
1373
+ ]),
1374
+ _: 1
1375
+ }),
1376
+ S(r(re), null, {
1377
+ default: x(() => [
1378
+ S(r(vt), {
1379
+ modelValue: n.value,
1380
+ "onUpdate:modelValue": p[2] || (p[2] = (i) => n.value = i)
1381
+ }, {
1382
+ default: x(() => [...p[3] || (p[3] = [
1383
+ G("记住我", -1)
1384
+ ])]),
1385
+ _: 1
1386
+ }, 8, ["modelValue"])
1387
+ ]),
1388
+ _: 1
1389
+ }),
1390
+ S(r(re), null, {
1391
+ default: x(() => [
1392
+ S(r(he), {
1393
+ type: "primary",
1394
+ size: "large",
1395
+ loading: a.value,
1396
+ class: "login__submit",
1397
+ onClick: h
1398
+ }, {
1399
+ default: x(() => [...p[4] || (p[4] = [
1400
+ G(" 登录 ", -1)
1401
+ ])]),
1402
+ _: 1
1403
+ }, 8, ["loading"])
1404
+ ]),
1405
+ _: 1
1406
+ })
1407
+ ]),
1408
+ _: 1
1409
+ }, 8, ["model"]),
1410
+ p[6] || (p[6] = t("div", { class: "login__footer" }, [
1411
+ t("p", null, "请输入您的用户名和密码")
1412
+ ], -1))
1413
+ ])
1414
+ ]));
1415
+ }
1416
+ }), so = /* @__PURE__ */ q(to, [["__scopeId", "data-v-f3e724b6"]]), oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1417
+ __proto__: null,
1418
+ default: so
1419
+ }, Symbol.toStringTag, { value: "Module" })), ao = { class: "error-page" }, no = { class: "error-page__content" }, ro = /* @__PURE__ */ H({
1420
+ __name: "404",
1421
+ setup(e) {
1422
+ const s = X(), o = () => {
1423
+ s.push("/");
1424
+ };
1425
+ return (a, n) => (u(), _("div", ao, [
1426
+ t("div", no, [
1427
+ n[1] || (n[1] = t("div", { class: "error-page__code" }, "404", -1)),
1428
+ n[2] || (n[2] = t("div", { class: "error-page__title" }, "页面不存在", -1)),
1429
+ n[3] || (n[3] = t("div", { class: "error-page__desc" }, "抱歉,您访问的页面不存在或已被删除", -1)),
1430
+ S(r(he), {
1431
+ type: "primary",
1432
+ onClick: o
1433
+ }, {
1434
+ default: x(() => [...n[0] || (n[0] = [
1435
+ G("返回首页", -1)
1436
+ ])]),
1437
+ _: 1
1438
+ })
1439
+ ])
1440
+ ]));
1441
+ }
1442
+ }), lo = /* @__PURE__ */ q(ro, [["__scopeId", "data-v-c3c12c24"]]), io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1443
+ __proto__: null,
1444
+ default: lo
1445
+ }, Symbol.toStringTag, { value: "Module" })), uo = { class: "error-page" }, co = { class: "error-page__content" }, mo = /* @__PURE__ */ H({
1446
+ __name: "403",
1447
+ setup(e) {
1448
+ const s = X(), o = () => {
1449
+ s.push("/");
1450
+ };
1451
+ return (a, n) => (u(), _("div", uo, [
1452
+ t("div", co, [
1453
+ n[1] || (n[1] = t("div", { class: "error-page__code" }, "403", -1)),
1454
+ n[2] || (n[2] = t("div", { class: "error-page__title" }, "无访问权限", -1)),
1455
+ n[3] || (n[3] = t("div", { class: "error-page__desc" }, "抱歉,您没有权限访问此页面", -1)),
1456
+ S(r(he), {
1457
+ type: "primary",
1458
+ onClick: o
1459
+ }, {
1460
+ default: x(() => [...n[0] || (n[0] = [
1461
+ G("返回首页", -1)
1462
+ ])]),
1463
+ _: 1
1464
+ })
1465
+ ])
1466
+ ]));
1467
+ }
1468
+ }), po = /* @__PURE__ */ q(mo, [["__scopeId", "data-v-dd5f2795"]]), ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1469
+ __proto__: null,
1470
+ default: po
1471
+ }, Symbol.toStringTag, { value: "Module" }));
1472
+ function Fo() {
1473
+ const e = J(), s = j(), o = $e(), a = y(() => s.userName || ""), n = y(() => s.userInfo), d = y(() => e.appName), w = y(() => o.isLoggedIn), c = y(() => e.isDark), h = y(() => e.theme), l = y(() => e.isCollapsed), p = y(() => e.layout);
1474
+ return {
1475
+ userName: a,
1476
+ userInfo: n,
1477
+ appName: d,
1478
+ isLoggedIn: w,
1479
+ isDark: c,
1480
+ theme: h,
1481
+ isCollapsed: l,
1482
+ layout: p,
1483
+ toggleTheme: () => {
1484
+ e.toggleTheme();
1485
+ },
1486
+ toggleCollapse: () => {
1487
+ e.toggleCollapse();
1488
+ }
1489
+ };
1490
+ }
1491
+ function Ko() {
1492
+ const e = j();
1493
+ return {
1494
+ isLoggedIn: y(() => e.isLoggedIn)
1495
+ };
1496
+ }
1497
+ function jo(e, s = {}) {
1498
+ const { rules: o, onSubmit: a } = s, n = g(), d = we({ ...e }), w = g(!1), c = g(!1), h = g(!1), l = () => {
1499
+ f(), h.value = !1, c.value = !0;
1500
+ }, p = (C) => {
1501
+ Object.assign(d, C), h.value = !0, c.value = !0;
1502
+ }, i = () => {
1503
+ c.value = !1, f();
1504
+ }, f = () => {
1505
+ var C;
1506
+ Object.keys(e).forEach((D) => {
1507
+ d[D] = e[D];
1508
+ }), (C = n.value) == null || C.resetFields();
1509
+ };
1510
+ return {
1511
+ formRef: n,
1512
+ formData: d,
1513
+ rules: o,
1514
+ loading: w,
1515
+ visible: c,
1516
+ isEdit: h,
1517
+ openAdd: l,
1518
+ openEdit: p,
1519
+ close: i,
1520
+ resetForm: f,
1521
+ handleSubmit: async () => {
1522
+ var C;
1523
+ try {
1524
+ await ((C = n.value) == null ? void 0 : C.validate()), w.value = !0, await (a == null ? void 0 : a(d)), i();
1525
+ } catch (D) {
1526
+ console.error(D);
1527
+ } finally {
1528
+ w.value = !1;
1529
+ }
1530
+ }
1531
+ };
1532
+ }
1533
+ function qo(e) {
1534
+ const { fetchData: s, defaultPageSize: o = 10 } = e, a = g(!1), n = g([]), d = g(0), w = g(1), c = g(o), h = we({}), l = async () => {
1535
+ a.value = !0;
1536
+ try {
1537
+ const b = {
1538
+ ...h,
1539
+ page: w.value,
1540
+ pageSize: c.value
1541
+ }, E = await s(b);
1542
+ n.value = E.list, d.value = E.total;
1543
+ } catch (b) {
1544
+ console.error(b);
1545
+ } finally {
1546
+ a.value = !1;
1547
+ }
1548
+ }, p = () => {
1549
+ w.value = 1, l();
1550
+ }, i = () => {
1551
+ Object.keys(h).forEach((b) => {
1552
+ h[b] = void 0;
1553
+ }), w.value = 1, l();
1554
+ }, f = (b) => {
1555
+ w.value = b, l();
1556
+ }, R = (b) => {
1557
+ c.value = b, w.value = 1, l();
1558
+ }, C = () => {
1559
+ l();
1560
+ }, D = y(() => ({
1561
+ current: w.value,
1562
+ pageSize: c.value,
1563
+ total: d.value
1564
+ }));
1565
+ return {
1566
+ loading: a,
1567
+ data: n,
1568
+ total: d,
1569
+ currentPage: w,
1570
+ pageSize: c,
1571
+ searchParams: h,
1572
+ pagination: D,
1573
+ getData: l,
1574
+ handleSearch: p,
1575
+ handleReset: i,
1576
+ handlePageChange: f,
1577
+ handleSizeChange: R,
1578
+ refresh: C
1579
+ };
1580
+ }
1581
+ function Yo(e) {
1582
+ return j().isLoggedIn;
1583
+ }
1584
+ function Wo(e) {
1585
+ return j().isLoggedIn;
1586
+ }
1587
+ function Ho() {
1588
+ return !0;
1589
+ }
1590
+ const Qe = [
1591
+ {
1592
+ path: "/login",
1593
+ name: "Login",
1594
+ component: () => Promise.resolve().then(() => oo),
1595
+ meta: {
1596
+ title: "登录",
1597
+ hidden: !0
1598
+ }
1599
+ },
1600
+ {
1601
+ path: "/404",
1602
+ name: "NotFound",
1603
+ component: () => Promise.resolve().then(() => io),
1604
+ meta: {
1605
+ title: "404",
1606
+ hidden: !0
1607
+ }
1608
+ },
1609
+ {
1610
+ path: "/403",
1611
+ name: "Forbidden",
1612
+ component: () => Promise.resolve().then(() => ho),
1613
+ meta: {
1614
+ title: "403",
1615
+ hidden: !0
1616
+ }
1617
+ }
1618
+ ], Ze = {
1619
+ path: "/:pathMatch(.*)*",
1620
+ redirect: "/404",
1621
+ meta: {
1622
+ hidden: !0
1623
+ }
1624
+ }, Ge = {
1625
+ path: "/",
1626
+ name: "Layout",
1627
+ component: () => Promise.resolve().then(() => Vs),
1628
+ redirect: "/dashboard",
1629
+ children: [
1630
+ {
1631
+ path: "/dashboard",
1632
+ name: "Dashboard",
1633
+ component: () => import("./index-CVMV9Tfg.js"),
1634
+ meta: {
1635
+ title: "仪表盘",
1636
+ icon: "dashboard",
1637
+ keepAlive: !0,
1638
+ affix: !0
1639
+ }
1640
+ },
1641
+ {
1642
+ path: "/system/user",
1643
+ name: "SystemUser",
1644
+ component: () => import("./index-DzerABZq.js"),
1645
+ meta: {
1646
+ title: "用户管理",
1647
+ icon: "user",
1648
+ keepAlive: !0
1649
+ }
1650
+ },
1651
+ {
1652
+ path: "/system/role",
1653
+ name: "SystemRole",
1654
+ component: () => import("./index-3zeoNaqT.js"),
1655
+ meta: {
1656
+ title: "角色管理",
1657
+ icon: "role",
1658
+ keepAlive: !0
1659
+ }
1660
+ },
1661
+ {
1662
+ path: "/system/menu",
1663
+ name: "SystemMenu",
1664
+ component: () => import("./index-CbEIzXG9.js"),
1665
+ meta: {
1666
+ title: "菜单管理",
1667
+ icon: "menu",
1668
+ keepAlive: !0
1669
+ }
1670
+ }
1671
+ ]
1672
+ }, Xo = [
1673
+ {
1674
+ path: "/dashboard",
1675
+ name: "Dashboard",
1676
+ component: () => import("./index-CVMV9Tfg.js"),
1677
+ meta: {
1678
+ title: "仪表盘",
1679
+ icon: "dashboard",
1680
+ keepAlive: !0,
1681
+ affix: !0
1682
+ }
1683
+ },
1684
+ {
1685
+ path: "/system",
1686
+ name: "System",
1687
+ redirect: "/system/user",
1688
+ meta: {
1689
+ title: "系统管理",
1690
+ icon: "setting"
1691
+ },
1692
+ children: [
1693
+ {
1694
+ path: "user",
1695
+ name: "SystemUser",
1696
+ component: () => import("./index-DzerABZq.js"),
1697
+ meta: {
1698
+ title: "用户管理",
1699
+ icon: "user",
1700
+ keepAlive: !0
1701
+ }
1702
+ },
1703
+ {
1704
+ path: "role",
1705
+ name: "SystemRole",
1706
+ component: () => import("./index-3zeoNaqT.js"),
1707
+ meta: {
1708
+ title: "角色管理",
1709
+ icon: "role",
1710
+ keepAlive: !0
1711
+ }
1712
+ },
1713
+ {
1714
+ path: "menu",
1715
+ name: "SystemMenu",
1716
+ component: () => import("./index-CbEIzXG9.js"),
1717
+ meta: {
1718
+ title: "菜单管理",
1719
+ icon: "menu",
1720
+ keepAlive: !0
1721
+ }
1722
+ }
1723
+ ]
1724
+ }
1725
+ ], vo = [
1726
+ {
1727
+ menuCode: "dashboard",
1728
+ menuName: "仪表盘",
1729
+ menuUrl: "/dashboard",
1730
+ icon: "dashboard",
1731
+ closable: !0,
1732
+ isDefault: !0,
1733
+ isOut: !1
1734
+ },
1735
+ {
1736
+ menuCode: "system",
1737
+ menuName: "系统管理",
1738
+ menuUrl: "/system",
1739
+ icon: "setting",
1740
+ closable: !1,
1741
+ isDefault: !1,
1742
+ isOut: !1,
1743
+ children: [
1744
+ {
1745
+ menuCode: "system_user",
1746
+ menuName: "用户管理",
1747
+ menuUrl: "/system/user",
1748
+ icon: "user",
1749
+ closable: !0,
1750
+ isDefault: !1,
1751
+ isOut: !1
1752
+ },
1753
+ {
1754
+ menuCode: "system_role",
1755
+ menuName: "角色管理",
1756
+ menuUrl: "/system/role",
1757
+ icon: "role",
1758
+ closable: !0,
1759
+ isDefault: !1,
1760
+ isOut: !1
1761
+ },
1762
+ {
1763
+ menuCode: "system_menu",
1764
+ menuName: "菜单管理",
1765
+ menuUrl: "/system/menu",
1766
+ icon: "menu",
1767
+ closable: !0,
1768
+ isDefault: !1,
1769
+ isOut: !1
1770
+ }
1771
+ ]
1772
+ }
1773
+ ], et = Ce({
1774
+ history: Se(),
1775
+ routes: [...Qe, Ge, Ze],
1776
+ scrollBehavior: () => ({ left: 0, top: 0 })
1777
+ }), fo = ["/login", "/404", "/403"];
1778
+ et.beforeEach(async (e, s, o) => {
1779
+ const a = J();
1780
+ if (a.initTheme(), Xe())
1781
+ if (e.path === "/login")
1782
+ o({ path: "/" });
1783
+ else {
1784
+ const n = j();
1785
+ n.isLoggedIn || (n.setUserInfo({
1786
+ appId: Me(),
1787
+ userId: "1",
1788
+ userName: "管理员",
1789
+ departmentName: "技术部",
1790
+ email: "admin@example.com",
1791
+ mobilePhone: "13800138000",
1792
+ positionName: "管理员",
1793
+ avatar: ""
1794
+ }), ee().setMenuList(vo)), e.name && e.meta.keepAlive && a.addCachedView(e.name), o();
1795
+ }
1796
+ else
1797
+ fo.includes(e.path) ? o() : o("/login");
1798
+ });
1799
+ function Jo() {
1800
+ const e = Ce({
1801
+ history: Se(),
1802
+ routes: [...Qe, Ge, Ze]
1803
+ });
1804
+ et.matcher = e.matcher;
1805
+ }
1806
+ function Qo(e, s = {}) {
1807
+ const o = s.indexPath || "/dashboard";
1808
+ return {
1809
+ path: "/",
1810
+ name: "Layout",
1811
+ component: Je,
1812
+ redirect: o,
1813
+ children: e
1814
+ };
1815
+ }
1816
+ function Zo(e) {
1817
+ return Ce({
1818
+ history: Se(),
1819
+ routes: e,
1820
+ scrollBehavior: () => ({ left: 0, top: 0 })
1821
+ });
1822
+ }
1823
+ function Go(e) {
1824
+ return T.get("/role/list", { params: e });
1825
+ }
1826
+ function ea(e) {
1827
+ return T.get(`/role/${e}`);
1828
+ }
1829
+ function ta(e) {
1830
+ return T.post("/role", e);
1831
+ }
1832
+ function sa(e, s) {
1833
+ return T.put(`/role/${e}`, s);
1834
+ }
1835
+ function oa(e) {
1836
+ return T.delete(`/role/${e}`);
1837
+ }
1838
+ function aa(e, s) {
1839
+ return T.patch(`/role/${e}/status`, { status: s });
1840
+ }
1841
+ function na() {
1842
+ return T.get("/user/v1.0/menu/list");
1843
+ }
1844
+ function _o(e) {
1845
+ const s = e || Me();
1846
+ return T.get(`/user/v1.0/menu/get-menu?appId=${s}`);
1847
+ }
1848
+ function ra(e) {
1849
+ return T.post("/menu", e);
1850
+ }
1851
+ function la(e, s) {
1852
+ return T.put(`/menu/${e}`, s);
1853
+ }
1854
+ function ia(e) {
1855
+ return T.delete(`/menu/${e}`);
1856
+ }
1857
+ const go = ["/login", "/404", "/403"];
1858
+ function ua(e, s = {}) {
1859
+ const o = s.whiteList || go, a = s.loginPath || "/login", n = s.homePath || "/";
1860
+ e.beforeEach(async (d, w, c) => {
1861
+ const h = J(), l = j(), p = ee();
1862
+ if (h.initTheme(), ve())
1863
+ if (d.path === a)
1864
+ c({ path: n });
1865
+ else if (l.isLoggedIn)
1866
+ d.name && d.meta.keepAlive && h.addCachedView(d.name), c();
1867
+ else
1868
+ try {
1869
+ if (s.fetchUserInfo) {
1870
+ const f = await s.fetchUserInfo();
1871
+ l.setUserInfo(f);
1872
+ } else {
1873
+ const f = await Qs();
1874
+ l.setUserInfo(f);
1875
+ }
1876
+ if (s.fetchMenu) {
1877
+ const f = await s.fetchMenu();
1878
+ p.setMenuList(f);
1879
+ } else {
1880
+ const f = await _o(s.appId);
1881
+ p.setMenuList(f);
1882
+ }
1883
+ s.onLoginSuccess && s.onLoginSuccess(), d.name && d.meta.keepAlive && h.addCachedView(d.name), c({ ...d, replace: !0 });
1884
+ } catch (f) {
1885
+ console.error("获取用户信息失败:", f), l.clearUserInfo(), p.clearMenu(), localStorage.removeItem("token"), localStorage.removeItem("token_type"), localStorage.removeItem("refresh_token"), c({ path: a, query: { redirect: d.fullPath } });
1886
+ }
1887
+ else
1888
+ o.includes(d.path) ? c() : c({ path: a, query: { redirect: d.fullPath } });
1889
+ }), e.afterEach(() => {
1890
+ });
1891
+ }
1892
+ function ca(e) {
1893
+ return T.get("/user/list", { params: e });
1894
+ }
1895
+ function da(e) {
1896
+ return T.get(`/user/${e}`);
1897
+ }
1898
+ function ma(e) {
1899
+ return T.post("/user", e);
1900
+ }
1901
+ function pa(e, s) {
1902
+ return T.put(`/user/${e}`, s);
1903
+ }
1904
+ function ha(e) {
1905
+ return T.delete(`/user/${e}`);
1906
+ }
1907
+ function va(e) {
1908
+ return T.post("/user/batch-delete", { ids: e });
1909
+ }
1910
+ function fa(e, s) {
1911
+ return T.patch(`/user/${e}/status`, { status: s });
1912
+ }
1913
+ function _a(e) {
1914
+ return T.post(`/user/${e}/reset-password`);
1915
+ }
1916
+ var yo = /* @__PURE__ */ ((e) => (e[e.ENABLED = 1] = "ENABLED", e[e.DISABLED = 0] = "DISABLED", e))(yo || {}), ko = /* @__PURE__ */ ((e) => (e[e.UNKNOWN = 0] = "UNKNOWN", e[e.MALE = 1] = "MALE", e[e.FEMALE = 2] = "FEMALE", e))(ko || {}), bo = /* @__PURE__ */ ((e) => (e[e.DIRECTORY = 0] = "DIRECTORY", e[e.MENU = 1] = "MENU", e[e.BUTTON = 2] = "BUTTON", e))(bo || {});
1917
+ const ga = {
1918
+ 1: "启用",
1919
+ 0: "禁用"
1920
+ }, ya = {
1921
+ 0: "未知",
1922
+ 1: "男",
1923
+ 2: "女"
1924
+ }, ka = {
1925
+ 0: "目录",
1926
+ 1: "菜单",
1927
+ 2: "按钮"
1928
+ }, ba = [
1929
+ {
1930
+ label: "启用",
1931
+ value: 1
1932
+ /* ENABLED */
1933
+ },
1934
+ {
1935
+ label: "禁用",
1936
+ value: 0
1937
+ /* DISABLED */
1938
+ }
1939
+ ], wa = [
1940
+ {
1941
+ label: "未知",
1942
+ value: 0
1943
+ /* UNKNOWN */
1944
+ },
1945
+ {
1946
+ label: "男",
1947
+ value: 1
1948
+ /* MALE */
1949
+ },
1950
+ {
1951
+ label: "女",
1952
+ value: 2
1953
+ /* FEMALE */
1954
+ }
1955
+ ], Ca = [
1956
+ {
1957
+ label: "目录",
1958
+ value: 0
1959
+ /* DIRECTORY */
1960
+ },
1961
+ {
1962
+ label: "菜单",
1963
+ value: 1
1964
+ /* MENU */
1965
+ },
1966
+ {
1967
+ label: "按钮",
1968
+ value: 2
1969
+ /* BUTTON */
1970
+ }
1971
+ ], Sa = {
1972
+ mounted(e, s) {
1973
+ var a;
1974
+ j().isLoggedIn || (a = e.parentNode) == null || a.removeChild(e);
1975
+ }
1976
+ };
1977
+ export {
1978
+ It as $,
1979
+ Ro as A,
1980
+ na as B,
1981
+ _o as C,
1982
+ Uo as D,
1983
+ Mo as E,
1984
+ Po as F,
1985
+ ko as G,
1986
+ Is as H,
1987
+ ea as I,
1988
+ Go as J,
1989
+ ve as K,
1990
+ Je as L,
1991
+ bo as M,
1992
+ wt as N,
1993
+ yt as O,
1994
+ da as P,
1995
+ Qs as Q,
1996
+ ca as R,
1997
+ yo as S,
1998
+ Do as T,
1999
+ Yo as U,
2000
+ Wo as V,
2001
+ Xe as W,
2002
+ T as X,
2003
+ Ao as Y,
2004
+ Ho as Z,
2005
+ q as _,
2006
+ ba as a,
2007
+ Ge as a0,
2008
+ v as a1,
2009
+ le as a2,
2010
+ Js as a3,
2011
+ zo as a4,
2012
+ vo as a5,
2013
+ Sa as a6,
2014
+ Oo as a7,
2015
+ _a as a8,
2016
+ Jo as a9,
2017
+ et as aa,
2018
+ $o as ab,
2019
+ ie as ac,
2020
+ xt as ad,
2021
+ St as ae,
2022
+ bt as af,
2023
+ gt as ag,
2024
+ Ct as ah,
2025
+ We as ai,
2026
+ kt as aj,
2027
+ ua as ak,
2028
+ Qe as al,
2029
+ la as am,
2030
+ sa as an,
2031
+ aa as ao,
2032
+ pa as ap,
2033
+ fa as aq,
2034
+ Fo as ar,
2035
+ J as as,
2036
+ Ko as at,
2037
+ $e as au,
2038
+ jo as av,
2039
+ ee as aw,
2040
+ qo as ax,
2041
+ j as ay,
2042
+ Ca as b,
2043
+ po as c,
2044
+ wa as d,
2045
+ ya as e,
2046
+ ka as f,
2047
+ lo as g,
2048
+ At as h,
2049
+ so as i,
2050
+ ga as j,
2051
+ Vo as k,
2052
+ va as l,
2053
+ He as m,
2054
+ Qo as n,
2055
+ ra as o,
2056
+ ta as p,
2057
+ Zo as q,
2058
+ ma as r,
2059
+ Xo as s,
2060
+ ia as t,
2061
+ oa as u,
2062
+ ha as v,
2063
+ Ze as w,
2064
+ Bo as x,
2065
+ Me as y,
2066
+ Zs as z
2067
+ };