|
@@ -74,6 +74,7 @@ import Detail from './Detail.vue'
|
|
|
import { ElderlyItemsRoundLogColumns } from '../column'
|
|
import { ElderlyItemsRoundLogColumns } from '../column'
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
import { ROLE_SUBMIT_LABEL, getRoleSubmitLabel } from './roleSubmitLabel'
|
|
import { ROLE_SUBMIT_LABEL, getRoleSubmitLabel } from './roleSubmitLabel'
|
|
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
|
|
|
|
@@ -84,14 +85,11 @@ const roleSubmitOptions = Object.entries(ROLE_SUBMIT_LABEL).map(([enumKey, label
|
|
|
|
|
|
|
|
defineOptions({ name: 'RoomInspectionProjectLog' })
|
|
defineOptions({ name: 'RoomInspectionProjectLog' })
|
|
|
|
|
|
|
|
-/** 默认巡房时间:当前自然月 [月初, 月末] */
|
|
|
|
|
|
|
+/** 默认巡房时间:[今天, 今天起往后一个月](按日历月加一个月) */
|
|
|
function createDefaultRoundTimeRange(): string[] {
|
|
function createDefaultRoundTimeRange(): string[] {
|
|
|
- const now = new Date()
|
|
|
|
|
- const start = new Date(now.getFullYear(), now.getMonth(), 1)
|
|
|
|
|
- const end = new Date(now.getFullYear(), now.getMonth() + 1, 0)
|
|
|
|
|
- const pad = (n: number) => String(n).padStart(2, '0')
|
|
|
|
|
- const fmt = (d: Date) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
|
|
|
|
|
- return [fmt(start), fmt(end)]
|
|
|
|
|
|
|
+ const start = dayjs().startOf('day')
|
|
|
|
|
+ const end = start.add(1, 'month')
|
|
|
|
|
+ return [start.format('YYYY-MM-DD'), end.format('YYYY-MM-DD')]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const queryParams = reactive({
|
|
const queryParams = reactive({
|