dev-report
qsh 1 month ago
parent 9c7ba2fb87
commit 8fc9dd449b
  1. 6
      src/views/Home/Comp/ChannelPeriod.vue

@ -64,6 +64,7 @@
<script setup name="ChannelPeriod"> <script setup name="ChannelPeriod">
import { getPeriodList } from '@/api/home/reportChannel' import { getPeriodList } from '@/api/home/reportChannel'
import { removeNullField } from '@/utils' import { removeNullField } from '@/utils'
import { formatDate } from '@/utils/formatTime'
const props = defineProps({ const props = defineProps({
sourceOptions: { sourceOptions: {
@ -89,15 +90,18 @@ const searchRules = {
onMounted(() => { onMounted(() => {
getOptions() getOptions()
handleReset() handleReset()
handleSearch()
}) })
const searchForm = ref({}) const searchForm = ref({})
function handleReset() { function handleReset() {
const date = new Date()
date.setDate(1)
searchForm.value = { searchForm.value = {
sourceId: undefined, sourceId: undefined,
periodNumber: 30, periodNumber: 30,
consultDate: [] consultDate: [formatDate(date), formatDate(new Date())]
} }
} }

Loading…
Cancel
Save