answer-report.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>答题结果通知</title>
  7. <style th:inline="text">
  8. /* 基础样式 */
  9. .email-container {
  10. width: 100% !important;
  11. max-width: 600px;
  12. margin: 0 auto;
  13. font-family: 'Segoe UI', Tahoma, sans-serif;
  14. background: #f5f5f5;
  15. /*padding: 20px 0;*/
  16. }
  17. /* 响应式调整 */
  18. @media only screen and (max-width: 480px) {
  19. .mobile-adjust { padding: 12px 15px !important; }
  20. .section-title { font-size: 18px !important; }
  21. .info-card { padding: 12px !important; }
  22. .score-container { gap: 10px !important; }
  23. .score-box { padding: 12px !important; }
  24. .final-score { padding: 15px !important;}
  25. .time-record td { padding: 4px 0 !important; }
  26. .system-alert { margin: 16px 0 !important; }
  27. .action-button { padding: 12px 24px !important; }
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <div class="email-container">
  33. <table role="presentation" style="width:100%;border-collapse:collapse;">
  34. <tr>
  35. <td class="mobile-adjust" style="padding:20px;background:white;">
  36. <!-- 头部信息 -->
  37. <div style="border-bottom:2px solid #2196F3; padding-bottom:12px; margin-bottom:16px;">
  38. <h2 class="section-title" style="margin:0;font-size:24px;">✅ 答题结束通知</h2>
  39. <p style="color:#7f8c8d; margin:6px 0; font-size:14px;">
  40. 用户:<strong th:text="${user.userName}"></strong> | 工号:<span th:text="${user.jobNo}"></span>
  41. </p>
  42. </div>
  43. <!-- 答题概览 -->
  44. <div style="margin-bottom:20px;">
  45. <div class="section-title" style="color:#2c3e50;font-size:20px;margin-bottom:12px;">📝 答题概览</div>
  46. <div class="info-card" style="background:#f8f9fa;padding:15px;border-radius:8px;">
  47. <p style="margin:4px 0;font-size:14px;">
  48. <span style="color:#7f8c8d;">模式:</span>
  49. <span th:text="${answer.batchFlag} ? '批量模式' : '单用户模式'"></span>
  50. </p>
  51. <p style="margin:4px 0;font-size:14px;">
  52. <span style="color:#7f8c8d;">工种:</span>
  53. <span style="color:#2196F3;font-weight:600;" th:text="${answer.jobTypeName}"></span>
  54. </p>
  55. </div>
  56. </div>
  57. <!-- 分数区块 -->
  58. <div class="score-container" style="display:flex;gap:15px;margin-bottom:20px;">
  59. <div th:each="score : ${scores}" class="score-box"
  60. style="flex:1;background:#f3f5f7;padding:15px;border-radius:8px;box-sizing:border-box;">
  61. <p style="margin:2px 0;color:#7f8c8d;font-size:14px;"
  62. th:text="${score.type}"></p>
  63. <p th:style="'font-size:20px;font-weight:600; margin:6px 0; color:' + ${score.color}"
  64. th:text="${score.value}"></p>
  65. </div>
  66. </div>
  67. <!-- 增长分数 -->
  68. <div class="score-box" style="text-align:center;background:#4CAF50;padding:15px;border-radius:8px;">
  69. <p style="margin:0;color:white;font-size:16px;font-weight:bold;">
  70. +<span th:text="${user.addScores}"></span> 分数增长
  71. </p>
  72. </div>
  73. <!-- 最终分数 -->
  74. <div class="final-score" style="text-align:center;background:white;padding:20px;margin:20px 0;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.1);">
  75. <p style="margin:4px 0;color:#7f8c8d;font-size:14px;">最终得分</p>
  76. <p style="font-size:32px;margin:8px 0;color:#4CAF50;font-weight:800;"
  77. th:text="${user.finalScore}"></p>
  78. </div>
  79. <!-- 时间记录 -->
  80. <div>
  81. <div class="section-title" style="color:#2c3e50;font-size:20px;margin:12px 0;">⏱ 时间记录</div>
  82. <table class="time-record" style="width:100%;font-size:14px;">
  83. <tr th:each="time : ${times}">
  84. <td style="padding:4px 0;color:#2196F3;">▸</td>
  85. <td style="padding:4px 0;"
  86. th:text="${time.label} + ':' + ${time.value}"></td>
  87. </tr>
  88. </table>
  89. </div>
  90. <!-- 系统提示 -->
  91. <div th:if="${exception}" class="system-alert" style="margin:25px 0;padding:15px;background:#fff3e0;border-radius:8px;">
  92. <p style="margin:4px 0;color:#EF6C00;font-size:14px;">
  93. 终止事件:<span th:text="${exception.message}"></span>
  94. </p>
  95. </div>
  96. <!-- 操作按钮 -->
  97. <div style="text-align:center;margin-top:30px;">
  98. <a th:href="@{${serverIp}/answer}" class="action-button"
  99. style="display:inline-block;background:#2196F3;color:white!important;padding:16px 40px;text-decoration:none;border-radius:30px;font-size:16px;letter-spacing:1px;min-width:200px;">
  100. 🚀 前往答题系统查看
  101. </a>
  102. </div>
  103. </td>
  104. </tr>
  105. </table>
  106. </div>
  107. </body>
  108. </html>