|
|
|
|
@ -1,5 +1,14 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="statistics-container">
|
|
|
|
|
<!-- 清除缓存区域 -->
|
|
|
|
|
<div class="clear-cache-section">
|
|
|
|
|
<div class="clear-cache-wrapper">
|
|
|
|
|
<el-button type="warning" @click="handleClearCache" size="small">
|
|
|
|
|
<i class="el-icon-delete"></i> 清除缓存
|
|
|
|
|
</el-button>
|
|
|
|
|
<div class="clear-cache-tip">如需获取实时数据,请点击清除缓存。</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="dashboard-container" v-loading="chartLoading">
|
|
|
|
|
<!-- 筛选条件区域 -->
|
|
|
|
|
<div class="filter-section">
|
|
|
|
|
@ -268,7 +277,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { index as courseTypeIndex } from '@/api/course/courseType.js'
|
|
|
|
|
import { courseChart,courseChartExport } from '@/api/homeChart.js'
|
|
|
|
|
import { courseChart,courseChartExport,clearCache } from '@/api/homeChart.js'
|
|
|
|
|
import * as XLSX from "xlsx";
|
|
|
|
|
import { download } from "@/utils/downloadRequest";
|
|
|
|
|
import formMixin from "@/mixin/formMixin.js";
|
|
|
|
|
@ -393,7 +402,7 @@ export default {
|
|
|
|
|
key: 'company_market_year_total',
|
|
|
|
|
icon: 'el-icon-s-finance',
|
|
|
|
|
value: '0',
|
|
|
|
|
label: '新增上市公司',
|
|
|
|
|
label: '今年新增上市公司',
|
|
|
|
|
cardClass: 'student-card-3'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
@ -629,6 +638,24 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
this.getCourseChart()
|
|
|
|
|
},
|
|
|
|
|
// 清除缓存
|
|
|
|
|
handleClearCache() {
|
|
|
|
|
this.$confirm('确定要清除缓存吗?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
clearCache().then(res => {
|
|
|
|
|
this.$message.success('缓存清除成功')
|
|
|
|
|
this.getCourseChart()
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
this.$message.error('缓存清除失败')
|
|
|
|
|
console.error('清除缓存失败:', err)
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
// 用户取消操作
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
buildChartParams(extra = {}) {
|
|
|
|
|
const courseTypeIds = this.filterForm.selectedCourses.length > 0
|
|
|
|
|
? this.filterForm.selectedCourses.join(',')
|
|
|
|
|
@ -1375,6 +1402,25 @@ export default {
|
|
|
|
|
padding: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.clear-cache-section {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
|
|
|
|
|
.clear-cache-wrapper {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: flex-end;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
|
|
|
|
.clear-cache-tip {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #909399;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dashboard-container {
|
|
|
|
|
background: rgba(255, 255, 255, 0.98);
|
|
|
|
|
border-radius: 25px;
|
|
|
|
|
|