|
|
|
|
@ -1006,6 +1006,11 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
// 查询条件创建时间默认为当天
|
|
|
|
|
let siteStartTime = this.dateUtil(new Date(new Date().toLocaleDateString()));
|
|
|
|
|
let siteEndTime = this.dateUtil(new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1));
|
|
|
|
|
this.dateRange = [siteStartTime, siteEndTime];
|
|
|
|
|
|
|
|
|
|
// 获取用户统计信息
|
|
|
|
|
this.getUserCount();
|
|
|
|
|
// 获取表单数据
|
|
|
|
|
@ -1028,6 +1033,16 @@ export default {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
dateUtil(date){
|
|
|
|
|
// 获取年份、月份和日期
|
|
|
|
|
const year = date.getFullYear().toString(); // 四位数表示的年份
|
|
|
|
|
const months = (date.getMonth() + 1).toString().padStart(2, '0'); // 补零后的两位数表示的月份
|
|
|
|
|
const day = date.getDate().toString().padStart(2, '0'); // 补零后的两位数表示的日期
|
|
|
|
|
const hours = date.getHours().toString().padStart(2, '0'); // 补全两位数的小时
|
|
|
|
|
const minutes = date.getMinutes().toString().padStart(2, '0'); // 补全两位数的分钟
|
|
|
|
|
const seconds = date.getSeconds().toString().padStart(2, '0');
|
|
|
|
|
return `${year}-${months}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
|
|
},
|
|
|
|
|
getUserCount() {
|
|
|
|
|
selectUserCount().then(Response => {
|
|
|
|
|
this.count.userNum = Response.data[0];
|
|
|
|
|
|