材料站增加默认查询时间
This commit is contained in:
parent
3cc97a37aa
commit
3702be5f60
|
|
@ -296,10 +296,20 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.time = [this.format(start), this.format(end)]
|
||||
this.getList()
|
||||
this.initSelectData()
|
||||
},
|
||||
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}`
|
||||
},
|
||||
/** 转换菜单数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
|
|
@ -372,7 +382,10 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time = []
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.time = [this.format(start), this.format(end)]
|
||||
// this.resetForm("queryForm");
|
||||
this.queryParams.teamId = ''
|
||||
this.projectId = null
|
||||
|
|
|
|||
|
|
@ -164,9 +164,19 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.timeRange = [this.format(start), this.format(end)]
|
||||
this.getList()
|
||||
},
|
||||
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}`
|
||||
},
|
||||
// 获取列表
|
||||
async getList() {
|
||||
this.loading = true
|
||||
|
|
@ -237,6 +247,10 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.timeRange = [this.format(start), this.format(end)]
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -315,9 +315,19 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.time = [this.format(start), this.format(end)]
|
||||
this.getList()
|
||||
},
|
||||
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}`
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
|
|
@ -346,7 +356,10 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time = []
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.time = [this.format(start), this.format(end)]
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.keyWord = ''
|
||||
this.handleQuery()
|
||||
|
|
|
|||
|
|
@ -165,9 +165,19 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.timeRange = [this.format(start), this.format(end)]
|
||||
this.getList()
|
||||
},
|
||||
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}`
|
||||
},
|
||||
// 获取列表
|
||||
async getList() {
|
||||
this.loading = true
|
||||
|
|
@ -236,6 +246,10 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.timeRange = [this.format(start), this.format(end)]
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -303,9 +303,19 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.time = [this.format(start), this.format(end)]
|
||||
this.getList()
|
||||
},
|
||||
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}`
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
|
|
@ -335,7 +345,10 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time = []
|
||||
const end = new Date()
|
||||
let start = new Date()
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
this.queryParams.time = [this.format(start), this.format(end)]
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.keyWord = ''
|
||||
this.handleQuery()
|
||||
|
|
|
|||
Loading…
Reference in New Issue