diff --git a/src/views/invest/investDealAnalysis/index.vue b/src/views/invest/investDealAnalysis/index.vue index 0439fca..eaf9845 100644 --- a/src/views/invest/investDealAnalysis/index.vue +++ b/src/views/invest/investDealAnalysis/index.vue @@ -211,14 +211,14 @@ const data = reactive({ const { queryParams, queryAcccountsParams, rules } = toRefs(data) const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) -const start = dayjs(end).add(-30, 'day') +const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01' queryParams.value.time = [start, end] const handleTimeChange = (type) => { queryParams.value.time = null if (type === 1) { const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) - const start = dayjs(end).add(-30, 'day') + const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01' queryParams.value.time = [start, end] } else if (type === 2) { const today = new Date() @@ -327,7 +327,7 @@ function resetQuery() { queryParams.value.id = null const today = new Date() const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2) - const start = dayjs(end).add(-30, 'day') + const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01' queryParams.value.time = [start, end] total.value = 0 handleQuery()