|
@@ -628,13 +628,30 @@ export default {
|
|
|
courseList().then(response => {
|
|
courseList().then(response => {
|
|
|
this.courseLists = response.list;
|
|
this.courseLists = response.list;
|
|
|
});
|
|
});
|
|
|
- this.getList();
|
|
|
|
|
|
|
+
|
|
|
this.getDicts("sys_course_watch_log_type").then(response => {
|
|
this.getDicts("sys_course_watch_log_type").then(response => {
|
|
|
this.logTypeOptions = response.data;
|
|
this.logTypeOptions = response.data;
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ // 设置默认当天时间 xgb 防止频繁查询大量数据
|
|
|
|
|
+ this.setToday();
|
|
|
|
|
+
|
|
|
|
|
+ this.getList();
|
|
|
this.getCompanyUserListLikeName(true);
|
|
this.getCompanyUserListLikeName(true);
|
|
|
|
|
+ this.loading=false;
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ setToday(){
|
|
|
|
|
+ const today = new Date();
|
|
|
|
|
+ const todayStart = new Date(today);
|
|
|
|
|
+ todayStart.setHours(0, 0, 0, 0);
|
|
|
|
|
+ const todayEnd = new Date(today);
|
|
|
|
|
+ todayEnd.setHours(23, 59, 59, 999);
|
|
|
|
|
+
|
|
|
|
|
+ this.createTimeText = [this.formatDate(todayStart), this.formatDate(todayEnd)];
|
|
|
|
|
+ this.queryParams.sTime = this.formatDate(todayStart);
|
|
|
|
|
+ this.queryParams.eTime = this.formatDate(todayEnd);
|
|
|
|
|
+ },
|
|
|
handleSendTypeChange() {
|
|
handleSendTypeChange() {
|
|
|
this.handleQuery(); // 重新查询列表
|
|
this.handleQuery(); // 重新查询列表
|
|
|
},
|
|
},
|
|
@@ -686,6 +703,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
/** 查询短链课程看课记录列表 */
|
|
/** 查询短链课程看课记录列表 */
|
|
|
getList() {
|
|
getList() {
|
|
|
|
|
+ // xgb 看课数据量太大必须限制时间
|
|
|
|
|
+ if (!this.createTimeText) {
|
|
|
|
|
+ this.$message.warning('请选择创建时间');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
if(this.queryParams.logType == "10"){
|
|
if(this.queryParams.logType == "10"){
|
|
|
this.queryParams.logType = null;
|
|
this.queryParams.logType = null;
|
|
@@ -754,6 +777,8 @@ export default {
|
|
|
// 统一重置日历组件
|
|
// 统一重置日历组件
|
|
|
this.resetCalendars();
|
|
this.resetCalendars();
|
|
|
|
|
|
|
|
|
|
+ this.setToday();
|
|
|
|
|
+
|
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
|
},
|
|
},
|
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
@@ -814,6 +839,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
handleExport() {
|
|
|
|
|
+ if (!this.createTimeText) {
|
|
|
|
|
+ this.$message.warning('请选择创建时间');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const that = this
|
|
const that = this
|
|
|
const queryParams = this.queryParams;
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
|
|
this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
|
|
@@ -889,6 +919,19 @@ export default {
|
|
|
// 创建时间
|
|
// 创建时间
|
|
|
createChange(createTime) {
|
|
createChange(createTime) {
|
|
|
if (createTime && createTime.length >= 2) {
|
|
if (createTime && createTime.length >= 2) {
|
|
|
|
|
+ const startDate = new Date(createTime[0]);
|
|
|
|
|
+ const endDate = new Date(createTime[1]);
|
|
|
|
|
+ const timeDiff = Math.abs(endDate.getTime() - startDate.getTime());
|
|
|
|
|
+ const diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
|
|
|
|
|
+
|
|
|
|
|
+ // 限制时间区间为一个月
|
|
|
|
|
+ if (diffDays > 31) {
|
|
|
|
|
+ this.$message.warning('创建时间区间不能超过一个月');
|
|
|
|
|
+ this.createTimeText = null;
|
|
|
|
|
+ this.queryParams.sTime = null;
|
|
|
|
|
+ this.queryParams.eTime = null;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
// this.createTimeText = this.formatDateRange(createTime);
|
|
// this.createTimeText = this.formatDateRange(createTime);
|
|
|
this.queryParams.sTime = this.formatDate(createTime[0]) || null;
|
|
this.queryParams.sTime = this.formatDate(createTime[0]) || null;
|
|
|
this.queryParams.eTime = this.formatDate(createTime[1]) || null;
|
|
this.queryParams.eTime = this.formatDate(createTime[1]) || null;
|