修改ui
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-15 10:49:13
|
||||
* @LastEditTime: 2024-07-05 13:24:58
|
||||
* @LastEditTime: 2024-07-08 13:18:08
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -201,12 +201,29 @@ export default {
|
||||
// this.getOverView()
|
||||
const today = new Date()
|
||||
const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000))
|
||||
this.listQuery.startDate = moment(sevenDaysAgo).format('yyyy-MM-DD')
|
||||
this.listQuery.endDate = moment(today).format('yyyy-MM-DD')
|
||||
this.listQuery.startDate = this.getFirstDay()
|
||||
this.listQuery.endDate = this.getLastDay()
|
||||
this.listQuery.reportTime = [this.listQuery.startDate, this.listQuery.endDate]
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
getFirstDay() {
|
||||
//当前月第一天
|
||||
var y = new Date().getFullYear(); //获取年份
|
||||
var m = new Date().getMonth() + 1; //获取月份
|
||||
var d = "01";
|
||||
m = m < 10 ? "0" + m : m; //月份补 0
|
||||
return [y, m, d].join("-");
|
||||
},
|
||||
getLastDay() {
|
||||
//当前月最后一天
|
||||
var y = new Date().getFullYear(); //获取年份
|
||||
var m = new Date().getMonth() + 1; //获取月份
|
||||
var d = new Date(y, m, 0).getDate(); //获取当月最后一日
|
||||
m = m < 10 ? "0" + m : m; //月份补 0
|
||||
d = d < 10 ? "0" + d : d; //日数补 0
|
||||
return [y, m, d].join("-");
|
||||
},
|
||||
handleChange() {
|
||||
this.listQuery.reportTime = []
|
||||
this.listQuery.end = null
|
||||
|
||||
Reference in New Issue
Block a user