()
| 74 | } |
| 75 | |
| 76 | async function loadAnalysisData() { |
| 77 | if (!currentSessionId.value) return |
| 78 | |
| 79 | isLoading.value = true |
| 80 | |
| 81 | try { |
| 82 | const filter = timeFilter.value |
| 83 | |
| 84 | const adapter = useDataService() |
| 85 | const [members, hourly, daily, types] = await Promise.all([ |
| 86 | adapter.getMemberActivity(currentSessionId.value, filter), |
| 87 | adapter.getHourlyActivity(currentSessionId.value, filter), |
| 88 | adapter.getDailyActivity(currentSessionId.value, filter), |
| 89 | adapter.getMessageTypeDistribution(currentSessionId.value, filter), |
| 90 | ]) |
| 91 | |
| 92 | memberActivity.value = members |
| 93 | hourlyActivity.value = hourly |
| 94 | dailyActivity.value = daily |
| 95 | messageTypes.value = types |
| 96 | } catch (error) { |
| 97 | console.error('加载分析数据失败:', error) |
| 98 | } finally { |
| 99 | isLoading.value = false |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | async function loadData() { |
| 104 | if (!currentSessionId.value) return |
no test coverage detected