feat(团队管理): 实现团队成员双击跳转功能并优化异常数据处理
1. 在PerformanceRanking组件中添加双击事件跳转到销售页面 2. 重构TeamAlerts组件异常数据处理逻辑,使用后端预处理数据 3. 在seniorManager页面添加异常预警API调用和数据处理 4. 优化路由参数处理逻辑,统一使用getRequestParams方法 5. 添加面包屑导航和返回功能,提升用户体验
This commit is contained in:
@@ -5,23 +5,39 @@
|
||||
<!-- 顶部导航栏 -->
|
||||
<!-- 数据分析区域 - 独立占据整行 -->
|
||||
<section class="analytics-section-full">
|
||||
<!-- 动态顶栏:根据是否有路由参数显示不同内容 -->
|
||||
<div class="section-header">
|
||||
<h1 class="app-title">销售驾驶舱</h1>
|
||||
<div
|
||||
class="quick-stats"
|
||||
style="display: flex; align-items: center; gap: 30px"
|
||||
>
|
||||
<div
|
||||
v-for="(stat, key) in MOCK_DATA.performance"
|
||||
:key="key"
|
||||
class="quick-stat-item"
|
||||
>
|
||||
<div class="stat-label">
|
||||
{{ stat.label + ":" + stat.value.toLocaleString() }}
|
||||
</div>
|
||||
<!-- 路由跳转时的顶栏:面包屑 + 姓名 -->
|
||||
<div v-if="isRouteNavigation" class="route-header">
|
||||
<div class="breadcrumb">
|
||||
<span class="breadcrumb-item" @click="goBack">团队管理</span>
|
||||
<span class="breadcrumb-separator">></span>
|
||||
<span class="breadcrumb-item current"> {{ routeUserName }}数据驾驶舱</span>
|
||||
</div>
|
||||
<div class="user-name">
|
||||
{{ routeUserName }}
|
||||
</div>
|
||||
</div>
|
||||
<UserDropdown />
|
||||
|
||||
<!-- 自己登录时的顶栏:原有样式 -->
|
||||
<template v-else>
|
||||
<h1 class="app-title">销售驾驶舱</h1>
|
||||
<div
|
||||
class="quick-stats"
|
||||
style="display: flex; align-items: center; gap: 30px"
|
||||
>
|
||||
<div
|
||||
v-for="(stat, key) in MOCK_DATA.performance"
|
||||
:key="key"
|
||||
class="quick-stat-item"
|
||||
>
|
||||
<div class="stat-label">
|
||||
{{ stat.label + ":" + stat.value.toLocaleString() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<UserDropdown />
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
@@ -143,6 +159,22 @@ const getRequestParams = () => {
|
||||
|
||||
return params
|
||||
}
|
||||
|
||||
// 判断是否为路由导航(有路由参数)
|
||||
const isRouteNavigation = computed(() => {
|
||||
const routeUserName = router.currentRoute.value.query.user_name || router.currentRoute.value.params.user_name
|
||||
return !!routeUserName
|
||||
})
|
||||
|
||||
// 获取路由传递的用户名
|
||||
const routeUserName = computed(() => {
|
||||
return router.currentRoute.value.query.user_name || router.currentRoute.value.params.user_name || ''
|
||||
})
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
router.go(-1)
|
||||
}
|
||||
// STATE
|
||||
const selectedContactId = ref(null);
|
||||
const contextPanelRef = ref(null);
|
||||
@@ -1293,6 +1325,55 @@ $primary: #3b82f6;
|
||||
rgba(102, 126, 234, 0.05),
|
||||
rgba(118, 75, 162, 0.05)
|
||||
);
|
||||
|
||||
// 路由导航顶栏样式
|
||||
.route-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
.breadcrumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
|
||||
.breadcrumb-item {
|
||||
color: $slate-600;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
|
||||
&:not(.current) {
|
||||
cursor: pointer;
|
||||
transition: color 0.2s;
|
||||
|
||||
&:hover {
|
||||
color: $primary;
|
||||
}
|
||||
}
|
||||
|
||||
&.current {
|
||||
color: $slate-800;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumb-separator {
|
||||
color: $slate-400;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
}
|
||||
|
||||
.user-name {
|
||||
color: $slate-800;
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
padding: 0.5rem 1rem;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
border-radius: 0.5rem;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
// PC端保持一致布局
|
||||
@media (min-width: 1024px) {
|
||||
|
||||
Reference in New Issue
Block a user