增加默认查询时间
This commit is contained in:
parent
66ab284e13
commit
8c7b7199ac
|
|
@ -160,8 +160,18 @@
|
||||||
},
|
},
|
||||||
created() {
|
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: {
|
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=列数
|
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||||
// 注意列数和行数从 0 开始
|
// 注意列数和行数从 0 开始
|
||||||
|
|
@ -214,7 +224,10 @@
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
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.queryParams.keyWord=null;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -373,8 +373,18 @@
|
||||||
},
|
},
|
||||||
created() {
|
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: {
|
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=列数
|
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||||
// 注意列数和行数从 0 开始
|
// 注意列数和行数从 0 开始
|
||||||
|
|
@ -432,7 +442,10 @@
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
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.queryParams.keyWord=null;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -164,8 +164,18 @@
|
||||||
},
|
},
|
||||||
created() {
|
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: {
|
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=列数
|
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||||
// 注意列数和行数从 0 开始
|
// 注意列数和行数从 0 开始
|
||||||
|
|
@ -220,7 +230,10 @@
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
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.queryParams.keyWord=null;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -164,8 +164,18 @@
|
||||||
},
|
},
|
||||||
created() {
|
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: {
|
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=列数
|
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||||
// 注意列数和行数从 0 开始
|
// 注意列数和行数从 0 开始
|
||||||
|
|
@ -221,7 +231,10 @@
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
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.queryParams.keyWord=null;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -181,8 +181,18 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
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: {
|
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=列数
|
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||||
// 注意列数和行数从 0 开始
|
// 注意列数和行数从 0 开始
|
||||||
|
|
@ -234,7 +244,10 @@ export default {
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm('queryForm')
|
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.queryParams.keyWord = null
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -159,9 +159,19 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
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: {
|
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=列数
|
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||||
// 注意列数和行数从 0 开始
|
// 注意列数和行数从 0 开始
|
||||||
|
|
@ -216,7 +226,10 @@
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
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.queryParams.keyWord=null;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue