From 3df460667d74868d0a54fce12d5e881bbd6c0c1a Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期四, 17 九月 2026 17:11:18 +0800
Subject: [PATCH] 青岛维护统计
---
src/views/statistics/index.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/src/views/statistics/index.vue b/src/views/statistics/index.vue
index 65545dd..8dfc7fe 100644
--- a/src/views/statistics/index.vue
+++ b/src/views/statistics/index.vue
@@ -1,6 +1,21 @@
<!-- src/views/statistics/index.vue -->
<template>
<div class="statistics-home">
+ <el-card class="mode-card" shadow="never">
+ <div class="mode-bar">
+ <span class="mode-label">缁熻鏁版嵁婧愶細</span>
+ <el-switch
+ v-model="useMock"
+ active-text="妯℃嫙鏁版嵁"
+ inactive-text="鐪熷疄鎺ュ彛"
+ active-color="#E6A23C"
+ inactive-color="#409EFF"
+ @change="handleModeChange"
+ />
+ <span class="mode-tip">鍒囨崲鍚庤繘鍏ュ悇缁熻椤甸潰鐢熸晥锛堟ā鎷熸暟鎹敤浜庢紨绀猴紝鐪熷疄鎺ュ彛璇诲彇鍚庣锛�</span>
+ </div>
+ </el-card>
+
<el-row :gutter="20">
<el-col :span="6" v-for="item in menuList" :key="item.path">
<el-card
@@ -24,38 +39,41 @@
</template>
<script>
+import { isStatisticsMock, setStatisticsMock } from '@/utils/statisticsMode';
+
export default {
name: 'StatisticsHome',
data() {
return {
+ useMock: isStatisticsMock(),
menuList: [
{
title: '妗堜緥缁熻',
desc: '鍦板尯銆佹湀浠界淮搴︾殑妗堜緥缁熻鍒嗘瀽',
icon: 'el-icon-s-data',
color: '#409EFF',
- path: '/statistics/case'
+ path: '/statics/caseStatistics'
},
{
title: '鎹愮尞鍣ㄥ畼缁熻',
desc: '鍣ㄥ畼鑾峰彇銆佺Щ妞嶆暟閲忕粺璁�',
icon: 'el-icon-s-claim',
color: '#67C23A',
- path: '/statistics/organ'
+ path: '/statics/organstatistics'
},
{
title: '鑾峰彇鐜囩粺璁�',
desc: '鎹愮尞鑾峰彇鐜囥�佸櫒瀹樺純鐢ㄧ巼鍒嗘瀽',
icon: 'el-icon-s-flag',
color: '#E6A23C',
- path: '/statistics/rate'
+ path: '/statics/statisticsStatistics'
},
{
title: '鎹愮尞鎰忔効缁熻',
desc: '鎹愮尞鎰忔効瓒嬪娍涓庡垎甯冨垎鏋�',
icon: 'el-icon-star-on',
color: '#F56C6C',
- path: '/statistics/willingness'
+ path: '/statics/donorstatistics'
},
{
title: '鎹愮尞鑰呭垎鏋�',
@@ -75,6 +93,9 @@
};
},
methods: {
+ handleModeChange(val) {
+ setStatisticsMock(val);
+ },
goToPage(path) {
this.$router.push(path);
}
@@ -87,6 +108,27 @@
padding: 20px;
}
+.mode-card {
+ margin-bottom: 20px;
+}
+
+.mode-bar {
+ display: flex;
+ align-items: center;
+}
+
+.mode-label {
+ font-size: 14px;
+ color: #303133;
+ margin-right: 10px;
+}
+
+.mode-tip {
+ margin-left: 16px;
+ font-size: 12px;
+ color: #909399;
+}
+
.stat-card {
cursor: pointer;
margin-bottom: 20px;
--
Gitblit v1.9.3