fix: 修改日期搜索默认8天内

This commit is contained in:
Jiangjie.Bai
2022-04-19 17:39:42 +08:00
committed by Jiangjie.Bai
parent cd51596d45
commit 5577051416
7 changed files with 18 additions and 18 deletions

View File

@@ -4,7 +4,7 @@
<script type="text/jsx">
import ListTable from '@/components/ListTable'
import { timeOffset, getDaysAgo, getDayEnd } from '@/utils/common'
import { timeOffset, getDaysAgo, getDaysFuture } from '@/utils/common'
import { ActionsFormatter } from '@/components/TableFormatters'
export default {
name: 'BaseList',
@@ -23,8 +23,8 @@ export default {
},
data() {
const now = new Date()
const dateFrom = getDaysAgo(2, now).toISOString()
const dateTo = getDayEnd(now).toISOString()
const dateFrom = getDaysAgo(7, now).toISOString()
const dateTo = getDaysFuture(1, now).toISOString()
return {
tableConfig: {
url: this.url,