-
-
+
+
-
+
- 查询
+ {{$t('inAnalysis.query')}}
@@ -87,7 +87,7 @@ export default {
const response = await listWarehouse(this.queryWarehouseParam)
this.warehouseOptions = response.rows
} catch (error) {
- console.error('获取仓库列表失败:', error)
+ console.error(this.$t('inAnalysis.getWarehouseListFailed'), error) // 获取仓库列表失败
}
},
/** 设置最近七天时间范围 */
@@ -115,7 +115,7 @@ export default {
updateChart() {
const option = {
title: {
- text: '入库数量统计'
+ text: this.$t('inAnalysis.inboundQuantityStatistics') // 入库数量统计
},
tooltip: {
trigger: 'axis'
@@ -126,10 +126,10 @@ export default {
},
yAxis: {
type: 'value',
- name: '入库数量'
+ name: this.$t('inAnalysis.inboundQuantity') // 入库数量
},
series: [{
- name: '入库数量',
+ name: this.$t('inAnalysis.inboundQuantity'), // 入库数量
type: 'line',
data: this.chartData.series,
smooth: true
@@ -149,6 +149,12 @@ export default {
},
/** 处理查询按钮点击 */
async handleQuery() {
+ // 验证时间范围是否为空
+ if (!this.dateRange || this.dateRange.length === 0 || !this.dateRange[0] || !this.dateRange[1]) {
+ this.$message.warning(this.$t('inAnalysis.selectTimeRange')) // 请选择时间范围
+ return
+ }
+
try {
const response = await getInAnalysisData(this.queryParams)
if (response.code === 200) {
@@ -159,8 +165,8 @@ export default {
this.$message.error(response.msg)
}
} catch (error) {
- console.error('获取统计数据失败:', error)
- this.$message.error('获取统计数据失败')
+ console.error(this.$t('inAnalysis.getStatisticsDataFailed'), error) // 获取统计数据失败
+ this.$message.error(this.$t('inAnalysis.getStatisticsDataFailed')) // 获取统计数据失败
}
},
diff --git a/ruoyi-ui/src/views/kpi/outAnalysis/indexByTime.vue b/ruoyi-ui/src/views/kpi/outAnalysis/indexByTime.vue
index ab9528b..da891e4 100644
--- a/ruoyi-ui/src/views/kpi/outAnalysis/indexByTime.vue
+++ b/ruoyi-ui/src/views/kpi/outAnalysis/indexByTime.vue
@@ -1,8 +1,8 @@
-
-
+
+
-
+
- 查询
+ {{$t('outAnalysis.query')}}
@@ -87,7 +87,7 @@ export default {
const response = await listWarehouse(this.queryWarehouseParam)
this.warehouseOptions = response.rows
} catch (error) {
- console.error('获取仓库列表失败:', error)
+ console.error(this.$t('outAnalysis.getWarehouseListFailed'), error) // 获取仓库列表失败
}
},
/** 设置最近七天时间范围 */
@@ -115,7 +115,7 @@ export default {
updateChart() {
const option = {
title: {
- text: '出库数量统计'
+ text: this.$t('outAnalysis.outboundQuantityStatistics') // 出库数量统计
},
tooltip: {
trigger: 'axis'
@@ -126,10 +126,10 @@ export default {
},
yAxis: {
type: 'value',
- name: '出库数量'
+ name: this.$t('outAnalysis.outboundQuantity') // 出库数量
},
series: [{
- name: '出库数量',
+ name: this.$t('outAnalysis.outboundQuantity'), // 出库数量
type: 'line',
data: this.chartData.series,
smooth: true
@@ -149,6 +149,12 @@ export default {
},
/** 处理查询按钮点击 */
async handleQuery() {
+ // 验证时间范围是否为空
+ if (!this.dateRange || this.dateRange.length === 0 || !this.dateRange[0] || !this.dateRange[1]) {
+ this.$message.warning(this.$t('outAnalysis.selectTimeRange')) // 请选择时间范围
+ return
+ }
+
try {
const response = await getInAnalysisData(this.queryParams)
if (response.code === 200) {
@@ -159,8 +165,8 @@ export default {
this.$message.error(response.msg)
}
} catch (error) {
- console.error('获取统计数据失败:', error)
- this.$message.error('获取统计数据失败')
+ console.error(this.$t('outAnalysis.getStatisticsDataFailed'), error) // 获取统计数据失败
+ this.$message.error(this.$t('outAnalysis.getStatisticsDataFailed')) // 获取统计数据失败
}
},
diff --git a/ruoyi-ui/src/views/kpi/spacePlan/index.vue b/ruoyi-ui/src/views/kpi/spacePlan/index.vue
index 2a2e605..0b7f174 100644
--- a/ruoyi-ui/src/views/kpi/spacePlan/index.vue
+++ b/ruoyi-ui/src/views/kpi/spacePlan/index.vue
@@ -4,7 +4,7 @@
-
+