فهرست منبع

Merge remote-tracking branch 'origin/master'

xgb 1 روز پیش
والد
کامیت
46ea691b4c

+ 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'
   })
 }

+ 8 - 0
src/api/qw/sopTemp.js

@@ -166,3 +166,11 @@ export function getSelectableRange() {
     method: 'get'
   })
 }
+
+export function batchOpenOrCloseOfficial(data) {
+  return request({
+    url: '/qw/sopTemp/batchOpenOrCloseOfficial',
+    method: 'post',
+    data: data
+  })
+}

+ 2 - 1
src/views/company/companyUser/index.vue

@@ -1422,7 +1422,8 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
 
-      const userIds = row.userId || this.ids;
+      // 确保 userIds 始终是数组
+      const userIds = row.userId ? [row.userId] : this.ids;
 
       // 筛选出 userType 为 '00' 的 userId
       const excludedUserIds = this.userList

+ 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()

+ 1 - 1
src/views/qw/sopLogs/sopLogsList.vue

@@ -29,7 +29,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="发送类型" prop="sendType" >
+      <el-form-item label="发送类型" prop="sendType" label-width="100px" >
         <el-select v-model="queryParams.sendType" placeholder="请选择发送类型" clearable size="small">
           <el-option
             v-for="dict in sysQwSopType"

+ 66 - 1
src/views/qw/sopTemp/index.vue

@@ -191,6 +191,15 @@
             v-hasPermi="['qw:sopTemp:edit']"
           >管理规则
           </el-button>
+          <el-button
+            v-if="scope.row.sendType == 11"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleBatchOfficial(scope.row)"
+            v-hasPermi="['qw:sopTemp:edit']"
+          >开关官方群发
+          </el-button>
           <el-button
             size="mini"
             type="text"
@@ -351,6 +360,20 @@
         <el-button type="primary" @click="updateRedData" :disabled="redData.loading">保 存</el-button>
       </div>
     </el-dialog>
+    
+    <el-dialog title="批量编辑官方群发" :visible.sync="official.open" width="500px" append-to-body>
+       <el-form :model="officialForm" ref="officialForm" :inline="true">
+         <el-form-item  label="官方群发" prop="isOfficial">
+            <el-radio-group v-model="officialForm.isOfficial">
+              <el-radio :label="0">关</el-radio>
+              <el-radio :label="1">开</el-radio>
+            </el-radio-group>
+         </el-form-item>
+       </el-form>
+      <div slot="footer" class="dialog-footer" style="display: flex;justify-content: flex-end;">
+        <el-button type="primary" @click="updateOfficial" :loading="official.loading">保 存</el-button>
+      </div>
+    </el-dialog>
 
     <el-dialog :title="shareOptions.title" :visible.sync="shareOptions.open" width="800px" append-to-body>
 
@@ -428,7 +451,8 @@ import {
   redList,
   shareSopTemp,
   updateRedPackage,
-  updateTemp
+  updateTemp,
+  batchOpenOrCloseOfficial
 } from "@/api/qw/sopTemp";
 import { getCompanyList, listCompany } from '@/api/company/company'
 import {courseList, getRoles} from "@/api/qw/sop";
@@ -441,6 +465,14 @@ export default {
   components: {Treeselect},
   data() {
     return {
+      officialForm:{
+        tempId:null,
+        isOfficial:null,
+      },
+      official:{
+        open:false,
+        loading:false,
+      },
       // 遮罩层
       loading: true,
       companysloading: false,
@@ -788,6 +820,17 @@ export default {
       this.$router.push(url)
       // }
     },
+    /**
+     * 批量编辑官方群发
+     */
+    handleBatchOfficial(row){
+        this.officialForm={
+           tempId:null,
+           isOfficial:null
+        }
+        this.officialForm.tempId = row.id;
+        this.official.open = true;
+    },
     /** 修改按钮操作 */
     handleUpdateRed(row) {
       this.redData.open = true;
@@ -955,6 +998,28 @@ export default {
         let len = old - val;
         this.form.timeList.splice(Math.max(this.form.timeList.length - len, 0), len);
       }
+    },
+    updateOfficial(){
+      if(!!this.officialForm){
+        if(this.officialForm.tempId == null || this.officialForm.tempId == '' || this.officialForm.tempId == undefined){
+            this.$message.error("参数错误");
+            return;
+        }
+        if(this.officialForm.isOfficial === null || this.officialForm.isOfficial === undefined){
+            this.$message.error("请选择官方群发操作结果");
+            return;
+        }
+      }else{
+          this.$message.error("参数错误");
+      }
+      this.official.loading = true;
+      batchOpenOrCloseOfficial(this.officialForm).then(res=>{
+         this.msgSuccess("保存成功");
+      this.official.loading = false;
+      this.official.open = false;
+      }).catch(res=>{
+      this.official.loading = false;
+      });
     }
   }
 };