fix:修改时间粒度,修改默认时间
This commit is contained in:
@@ -208,8 +208,8 @@ const rangePicker = reactive<RangePicker>({
|
|||||||
...Object.fromEntries(networkElementTypes.value.map(type => [
|
...Object.fromEntries(networkElementTypes.value.map(type => [
|
||||||
type,
|
type,
|
||||||
[
|
[
|
||||||
dayjs().startOf('hour').valueOf().toString(), // 当前小时内
|
dayjs().subtract(1, 'hour').startOf('hour').valueOf().toString(), // 上一小时开始
|
||||||
dayjs().endOf('hour').valueOf().toString()
|
dayjs().startOf('hour').add(1, 'hour').valueOf().toString(), // 当前小时结束
|
||||||
]
|
]
|
||||||
])) as Record<AllChartType, [string, string]>,
|
])) as Record<AllChartType, [string, string]>,
|
||||||
placeholder: [t('views.monitor.monitor.startTime'), t('views.monitor.monitor.endTime')] as [string, string],
|
placeholder: [t('views.monitor.monitor.startTime'), t('views.monitor.monitor.endTime')] as [string, string],
|
||||||
@@ -336,7 +336,7 @@ const fetchData = async (type: AllChartType) => {
|
|||||||
endTime,
|
endTime,
|
||||||
sortField: 'timeGroup',
|
sortField: 'timeGroup',
|
||||||
sortOrder: 'desc',
|
sortOrder: 'desc',
|
||||||
interval: 5,
|
interval: 60*15,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user