diff --git a/ruoyi-ui/src/views/ccdiProject/index.vue b/ruoyi-ui/src/views/ccdiProject/index.vue index acf3d0e..4b3c25d 100644 --- a/ruoyi-ui/src/views/ccdiProject/index.vue +++ b/ruoyi-ui/src/views/ccdiProject/index.vue @@ -132,17 +132,19 @@ export default { this.total = listResponse.total // 处理状态统计 - const counts = countsResponse.data + const counts = countsResponse.data || {} this.tabCounts = { - all: counts.all, - '0': counts.status0, - '1': counts.status1, - '2': counts.status2 + all: counts.all || 0, + '0': counts.status0 || 0, + '1': counts.status1 || 0, + '2': counts.status2 || 0 } this.loading = false - }).catch(() => { + }).catch((error) => { this.loading = false + console.error('加载数据失败:', error) + this.$modal.msgError('加载数据失败,请稍后重试') }) }, /** 搜索按钮操作 */