From 6a8e08a81a238e8f7cd9e6708460ee8eac2678df Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 19 Jun 2025 20:55:02 +0800 Subject: [PATCH] =?UTF-8?q?style:=20kpi=E8=8F=9C=E5=8D=95=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=8E=BB=E6=8E=89=E5=BD=93=E5=89=8D=E5=B0=8F=E6=97=B6?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E4=BB=8A=E5=A4=A9=E9=80=89=E6=8B=A9=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 2 +- src/i18n/locales/zh-CN.ts | 2 +- src/views/perfManage/goldTarget/index.vue | 21 +++++++++++++++------ src/views/perfManage/kpiCReport/index.vue | 21 +++++++++++++++------ src/views/perfManage/kpiKeyTarget/index.vue | 21 +++++++++++++++------ src/views/perfManage/kpiOverView/index.vue | 19 ++++++++++++++----- 6 files changed, 61 insertions(+), 25 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 5f6da6c0..bfbf220f 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -1001,10 +1001,10 @@ export default { expression:'Expression', description:' Description', kpiSet:' Statistical Settings', - new1Hour:'Within current hour', ago1Hour:'Last 1 hour', ago3Hour:'Last 3 hour', ago6Hour:'Last 6 hour', + toDay:'Today', ago1Day:'Last 1 day', ago7Day:'Last 7 day', ago15Day:'Last 15 day', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 9c42fcd7..73214c60 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -1001,10 +1001,10 @@ export default { expression:'计算公式', description:'描述', kpiSet:'统计设置', - new1Hour:'当前小时内', ago1Hour:'过去1小时', ago3Hour:'过去3小时', ago6Hour:'过去6小时', + toDay:'今天', ago1Day:'过去1天', ago7Day:'过去7天', ago15Day:'过去15天', diff --git a/src/views/perfManage/goldTarget/index.vue b/src/views/perfManage/goldTarget/index.vue index 0404a76d..a1829b78 100644 --- a/src/views/perfManage/goldTarget/index.vue +++ b/src/views/perfManage/goldTarget/index.vue @@ -86,12 +86,15 @@ let queryRangePicker = ref<[string, string]>(['', '']); //日期快捷选择 const ranges = ref([ { - label: t('views.perfManage.customTarget.new1Hour'), - value: [dayjs().startOf('day'), dayjs()], + label: t('views.perfManage.customTarget.toDay'), + value: [dayjs().startOf('hour'), dayjs()], }, { label: t('views.perfManage.customTarget.ago1Hour'), - value: [dayjs().subtract(1, 'hour').startOf('hour'), dayjs().endOf('hour')], + value: [ + dayjs().subtract(1, 'hour').startOf('hour'), + dayjs().subtract(1, 'hour').endOf('hour'), + ], }, // { // label: t('views.perfManage.customTarget.ago3Hour'), @@ -105,16 +108,22 @@ const ranges = ref([ label: t('views.perfManage.customTarget.ago1Day'), value: [ dayjs().subtract(1, 'day').startOf('day'), - dayjs().subtract(1, 'day'), + dayjs().subtract(1, 'day').endOf('day'), ], }, { label: t('views.perfManage.customTarget.ago7Day'), - value: [dayjs().subtract(7, 'day').startOf('day'), dayjs()], + value: [ + dayjs().subtract(7, 'day').startOf('day'), + dayjs().subtract(1, 'day').endOf('day'), + ], }, { label: t('views.perfManage.customTarget.ago15Day'), - value: [dayjs().subtract(15, 'day').startOf('day'), dayjs()], + value: [ + dayjs().subtract(15, 'day').startOf('day'), + dayjs().subtract(1, 'day').endOf('day'), + ], }, ]); diff --git a/src/views/perfManage/kpiCReport/index.vue b/src/views/perfManage/kpiCReport/index.vue index 82ab0062..eea03e9b 100644 --- a/src/views/perfManage/kpiCReport/index.vue +++ b/src/views/perfManage/kpiCReport/index.vue @@ -86,12 +86,15 @@ let queryRangePicker = ref<[string, string]>(['', '']); /**时间选择 */ const ranges = ref([ { - label: t('views.perfManage.customTarget.new1Hour'), - value: [dayjs().startOf('day'), dayjs()], + label: t('views.perfManage.customTarget.toDay'), + value: [dayjs().startOf('hour'), dayjs()], }, { label: t('views.perfManage.customTarget.ago1Hour'), - value: [dayjs().subtract(1, 'hour').startOf('hour'), dayjs().endOf('hour')], + value: [ + dayjs().subtract(1, 'hour').startOf('hour'), + dayjs().subtract(1, 'hour').endOf('hour'), + ], }, // { // label: t('views.perfManage.customTarget.ago3Hour'), @@ -105,16 +108,22 @@ const ranges = ref([ label: t('views.perfManage.customTarget.ago1Day'), value: [ dayjs().subtract(1, 'day').startOf('day'), - dayjs().subtract(1, 'day'), + dayjs().subtract(1, 'day').endOf('day'), ], }, { label: t('views.perfManage.customTarget.ago7Day'), - value: [dayjs().subtract(7, 'day').startOf('day'), dayjs()], + value: [ + dayjs().subtract(7, 'day').startOf('day'), + dayjs().subtract(1, 'day').endOf('day'), + ], }, { label: t('views.perfManage.customTarget.ago15Day'), - value: [dayjs().subtract(15, 'day').startOf('day'), dayjs()], + value: [ + dayjs().subtract(15, 'day').startOf('day'), + dayjs().subtract(1, 'day').endOf('day'), + ], }, ]); diff --git a/src/views/perfManage/kpiKeyTarget/index.vue b/src/views/perfManage/kpiKeyTarget/index.vue index 50a09ed4..710b582f 100644 --- a/src/views/perfManage/kpiKeyTarget/index.vue +++ b/src/views/perfManage/kpiKeyTarget/index.vue @@ -36,12 +36,15 @@ const neInfoStore = useNeInfoStore(); //日期快捷选择 const ranges = ref([ { - label: t('views.perfManage.customTarget.new1Hour'), - value: [dayjs().startOf('day'), dayjs()], + label: t('views.perfManage.customTarget.toDay'), + value: [dayjs().startOf('hour'), dayjs()], }, { label: t('views.perfManage.customTarget.ago1Hour'), - value: [dayjs().subtract(1, 'hour').startOf('hour'), dayjs().endOf('hour')], + value: [ + dayjs().subtract(1, 'hour').startOf('hour'), + dayjs().subtract(1, 'hour').endOf('hour'), + ], }, // { // label: t('views.perfManage.customTarget.ago3Hour'), @@ -55,16 +58,22 @@ const ranges = ref([ label: t('views.perfManage.customTarget.ago1Day'), value: [ dayjs().subtract(1, 'day').startOf('day'), - dayjs().subtract(1, 'day'), + dayjs().subtract(1, 'day').endOf('day'), ], }, { label: t('views.perfManage.customTarget.ago7Day'), - value: [dayjs().subtract(7, 'day').startOf('day'), dayjs()], + value: [ + dayjs().subtract(7, 'day').startOf('day'), + dayjs().subtract(1, 'day').endOf('day'), + ], }, { label: t('views.perfManage.customTarget.ago15Day'), - value: [dayjs().subtract(15, 'day').startOf('day'), dayjs()], + value: [ + dayjs().subtract(15, 'day').startOf('day'), + dayjs().subtract(1, 'day').endOf('day'), + ], }, ]); //WebSocket连接 diff --git a/src/views/perfManage/kpiOverView/index.vue b/src/views/perfManage/kpiOverView/index.vue index 5181e5a0..e12f08a7 100644 --- a/src/views/perfManage/kpiOverView/index.vue +++ b/src/views/perfManage/kpiOverView/index.vue @@ -60,12 +60,15 @@ const ws = ref(null); //时间选择 const ranges = ref([ { - label: t('views.perfManage.customTarget.new1Hour'), + label: t('views.perfManage.customTarget.toDay'), value: [dayjs().startOf('day'), dayjs()], }, { label: t('views.perfManage.customTarget.ago1Hour'), - value: [dayjs().subtract(1, 'hour').startOf('hour'), dayjs().endOf('hour')], + value: [ + dayjs().subtract(1, 'hour').startOf('hour'), + dayjs().subtract(1, 'hour').endOf('hour'), + ], }, // { // label: t('views.perfManage.customTarget.ago3Hour'), @@ -79,16 +82,22 @@ const ranges = ref([ label: t('views.perfManage.customTarget.ago1Day'), value: [ dayjs().subtract(1, 'day').startOf('day'), - dayjs().subtract(1, 'day'), + dayjs().subtract(1, 'day').endOf('day'), ], }, { label: t('views.perfManage.customTarget.ago7Day'), - value: [dayjs().subtract(7, 'day').startOf('day'), dayjs()], + value: [ + dayjs().subtract(7, 'day').startOf('day'), + dayjs().subtract(1, 'day').endOf('day'), + ], }, { label: t('views.perfManage.customTarget.ago15Day'), - value: [dayjs().subtract(15, 'day').startOf('day'), dayjs()], + value: [ + dayjs().subtract(15, 'day').startOf('day'), + dayjs().subtract(1, 'day').endOf('day'), + ], }, ]); //日期范围响应式变量