chore: 执行批次默认查询一周内数据
This commit is contained in:
parent
04c3c3926a
commit
fd57b113c0
@ -147,6 +147,13 @@ export function monthRangeISO8601(months: number = 1, startOf: dayjs.OpUnitType
|
|||||||
] as [string, string];
|
] as [string, string];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function weekRangeISO8601(weeks: number = 1, startOf: dayjs.OpUnitType = 'day') {
|
||||||
|
return [
|
||||||
|
dayjs().subtract(weeks, 'week').startOf(startOf).format('YYYY-MM-DDTHH:mm:ss'),
|
||||||
|
dayjs().endOf('day').format('YYYY-MM-DDTHH:mm:ss')
|
||||||
|
] as [string, string];
|
||||||
|
}
|
||||||
|
|
||||||
export function isNotNull(value: any) {
|
export function isNotNull(value: any) {
|
||||||
return value !== undefined && value !== null && value !== '' && value !== 'undefined';
|
return value !== undefined && value !== null && value !== '' && value !== 'undefined';
|
||||||
}
|
}
|
||||||
@ -190,7 +197,7 @@ export function stringToContent(
|
|||||||
if (typeof jsonString === 'string') {
|
if (typeof jsonString === 'string') {
|
||||||
try {
|
try {
|
||||||
parsedObj = JSON.parse(jsonString);
|
parsedObj = JSON.parse(jsonString);
|
||||||
} catch (e) {
|
} catch {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ import { $t } from '@/locales';
|
|||||||
import { useAppStore } from '@/store/modules/app';
|
import { useAppStore } from '@/store/modules/app';
|
||||||
import { useTable, useTableOperate } from '@/hooks/common/table';
|
import { useTable, useTableOperate } from '@/hooks/common/table';
|
||||||
import { operationReasonRecord, taskBatchStatusRecord, taskTypeRecord } from '@/constants/business';
|
import { operationReasonRecord, taskBatchStatusRecord, taskTypeRecord } from '@/constants/business';
|
||||||
import { monthRangeISO8601, tagColor } from '@/utils/common';
|
import { tagColor, weekRangeISO8601 } from '@/utils/common';
|
||||||
import SvgIcon from '@/components/custom/svg-icon.vue';
|
import SvgIcon from '@/components/custom/svg-icon.vue';
|
||||||
import JobBatchSearch from './modules/job-batch-search.vue';
|
import JobBatchSearch from './modules/job-batch-search.vue';
|
||||||
import JobBatchDetailDrawer from './modules/job-batch-detail-drawer.vue';
|
import JobBatchDetailDrawer from './modules/job-batch-detail-drawer.vue';
|
||||||
@ -38,7 +38,7 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
|
|||||||
jobName: null,
|
jobName: null,
|
||||||
taskBatchStatus: null,
|
taskBatchStatus: null,
|
||||||
jobId: null,
|
jobId: null,
|
||||||
datetimeRange: monthRangeISO8601()
|
datetimeRange: weekRangeISO8601()
|
||||||
},
|
},
|
||||||
searchParams: {
|
searchParams: {
|
||||||
jobId,
|
jobId,
|
||||||
|
Loading…
Reference in New Issue
Block a user