|
@@ -1,41 +1,30 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
- <el-form-item label="会员ID" prop="userId">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.userId"
|
|
|
- placeholder="请输入会员ID"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="会员昵称" prop="nickName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.nickName"
|
|
|
- placeholder="请输入会员昵称"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="企微客户昵称" prop="nickName" >
|
|
|
- <el-input
|
|
|
- v-model="queryParams.externalUserName"
|
|
|
- placeholder="请输入企微客户昵称"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ <el-form-item label="用户" prop="userId">
|
|
|
+ <el-select v-model="queryParams.userId" remote placeholder="用户名/手机号" filterable clearable style="width: 100%;"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ :remote-method="remoteGetFsUserList"
|
|
|
+ @clear="handleClear"
|
|
|
+ :loading="queryUserLoading"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in fsUserList"
|
|
|
+ :key="`${dict.nickname} - ${dict.phone}`"
|
|
|
+ :label="`${dict.nickname} - ${dict.phone}`"
|
|
|
+ :value="dict.userId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属销售" prop="companyUserName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.companyUserName"
|
|
|
- placeholder="请输入所属销售"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ <el-select v-model="queryParams.companyUserId" remote placeholder="请选择" filterable clearable style="width: 100%;" @keyup.enter.native="handleQuery">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in companyUserList"
|
|
|
+ :key="`${dict.nickName} - ${dict.userName}`"
|
|
|
+ :label="`${dict.nickName} - ${dict.userName}`"
|
|
|
+ :value="dict.userId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程" prop="courseId">
|
|
|
<el-select filterable v-model="queryParams.courseId" placeholder="请选择课程" clearable size="small" @change="courseChange(queryParams.courseId)">
|
|
@@ -106,8 +95,8 @@
|
|
|
<el-table border v-loading="loading" :data="courseWatchLogList" @selection-change="handleSelectionChange">
|
|
|
<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"/>
|
|
|
- <el-table-column label="会员ID" align="center" prop="userId" />
|
|
|
+<!-- <el-table-column label="企微客户" align="center" prop="externalUserName"/>-->
|
|
|
+ <el-table-column label="用户账号" align="center" prop="userName" />
|
|
|
<el-table-column label="会员昵称" align="center" prop="fsNickName">
|
|
|
<template slot-scope="scope">
|
|
|
<div style="display: flex;white-space: nowrap">
|
|
@@ -124,6 +113,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="项目" align="center" prop="projectName" />
|
|
|
<el-table-column label="课程名称" align="center" prop="courseName" />
|
|
|
<el-table-column label="小节名称" align="center" prop="videoName" />
|
|
|
<el-table-column label="记录类型" align="center" prop="logType">
|
|
@@ -134,7 +124,7 @@
|
|
|
<el-table-column label="播放时长" align="center" prop="duration" />
|
|
|
<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" />-->
|
|
|
<!-- <el-table-column label="所属发送方式" align="center" prop="sendType" />-->
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" />
|
|
|
<el-table-column label="更新时间" align="center" prop="updateTime" />
|
|
@@ -157,6 +147,8 @@
|
|
|
import { listCourseWatchLog, getCourseWatchLog, delCourseWatchLog, addCourseWatchLog, updateCourseWatchLog, exportCourseWatchLog } from "@/api/course/courseWatchLog";
|
|
|
import {allList}from "@/api/company/company";
|
|
|
import { courseList,videoList } from '@/api/course/courseRedPacketLog'
|
|
|
+import {getUserList} from "@/api/company/companyUser";
|
|
|
+import {getFsUserList} from "@/api/users/user";
|
|
|
export default {
|
|
|
name: "CourseWatchLog",
|
|
|
data() {
|
|
@@ -167,6 +159,7 @@ export default {
|
|
|
courseLists:[],
|
|
|
videoList:[],
|
|
|
logTypeOptions:[],
|
|
|
+ queryUserLoading: false,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 导出遮罩层
|
|
@@ -181,8 +174,10 @@ export default {
|
|
|
showSearch: true,
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
+ companyUserList: [],
|
|
|
// 短链课程看课记录表格数据
|
|
|
courseWatchLogList: [],
|
|
|
+ fsUserList: [],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
@@ -225,8 +220,41 @@ export default {
|
|
|
this.getDicts("sys_course_watch_log_type").then(response => {
|
|
|
this.logTypeOptions = response.data;
|
|
|
});
|
|
|
+ getUserList().then(res=>{
|
|
|
+ if(res.code === 200) {
|
|
|
+ this.companyUserList = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleClear(){
|
|
|
+ this.queryUserLoading = false;
|
|
|
+ this.fsUserList = [];
|
|
|
+ },
|
|
|
+ remoteGetFsUserList(query){
|
|
|
+ if(query){
|
|
|
+ this.queryUserLoading = true;
|
|
|
+ const isNumeric = /^\d+$/.test(query);
|
|
|
+ let payload = {
|
|
|
+ username: query,
|
|
|
+ nickname: query
|
|
|
+ }
|
|
|
+ if(isNumeric) {
|
|
|
+ payload = {
|
|
|
+ userId: query,
|
|
|
+ username: query,
|
|
|
+ phone: query
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getFsUserList(payload).then(res=>{
|
|
|
+ if(res.code === 200) {
|
|
|
+ this.fsUserList = res.data
|
|
|
+ }
|
|
|
+ }).finally(()=>{
|
|
|
+ this.queryUserLoading = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
courseChange(row){
|
|
|
this.queryParams.videoId=null;
|
|
|
if(row === ''){
|