|
|
@@ -0,0 +1,223 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
|
|
|
+ <el-form-item label="公司名" prop="companyId">
|
|
|
+ <el-select filterable v-model="queryParams.companyId" placeholder="请选择公司名" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in companys"
|
|
|
+ :key="item.companyId"
|
|
|
+ :label="item.companyName"
|
|
|
+ :value="item.companyId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="用户Id" prop="userId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.userId"
|
|
|
+ placeholder="请输入用户userId"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="直播间id" prop="liveId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.liveId"
|
|
|
+ placeholder="请输入直播间id"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="记录类型" prop="logType">
|
|
|
+ <el-select v-model="queryParams.logType" placeholder="请选择记录类型" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in logTypeOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="外部联系人id" prop="externalContactId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.externalContactId"
|
|
|
+ placeholder="请输入外部联系人id"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="销售id" prop="companyUserId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.companyUserId"
|
|
|
+ placeholder="请输入销售id"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="完课时间" prop="finishTime">
|
|
|
+ <el-date-picker clearable size="small"
|
|
|
+ v-model="queryParams.finishTime"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择完课时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="分享人企微id" prop="qwUserId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.qwUserId"
|
|
|
+ placeholder="请输入分享人企微id"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ :loading="exportLoading"
|
|
|
+ @click="handleExport"
|
|
|
+ v-hasPermi="['live:liveWatchLog:export']"
|
|
|
+ >导出</el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-table border v-loading="loading" :data="liveWatchLogList" @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="companyName" min-width="120" />
|
|
|
+ <el-table-column label="会员id" align="center" prop="userId" />
|
|
|
+ <el-table-column label="会员名称" align="center" prop="userName" />
|
|
|
+ <el-table-column label="头像" width="150" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <img v-if="scope.row.userAvatar" :src="scope.row.userAvatar" style="height: 80px">
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="直播间id" align="center" prop="liveId" />
|
|
|
+ <el-table-column label="直播间" align="center" prop="liveName" />
|
|
|
+ <el-table-column label="记录类型" align="center" prop="logType">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="logTypeOptions" :value="scope.row.logType"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="外部联系人id" align="center" prop="externalContactId" />
|
|
|
+ <el-table-column label="外部联系人" align="center" prop="qwExternalName" />
|
|
|
+ <el-table-column label="销售" align="center" prop="companyUserName" />
|
|
|
+ <el-table-column label="sop最后创建时间" align="center" prop="sopCreateTime" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.sopCreateTime, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="企微" align="center" prop="qwUserName" />
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <pagination
|
|
|
+ v-show="total>0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { listLiveWatchLog, exportLiveWatchLog } from "@/api/live/liveWatchLog";
|
|
|
+import { getCompanyList } from "@/api/company/company";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "LiveWatchLog",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ loading: true,
|
|
|
+ exportLoading: false,
|
|
|
+ ids: [],
|
|
|
+ single: true,
|
|
|
+ multiple: true,
|
|
|
+ showSearch: true,
|
|
|
+ total: 0,
|
|
|
+ liveWatchLogList: [],
|
|
|
+ companys: [],
|
|
|
+ logTypeOptions: [],
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ companyId: null,
|
|
|
+ userId: null,
|
|
|
+ liveId: null,
|
|
|
+ logType: null,
|
|
|
+ externalContactId: null,
|
|
|
+ companyUserId: null,
|
|
|
+ finishTime: null,
|
|
|
+ sopCreateTime: null,
|
|
|
+ sendAppId: null,
|
|
|
+ logSource: null,
|
|
|
+ qwUserId: null
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ getCompanyList().then(response => {
|
|
|
+ this.companys = response.data || [];
|
|
|
+ });
|
|
|
+ this.getList();
|
|
|
+ this.getDicts("live_watch_log_type").then(response => {
|
|
|
+ this.logTypeOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ listLiveWatchLog(this.queryParams).then(response => {
|
|
|
+ this.liveWatchLogList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map(item => item.logId)
|
|
|
+ this.single = selection.length !== 1
|
|
|
+ this.multiple = !selection.length
|
|
|
+ },
|
|
|
+ handleExport() {
|
|
|
+ const queryParams = this.queryParams;
|
|
|
+ this.$confirm('是否确认导出所有直播看课记录数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.exportLoading = true;
|
|
|
+ return exportLiveWatchLog(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ this.exportLoading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ this.exportLoading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|