main #34
@ -1,4 +1,3 @@
|
|||||||
<!-- Sidebar.vue -->
|
|
||||||
<template>
|
<template>
|
||||||
<div class="index">
|
<div class="index">
|
||||||
<div :class="{ 'has-logo': showLogo }" class="sidebar-container">
|
<div :class="{ 'has-logo': showLogo }" class="sidebar-container">
|
||||||
@ -108,7 +107,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重点修改部分 - 更具体的选择器
|
// 更具体的选择器
|
||||||
::v-deep .el-menu-vertical {
|
::v-deep .el-menu-vertical {
|
||||||
border: none;
|
border: none;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -166,7 +165,7 @@ export default {
|
|||||||
.el-menu--popup {
|
.el-menu--popup {
|
||||||
.el-menu-item {
|
.el-menu-item {
|
||||||
&.is-active {
|
&.is-active {
|
||||||
background-color: #d7dafd !important;
|
background-color: #f5f7fa !important;
|
||||||
color: #296ad9 !important;
|
color: #296ad9 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
|
|
||||||
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
||||||
|
|
||||||
import './assets/css/iconfont/iconfont.css'
|
import './assets/css/iconfont/iconfont.css'
|
||||||
|
|||||||
@ -300,31 +300,54 @@ export const constantRoutes = [
|
|||||||
*/
|
*/
|
||||||
export const asyncRoutes = [
|
export const asyncRoutes = [
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 全部产品 - 一级菜单
|
||||||
|
// 全部产品 - 一级菜单(无子路由)
|
||||||
{
|
{
|
||||||
path: "/product",
|
path: "/product",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: "/product/overview",
|
|
||||||
meta: {
|
meta: {
|
||||||
title: "全部产品",
|
title: "全部产品",
|
||||||
fullPath: "/product",
|
fullPath: "/product",
|
||||||
noCache: true,
|
noCache: true,
|
||||||
icon: "el-icon-goods"
|
icon: "el-icon-goods"
|
||||||
},
|
},
|
||||||
alwaysShow: true,
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "overview",
|
path: "",
|
||||||
component: () => import('../views/customer/orderManagement/index.vue'),
|
component: () => import('@/views/product/productHome/productIndex/index.vue'),
|
||||||
name: 'ProductOverview',
|
name: 'ProductHome',
|
||||||
meta: {
|
meta: {
|
||||||
title: "资源概览",
|
title: "全部产品",
|
||||||
fullPath: "/product/overview",
|
fullPath: "/product",
|
||||||
noCache: true
|
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",
|
path: "/orderManagement",
|
||||||
|
|||||||
@ -16,8 +16,11 @@ function filterAsyncRoutes(routes, permissions) {
|
|||||||
// 检查当前路由是否在权限列表中
|
// 检查当前路由是否在权限列表中
|
||||||
const hasPermission = permissions.some(p => p.path === route.meta?.fullPath);
|
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);
|
res.push(tmpRoute);
|
||||||
}
|
}
|
||||||
// 如果没有直接权限,但有子路由,递归处理子路由
|
// 如果没有直接权限,但有子路由,递归处理子路由
|
||||||
|
|||||||
@ -32,3 +32,63 @@
|
|||||||
.mt20{
|
.mt20{
|
||||||
margin-top: 20px;
|
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%);
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -796,6 +796,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
||||||
// 添加动画样式
|
// 添加动画样式
|
||||||
.slide-fade-enter-active {
|
.slide-fade-enter-active {
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
|||||||
@ -224,7 +224,7 @@ export default Vue.extend({
|
|||||||
console.log(`跳转到资源概览,筛选类型: ${todoName}`, query);
|
console.log(`跳转到资源概览,筛选类型: ${todoName}`, query);
|
||||||
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/product/overview',
|
path: '/overview',
|
||||||
query: query
|
query: query
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -248,7 +248,14 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
/* 样式保持不变,与之前相同 */
|
::v-deep .table-header {
|
||||||
|
background: #409eff !important;
|
||||||
|
color: #ffffff !important;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.mainBox {
|
.mainBox {
|
||||||
background: #f5f7fa;
|
background: #f5f7fa;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user