This commit is contained in:
hrx 2025-10-30 16:57:08 +08:00
parent 2144f3dcbc
commit 54e01453d5
8 changed files with 663 additions and 387 deletions

View File

@ -1,4 +1,3 @@
<!-- Sidebar.vue -->
<template>
<div class="index">
<div :class="{ 'has-logo': showLogo }" class="sidebar-container">
@ -32,7 +31,7 @@
<script>
import { mapGetters } from "vuex";
import SidebarItem from "./SidebarItem.vue";
import SidebarItem from "./SidebarItem.vue";
import variables from "@/styles/variables.scss";
import Logo from "./Logo.vue";
@ -108,7 +107,7 @@ export default {
}
}
// -
//
::v-deep .el-menu-vertical {
border: none;
height: 100%;
@ -166,7 +165,7 @@ export default {
.el-menu--popup {
.el-menu-item {
&.is-active {
background-color: #d7dafd !important;
background-color: #f5f7fa !important;
color: #296ad9 !important;
}
}

View File

@ -1,7 +1,6 @@
import Vue from 'vue'
import Cookies from 'js-cookie'
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import './assets/css/iconfont/iconfont.css'

View File

@ -300,31 +300,54 @@ export const constantRoutes = [
*/
export const asyncRoutes = [
// 全部产品 - 一级菜单
// 全部产品 - 一级菜单(无子路由)
{
path: "/product",
component: Layout,
redirect: "/product/overview",
meta: {
title: "全部产品",
fullPath: "/product",
noCache: true,
icon: "el-icon-goods"
},
alwaysShow: true,
children: [
{
path: "overview",
component: () => import('../views/customer/orderManagement/index.vue'),
name: 'ProductOverview',
path: "",
component: () => import('@/views/product/productHome/productIndex/index.vue'),
name: 'ProductHome',
meta: {
title: "资源概览",
fullPath: "/product/overview",
title: "全部产品",
fullPath: "/product",
noCache: true
}
},
]
},
{
path: "/overview",
component: Layout,
meta: {
title: "资源概览",
fullPath: "/overview",
noCache: true,
icon: "el-icon-s-data"
},
children: [
{
path: "",
component: () => import('../views/customer/orderManagement/index.vue'),
name: 'ResourceOverview',
meta: {
title: "资源概览",
fullPath: "/overview",
noCache: true
}
}
]
},
{
path: "/orderManagement",

View File

@ -16,8 +16,11 @@ function filterAsyncRoutes(routes, permissions) {
// 检查当前路由是否在权限列表中
const hasPermission = permissions.some(p => p.path === route.meta?.fullPath);
// 如果当前路由有权限,则加入结果
if (hasPermission) {
// 特殊处理:确保"全部产品"和"资源概览"这两个一级路由始终显示
const isCriticalRoute = route.path === "/product" || route.path === "/overview";
// 如果当前路由有权限或者是关键路由,则加入结果
if (hasPermission || isCriticalRoute) {
res.push(tmpRoute);
}
// 如果没有直接权限,但有子路由,递归处理子路由

View File

@ -32,3 +32,63 @@
.mt20{
margin-top: 20px;
}
/* ::v-deep .table-header {
background: !important;
color: #ffffff !important;
font-weight: bold;
text-align: center;
} */
/* 全局表格头部样式 - 蓝色渐变 */
.el-table .el-table__header th,
.el-table .el-table__header .el-table__cell {
background: #409EFF !important;
color: #ffffff !important;
font-weight: bold !important;
text-align: center !important;
border-bottom: none !important;
}
/* 处理表格边框情况 */
.el-table--border .el-table__header th,
.el-table--border .el-table__header .el-table__cell {
border-right: 1px solid #a0cfff !important;
}
.el-table--border .el-table__header th:last-child,
.el-table--border .el-table__header .el-table__cell:last-child {
border-right: none !important;
}
/* 鼠标悬停效果 */
.el-table .el-table__header th:hover,
.el-table .el-table__header .el-table__cell:hover {
background: linear-gradient(135deg, #66b1ff, #409eff) !important;
}
/* 科技蓝紫渐变滚动条 */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: linear-gradient(180deg, #f8faff 0%, #f0f4ff 100%);
border-radius: 6px;
box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
border-radius: 6px;
border: 1.5px solid #f8faff;
box-shadow: 0 1px 4px rgba(99, 102, 241, 0.25);
}
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, #818cf8 0%, #a78bfa 50%, #c084fc 100%);
box-shadow: 0 1px 6px rgba(99, 102, 241, 0.35);
}
::-webkit-scrollbar-thumb:active {
background: linear-gradient(180deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
}

View File

@ -796,6 +796,7 @@ export default Vue.extend({
<style scoped lang="less">
//
.slide-fade-enter-active {
transition: all 0.3s ease;
@ -811,7 +812,7 @@ export default Vue.extend({
height: 100%;
overflow: auto !important;
min-width: 1500px;
}
.banner {

View File

@ -224,7 +224,7 @@ export default Vue.extend({
console.log(`跳转到资源概览,筛选类型: ${todoName}`, query);
this.$router.push({
path: '/product/overview',
path: '/overview',
query: query
});
}
@ -248,7 +248,14 @@ export default Vue.extend({
</script>
<style lang="less" scoped>
/* 样式保持不变,与之前相同 */
::v-deep .table-header {
background: #409eff !important;
color: #ffffff !important;
font-weight: bold;
text-align: center;
}
.mainBox {
background: #f5f7fa;
width: 100%;