|
|
@@ -788,7 +788,7 @@ export default {
|
|
|
courseList().then(response => {
|
|
|
this.courseLists = response.list;
|
|
|
});
|
|
|
- this.getList();
|
|
|
+
|
|
|
this.getDicts("sys_course_watch_log_type_new").then(response => {
|
|
|
this.logTypeOptions = response.data;
|
|
|
});
|
|
|
@@ -796,14 +796,30 @@ export default {
|
|
|
this.getDicts("sys_company_or").then(response => {
|
|
|
this.sysCompanyOr = response.data;
|
|
|
});
|
|
|
- getMyQwUserList().then(response => {
|
|
|
- this.myQwUserList = response.data;
|
|
|
- });
|
|
|
this.getDicts("sys_course_project").then(response => {
|
|
|
this.projectOptions = response.data;
|
|
|
});
|
|
|
+ // 设置默认当天时间 xgb 防止频繁查询大量数据
|
|
|
+ this.setToday();
|
|
|
+
|
|
|
+ this.getList();
|
|
|
+ getMyQwUserList().then(response => {
|
|
|
+ this.myQwUserList = response.data;
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
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() {
|
|
|
// 重置相关参数
|
|
|
@@ -902,6 +918,20 @@ export default {
|
|
|
// 创建时间
|
|
|
createChange(createTime) {
|
|
|
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.queryParams.sTime = this.formatDate(createTime[0]) || null;
|
|
|
this.queryParams.eTime = this.formatDate(createTime[1]) || null;
|
|
|
@@ -1027,6 +1057,11 @@ export default {
|
|
|
|
|
|
/** 查询短链课程看课记录列表 */
|
|
|
getList() {
|
|
|
+ // xgb 看课数据量太大必须限制时间
|
|
|
+ if (!this.createTimeText) {
|
|
|
+ this.$message.warning('请选择创建时间');
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.loading = true;
|
|
|
let param = JSON.parse(JSON.stringify(this.queryParams));
|
|
|
if (param.logType == "10") {
|
|
|
@@ -1100,6 +1135,8 @@ export default {
|
|
|
// 统一重置日历组件
|
|
|
this.resetCalendars();
|
|
|
|
|
|
+ this.setToday();
|
|
|
+
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
@@ -1161,6 +1198,10 @@ export default {
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
+ if (!this.createTimeText) {
|
|
|
+ this.$message.warning('请选择创建时间');
|
|
|
+ return;
|
|
|
+ }
|
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
|
|
|
confirmButtonText: "确定",
|