|
@@ -178,11 +178,13 @@ const PerformanceDetial = defineComponent({
|
|
moment(val[0]).format("YYYY-MM"),
|
|
moment(val[0]).format("YYYY-MM"),
|
|
moment(val[1]).format("YYYY-MM"),
|
|
moment(val[1]).format("YYYY-MM"),
|
|
];
|
|
];
|
|
|
|
+ console.log(this.search.date_arr, "1");
|
|
} else {
|
|
} else {
|
|
this.search.date_arr = [
|
|
this.search.date_arr = [
|
|
moment(val[0]).format("YYYY-MM-DD"),
|
|
moment(val[0]).format("YYYY-MM-DD"),
|
|
moment(val[1]).format("YYYY-MM-DD"),
|
|
moment(val[1]).format("YYYY-MM-DD"),
|
|
];
|
|
];
|
|
|
|
+ console.log(this.search.date_arr, "2");
|
|
}
|
|
}
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
@@ -238,8 +240,13 @@ const PerformanceDetial = defineComponent({
|
|
// 月、日查询类型改变
|
|
// 月、日查询类型改变
|
|
onTypeChange(val: string) {
|
|
onTypeChange(val: string) {
|
|
var date = new Date(new Date().getTime() - 24 * 60 * 60 * 1000);
|
|
var date = new Date(new Date().getTime() - 24 * 60 * 60 * 1000);
|
|
- console.log(val);
|
|
|
|
if (val === "month") {
|
|
if (val === "month") {
|
|
|
|
+ //如果是月份格式化
|
|
|
|
+ this.search.date_arr = [
|
|
|
|
+ moment(this.search.date_arr[0]).format("YYYY-MM"),
|
|
|
|
+ moment(this.search.date_arr[1]).format("YYYY-MM"),
|
|
|
|
+ ];
|
|
|
|
+ console.log(this.search.date_arr, "3");
|
|
this.search.value = 3;
|
|
this.search.value = 3;
|
|
var list = this.getDateRange(date, 30, true);
|
|
var list = this.getDateRange(date, 30, true);
|
|
this.mode2 = ["month", "month"];
|
|
this.mode2 = ["month", "month"];
|
|
@@ -256,9 +263,14 @@ const PerformanceDetial = defineComponent({
|
|
moment(this.search.date_arr[1], "YYYY-MM"),
|
|
moment(this.search.date_arr[1], "YYYY-MM"),
|
|
];
|
|
];
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (val === "day") {
|
|
|
|
+ //如果是日期格式化
|
|
|
|
+ this.search.date_arr = [
|
|
|
|
+ moment(this.search.date_arr[0]).format("YYYY-MM-DD"),
|
|
|
|
+ moment(this.search.date_arr[1]).format("YYYY-MM-DD"),
|
|
|
|
+ ];
|
|
this.search.value = "";
|
|
this.search.value = "";
|
|
-
|
|
|
|
this.mode2 = ["date", "date"];
|
|
this.mode2 = ["date", "date"];
|
|
if (this.$route.query.start_time && this.$route.query.end_time) {
|
|
if (this.$route.query.start_time && this.$route.query.end_time) {
|
|
this.value[0] = moment(this.search.date_arr[0], "YYYY-MM-DD");
|
|
this.value[0] = moment(this.search.date_arr[0], "YYYY-MM-DD");
|