|
|
@@ -12,7 +12,13 @@
|
|
|
<div class="filter-controls">
|
|
|
<div class="filter-group">
|
|
|
<label>选择课程</label>
|
|
|
- <a-select v-model:value="filters.courseId" placeholder="全部课程" @change="updateStats" :loading="loading" allowClear>
|
|
|
+ <a-select
|
|
|
+ v-model:value="filters.courseId"
|
|
|
+ placeholder="全部课程"
|
|
|
+ @change="updateStats"
|
|
|
+ :loading="loading"
|
|
|
+ allowClear
|
|
|
+ >
|
|
|
<a-select-option v-for="option in courseOptions" :key="option.courseId" :value="option.courseId">
|
|
|
{{ option.courseName }}
|
|
|
</a-select-option>
|
|
|
@@ -55,7 +61,7 @@
|
|
|
<div class="stat-label">平均跳出时间</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="stat-card">
|
|
|
+ <div class="stat-card" v-if="forumType">
|
|
|
<h3>💬 讨论互动统计</h3>
|
|
|
<div class="stat-number">{{ stats.totalDiscussions }}</div>
|
|
|
<div class="stat-label">讨论总数</div>
|
|
|
@@ -96,7 +102,7 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 讨论详情表格 -->
|
|
|
- <div class="data-table">
|
|
|
+ <div class="data-table" v-if="forumType">
|
|
|
<h3>💬 课程讨论详情</h3>
|
|
|
<a-table
|
|
|
:columns="discussionColumns"
|
|
|
@@ -135,7 +141,8 @@
|
|
|
getDiscussionData,
|
|
|
getDocumentStats
|
|
|
} from '@/api/statisticalAnalysis/analysisTeachingActivities'
|
|
|
-
|
|
|
+ import tool from '@/utils/tool'
|
|
|
+ const forumType = computed(() => (tool.dictList('FORUM_TYPE')[0].value == 1 ? true : false))
|
|
|
// 响应式数据
|
|
|
const filters = reactive({
|
|
|
courseId: '',
|
|
|
@@ -454,10 +461,10 @@
|
|
|
try {
|
|
|
const response = await getDailyVisits({
|
|
|
type: filters.timeRange,
|
|
|
- courseId:filters.courseId
|
|
|
+ courseId: filters.courseId
|
|
|
})
|
|
|
- chartData.dates = response.map(r=>r.TIME)
|
|
|
- chartData.visits = response.map(r=>r.num)
|
|
|
+ chartData.dates = response.map((r) => r.TIME)
|
|
|
+ chartData.visits = response.map((r) => r.num)
|
|
|
updateChartData()
|
|
|
} catch (error) {
|
|
|
console.error('获取每日访问数据失败:', error)
|
|
|
@@ -486,7 +493,7 @@
|
|
|
courseId: filters.courseId,
|
|
|
page: documentPagination.current,
|
|
|
pageSize: documentPagination.pageSize,
|
|
|
- type:filters.timeRange
|
|
|
+ type: filters.timeRange
|
|
|
})
|
|
|
documentData.value = response
|
|
|
documentPagination.total = response.total
|