reports.scss 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. .reports-container {
  2. padding: 20px;
  3. max-width: 1400px;
  4. margin: 0 auto;
  5. }
  6. .reports-header {
  7. margin-bottom: 30px;
  8. text-align: center;
  9. }
  10. .header-top {
  11. margin-bottom: 20px;
  12. text-align: left;
  13. }
  14. .back-to-dashboard-btn {
  15. display: inline-flex;
  16. align-items: center;
  17. gap: 6px;
  18. padding: 8px 16px;
  19. background-color: #F2F3F5;
  20. color: #1D2129;
  21. border: 1px solid #E5E6EB;
  22. border-radius: 8px;
  23. font-size: 14px;
  24. font-weight: 500;
  25. cursor: pointer;
  26. transition: all 0.2s ease-in-out;
  27. text-decoration: none;
  28. min-height: 40px;
  29. white-space: nowrap;
  30. }
  31. .back-to-dashboard-btn:hover {
  32. background-color: #F7F8FA;
  33. color: #1D2129;
  34. border-color: rgba(22, 93, 255, 0.3);
  35. transform: translateY(-1px);
  36. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  37. }
  38. .back-to-dashboard-btn:active {
  39. transform: translateY(0);
  40. background-color: #F2F3F5;
  41. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  42. }
  43. .reports-header h1 {
  44. font-size: 28px;
  45. font-weight: 600;
  46. margin-bottom: 8px;
  47. color: #333;
  48. }
  49. .reports-header p {
  50. font-size: 16px;
  51. color: #666;
  52. margin: 0;
  53. }
  54. /* 报表参数设置区域 */
  55. .reports-params {
  56. margin-bottom: 30px;
  57. }
  58. .params-card {
  59. background-color: #fff;
  60. border-radius: 12px;
  61. padding: 24px;
  62. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  63. border: 1px solid #e0e0e0;
  64. }
  65. .params-card h2 {
  66. font-size: 20px;
  67. font-weight: 600;
  68. margin-bottom: 20px;
  69. color: #333;
  70. }
  71. .params-grid {
  72. display: grid;
  73. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  74. gap: 16px;
  75. margin-bottom: 24px;
  76. }
  77. .param-item {
  78. display: flex;
  79. flex-direction: column;
  80. gap: 6px;
  81. }
  82. .param-item label {
  83. font-size: 14px;
  84. font-weight: 500;
  85. color: #555;
  86. }
  87. .form-select,
  88. .form-input {
  89. padding: 10px 12px;
  90. border: 1px solid #ddd;
  91. border-radius: 6px;
  92. font-size: 14px;
  93. transition: all 0.3s ease;
  94. background-color: #fff;
  95. }
  96. .form-select:focus,
  97. .form-input:focus {
  98. outline: none;
  99. border-color: #4a90e2;
  100. box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
  101. }
  102. .params-actions {
  103. display: flex;
  104. gap: 12px;
  105. justify-content: flex-end;
  106. flex-wrap: wrap;
  107. }
  108. /* 按钮样式 */
  109. .btn-primary,
  110. .btn-secondary,
  111. .btn-outline {
  112. padding: 10px 20px;
  113. border: none;
  114. border-radius: 6px;
  115. font-size: 14px;
  116. font-weight: 500;
  117. cursor: pointer;
  118. transition: all 0.3s ease;
  119. display: flex;
  120. align-items: center;
  121. gap: 6px;
  122. }
  123. .btn-primary {
  124. background-color: #4a90e2;
  125. color: white;
  126. }
  127. .btn-primary:hover:not(:disabled) {
  128. background-color: #357abd;
  129. transform: translateY(-1px);
  130. }
  131. .btn-primary:disabled {
  132. background-color: #ccc;
  133. cursor: not-allowed;
  134. transform: none;
  135. }
  136. .btn-secondary {
  137. background-color: #28a745;
  138. color: white;
  139. }
  140. .btn-secondary:hover:not(:disabled) {
  141. background-color: #218838;
  142. transform: translateY(-1px);
  143. }
  144. .btn-secondary:disabled {
  145. background-color: #ccc;
  146. cursor: not-allowed;
  147. transform: none;
  148. }
  149. .btn-outline {
  150. background-color: transparent;
  151. color: #666;
  152. border: 1px solid #ddd;
  153. }
  154. .btn-outline:hover {
  155. background-color: #f5f5f5;
  156. border-color: #4a90e2;
  157. color: #4a90e2;
  158. }
  159. .btn-icon {
  160. background: none;
  161. border: none;
  162. cursor: pointer;
  163. padding: 8px;
  164. border-radius: 4px;
  165. color: #666;
  166. transition: all 0.3s ease;
  167. }
  168. .btn-icon:hover {
  169. background-color: #f5f5f5;
  170. color: #4a90e2;
  171. }
  172. /* 报表结果展示区域 */
  173. .reports-result {
  174. margin-bottom: 40px;
  175. background-color: #fff;
  176. border-radius: 12px;
  177. padding: 24px;
  178. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  179. border: 1px solid #e0e0e0;
  180. animation: fadeIn 0.5s ease;
  181. }
  182. @keyframes fadeIn {
  183. from {
  184. opacity: 0;
  185. transform: translateY(10px);
  186. }
  187. to {
  188. opacity: 1;
  189. transform: translateY(0);
  190. }
  191. }
  192. .result-header {
  193. margin-bottom: 24px;
  194. border-bottom: 1px solid #eee;
  195. padding-bottom: 16px;
  196. }
  197. .result-header h2 {
  198. font-size: 22px;
  199. font-weight: 600;
  200. margin-bottom: 8px;
  201. color: #333;
  202. }
  203. .result-meta {
  204. display: flex;
  205. gap: 20px;
  206. flex-wrap: wrap;
  207. font-size: 13px;
  208. color: #666;
  209. }
  210. /* 汇总卡片 */
  211. .summary-cards {
  212. display: grid;
  213. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  214. gap: 16px;
  215. margin-bottom: 32px;
  216. }
  217. .summary-card {
  218. background-color: #f8f9fa;
  219. border-radius: 8px;
  220. padding: 20px;
  221. display: flex;
  222. align-items: center;
  223. gap: 12px;
  224. transition: all 0.3s ease;
  225. border: 1px solid #e9ecef;
  226. }
  227. .summary-card:hover {
  228. transform: translateY(-2px);
  229. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  230. }
  231. .summary-icon {
  232. font-size: 24px;
  233. }
  234. .summary-content {
  235. flex: 1;
  236. }
  237. .summary-label {
  238. font-size: 13px;
  239. color: #666;
  240. margin-bottom: 4px;
  241. }
  242. .summary-value {
  243. font-size: 20px;
  244. font-weight: 600;
  245. color: #333;
  246. }
  247. .summary-value.profit {
  248. color: #28a745;
  249. }
  250. /* 图表容器 */
  251. .chart-container {
  252. background-color: #fafbfc;
  253. border-radius: 8px;
  254. padding: 20px;
  255. border: 1px solid #e9ecef;
  256. .role-warning {
  257. margin: 8px 0 12px;
  258. padding: 10px 12px;
  259. background: #fff7e6;
  260. border: 1px solid #ffe7ba;
  261. color: #ad6800;
  262. border-radius: 6px;
  263. font-size: 13px;
  264. }
  265. }
  266. .chart-header {
  267. display: flex;
  268. justify-content: space-between;
  269. align-items: center;
  270. margin-bottom: 20px;
  271. flex-wrap: wrap;
  272. gap: 16px;
  273. }
  274. .chart-header h3 {
  275. font-size: 18px;
  276. font-weight: 600;
  277. color: #333;
  278. margin: 0;
  279. }
  280. .chart-legend {
  281. display: flex;
  282. gap: 16px;
  283. flex-wrap: wrap;
  284. }
  285. .legend-item {
  286. display: flex;
  287. align-items: center;
  288. gap: 6px;
  289. font-size: 13px;
  290. color: #666;
  291. }
  292. .legend-color {
  293. width: 12px;
  294. height: 12px;
  295. border-radius: 50%;
  296. flex-shrink: 0;
  297. }
  298. /* 柱状图 */
  299. .bar-chart {
  300. display: flex;
  301. gap: 16px;
  302. align-items: flex-end;
  303. height: 300px;
  304. padding: 20px 0;
  305. position: relative;
  306. }
  307. .bar-item {
  308. flex: 1;
  309. background-color: #4a90e2;
  310. border-radius: 6px 6px 0 0;
  311. position: relative;
  312. transition: all 0.3s ease;
  313. cursor: pointer;
  314. min-width: 40px;
  315. }
  316. .bar-item:hover {
  317. opacity: 0.9;
  318. transform: translateY(-2px);
  319. }
  320. .bar-label {
  321. position: absolute;
  322. bottom: -30px;
  323. left: 50%;
  324. transform: translateX(-50%);
  325. font-size: 12px;
  326. color: #666;
  327. white-space: nowrap;
  328. overflow: hidden;
  329. text-overflow: ellipsis;
  330. max-width: 100%;
  331. }
  332. .bar-value {
  333. position: absolute;
  334. top: -30px;
  335. left: 50%;
  336. transform: translateX(-50%);
  337. font-size: 13px;
  338. font-weight: 600;
  339. color: #333;
  340. background-color: #fff;
  341. padding: 4px 8px;
  342. border-radius: 4px;
  343. white-space: nowrap;
  344. }
  345. /* 饼图 */
  346. .pie-chart {
  347. display: flex;
  348. justify-content: center;
  349. padding: 20px;
  350. }
  351. .pie-container {
  352. width: 300px;
  353. height: 300px;
  354. border-radius: 50%;
  355. position: relative;
  356. overflow: hidden;
  357. }
  358. .pie-slice {
  359. position: absolute;
  360. width: 100%;
  361. height: 100%;
  362. transform-origin: center;
  363. }
  364. /* 表格 */
  365. .table-container {
  366. overflow-x: auto;
  367. }
  368. .data-table {
  369. width: 100%;
  370. border-collapse: collapse;
  371. background-color: #fff;
  372. border-radius: 8px;
  373. overflow: hidden;
  374. }
  375. .data-table th {
  376. background-color: #f8f9fa;
  377. padding: 12px 16px;
  378. text-align: left;
  379. font-weight: 600;
  380. font-size: 14px;
  381. color: #333;
  382. border-bottom: 2px solid #e9ecef;
  383. }
  384. .data-table td {
  385. padding: 12px 16px;
  386. font-size: 14px;
  387. color: #555;
  388. border-bottom: 1px solid #f0f0f0;
  389. }
  390. .data-table tr:last-child td {
  391. border-bottom: none;
  392. }
  393. .data-table tr:hover {
  394. background-color: #f8f9fa;
  395. }
  396. .table-total {
  397. background-color: #f8f9fa;
  398. font-weight: 600;
  399. }
  400. .table-label {
  401. display: flex;
  402. align-items: center;
  403. gap: 8px;
  404. }
  405. .label-color {
  406. width: 8px;
  407. height: 8px;
  408. border-radius: 50%;
  409. flex-shrink: 0;
  410. }
  411. /* 历史报表 */
  412. .historical-reports {
  413. background-color: #fff;
  414. border-radius: 12px;
  415. padding: 24px;
  416. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  417. border: 1px solid #e0e0e0;
  418. }
  419. .history-header {
  420. display: flex;
  421. justify-content: space-between;
  422. align-items: center;
  423. margin-bottom: 20px;
  424. }
  425. .history-header h2 {
  426. font-size: 20px;
  427. font-weight: 600;
  428. color: #333;
  429. margin: 0;
  430. }
  431. .history-count {
  432. font-size: 14px;
  433. color: #666;
  434. background-color: #f8f9fa;
  435. padding: 4px 12px;
  436. border-radius: 16px;
  437. }
  438. .history-list {
  439. display: flex;
  440. flex-direction: column;
  441. gap: 12px;
  442. }
  443. .history-item {
  444. display: flex;
  445. align-items: center;
  446. gap: 16px;
  447. padding: 16px;
  448. border: 1px solid #e9ecef;
  449. border-radius: 8px;
  450. cursor: pointer;
  451. transition: all 0.3s ease;
  452. background-color: #fafbfc;
  453. }
  454. .history-item:hover {
  455. background-color: #f0f2f5;
  456. border-color: #4a90e2;
  457. transform: translateX(2px);
  458. }
  459. .history-icon {
  460. font-size: 20px;
  461. flex-shrink: 0;
  462. }
  463. .history-content {
  464. flex: 1;
  465. min-width: 0;
  466. }
  467. .history-title {
  468. font-size: 15px;
  469. font-weight: 500;
  470. color: #333;
  471. margin-bottom: 4px;
  472. white-space: nowrap;
  473. overflow: hidden;
  474. text-overflow: ellipsis;
  475. }
  476. .history-meta {
  477. display: flex;
  478. gap: 12px;
  479. font-size: 12px;
  480. color: #666;
  481. }
  482. .history-actions {
  483. flex-shrink: 0;
  484. }
  485. /* 响应式设计 */
  486. @media (max-width: 768px) {
  487. .reports-container {
  488. padding: 16px;
  489. }
  490. .params-grid {
  491. grid-template-columns: 1fr;
  492. }
  493. .params-actions {
  494. justify-content: center;
  495. }
  496. .summary-cards {
  497. grid-template-columns: 1fr 1fr;
  498. }
  499. .result-meta {
  500. flex-direction: column;
  501. gap: 8px;
  502. }
  503. .bar-chart {
  504. height: 200px;
  505. flex-direction: column;
  506. align-items: stretch;
  507. }
  508. .bar-item {
  509. min-height: 40px;
  510. }
  511. .pie-container {
  512. width: 200px;
  513. height: 200px;
  514. }
  515. }
  516. @media (max-width: 480px) {
  517. .summary-cards {
  518. grid-template-columns: 1fr;
  519. }
  520. .params-actions {
  521. flex-direction: column;
  522. }
  523. .chart-header {
  524. flex-direction: column;
  525. align-items: flex-start;
  526. }
  527. .chart-legend {
  528. justify-content: flex-start;
  529. }
  530. }