|
|
@ -34,10 +34,10 @@ |
|
|
|
<div class="time-group"> |
|
|
|
<el-text size="large" style="width: 80px">提交时间:</el-text> |
|
|
|
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="至" start-placeholder="开始时间" |
|
|
|
end-placeholder="结束时间" style="width: 400px" /> |
|
|
|
<el-button @click="getToday()" style="margin-left: 10px">今</el-button> |
|
|
|
<el-button @click="getYesterday()" style="margin-left: 10px">昨</el-button> |
|
|
|
<el-button @click="get7Days()" style="margin-left: 10px">近7天</el-button> |
|
|
|
end-placeholder="结束时间" style="width: 400px" @change="handleDatePickerChange"/> |
|
|
|
<el-button @click="getToday()" style="margin-left: 10px" :type="activeTimeRange === 'today' ? 'primary' : ''"> 今</el-button> |
|
|
|
<el-button @click="getYesterday()" style="margin-left: 10px" :type="activeTimeRange === 'yesterday' ? 'primary' : ''"> 昨</el-button> |
|
|
|
<el-button @click="get7Days()" style="margin-left: 10px" :type="activeTimeRange === '7days' ? 'primary' : ''"> 近7天</el-button> |
|
|
|
<el-button type="success" @click="resetSearch">重置</el-button> |
|
|
|
<el-button type="primary" @click="handleSearch">查询</el-button> |
|
|
|
</div> |
|
|
@ -154,6 +154,13 @@ import { ElMessage } from 'element-plus' |
|
|
|
import API from '@/util/http' |
|
|
|
import moment from 'moment' |
|
|
|
|
|
|
|
// 标记当前激活的时间范围按钮 |
|
|
|
const activeTimeRange = ref('') |
|
|
|
// 日期选择器变化时清除按钮激活状态 |
|
|
|
const handleDatePickerChange = () => { |
|
|
|
activeTimeRange.value = '' |
|
|
|
} |
|
|
|
|
|
|
|
const scopeValue = ref(null) // 当前行 |
|
|
|
const rejectDialogVisible = ref(false) // 驳回对话框显示状态 |
|
|
|
const rejectReason = ref('') // 驳回理由 |
|
|
@ -174,6 +181,7 @@ const searchForm = ref({ |
|
|
|
auditStatus: '0' |
|
|
|
}) |
|
|
|
const checkTab = ref('pending') // 能否不用STATUS常量,0是待审批,1是已通过,2是驳回,参数status需要Integer |
|
|
|
// 时间 |
|
|
|
const dateRange = ref([]) |
|
|
|
const pagination = ref({ |
|
|
|
pageNum: 1, |
|
|
@ -399,6 +407,7 @@ const resetSearch = function () { |
|
|
|
auditStatus:auditStatus |
|
|
|
} |
|
|
|
dateRange.value = [] |
|
|
|
activeTimeRange.value = '' // 清除激活状态 |
|
|
|
} |
|
|
|
|
|
|
|
// 今天 |
|
|
@ -408,8 +417,11 @@ const getToday = function () { |
|
|
|
const endTime = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1) |
|
|
|
dateRange.value = [startTime, endTime] |
|
|
|
console.log('dateRange', dateRange.value) |
|
|
|
activeTimeRange.value = 'today' // 标记当前激活状态 |
|
|
|
|
|
|
|
get() |
|
|
|
getStats() |
|
|
|
|
|
|
|
console.log('aaaaaaaaaa这是今天调用') |
|
|
|
} |
|
|
|
|
|
|
@ -421,6 +433,8 @@ const getYesterday = function () { |
|
|
|
const endTime = new Date(yesterday.getFullYear(), yesterday.getMonth(), yesterday.getDate() + 1) |
|
|
|
dateRange.value = [startTime, endTime] |
|
|
|
console.log('dateRange', dateRange.value) |
|
|
|
activeTimeRange.value = 'yesterday' // 标记当前激活状态 |
|
|
|
|
|
|
|
get() |
|
|
|
getStats() |
|
|
|
console.log('aaaaaaaaaa这是昨天调用') |
|
|
@ -433,6 +447,8 @@ const get7Days = function () { |
|
|
|
const endTime = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1) |
|
|
|
dateRange.value = [startTime, endTime] |
|
|
|
console.log('dateRange', dateRange.value) |
|
|
|
activeTimeRange.value = '7days' // 标记当前激活状态 |
|
|
|
|
|
|
|
get() |
|
|
|
getStats() |
|
|
|
console.log('aaaaaaaaaa这是近七天调用') |
|
|
|