report.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>车辆诊断报告</title>
  7. <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
  8. <style>
  9. body {
  10. font-family: Arial, sans-serif;
  11. }
  12. h1, h2, h3 {
  13. margin-top: 20px;
  14. }
  15. /* 诊断报告标题 */
  16. .report-title {
  17. font-size: 28px; /* 调整字体大小 */
  18. font-weight: bold;
  19. color: #365697;
  20. text-align: center;
  21. }
  22. /* 时间 */
  23. .report-time {
  24. font-size: 20px; /* 调整字体大小 */
  25. color: #365697;
  26. text-align: center;
  27. }
  28. .vehicle-info, .diagnosis-details, .company-info {
  29. margin-top: 20px;
  30. background-color: #EBF1FA;
  31. border-radius: 5px;
  32. padding: 10px;
  33. }
  34. .vehicle-info h2{
  35. background-color: #406DB7;
  36. color: #FFFFFF;
  37. font-size: 24px; /* 调整字体大小 */
  38. font-weight: bold;
  39. text-align: center;
  40. margin: 0 auto;
  41. padding: 10px;
  42. width: 200px;
  43. border-bottom-left-radius: 8px;
  44. border-bottom-right-radius: 8px;
  45. }
  46. .fan h3{
  47. background-color: #406DB7;
  48. color: #FFFFFF;
  49. font-size: 24px; /* 调整字体大小 */
  50. font-weight: bold;
  51. text-align: left;
  52. padding: 10px;
  53. width: 500px;
  54. margin-top: 40px;
  55. margin-left: -10px;
  56. border-top-right-radius: 8px; /* 设置顶部右上角的圆角半径为20像素 */
  57. }
  58. .diagnosis-details h2, .company-info h2 {
  59. background-color: #406DB7;
  60. color: #FFFFFF;
  61. font-size: 24px; /* 调整字体大小 */
  62. font-weight: bold;
  63. text-align: center;
  64. padding: 10px;
  65. width: 120px;
  66. margin: 0 auto;
  67. border-bottom-left-radius: 8px;
  68. border-bottom-right-radius: 8px;
  69. }
  70. ul {
  71. list-style-type: none;
  72. padding-left: 0;
  73. font-size: 16px; /* 调整字体大小 */
  74. color: #e50909;
  75. }
  76. li {
  77. margin-bottom: 5px;
  78. }
  79. .diagnosis-details {
  80. margin-top: 10px;
  81. }
  82. .diagnosis-details h2 {
  83. margin-top: -10px;
  84. align-content: center;
  85. }
  86. .diagnosis-details table, .diagnosis-details th, .diagnosis-details td {
  87. border-collapse: collapse;
  88. padding: 8px;
  89. text-align: left;
  90. font-size: 16px; /* 调整字体大小 */
  91. color: #000000;
  92. }
  93. .diagnosis-details th, .diagnosis-details td {
  94. border: none;
  95. }
  96. .diagnosis-details th {
  97. font-weight: bold;
  98. }
  99. .diagnosis-details td {
  100. padding-right: 30px; /* 调整两列之间的间距 */
  101. }
  102. .diagnosis-details .fault-code {
  103. color: #e50909; /* 设置故障码字体颜色为红色 */
  104. }
  105. .company-info {
  106. margin-top: 10px;
  107. padding: 10px;
  108. background-color: #EBF1FA;
  109. border-radius: 5px;
  110. }
  111. .company-info p {
  112. font-size: 20px; /* 调整字体大小 */
  113. color: #888888;
  114. }
  115. .company-info tr {
  116. font-size: 20px; /* 调整字体大小 */
  117. color: #000000;
  118. }
  119. .company-info td{
  120. color: #888888;
  121. font-size: 20px;
  122. }
  123. .vehicle-info table {
  124. font-size: 20px; /* 调整车辆信息表格内字体大小 */
  125. }
  126. .disclaimer {
  127. font-size: 16px; /* 调整字体大小 */
  128. color: #888888;
  129. margin-left: 10px;
  130. margin-top: 10px;
  131. }
  132. /* 添加样式以美化页面 */
  133. .edit-form {
  134. position: fixed;
  135. top: 50%;
  136. left: 50%;
  137. transform: translate(-50%, -50%);
  138. background-color: #f9f9f9;
  139. padding: 20px;
  140. border: 1px solid #ccc;
  141. border-radius: 5px;
  142. z-index: 9999;
  143. }
  144. #vinInput{
  145. background-color: #ECF1FA;
  146. }
  147. #yearInput{
  148. background-color: #ECF1FA;
  149. }
  150. #mileageInput{
  151. background-color: #ECF1FA;
  152. }
  153. #companyInput{
  154. background-color: #ECF1FA;
  155. }
  156. #phoneInput{
  157. background-color: #ECF1FA;
  158. }
  159. #addressInput{
  160. background-color: #ECF1FA;
  161. }
  162. </style>
  163. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
  164. <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"></script>
  165. <script src="https://wl-resource.obs.cn-south-1.myhuaweicloud.com:443/static/axios.min.js"></script>
  166. </head>
  167. <body>
  168. <div class="vehicle-info">
  169. <h1 class="report-title">${mainTitle}</h1>
  170. <p class="report-time">- ${reportTime} -</p>
  171. </div>
  172. <div class="vehicle-info">
  173. <div>
  174. <h2>${carInfoTitle}</h2>
  175. </div>
  176. <table>
  177. <tr>
  178. <td>${vin}:</td>
  179. <td id="vin" style="padding-left: 180px">
  180. <#if baseMap["车架号"]?has_content>
  181. ${baseMap["车架号"]}
  182. <#else>
  183. </#if>
  184. </td>
  185. </tr>
  186. <tr>
  187. <td>${modelYear}:</td>
  188. <td id="year" style="padding-left: 180px">
  189. <#if baseMap["年款"]?has_content>
  190. ${baseMap["年款"]}
  191. <#else>
  192. </#if>
  193. </td>
  194. </tr>
  195. <tr>
  196. <td>${mileage}:</td>
  197. <td id="mileage" style="padding-left: 180px">
  198. <#if baseMap["里程"]?has_content>
  199. ${baseMap["里程"]}
  200. <#else>
  201. </#if>
  202. </td>
  203. </tr>
  204. <tr>
  205. <td>${diagnosticPath}:</td>
  206. <td style="padding-left: 180px">${baseMap["诊断路径"]}</td>
  207. </tr>
  208. <tr>
  209. <td>${repairNum}:</td>
  210. <td style="padding-left: 180px">${baseMap["报告编号"]}</td>
  211. </tr>
  212. <tr>
  213. <td>${SN}:</td>
  214. <td style="padding-left: 180px">${baseMap["SN"]}</td>
  215. </tr>
  216. </table>
  217. </div>
  218. <div class="diagnosis-details">
  219. <h2>${diagnosticDetailsTitle}</h2>
  220. <#list controlListMap as controlMap>
  221. <div style="display: flex;">
  222. <div class="fan"><h3>${controlMap.getName()}</h3></div>
  223. <div style="margin-top: 83px;width: 10000px;margin-right: 50px"><hr color="#406DB7"></div>
  224. </div>
  225. <div class="company-info">
  226. <p>${faultCodeTitle}(
  227. <#if controlMap.getFaultCodeMap()?size != 0 >
  228. ${controlMap.getFaultCodeMap()?size}
  229. <#else>
  230. 0
  231. </#if>
  232. )</p>
  233. </div>
  234. <table class="fault-code">
  235. <#list controlMap.getFaultCodeMap()?keys as key>
  236. <tr>
  237. <td style="color: #e50909">${key}</td>
  238. <td style="color: #e50909">
  239. <#if controlMap.getFaultCodeMap()[key].description?has_content>
  240. ${controlMap.getFaultCodeMap()[key].description}
  241. <#else>
  242. </#if>
  243. </td>
  244. <td style="color: #e50909">
  245. <#if controlMap.getFaultCodeMap()[key].status?has_content>
  246. ${controlMap.getFaultCodeMap()[key].status}
  247. <#else>
  248. </#if>
  249. </td>
  250. </tr>
  251. </#list>
  252. </table>
  253. <div class="vehicle-info">
  254. <p>${versionInfoTitle}(
  255. <#if controlMap.getVersionMap()?size != 0 >
  256. ${controlMap.getVersionMap()?size}
  257. <#else>
  258. 0
  259. </#if>
  260. )</p>
  261. </div>
  262. <table>
  263. <#list controlMap.getVersionMap()?keys as key>
  264. <tr>
  265. <td>${key}</td>
  266. <td style="padding-left: 190px">${controlMap.getVersionMap()[key]}</td>
  267. </tr>
  268. </#list>
  269. </table>
  270. </#list>
  271. </div>
  272. <div class="company-info">
  273. <table>
  274. <tr>
  275. <td>${company}:</td>
  276. <td id="company" style="padding-left: 180px">
  277. <#if companyMap["公司"]?has_content>
  278. ${companyMap["公司"]}
  279. <#else>
  280. </#if>
  281. </td>
  282. </tr>
  283. <tr>
  284. <td>${telephone}:</td>
  285. <td id="phone" style="padding-left: 180px">
  286. <#if companyMap["电话"]?has_content>
  287. ${companyMap["电话"]}
  288. <#else>
  289. </#if>
  290. </td>
  291. </tr>
  292. <tr>
  293. <td>${address}:</td>
  294. <td id="address" style="padding-left: 180px">
  295. <#if companyMap["地址"]?has_content>
  296. ${companyMap["地址"]}
  297. <#else>
  298. </#if>
  299. </td>
  300. </tr>
  301. </table>
  302. <p STYLE="font-size: 15px"><text style="color: red">*</text>${message}</p>
  303. </div>
  304. </body>
  305. </html>