From 5244e541623818b8247982be9570c267864e1e94 Mon Sep 17 00:00:00 2001 From: hwj Date: Fri, 17 Apr 2026 14:04:05 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E9=A6=96=E9=A1=B5loading?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dashboard/PlanSection.vue | 12 ++++++++---- src/locales/en-US.js | 15 ++++++++++++++- src/locales/zh-CN.js | 15 ++++++++++++++- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/components/dashboard/PlanSection.vue b/src/components/dashboard/PlanSection.vue index 341f27d..a4a9f22 100644 --- a/src/components/dashboard/PlanSection.vue +++ b/src/components/dashboard/PlanSection.vue @@ -132,6 +132,7 @@ const startPickerRef = ref(null) const endPickerRef = ref(null) const currentFilter = ref('task') const currentRange = ref('year') +const isInitialLoad = ref(true) const filterColumns = computed(() => [ [ @@ -390,7 +391,8 @@ async function loadTrendData() { const res = await request({ url: '/admin-api/mes/baogong-record/trend', method: 'get', - params + params, + showLoading: !isInitialLoad.value }) const data = res?.data || {} trendData.baogongNum = data.baogongNum ?? 0 @@ -424,7 +426,8 @@ async function loadTaskTrendData() { const res = await request({ url: '/admin-api/mes/task/trend', method: 'get', - params + params, + showLoading: !isInitialLoad.value }) const data = res?.data || {} taskTrendData.totalNum = data.totalNum ?? 0 @@ -491,8 +494,9 @@ function loadData() { } } -onMounted(() => { - loadData() +onMounted(async () => { + await loadData() + isInitialLoad.value = false }) defineExpose({ loadData }) diff --git a/src/locales/en-US.js b/src/locales/en-US.js index ab004f6..e059774 100644 --- a/src/locales/en-US.js +++ b/src/locales/en-US.js @@ -99,7 +99,20 @@ export default { offlineCount: 'Offline', utilizationRate: 'Utilization', bootRate: 'Boot Rate', - faultRate: 'Fault Rate' + faultRate: 'Fault Rate', + rateTrend: 'Utilization / Boot Rate Trend', + onlyScheduled: 'Scheduled Only', + skipHoliday: 'Skip Holidays', + periodLastWeek: 'Last Week', + periodThisWeek: 'This Week', + periodLast7Days: 'Last 7 Days', + periodLastMonth: 'Last Month', + periodThisMonth: 'This Month', + utilizationRanking: 'Last 7 Days Utilization Ranking', + utilizationRateTrend: 'Utilization Rate', + deviceRateTrend: 'Single Device 7-Day Utilization/Boot Rate Trend', + selectDevice: 'Select Device', + selectDeviceHint: 'Please select a device to view trend' }, taskList: { taskType: 'Task Type', diff --git a/src/locales/zh-CN.js b/src/locales/zh-CN.js index bb75150..7561da4 100644 --- a/src/locales/zh-CN.js +++ b/src/locales/zh-CN.js @@ -99,7 +99,20 @@ export default { offlineCount: '离线', utilizationRate: '利用率', bootRate: '开机率', - faultRate: '故障率' + faultRate: '故障率', + rateTrend: '稼动率/开机率趋势', + onlyScheduled: '只统计排产设备', + skipHoliday: '跳过节假日', + periodLastWeek: '上周', + periodThisWeek: '本周', + periodLast7Days: '近7日', + periodLastMonth: '上月', + periodThisMonth: '本月', + utilizationRanking: '近7日平均稼动率排名', + utilizationRateTrend: '稼动率', + deviceRateTrend: '单设备近7日稼动率/开机率趋势', + selectDevice: '选择设备', + selectDeviceHint: '请选择设备查看趋势' }, taskList: { taskType: '任务类型',