From cb47d97c32460542d01c67113ffd45affe39f69b Mon Sep 17 00:00:00 2001 From: linyongLynn <15926056+linyonglynn@user.noreply.gitee.com> Date: Mon, 18 Aug 2025 23:56:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=90=8E=E5=8F=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/student/index.js | 9 + src/views/email/index.vue | 83 +++- src/views/student/interaction_stats.vue | 508 ++++++++++++++++++++++-- 3 files changed, 548 insertions(+), 52 deletions(-) diff --git a/src/api/student/index.js b/src/api/student/index.js index 2981c75..b9c7cb3 100644 --- a/src/api/student/index.js +++ b/src/api/student/index.js @@ -126,3 +126,12 @@ export function supplyDemandChart(params) { }) } +// 获取消息列表 +export function getMessageList(params) { + return request({ + method: 'get', + url: '/api/admin/supply-demand/message-list', + params + }) +} + diff --git a/src/views/email/index.vue b/src/views/email/index.vue index bc5b813..b61679b 100644 --- a/src/views/email/index.vue +++ b/src/views/email/index.vue @@ -294,7 +294,7 @@ style="width: 100%;"> - + @@ -624,8 +624,8 @@ :before-close="() => showVarDataModal = false">
- {{ value }} @@ -642,22 +642,26 @@ :before-close="() => showSystemDataModal = false">
- - - + + + + + + 搜索
- + { + this.courseTypesList = res.data + }).catch(error => { + console.error('加载课程列表失败:', error) + }) + }, + + // 课程选择变化处理 + handleCourseTypeChange(courseId) { + if (courseId) { + // 找到选中的课程 + const selectedCourse = this.courseTypesList.find(course => course.id === courseId) + if (selectedCourse) { + // 将课程名称赋值给搜索框 + this.systemStudentSearch = selectedCourse.name + // 清空当前页选择 + this.selectedSystemStudents = [] + // 重置分页到第一页 + this.currentPage = 1 + // 调用loadStudents进行搜索 + this.loadStudents() + } + } else { + // 清空课程选择时,清空搜索框 + this.systemStudentSearch = '' + // 清空当前页选择 + this.selectedSystemStudents = [] + // 重置分页到第一页 + this.currentPage = 1 + // 重新加载学员数据 + this.loadStudents() + } + }, + // 加载学员数据 loadStudents() { this.studentsLoading = true @@ -1589,6 +1639,11 @@ export default { params.keyword = this.systemStudentSearch.trim() } + // 添加课程筛选参数 + if (this.selectedCourseType) { + params.course_id = this.selectedCourseType + } + index(params, false).then(res => { // 保存当前的选择状态 const currentSelection = [...this.selectedSystemStudents] diff --git a/src/views/student/interaction_stats.vue b/src/views/student/interaction_stats.vue index c5be4d3..f9cc4a0 100644 --- a/src/views/student/interaction_stats.vue +++ b/src/views/student/interaction_stats.vue @@ -12,17 +12,42 @@
- + - + + - + + + + + + + + + + + + + @@ -31,7 +56,7 @@ - + {{ loading ? '更新中...' : '更新统计' }} @@ -52,7 +77,7 @@
{{ chartData.totalCount || 0 }}
-
+
{{ formatChange(chartData.publishChange) }} 较上期
@@ -66,7 +91,7 @@
{{ chartData.messageCount || 0 }}
-
+
{{ formatChange(chartData.messageChange) }} 较上期
@@ -80,10 +105,11 @@
{{ chartData.interactionCount || 0 }}
-
+
{{ formatChange(chartData.interactionChange) }} 较上期
+
周期内有私信来回,计一次
@@ -94,26 +120,26 @@
- - - + + + @@ -125,11 +151,17 @@