2025-10-07 20:26:15 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="zh-CN">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2025-10-08 09:22:58 +00:00
|
|
|
<title>xx品牌业绩排行榜 - 品牌数据中心</title>
|
2025-10-07 20:26:15 +00:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js"></script>
|
|
|
|
|
<style>
|
|
|
|
|
* {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
|
|
|
|
|
'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
|
|
|
background: #f5f5f5;
|
|
|
|
|
color: #333;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.container {
|
|
|
|
|
max-width: 1600px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-header {
|
|
|
|
|
background: white;
|
|
|
|
|
padding: 16px 24px;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-title {
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #262626;
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-subtitle {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-section {
|
|
|
|
|
background: white;
|
|
|
|
|
padding: 24px;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
|
|
|
gap: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stat-item {
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
border: 1px solid #f0f0f0;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
background: #fafafa;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stat-item:hover {
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
|
|
|
transform: translateY(-2px);
|
|
|
|
|
transition: all 0.3s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stat-item h3 {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #666;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stat-item .value {
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #1890ff;
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stat-item .label {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.chart-section {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(2, 1fr);
|
|
|
|
|
gap: 16px;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 1024px) {
|
|
|
|
|
.chart-section {
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.chart-card {
|
|
|
|
|
background: white;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
padding: 24px;
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.chart-card h2 {
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
color: #262626;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
padding-bottom: 12px;
|
|
|
|
|
border-bottom: 1px solid #f0f0f0;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.chart-container {
|
|
|
|
|
height: 400px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-list {
|
|
|
|
|
list-style: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
background: #f8f9fa;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
border: 1px solid #f0f0f0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-item:hover {
|
|
|
|
|
background: #f8f9fa;
|
|
|
|
|
transform: translateX(2px);
|
|
|
|
|
border-color: #1890ff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-number {
|
|
|
|
|
width: 40px;
|
|
|
|
|
height: 40px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
margin-right: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-number.top1 {
|
|
|
|
|
background: linear-gradient(135deg, #FFD700, #FFA500);
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-number.top2 {
|
|
|
|
|
background: linear-gradient(135deg, #C0C0C0, #808080);
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-number.top3 {
|
|
|
|
|
background: linear-gradient(135deg, #CD7F32, #8B4513);
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-number.other {
|
|
|
|
|
background: #dee2e6;
|
|
|
|
|
color: #495057;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-info {
|
|
|
|
|
flex: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-name {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #333;
|
|
|
|
|
margin-bottom: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-location {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-value {
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: #1890ff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ranking-unit {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #999;
|
|
|
|
|
margin-left: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.trend-badge {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 4px 12px;
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.trend-up {
|
|
|
|
|
background: #d4edda;
|
|
|
|
|
color: #155724;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.trend-down {
|
|
|
|
|
background: #f8d7da;
|
|
|
|
|
color: #721c24;
|
|
|
|
|
}
|
2025-10-08 09:22:58 +00:00
|
|
|
|
|
|
|
|
.time-filter-section {
|
|
|
|
|
background: white;
|
|
|
|
|
padding: 20px 24px;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.time-filter-container {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 20px;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.filter-label {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #666;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.filter-buttons {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.filter-btn {
|
|
|
|
|
padding: 8px 16px;
|
|
|
|
|
border: 1px solid #d9d9d9;
|
|
|
|
|
background: white;
|
|
|
|
|
color: #666;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.3s;
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.filter-btn:hover {
|
|
|
|
|
border-color: #1890ff;
|
|
|
|
|
color: #1890ff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.filter-btn.active {
|
|
|
|
|
background: #1890ff;
|
|
|
|
|
color: white;
|
|
|
|
|
border-color: #1890ff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.custom-btn {
|
|
|
|
|
border-style: dashed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.custom-date-range {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.date-input {
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
border: 1px solid #d9d9d9;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.date-input:focus {
|
|
|
|
|
border-color: #1890ff;
|
|
|
|
|
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.date-separator {
|
|
|
|
|
color: #999;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.query-btn {
|
|
|
|
|
padding: 8px 16px;
|
|
|
|
|
background: #1890ff;
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.3s;
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.query-btn:hover {
|
|
|
|
|
background: #40a9ff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.time-filter-container {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.custom-date-range {
|
|
|
|
|
margin-left: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-07 20:26:15 +00:00
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="page-header">
|
2025-10-08 09:22:58 +00:00
|
|
|
<h1 class="page-title">📊 xx品牌业绩排行榜</h1>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="time-filter-section">
|
|
|
|
|
<div class="time-filter-container">
|
|
|
|
|
<div class="filter-label">时间范围:</div>
|
|
|
|
|
<div class="filter-buttons">
|
|
|
|
|
<button class="filter-btn active" data-range="1">近1天</button>
|
|
|
|
|
<button class="filter-btn" data-range="7">近7天</button>
|
|
|
|
|
<button class="filter-btn" data-range="30">近30天</button>
|
|
|
|
|
<button class="filter-btn custom-btn" data-range="custom">自定义</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="custom-date-range" style="display: none;">
|
|
|
|
|
<input type="date" class="date-input" id="startDate">
|
|
|
|
|
<span class="date-separator">至</span>
|
|
|
|
|
<input type="date" class="date-input" id="endDate">
|
|
|
|
|
<button class="query-btn" id="customQuery">查询</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-10-07 20:26:15 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="stats-section">
|
|
|
|
|
<div class="stats-grid">
|
|
|
|
|
<div class="stat-item">
|
2025-10-08 09:22:58 +00:00
|
|
|
<h3>品牌单位总数</h3>
|
2025-10-07 20:26:15 +00:00
|
|
|
<div class="value">28</div>
|
|
|
|
|
<div class="label">家连锁市场/店铺</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="stat-item">
|
2025-10-08 09:22:58 +00:00
|
|
|
<h3>总销售额</h3>
|
2025-10-07 20:26:15 +00:00
|
|
|
<div class="value">¥856万</div>
|
|
|
|
|
<div class="label">环比上月 +23.5%</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="stat-item">
|
2025-10-08 09:22:58 +00:00
|
|
|
<h3>总订单量</h3>
|
2025-10-07 20:26:15 +00:00
|
|
|
<div class="value">12,847</div>
|
|
|
|
|
<div class="label">环比上月 +18.2%</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
<h3>本月总客户数</h3>
|
|
|
|
|
<div class="value">8,563</div>
|
|
|
|
|
<div class="label">环比上月 +15.8%</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="chart-section">
|
|
|
|
|
<div class="chart-card">
|
|
|
|
|
<h2>🏆 销售额TOP10排行榜</h2>
|
|
|
|
|
<ul class="ranking-list">
|
|
|
|
|
<li class="ranking-item">
|
|
|
|
|
<div class="ranking-number top1">1</div>
|
|
|
|
|
<div class="ranking-info">
|
|
|
|
|
<div class="ranking-name">朝阳菜市场(望京店)</div>
|
|
|
|
|
<div class="ranking-location">📍 北京市朝阳区</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="ranking-value">¥128.5万</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="ranking-item">
|
|
|
|
|
<div class="ranking-number top2">2</div>
|
|
|
|
|
<div class="ranking-info">
|
|
|
|
|
<div class="ranking-name">海淀菜市场(中关村店)</div>
|
|
|
|
|
<div class="ranking-location">📍 北京市海淀区</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="ranking-value">¥115.2万</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="ranking-item">
|
|
|
|
|
<div class="ranking-number top3">3</div>
|
|
|
|
|
<div class="ranking-info">
|
|
|
|
|
<div class="ranking-name">西城菜市场(金融街店)</div>
|
|
|
|
|
<div class="ranking-location">📍 北京市西城区</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="ranking-value">¥98.7万</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="ranking-item">
|
|
|
|
|
<div class="ranking-number other">4</div>
|
|
|
|
|
<div class="ranking-info">
|
|
|
|
|
<div class="ranking-name">东城菜市场(国贸店)</div>
|
|
|
|
|
<div class="ranking-location">📍 北京市东城区</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="ranking-value">¥87.3万</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="ranking-item">
|
|
|
|
|
<div class="ranking-number other">5</div>
|
|
|
|
|
<div class="ranking-info">
|
|
|
|
|
<div class="ranking-name">丰台菜市场(科技园店)</div>
|
|
|
|
|
<div class="ranking-location">📍 北京市丰台区</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="ranking-value">¥76.8万</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="ranking-item">
|
|
|
|
|
<div class="ranking-number other">6</div>
|
|
|
|
|
<div class="ranking-info">
|
|
|
|
|
<div class="ranking-name">石景山菜市场(万达店)</div>
|
|
|
|
|
<div class="ranking-location">📍 北京市石景山区</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="ranking-value">¥65.4万</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="ranking-item">
|
|
|
|
|
<div class="ranking-number other">7</div>
|
|
|
|
|
<div class="ranking-info">
|
|
|
|
|
<div class="ranking-name">通州菜市场(副中心店)</div>
|
|
|
|
|
<div class="ranking-location">📍 北京市通州区</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="ranking-value">¥58.9万</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="ranking-item">
|
|
|
|
|
<div class="ranking-number other">8</div>
|
|
|
|
|
<div class="ranking-info">
|
|
|
|
|
<div class="ranking-name">昌平菜市场(回龙观店)</div>
|
|
|
|
|
<div class="ranking-location">📍 北京市昌平区</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="ranking-value">¥52.3万</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="ranking-item">
|
|
|
|
|
<div class="ranking-number other">9</div>
|
|
|
|
|
<div class="ranking-info">
|
|
|
|
|
<div class="ranking-name">大兴菜市场(亦庄店)</div>
|
|
|
|
|
<div class="ranking-location">📍 北京市大兴区</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="ranking-value">¥48.6万</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="ranking-item">
|
|
|
|
|
<div class="ranking-number other">10</div>
|
|
|
|
|
<div class="ranking-info">
|
|
|
|
|
<div class="ranking-name">顺义菜市场(空港店)</div>
|
|
|
|
|
<div class="ranking-location">📍 北京市顺义区</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="ranking-value">¥42.1万</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="chart-card">
|
|
|
|
|
<h2>📦 订单量TOP10排行榜</h2>
|
|
|
|
|
<div class="chart-container" id="orderChart"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="chart-section">
|
|
|
|
|
<div class="chart-card">
|
|
|
|
|
<h2>👥 客户量TOP10排行榜</h2>
|
|
|
|
|
<div class="chart-container" id="customerChart"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-10-08 09:22:58 +00:00
|
|
|
// 时间筛选功能
|
|
|
|
|
const filterButtons = document.querySelectorAll('.filter-btn');
|
|
|
|
|
const customDateRange = document.querySelector('.custom-date-range');
|
|
|
|
|
const customQueryBtn = document.getElementById('customQuery');
|
|
|
|
|
|
|
|
|
|
// 切换按钮状态
|
|
|
|
|
filterButtons.forEach(btn => {
|
|
|
|
|
btn.addEventListener('click', function() {
|
|
|
|
|
// 移除所有按钮的active状态
|
|
|
|
|
filterButtons.forEach(b => b.classList.remove('active'));
|
|
|
|
|
// 给当前按钮添加active状态
|
|
|
|
|
this.classList.add('active');
|
|
|
|
|
|
|
|
|
|
const range = this.getAttribute('data-range');
|
|
|
|
|
|
|
|
|
|
if (range === 'custom') {
|
|
|
|
|
customDateRange.style.display = 'flex';
|
|
|
|
|
} else {
|
|
|
|
|
customDateRange.style.display = 'none';
|
|
|
|
|
// 这里可以根据选择的日期范围加载数据
|
|
|
|
|
loadDataByRange(range);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 自定义日期查询
|
|
|
|
|
customQueryBtn.addEventListener('click', function() {
|
|
|
|
|
const startDate = document.getElementById('startDate').value;
|
|
|
|
|
const endDate = document.getElementById('endDate').value;
|
|
|
|
|
|
|
|
|
|
if (!startDate || !endDate) {
|
|
|
|
|
alert('请选择开始和结束日期');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (new Date(startDate) > new Date(endDate)) {
|
|
|
|
|
alert('开始日期不能晚于结束日期');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 这里可以根据自定义日期范围加载数据
|
|
|
|
|
loadCustomData(startDate, endDate);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 根据预设范围加载数据
|
|
|
|
|
function loadDataByRange(range) {
|
|
|
|
|
console.log('加载近' + range + '天数据');
|
|
|
|
|
// 这里可以添加数据加载逻辑
|
|
|
|
|
// 例如:更新统计数据、图表数据等
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 加载自定义日期范围数据
|
|
|
|
|
function loadCustomData(startDate, endDate) {
|
|
|
|
|
console.log('加载自定义日期数据:', startDate, '至', endDate);
|
|
|
|
|
// 这里可以添加数据加载逻辑
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-07 20:26:15 +00:00
|
|
|
// 订单量排行榜
|
|
|
|
|
const orderChart = echarts.init(document.getElementById('orderChart'));
|
|
|
|
|
const orderOption = {
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
axisPointer: { type: 'shadow' }
|
|
|
|
|
},
|
|
|
|
|
grid: {
|
|
|
|
|
left: '3%',
|
|
|
|
|
right: '4%',
|
|
|
|
|
bottom: '3%',
|
|
|
|
|
containLabel: true
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'value',
|
|
|
|
|
name: '订单量'
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: ['顺义(空港)', '大兴(亦庄)', '昌平(回龙观)', '通州(副中心)', '石景山(万达)',
|
|
|
|
|
'丰台(科技园)', '东城(国贸)', '西城(金融街)', '海淀(中关村)', '朝阳(望京)'],
|
|
|
|
|
axisLabel: {
|
|
|
|
|
fontSize: 12
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
series: [{
|
|
|
|
|
name: '订单量',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
data: [582, 635, 698, 758, 823, 945, 1067, 1235, 1456, 1689],
|
|
|
|
|
itemStyle: {
|
|
|
|
|
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
|
|
|
|
|
{ offset: 0, color: '#667eea' },
|
|
|
|
|
{ offset: 1, color: '#764ba2' }
|
|
|
|
|
])
|
|
|
|
|
},
|
|
|
|
|
label: {
|
|
|
|
|
show: true,
|
|
|
|
|
position: 'right',
|
|
|
|
|
formatter: '{c}单'
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
};
|
|
|
|
|
orderChart.setOption(orderOption);
|
|
|
|
|
|
|
|
|
|
// 客户量排行榜
|
|
|
|
|
const customerChart = echarts.init(document.getElementById('customerChart'));
|
|
|
|
|
const customerOption = {
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
axisPointer: { type: 'shadow' }
|
|
|
|
|
},
|
|
|
|
|
grid: {
|
|
|
|
|
left: '3%',
|
|
|
|
|
right: '4%',
|
|
|
|
|
bottom: '3%',
|
|
|
|
|
containLabel: true
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'value',
|
|
|
|
|
name: '客户数'
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: ['顺义(空港)', '大兴(亦庄)', '昌平(回龙观)', '通州(副中心)', '石景山(万达)',
|
|
|
|
|
'丰台(科技园)', '东城(国贸)', '西城(金融街)', '海淀(中关村)', '朝阳(望京)'],
|
|
|
|
|
axisLabel: {
|
|
|
|
|
fontSize: 12
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
series: [{
|
|
|
|
|
name: '客户数',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
data: [456, 512, 578, 623, 689, 756, 834, 923, 1089, 1267],
|
|
|
|
|
itemStyle: {
|
|
|
|
|
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
|
|
|
|
|
{ offset: 0, color: '#f093fb' },
|
|
|
|
|
{ offset: 1, color: '#f5576c' }
|
|
|
|
|
])
|
|
|
|
|
},
|
|
|
|
|
label: {
|
|
|
|
|
show: true,
|
|
|
|
|
position: 'right',
|
|
|
|
|
formatter: '{c}人'
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
};
|
|
|
|
|
customerChart.setOption(customerOption);
|
|
|
|
|
|
|
|
|
|
// 响应式
|
|
|
|
|
window.addEventListener('resize', function() {
|
|
|
|
|
orderChart.resize();
|
|
|
|
|
customerChart.resize();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|