zyp 4 天之前
父節點
當前提交
fd0ce52b58
共有 1 個文件被更改,包括 64 次插入16 次删除
  1. 64 16
      src/views/course/courseWatchLog/watchLog.vue

+ 64 - 16
src/views/course/courseWatchLog/watchLog.vue

@@ -233,7 +233,13 @@
       <el-tab-pane label="全部" name="00"></el-tab-pane>
       <el-tab-pane v-for="(item,index) in logTypeOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
     </el-tabs>
-    <el-table border v-loading="loading" :data="courseWatchLogList" @selection-change="handleSelectionChange">
+<!--    <el-table border v-loading="loading" :data="courseWatchLogList" @selection-change="handleSelectionChange">-->
+    <el-table
+      border
+      v-loading="loading"
+      :data="courseWatchLogList"
+      @selection-change="handleSelectionChange"
+      :key="tableKey">
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="记录编号" align="center" prop="logId"/>
      <el-table-column label="客户昵称" align="center" prop="externalUserName" v-if="queryParams.sendType == 2"/>
@@ -241,17 +247,31 @@
       &lt;!&ndash;
       <el-table-column label="会员ID" align="center" prop="userId" v-if="queryParams.sendType == 1"/>
       &ndash;&gt;
-     <el-table-column label="客户头像" align="center" prop="externalUserAvatar" v-if="queryParams.sendType == 2">
-       <template slot-scope="scope">
-         <el-popover
-           placement="right"
-           title=""
-           trigger="hover">
-           <img slot="reference" :src="scope.row.externalUserAvatar" style="width: 50px;height: 50px">
-           <img :src="scope.row.externalUserAvatar" style="max-width: 200px;max-height: 200px">
-         </el-popover>
-       </template>
-     </el-table-column>
+<!--     <el-table-column label="客户头像" align="center" prop="externalUserAvatar" v-if="queryParams.sendType == 2">-->
+<!--       <template slot-scope="scope">-->
+<!--         <el-popover-->
+<!--           placement="right"-->
+<!--           title=""-->
+<!--           trigger="hover">-->
+<!--           <img slot="reference" :src="scope.row.externalUserAvatar" style="width: 50px;height: 50px">-->
+<!--           <img :src="scope.row.externalUserAvatar" style="max-width: 200px;max-height: 200px">-->
+<!--         </el-popover>-->
+<!--       </template>-->
+<!--     </el-table-column>-->
+      <el-table-column label="头像" align="center">
+        <template slot-scope="scope">
+          <img
+            v-if="queryParams.sendType == 1"
+            :src="scope.row.fsAvatar"
+            style="width:50px;height:50px"
+          />
+          <img
+            v-else-if="queryParams.sendType == 2"
+            :src="scope.row.externalUserAvatar"
+            style="width:50px;height:50px"
+          />
+        </template>
+      </el-table-column>
       <el-table-column label="用户昵称" align="center" v-if="queryParams.sendType == 1">
         <template slot-scope="scope">
           {{ queryParams.sendType=='1' ? scope.row.fsNickName : scope.row.externalUserName }}
@@ -274,7 +294,13 @@
 <!--      <el-table-column label="所属销售" align="center" prop="companyUserName"/>-->
 <!--      <el-table-column label="所属公司" align="center" prop="companyName"/>-->
 <!--      <el-table-column label="企微员工名称" align="center" prop="qwUserName"/>-->
-      <el-table-column label="所属企微" align="center" prop="qwUserName" v-if="queryParams.sendType==2" />
+      <!-- 所属企微列 -->
+      <el-table-column
+        label="所属企微"
+        align="center"
+        prop="qwUserName"
+        v-if="queryParams.sendType == 2"
+      />
       <!--      <el-table-column label="所属发送方式" align="center" prop="sendType"/>-->
       <el-table-column label="创建时间" align="center" prop="createTime" width="100px"/>
       <el-table-column label="更新时间" align="center" prop="updateTime" width="100px" />
@@ -515,6 +541,7 @@ export default {
   name: "CourseWatchLog",
   data() {
     return {
+      tableKey: 0,
       // 日历 key 控制刷新
       scheduleCalendarKey: 0,
       createCalendarKey: 0,
@@ -590,10 +617,10 @@ export default {
       },
       projectOptions:[],
       sendTypeOptions:[{
-        dictLabel:"会员",dictValue:'1'
+        dictLabel:'会员',dictValue:'1'
       },
         {
-          dictLabel:"企微",dictValue:'2'
+          dictLabel:'企微',dictValue:'2'
         }
       ],
 
@@ -699,7 +726,28 @@ export default {
   methods: {
 
     handleSendTypeChange() {
-      this.handleQuery(); // 重新查询列表
+      // 重置相关参数
+      this.queryParams.qwUserId = null;
+      this.queryParams.qwExternalContactId = null;
+      this.queryParams.userId = null;
+      this.queryParams.nickName = null;
+      this.queryParams.externalUserName = null;
+      this.queryParams.corpId = null;
+      this.queryParams.project = null;
+      this.queryParams.courseId = null;
+      this.queryParams.videoId = null;
+
+      // 重置选择
+      this.ids = [];
+      this.courseWatchLogList = []; // 清空表格数据
+
+      // 重置分页
+      this.queryParams.pageNum = 1;
+
+      // 强制重新渲染表格
+      this.tableKey += 1;
+
+      this.getList();
     },
 
     // 重置日历组件