feat: kpi菜单时间选择预设1h/1d/7d/15d

This commit is contained in:
TsMask
2025-06-17 20:02:42 +08:00
parent a341800efc
commit 88aea40885
6 changed files with 267 additions and 126 deletions

View File

@@ -86,17 +86,36 @@ let queryRangePicker = ref<[string, string]>(['', '']);
/**时间选择 */
const ranges = ref([
{
label: t('views.perfManage.customTarget.sixHoursAgo'),
value: [dayjs().subtract(6, 'hours'), dayjs()],
},
{
label: t('views.perfManage.customTarget.threeHoursAgo'),
value: [dayjs().subtract(3, 'hours'), dayjs()],
},
{
label: t('views.monitor.monitor.today'),
label: t('views.perfManage.customTarget.new1Hour'),
value: [dayjs().startOf('day'), dayjs()],
},
{
label: t('views.perfManage.customTarget.ago1Hour'),
value: [dayjs().subtract(1, 'hour').startOf('hour'), dayjs().endOf('hour')],
},
// {
// label: t('views.perfManage.customTarget.ago3Hour'),
// value: [dayjs().subtract(3, 'hours'), dayjs()],
// },
// {
// label: t('views.perfManage.customTarget.ago6Hour'),
// value: [dayjs().subtract(6, 'hours'), dayjs()],
// },
{
label: t('views.perfManage.customTarget.ago1Day'),
value: [
dayjs().subtract(1, 'day').startOf('day'),
dayjs().subtract(1, 'day'),
],
},
{
label: t('views.perfManage.customTarget.ago7Day'),
value: [dayjs().subtract(7, 'day').startOf('day'), dayjs()],
},
{
label: t('views.perfManage.customTarget.ago15Day'),
value: [dayjs().subtract(15, 'day').startOf('day'), dayjs()],
},
]);
/**表格字段列 */