|
|
@ -283,6 +283,10 @@ export default {
|
|
|
|
//图表所有数据
|
|
|
|
//图表所有数据
|
|
|
|
chartDataArr: [], //数据
|
|
|
|
chartDataArr: [], //数据
|
|
|
|
chartLoading: false,
|
|
|
|
chartLoading: false,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//开始时间和结束时间全局
|
|
|
|
|
|
|
|
allStartTime: "",
|
|
|
|
|
|
|
|
allEndTime: "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -315,11 +319,15 @@ export default {
|
|
|
|
"starttime",
|
|
|
|
"starttime",
|
|
|
|
new Date(thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30))
|
|
|
|
new Date(thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30))
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
this.allStartTime = new Date(
|
|
|
|
|
|
|
|
thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30)
|
|
|
|
|
|
|
|
);
|
|
|
|
console.log(this.formdata.starttime);
|
|
|
|
console.log(this.formdata.starttime);
|
|
|
|
const currentDate = new Date(); // 获取当前时间
|
|
|
|
const currentDate = new Date(); // 获取当前时间
|
|
|
|
currentDate.setHours(23); // 设置小时为23
|
|
|
|
currentDate.setHours(23); // 设置小时为23
|
|
|
|
currentDate.setMinutes(59); // 设置分钟为59
|
|
|
|
currentDate.setMinutes(59); // 设置分钟为59
|
|
|
|
currentDate.setSeconds(59); // 设置秒数为59
|
|
|
|
currentDate.setSeconds(59); // 设置秒数为59
|
|
|
|
|
|
|
|
this.allEndTime = currentDate;
|
|
|
|
this.$set(this.formdata, "endtime", currentDate);
|
|
|
|
this.$set(this.formdata, "endtime", currentDate);
|
|
|
|
console.log("我是开始时间", this.formdata.starttime);
|
|
|
|
console.log("我是开始时间", this.formdata.starttime);
|
|
|
|
console.log("我是结束时间", currentDate);
|
|
|
|
console.log("我是结束时间", currentDate);
|
|
|
@ -421,7 +429,8 @@ export default {
|
|
|
|
startDate.setSeconds(0); // 设置秒数为59
|
|
|
|
startDate.setSeconds(0); // 设置秒数为59
|
|
|
|
this.formdata.starttime = startDate;
|
|
|
|
this.formdata.starttime = startDate;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.formdata.starttime = val;
|
|
|
|
this.allStartTime = val;
|
|
|
|
|
|
|
|
this.formdata.starttime = this.allStartTime;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//结束日期
|
|
|
|
//结束日期
|
|
|
@ -438,7 +447,8 @@ export default {
|
|
|
|
val.setHours(23); // 设置小时为23
|
|
|
|
val.setHours(23); // 设置小时为23
|
|
|
|
val.setMinutes(59); // 设置分钟为59
|
|
|
|
val.setMinutes(59); // 设置分钟为59
|
|
|
|
val.setSeconds(59); // 设置秒数为59
|
|
|
|
val.setSeconds(59); // 设置秒数为59
|
|
|
|
this.formdata.endtime = val;
|
|
|
|
this.allEndTime = val;
|
|
|
|
|
|
|
|
this.formdata.endtime = this.allEndTime;
|
|
|
|
console.log(val);
|
|
|
|
console.log(val);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -459,6 +469,12 @@ export default {
|
|
|
|
// "starttime",
|
|
|
|
// "starttime",
|
|
|
|
// new Date(thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30))
|
|
|
|
// new Date(thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30))
|
|
|
|
// );
|
|
|
|
// );
|
|
|
|
|
|
|
|
console.log(
|
|
|
|
|
|
|
|
"全局开始时间和结束时间为0",
|
|
|
|
|
|
|
|
this.allStartTime,
|
|
|
|
|
|
|
|
this.allEndTime
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
if (this.allStartTime == "" && this.allEndTime == "") {
|
|
|
|
const thirtyDaysAgo = new Date();
|
|
|
|
const thirtyDaysAgo = new Date();
|
|
|
|
this.$set(
|
|
|
|
this.$set(
|
|
|
|
this.formdata,
|
|
|
|
this.formdata,
|
|
|
@ -475,6 +491,16 @@ export default {
|
|
|
|
console.log("我是开始时间", this.formdata.starttime);
|
|
|
|
console.log("我是开始时间", this.formdata.starttime);
|
|
|
|
console.log("我是结束时间", currentDate);
|
|
|
|
console.log("我是结束时间", currentDate);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$set(this.formdata, "starttime", this.allStartTime);
|
|
|
|
|
|
|
|
this.$set(this.formdata, "endtime", this.allEndTime);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
console.log(
|
|
|
|
|
|
|
|
"全局开始时间和结束时间不为0",
|
|
|
|
|
|
|
|
this.allStartTime,
|
|
|
|
|
|
|
|
this.allEndTime
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
if (this.allStartTime == "" && this.allEndTime == "") {
|
|
|
|
console.log(res.data.content[0].acquisitionTime);
|
|
|
|
console.log(res.data.content[0].acquisitionTime);
|
|
|
|
this.formdata.endtime = res.data.content[0].acquisitionTime;
|
|
|
|
this.formdata.endtime = res.data.content[0].acquisitionTime;
|
|
|
|
const qet = new Date(this.formdata.endtime);
|
|
|
|
const qet = new Date(this.formdata.endtime);
|
|
|
@ -492,6 +518,10 @@ export default {
|
|
|
|
"starttime",
|
|
|
|
"starttime",
|
|
|
|
new Date(thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30))
|
|
|
|
new Date(thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30))
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$set(this.formdata, "starttime", this.allStartTime);
|
|
|
|
|
|
|
|
this.$set(this.formdata, "endtime", this.allEndTime);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.handleSearch();
|
|
|
|
this.handleSearch();
|
|
|
|