|
@@ -39,6 +39,21 @@
|
|
|
</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="['qw:user:export']"
|
|
|
+ >导出</el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
<el-table border v-loading="loading" :data="courseWatchLogList" @selection-change="handleSelectionChange" show-summary>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="企微员工名称" align="center" prop="qwUserName" />
|
|
@@ -65,7 +80,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listCourseWatchLog, getCourseWatchLog, delCourseWatchLog, addCourseWatchLog, updateCourseWatchLog, exportCourseWatchLog,statisticsList } from "@/api/course/qw/courseWatchLog";
|
|
|
+import { listCourseWatchLog, getCourseWatchLog, delCourseWatchLog, addCourseWatchLog, updateCourseWatchLog, exportCourseWatchLog,statisticsList,statisticsExport } from "@/api/course/qw/courseWatchLog";
|
|
|
import { courseList,videoList } from '@/api/course/courseRedPacketLog'
|
|
|
import { getDateRange } from '@/utils/common'
|
|
|
export default {
|
|
@@ -278,14 +293,19 @@ export default {
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
+ // 检查是否选择了时间范围
|
|
|
+ if (!this.queryParams.sTime || !this.queryParams.eTime) {
|
|
|
+ this.$message.warning("请选择创建时间后才能导出");
|
|
|
+ return;
|
|
|
+ }
|
|
|
const queryParams = this.queryParams;
|
|
|
- this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
|
|
|
+ this.$confirm('是否确认导出所有企微看课记录数据项?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
this.exportLoading = true;
|
|
|
- return exportCourseWatchLog(queryParams);
|
|
|
+ return statisticsExport(queryParams);
|
|
|
}).then(response => {
|
|
|
this.download(response.msg);
|
|
|
this.exportLoading = false;
|