Jelajahi Sumber

直播代码迁移

wangxy 5 hari lalu
induk
melakukan
e8d5ebd8c9

+ 2 - 0
.env.prod-hdt

@@ -22,5 +22,7 @@ VUE_APP_COURSE_DEFAULT = 1
 #项目所属
 VUE_APP_PROJECT_FROM=hat
 
+VUE_APP_LIVE_WS_URL = ws://live.hbhdt.top/ws
+
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 1 - 1
src/api/live/liveAnchor.js

@@ -50,4 +50,4 @@ export function exportLiveAnchor(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 2 - 2
src/api/live/liveData.js

@@ -67,9 +67,9 @@ export function getLiveDataDetailBySql(liveId) {
   })
 }
 
-export function getLiveUserDetailListBySql(liveId) {
+export function getLiveUserDetailListBySql(liveId, pageNum, pageSize) {
   return request({
-    url: '/liveData/liveData/getLiveUserDetailListBySql?liveId=' + liveId,
+    url: '/liveData/liveData/getLiveUserDetailListBySql?liveId=' + liveId + '&pageNum=' + (pageNum || 1) + '&pageSize=' + (pageSize || 100),
     method: 'get'
   })
 }

+ 1 - 1
src/api/live/liveOrderitems.js

@@ -50,4 +50,4 @@ export function exportLiveOrderitems(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/live/liveQuestion.js

@@ -50,4 +50,4 @@ export function exportLiveQuestion(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/live/liveQuestionBank.js

@@ -33,4 +33,4 @@ export function deleteLiveQuestionBank(questionBankId) {
     url: '/live/liveQuestionBank/' + questionBankId,
     method: 'delete'
   })
-}
+}

+ 1 - 1
src/api/live/liveWatchLog.js

@@ -50,4 +50,4 @@ export function exportLiveWatchLog(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 31 - 10
src/views/live/liveData/index.vue

@@ -363,25 +363,25 @@
             </el-col>
             <el-col :span="12">
               <div class="detail-item">
-                <span class="detail-label">>20分钟人数(直播):</span>
+                <span class="detail-label">>=20分钟人数(直播):</span>
                 <span class="detail-value">{{ detailData.liveOver20Minutes || 0 }}</span>
               </div>
             </el-col>
             <el-col :span="12">
               <div class="detail-item">
-                <span class="detail-label">>30分钟人数(直播):</span>
+                <span class="detail-label">>=30分钟人数(直播):</span>
                 <span class="detail-value">{{ detailData.liveOver30Minutes || 0 }}</span>
               </div>
             </el-col>
             <el-col :span="12">
               <div class="detail-item">
-                <span class="detail-label">到课完课率直播(>20分钟):</span>
+                <span class="detail-label">到课完课率直播(>=20分钟):</span>
                 <span class="detail-value">{{ formatPercent(detailData.liveCompletionRate20) }}</span>
               </div>
             </el-col>
             <el-col :span="12">
               <div class="detail-item">
-                <span class="detail-label">到课完课率直播(>30分钟):</span>
+                <span class="detail-label">到课完课率直播(>=30分钟):</span>
                 <span class="detail-value">{{ formatPercent(detailData.liveCompletionRate30) }}</span>
               </div>
             </el-col>
@@ -399,25 +399,25 @@
             </el-col>
             <el-col :span="12">
               <div class="detail-item">
-                <span class="detail-label">>20分钟人数(回放):</span>
+                <span class="detail-label">>=20分钟人数(回放):</span>
                 <span class="detail-value">{{ detailData.playbackOver20Minutes || 0 }}</span>
               </div>
             </el-col>
             <el-col :span="12">
               <div class="detail-item">
-                <span class="detail-label">>30分钟人数(回放):</span>
+                <span class="detail-label">>=30分钟人数(回放):</span>
                 <span class="detail-value">{{ detailData.playbackOver30Minutes || 0 }}</span>
               </div>
             </el-col>
             <el-col :span="12">
               <div class="detail-item">
-                <span class="detail-label">到课完课率回放(>20分钟):</span>
+                <span class="detail-label">到课完课率回放(>=20分钟):</span>
                 <span class="detail-value">{{ formatPercent(detailData.playbackCompletionRate20) }}</span>
               </div>
             </el-col>
             <el-col :span="12">
               <div class="detail-item">
-                <span class="detail-label">到课完课率回放(>30分钟):</span>
+                <span class="detail-label">到课完课率回放(>=30分钟):</span>
                 <span class="detail-value">{{ formatPercent(detailData.playbackCompletionRate30) }}</span>
               </div>
             </el-col>
@@ -555,6 +555,16 @@
           <el-table-column prop="companyName" label="分公司" min-width="150"></el-table-column>
           <el-table-column prop="salesName" label="销售" min-width="120"></el-table-column>
         </el-table>
+        <!-- 用户详情分页组件 -->
+        <pagination
+          v-show="userDetailTotal > 0"
+          :total="userDetailTotal"
+          :page.sync="userDetailQueryParams.pageNum"
+          :limit.sync="userDetailQueryParams.pageSize"
+          :page-sizes="[10, 100, 1000]"
+          @pagination="handleViewUserDetail"
+          style="margin-top: 20px;"
+        />
       </div>
     </el-drawer>
   </div>
@@ -639,7 +649,12 @@ export default {
       userDetailList: [],
       userDetailLoading: false,
       showUserDetail: false,
-      userDetailExportLoading: false
+      userDetailExportLoading: false,
+      userDetailTotal: 0,
+      userDetailQueryParams: {
+        pageNum: 1,
+        pageSize: 10
+      }
     };
   },
   created() {
@@ -888,9 +903,10 @@ export default {
       if (!this.currentLiveId) return;
       this.showUserDetail = true;
       this.userDetailLoading = true;
-      getLiveUserDetailListBySql(this.currentLiveId).then(response => {
+      getLiveUserDetailListBySql(this.currentLiveId, this.userDetailQueryParams.pageNum, this.userDetailQueryParams.pageSize).then(response => {
         if (response.code === 200) {
           this.userDetailList = response.data || [];
+          this.userDetailTotal = response.total || 0;
         }
         this.userDetailLoading = false;
       }).catch(() => {
@@ -904,6 +920,11 @@ export default {
       this.detailData = {};
       this.userDetailList = [];
       this.currentLiveId = null;
+      this.userDetailTotal = 0;
+      this.userDetailQueryParams = {
+        pageNum: 1,
+        pageSize: 100
+      };
     },
     /** 格式化百分比 */
     formatPercent(value) {

+ 6 - 6
src/views/live/order/index.vue

@@ -806,12 +806,12 @@ export default {
     // })
 
     // 初始化档期归属列表
-    getTcmScheduleList().then(response => {
-      this.scheduleOptions = response.data || []
-    }).catch(error => {
-      console.error('获取档期归属列表失败:', error)
-      this.scheduleOptions = []
-    })
+    // getTcmScheduleList().then(response => {
+    //   this.scheduleOptions = response.data || []
+    // }).catch(error => {
+    //   console.error('获取档期归属列表失败:', error)
+    //   this.scheduleOptions = []
+    // })
 
     // 初始化小程序列表
     this.getAppMallOptions()