路由修正

This commit is contained in:
2025-11-14 19:17:49 +08:00
parent 9e4cfc1200
commit cb401eebe1
8 changed files with 54 additions and 98 deletions

View File

@@ -49,11 +49,12 @@ defineProps<{
}>();
const route = useRoute();
console.log(route.path);
// 获取兄弟路由(计算属性,确保响应式更新)
const menus = computed(() => {
return getParentChildrenRoutes(route);
});
console.log(menus.value);
// 获取完整路径
function getFullPath(menu: RouteRecordRaw): string {

View File

@@ -1,56 +0,0 @@
<template>
<AdminLayout
title="资源管理"
subtitle="管理文章、资源、数据等内容"
>
<div class="data-records">
<el-tabs v-model="activeTab">
<el-tab-pane label="菜单管理" name="menu">
<!-- 菜单管理已在manage/system中实现这里可以引用或重新实现 -->
<div class="redirect-info">
<p>菜单管理功能已在系统管理模块中实现</p>
<el-button type="primary" @click="goToMenuManage">前往菜单管理</el-button>
</div>
</el-tab-pane>
</el-tabs>
</div>
</AdminLayout>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { ElTabs, ElTabPane, ElButton } from 'element-plus';
import { AdminLayout } from '@/views/admin';
defineOptions({
name: 'DataRecordsView'
});
const router = useRouter();
const activeTab = ref('menu');
function goToMenuManage() {
router.push('/admin/system/menu');
}
</script>
<style lang="scss" scoped>
.data-records {
background: #FFFFFF;
padding: 24px;
border-radius: 14px;
}
.redirect-info {
padding: 40px;
text-align: center;
p {
font-size: 16px;
color: #666;
margin-bottom: 20px;
}
}
</style>

View File

@@ -1,11 +1,10 @@
<template>
<AdminLayout
title="资源管理"
subtitle="管理文章、资源、数据等内容"
title="数据采集"
subtitle="管理新闻采集数据"
>
<div class="resource-management">
<div class="header">
<h2>数据采集管理</h2>
<div class="header-actions">
<el-button type="primary" @click="handleRefresh">
<el-icon><Refresh /></el-icon>
@@ -710,7 +709,7 @@ onMounted(() => {
.header {
display: flex;
justify-content: space-between;
justify-content: flex-end;
align-items: center;
margin-bottom: 20px;