| | |
| | | zhCN, |
| | | enUS, |
| | | }; |
| | | |
| | | console.log('%c 中扬立库平台 %c 1.0.0','background-color:rgb(53,73,94);color: #fff;border-radius:2px 0 0 2px;padding:2px 4px;','background-color:rgb(25,190,107);color: #fff;border-radius:0 2px 2px 0;padding:2px 4px;font: 9pt "Apercu Regular", Georgia, "Times New Roman", Times, serif;') |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | app.use(createPinia()) |
| | | app.use(router) |
| | | app.use(Antd) |
| | | app.mount('#app') |
| | | router.isReady().then((e) => { |
| | | app.mount('#app') |
| | | }) |
| | | } |
| | | boot() |
| | | |
| | |
| | | <script setup> |
| | | import { nextTick, ref, inject } from 'vue'; |
| | | import { nextTick, ref, inject, onMounted } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postForm } from '@/utils/request.js' |
| | | import { logout } from '@/config.js'; |
| | |
| | | ...Icons, |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | let name = router.currentRoute.value.name; |
| | | let path = router.currentRoute.value.path; |
| | | if (currentCache.value == null && path != '/') { |
| | | get('/api/menu/get/route', { |
| | | route: path |
| | | }).then((resp) => { |
| | | let result = resp.data; |
| | | let data = result.data; |
| | | if (result.code == 200) { |
| | | currentCache.value = name; |
| | | routerCache.value.push(name) |
| | | routerCacheList.value.push({ |
| | | key: path, |
| | | languageId: data.languageId, |
| | | name: name, |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | getMenu() |
| | | function getMenu() { |
| | | get('/api/auth/menu', {}).then((result) => { |
| | |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:menu:list')") |
| | | @GetMapping("/menu/get/route") |
| | | public R getByRoute(@RequestParam("route") String route) { |
| | | Menu menu = menuService.getOne(new LambdaQueryWrapper<Menu>().eq(Menu::getRoute, route).eq(Menu::getStatus, 1).last("limit 1")); |
| | | return R.ok().add(menu); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:menu:list')") |
| | | @GetMapping("/menu/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(menuService.getById(id)); |