增加默认查询时间
This commit is contained in:
parent
66ab284e13
commit
8c7b7199ac
|
|
@ -159,9 +159,19 @@
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList();
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
},
|
||||
methods: {
|
||||
format(date) {
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${y}-${m}-${day}`
|
||||
},
|
||||
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||
// 注意列数和行数从 0 开始
|
||||
|
|
@ -214,7 +224,10 @@
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.dateRange=[]
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
this.queryParams.keyWord=null;
|
||||
this.handleQuery();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -372,9 +372,19 @@
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList();
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
},
|
||||
methods: {
|
||||
format(date) {
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${y}-${m}-${day}`
|
||||
},
|
||||
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||
// 注意列数和行数从 0 开始
|
||||
|
|
@ -432,7 +442,10 @@
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.dateRange=[]
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
this.queryParams.keyWord=null;
|
||||
this.handleQuery();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -163,9 +163,19 @@
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList();
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
},
|
||||
methods: {
|
||||
format(date) {
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${y}-${m}-${day}`
|
||||
},
|
||||
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||
// 注意列数和行数从 0 开始
|
||||
|
|
@ -220,7 +230,10 @@
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.dateRange=[]
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
this.queryParams.keyWord=null;
|
||||
this.handleQuery();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -163,9 +163,19 @@
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList();
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
},
|
||||
methods: {
|
||||
format(date) {
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${y}-${m}-${day}`
|
||||
},
|
||||
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||
// 注意列数和行数从 0 开始
|
||||
|
|
@ -221,7 +231,10 @@
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.dateRange=[]
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
this.queryParams.keyWord=null;
|
||||
this.handleQuery();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -181,8 +181,18 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList()
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
},
|
||||
methods: {
|
||||
format(date) {
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${y}-${m}-${day}`
|
||||
},
|
||||
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||
// 注意列数和行数从 0 开始
|
||||
|
|
@ -234,7 +244,10 @@ export default {
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.dateRange = []
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
this.queryParams.keyWord = null
|
||||
this.handleQuery()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -159,9 +159,19 @@
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
},
|
||||
methods: {
|
||||
format(date) {
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${y}-${m}-${day}`
|
||||
},
|
||||
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||
// 注意列数和行数从 0 开始
|
||||
|
|
@ -216,7 +226,10 @@
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.dateRange=[]
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 2)
|
||||
this.dateRange = [this.format(start), this.format(end)]
|
||||
this.queryParams.keyWord=null;
|
||||
this.handleQuery();
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue