xto-fronted 0.4.86 → 0.4.87

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