瀏覽代碼

营期优化

caoliqin 1 月之前
父節點
當前提交
c7067b7e39
共有 2 個文件被更改,包括 9 次插入7 次删除
  1. 1 0
      src/views/course/userCoursePeriod/redPacket.vue
  2. 8 7
      src/views/course/userCoursePeriod/statistics.vue

+ 1 - 0
src/views/course/userCoursePeriod/redPacket.vue

@@ -25,6 +25,7 @@
         <el-table-column type="index" label="序号" width="60" align="center" />
         <el-table-column label="课程" prop="courseName" align="center" />
         <el-table-column label="小节" prop="videoName" align="center" />
+        <el-table-column label="营期日期" prop="dayDate" align="center"/>
         <el-table-column label="红包金额" width="200px" align="center">
           <template slot-scope="scope">
             <el-input-number

+ 8 - 7
src/views/course/userCoursePeriod/statistics.vue

@@ -74,7 +74,8 @@
     <div class="table-wrapper">
       <el-table v-loading="loading" :data="list" border height="calc(100vh - 450px)">
         <el-table-column type="index" label="序号" width="50" align="center" fixed/>
-        <el-table-column prop="title" label="课程名称" align="center" min-width="150" fixed/>
+        <el-table-column prop="title" label="课程名称" align="center" min-width="250" fixed/>
+        <el-table-column prop="dayDate" label="营期日期" align="center" min-width="120" fixed/>
         <el-table-column prop="countDetailsVO.courseWatchTimes" label="观看次数" align="center" min-width="100"/>
         <el-table-column prop="countDetailsVO.courseCompleteTimes" label="完播次数" align="center" min-width="100"/>
         <el-table-column prop="countDetailsVO.courseWatchNum" label="观看人数" align="center" min-width="100"/>
@@ -214,10 +215,10 @@ export default {
           // 设置列表数据
           this.list = response.rows;
           this.total = response.total || 0;
-          
+
           // 计算总统计数据
           this.calculateTotalStatistics();
-          
+
           console.log('列表数据:', this.list);
         } else {
           this.$message.error(response.msg || '获取数据失败');
@@ -241,16 +242,16 @@ export default {
         answerRightTimes: 0,
         redPacketAmount: 0
       };
-      
+
       // 如果没有数据,直接返回
       if (!this.list || this.list.length === 0) {
         return;
       }
-      
+
       // 遍历列表数据,累加各项统计数据
       this.list.forEach(item => {
         const details = item.countDetailsVO || {};
-        
+
         // 累加各项数据
         this.statistics.courseCompleteNum += details.courseCompleteNum || 0;
         this.statistics.courseWatchNum += details.courseWatchNum || 0;
@@ -259,7 +260,7 @@ export default {
         this.statistics.answerRightTimes += details.answerRightNum || 0;
         this.statistics.redPacketAmount += details.redPacketAmount || 0;
       });
-      
+
       // 计算完播率
       if (this.statistics.courseWatchNum > 0) {
         const rate = (this.statistics.courseCompleteNum / this.statistics.courseWatchNum * 100).toFixed(2);