載入評審結果中...
"use client" import { useState, useEffect } from "react" import { Sidebar } from "@/components/sidebar" import { Button } from "@/components/ui/button" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { Progress } from "@/components/ui/progress" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, PieChart, Pie, Cell, RadarChart, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar, } from "recharts" import { Download, Share2, TrendingUp, AlertCircle, CheckCircle, Star } from "lucide-react" import { useToast } from "@/hooks/use-toast" // 模擬評分結果數據 const mockResults = { projectTitle: "產品介紹簡報", overallScore: 82, totalPossible: 100, grade: "B+", analysisDate: "2024-01-15", criteria: [ { name: "內容品質", score: 8.5, maxScore: 10, weight: 25, weightedScore: 21.25, feedback: "內容結構清晰,資訊豐富且準確。建議增加更多實際案例來支撐論點。", strengths: ["邏輯清晰", "資料準確", "結構完整"], improvements: ["增加案例", "深化分析"], }, { name: "視覺設計", score: 7.8, maxScore: 10, weight: 20, weightedScore: 15.6, feedback: "整體設計風格統一,色彩搭配合理。部分頁面文字密度過高,影響閱讀體驗。", strengths: ["風格統一", "色彩協調", "版面整潔"], improvements: ["減少文字密度", "增加視覺元素"], }, { name: "邏輯結構", score: 8.8, maxScore: 10, weight: 20, weightedScore: 17.6, feedback: "邏輯架構非常清晰,各章節銜接自然,論述層次分明。", strengths: ["邏輯清晰", "結構完整", "銜接自然"], improvements: ["可增加總結回顧"], }, { name: "創新性", score: 7.2, maxScore: 10, weight: 15, weightedScore: 10.8, feedback: "內容具有一定創新性,但可以更大膽地提出獨特觀點和解決方案。", strengths: ["思路新穎", "角度獨特"], improvements: ["增加創新元素", "提出獨特見解"], }, { name: "實用性", score: 8.3, maxScore: 10, weight: 20, weightedScore: 16.6, feedback: "內容實用性強,提供的解決方案具有可操作性,對目標受眾有實際價值。", strengths: ["實用性強", "可操作性好", "價值明確"], improvements: ["增加實施步驟"], }, ], } // 圖表數據將在組件內部動態生成 const COLORS = ["#0891b2", "#6366f1", "#f59e0b", "#dc2626", "#10b981"] export default function ResultsPage() { const [activeTab, setActiveTab] = useState("overview") const [evaluationData, setEvaluationData] = useState(null) const [isLoading, setIsLoading] = useState(true) const { toast } = useToast() useEffect(() => { // 從 localStorage 獲取評審結果 const storedData = localStorage.getItem('evaluationResult') if (storedData) { try { const data = JSON.parse(storedData) setEvaluationData(data) } catch (error) { console.error('解析評審結果失敗:', error) toast({ title: "數據錯誤", description: "無法載入評審結果,請重新進行評審", variant: "destructive", }) } } else { toast({ title: "無評審結果", description: "請先進行評審以查看結果", variant: "destructive", }) } setIsLoading(false) }, [toast]) // 如果正在載入,顯示載入狀態 if (isLoading) { return (
載入評審結果中...
沒有找到評審結果
{safeResults.projectTitle} - 分析完成於 {safeResults.analysisDate}
{item.feedback}
{strength.description}
{improvement.description}
{action.description}