|
@@ -169,13 +169,9 @@ import dayjs from "dayjs";
|
|
|
import histogram from "v-charts/lib/histogram.common";
|
|
|
import { getNowDateAndMonday, getNowDateAndSunday } from "@/utils/utils";
|
|
|
import { cloudTeacherNum } from "../api";
|
|
|
-let nowTime = new Date();
|
|
|
-nowTime =
|
|
|
- nowTime.getFullYear() +
|
|
|
- "-" +
|
|
|
- (nowTime.getMonth() + 1) +
|
|
|
- "-" +
|
|
|
- nowTime.getDate();
|
|
|
+let nowTime = dayjs()
|
|
|
+ .subtract(1, "day")
|
|
|
+ .format("YYYY-MM-DD")
|
|
|
export const getTimes = (times, keys = []) => {
|
|
|
if (times && times.length) {
|
|
|
return {
|
|
@@ -191,17 +187,24 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
- dates: []
|
|
|
+ dates: [
|
|
|
+ dayjs()
|
|
|
+ .subtract(1, "day")
|
|
|
+ .format("YYYY-MM-DD"),
|
|
|
+ dayjs()
|
|
|
+ .subtract(1, "day")
|
|
|
+ .format("YYYY-MM-DD")
|
|
|
+ ]
|
|
|
},
|
|
|
tableList: [],
|
|
|
activeName: "first"
|
|
|
};
|
|
|
},
|
|
|
async mounted() {
|
|
|
- if (this.searchForm.dates?.length <= 0) {
|
|
|
- this.searchForm.dates.push(nowTime);
|
|
|
- this.searchForm.dates.push(nowTime);
|
|
|
- }
|
|
|
+ // if (this.searchForm.dates?.length <= 0) {
|
|
|
+ // this.searchForm.dates.push(nowTime);
|
|
|
+ // this.searchForm.dates.push(nowTime);
|
|
|
+ // }
|
|
|
|
|
|
this.getList();
|
|
|
},
|
|
@@ -247,8 +250,8 @@ export default {
|
|
|
page: 1
|
|
|
};
|
|
|
this.$refs.searchForm.resetFields();
|
|
|
- this.searchForm.dates.push(getNowDateAndMonday(nowTime));
|
|
|
- this.searchForm.dates.push(getNowDateAndSunday(nowTime));
|
|
|
+ // this.searchForm.dates.push(getNowDateAndMonday(nowTime));
|
|
|
+ // this.searchForm.dates.push(getNowDateAndSunday(nowTime));
|
|
|
this.getList();
|
|
|
},
|
|
|
getDefaultTime() {
|