diff --git a/src/config/api.js b/src/config/api.js index 9b4323b..fa5b3e7 100644 --- a/src/config/api.js +++ b/src/config/api.js @@ -1,7 +1,8 @@ // API配置文件 export const API_CONFIG = { // API服务器基础地址 - BASE_URL: 'http://192.168.110.38:8100', + // BASE_URL: 'http://192.168.110.38:8100', + BASE_URL: 'http://localhost:8100', // API端点 ENDPOINTS: { diff --git a/src/views/warehouse/WmsImportResult/index.vue b/src/views/warehouse/WmsImportResult/index.vue index b92753f..88e1c24 100644 --- a/src/views/warehouse/WmsImportResult/index.vue +++ b/src/views/warehouse/WmsImportResult/index.vue @@ -36,17 +36,16 @@ >帕累托分析 - 修改 + >项目分析 + 删除 + >趋势分析 - - + @@ -150,7 +149,7 @@ function handlePareto() { // 根据选择的时间范围计算开始和结束日期 const endDate = new Date(); const startDate = new Date(); - + if (queryForm.value.selectedTimeRange === '近1年') { startDate.setFullYear(endDate.getFullYear() - 1); } else if (queryForm.value.selectedTimeRange === '近2年') { @@ -158,7 +157,7 @@ function handlePareto() { } else if (queryForm.value.selectedTimeRange === '近3年') { startDate.setFullYear(endDate.getFullYear() - 3); } - + // 格式化日期为 YYYY-MM-DD const formatDate = (date) => { const year = date.getFullYear(); @@ -166,10 +165,10 @@ function handlePareto() { const day = String(date.getDate()).padStart(2, '0'); return `${year}-${month}-${day}`; }; - + const startDateStr = formatDate(startDate); const endDateStr = formatDate(endDate); - + // console.log(startDateStr, endDateStr); // 调用质检API并显示结果 fetch(`${API_CONFIG.BASE_URL}${API_CONFIG.ENDPOINTS.PARETO_ANALYSIS}?start_date=${startDateStr}&end_date=${endDateStr}`)