|
|
@@ -378,7 +378,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
|
|
|
+import { dateFormatter, dateFormatter2, rangeShortcuts } from '@/utils/formatTime'
|
|
|
import download from '@/utils/download'
|
|
|
import { IotRyDailyReportApi, IotRyDailyReportVO } from '@/api/pms/iotrydailyreport'
|
|
|
import IotRyXjDailyReportForm from './IotRyXjDailyReportForm.vue'
|
|
|
@@ -392,99 +392,6 @@ import quarterOfYear from 'dayjs/plugin/quarterOfYear'
|
|
|
|
|
|
dayjs.extend(quarterOfYear)
|
|
|
|
|
|
-const rangeShortcuts = [
|
|
|
- {
|
|
|
- text: '今天',
|
|
|
- value: () => {
|
|
|
- const today = dayjs()
|
|
|
- return [today.startOf('day').toDate(), today.endOf('day').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '昨天',
|
|
|
- value: () => {
|
|
|
- const yesterday = dayjs().subtract(1, 'day')
|
|
|
- return [yesterday.startOf('day').toDate(), yesterday.endOf('day').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '本周',
|
|
|
- value: () => {
|
|
|
- return [dayjs().startOf('week').toDate(), dayjs().endOf('week').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '上周',
|
|
|
- value: () => {
|
|
|
- const lastWeek = dayjs().subtract(1, 'week')
|
|
|
- return [lastWeek.startOf('week').toDate(), lastWeek.endOf('week').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '本月',
|
|
|
- value: () => {
|
|
|
- return [dayjs().startOf('month').toDate(), dayjs().endOf('month').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '上月',
|
|
|
- value: () => {
|
|
|
- const lastMonth = dayjs().subtract(1, 'month')
|
|
|
- return [lastMonth.startOf('month').toDate(), lastMonth.endOf('month').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '本季度',
|
|
|
- value: () => {
|
|
|
- return [dayjs().startOf('quarter').toDate(), dayjs().endOf('quarter').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '上季度',
|
|
|
- value: () => {
|
|
|
- const lastQuarter = dayjs().subtract(1, 'quarter')
|
|
|
- return [lastQuarter.startOf('quarter').toDate(), lastQuarter.endOf('quarter').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '今年',
|
|
|
- value: () => {
|
|
|
- return [dayjs().startOf('year').toDate(), dayjs().endOf('year').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '去年',
|
|
|
- value: () => {
|
|
|
- const lastYear = dayjs().subtract(1, 'year')
|
|
|
- return [lastYear.startOf('year').toDate(), lastYear.endOf('year').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '最近7天',
|
|
|
- value: () => {
|
|
|
- return [dayjs().subtract(6, 'day').toDate(), dayjs().toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '最近30天',
|
|
|
- value: () => {
|
|
|
- return [dayjs().subtract(29, 'day').toDate(), dayjs().toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '最近90天',
|
|
|
- value: () => {
|
|
|
- return [dayjs().subtract(89, 'day').toDate(), dayjs().toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '最近一年',
|
|
|
- value: () => {
|
|
|
- return [dayjs().subtract(1, 'year').toDate(), dayjs().toDate()]
|
|
|
- }
|
|
|
- }
|
|
|
-]
|
|
|
-
|
|
|
/** 瑞鹰日报 列表 */
|
|
|
defineOptions({ name: 'IotRyXjDailyReport' })
|
|
|
|
|
|
@@ -535,7 +442,9 @@ let queryParams = reactive({
|
|
|
status: undefined,
|
|
|
processInstanceId: undefined,
|
|
|
auditStatus: undefined,
|
|
|
- createTime: []
|
|
|
+ createTime: [
|
|
|
+ ...rangeShortcuts[2].value().map((item) => dayjs(item).format('YYYY-MM-DD HH:mm:ss'))
|
|
|
+ ]
|
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
const exportLoading = ref(false) // 导出的加载中
|