reports.scss 9.2 KB

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