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: '任务类型',