table.scss 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /* 添加卡片占满容器的样式 */
  2. .tcs-card-full {
  3. flex: 1;
  4. display: flex;
  5. flex-direction: column;
  6. margin-bottom: 0;
  7. overflow: hidden;
  8. }
  9. /* 让卡片体占满剩余空间并允许滚动 */
  10. .tcs-card-full .card-body {
  11. flex: 1;
  12. overflow: hidden;
  13. padding: 0;
  14. position: relative; /* 添加相对定位 */
  15. }
  16. /* 修改表格响应式容器样式 */
  17. .tcs-card-full .table-responsive {
  18. position: absolute; /* 使用绝对定位 */
  19. top: 0;
  20. left: 0;
  21. right: 0;
  22. bottom: 0;
  23. overflow-y: auto;
  24. overflow-x: auto;
  25. }
  26. /* 固定表头 */
  27. .tcs-card-full .table thead {
  28. position: sticky;
  29. top: 0;
  30. z-index: 1;
  31. background-color: var(--tblr-bg-surface);
  32. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
  33. }
  34. /* 确保表格占满容器宽度 */
  35. .tcs-card-full .table {
  36. margin-bottom: 0;
  37. width: 100%;
  38. border-collapse: separate; /* 确保边框正确显示 */
  39. border-spacing: 0;
  40. }
  41. /* 确保表格行有边框 */
  42. .tcs-card-full .table tbody tr {
  43. border-bottom: 1px solid var(--tblr-border-color);
  44. }
  45. /* 设置表格行悬停效果 */
  46. .tcs-card-full .table tbody tr:hover {
  47. background-color: rgba(var(--tblr-primary-rgb), 0.05);
  48. }
  49. /* 添加表格头和内容居中的样式 */
  50. .tcs-card-full .table th,
  51. .tcs-card-full .table td {
  52. text-align: center;
  53. vertical-align: middle;
  54. }
  55. /* 添加卡片头部和底部紧凑样式 */
  56. .tcs-card-header-compact {
  57. padding-top: 0.5rem;
  58. padding-bottom: 0.5rem;
  59. }
  60. .tcs-card-footer-compact {
  61. padding-top: 0.25rem;
  62. padding-bottom: 0.25rem;
  63. }
  64. /* 添加表格行紧凑样式 */
  65. .tcs-table-compact th,
  66. .tcs-table-compact td {
  67. padding-top: 0.4rem;
  68. padding-bottom: 0.4rem;
  69. }
  70. /* 调整表格内进度条的大小 */
  71. .tcs-table-compact .progress-xs {
  72. margin-top: 0.2rem;
  73. margin-bottom: 0.2rem;
  74. }
  75. /* 调整表格内文字间距 */
  76. .tcs-table-compact .clearfix {
  77. margin-bottom: 0.1rem;
  78. }
  79. /* 确保取消按钮样式正确 */
  80. .btn.tcs-table-oper-btn {
  81. padding: 0.25rem 0.5rem;
  82. font-size: 0.75rem;
  83. }
  84. /* 添加时间列宽度样式 */
  85. .tcs-table-time-column {
  86. width: 9.375rem; /* 150px / 16 = 9.375rem */
  87. min-width: 9.375rem; /* 150px / 16 = 9.375rem */
  88. white-space: nowrap;
  89. }
  90. /* 确保时间列内容不会换行 */
  91. .tcs-table-time-column span {
  92. display: block;
  93. overflow: hidden;
  94. text-overflow: ellipsis;
  95. }
  96. /* 添加操作列宽度样式 */
  97. .tcs-table-action-column {
  98. width: 12.5rem; /* 200px / 16 = 12.5rem */
  99. min-width: 12.5rem; /* 200px / 16 = 12.5rem */
  100. text-align: center;
  101. }
  102. /* 调整操作按钮样式 */
  103. .tcs-table-action-column .btn {
  104. display: inline-block;
  105. margin: 0 auto;
  106. }
  107. /* ID列宽度 */
  108. .tcs-table-id-column {
  109. width: 6.25rem; /* 100px / 16 = 6.25rem */
  110. min-width: 6.25rem; /* 100px / 16 = 6.25rem */
  111. }
  112. /* 状态列宽度 */
  113. .tcs-table-status-column {
  114. width: 6.25rem; /* 100px / 16 = 6.25rem */
  115. min-width: 6.25rem; /* 100px / 16 = 6.25rem */
  116. text-align: center;
  117. }
  118. /* order 从、到、货物列宽度 */
  119. .tcs-table-from-column,
  120. .tcs-table-to-column,
  121. .tcs-table-goods-column {
  122. /* 120px / 16 = 7.5rem */
  123. min-width: 7.5rem; /* 120px / 16 = 7.5rem */
  124. }
  125. /* 报警列宽度 */
  126. /* 来源列宽度 */
  127. .tcs-table-source-column {
  128. min-width: 6.875rem; /* 110px / 16 = 6.875rem */
  129. }
  130. /* 级别列宽度 */
  131. .tcs-table-level-column {
  132. min-width: 5rem; /* 80px / 16 = 5rem */
  133. text-align: center;
  134. }
  135. /* 事件列宽度 */
  136. .tcs-table-event-column {
  137. min-width: 7.5rem; /* 120px / 16 = 7.5rem */
  138. }
  139. /* 地图列宽度 */
  140. .tcs-table-map-column {
  141. min-width: 6.25rem; /* 100px / 16 = 6.25rem */
  142. }
  143. /* 区域列宽度 */
  144. .tcs-table-area-column {
  145. min-width: 5.625rem; /* 90px / 16 = 5.625rem */
  146. }
  147. /* 名称列宽度 */
  148. .tcs-table-name-column {
  149. min-width: 5.625rem; /* 90px / 16 = 5.625rem */
  150. }
  151. /* 描述列宽度 */
  152. .tcs-table-desc-column {
  153. min-width: 5rem; /* 80px / 16 = 5rem */
  154. }
  155. /* 类型列宽度 */
  156. .tcs-table-type-column {
  157. min-width: 5rem; /* 80px / 16 = 5rem */
  158. }
  159. /* 版本列宽度 */
  160. .tcs-table-version-column {
  161. min-width: 6.25rem; /* 100px / 16 = 6.25rem */
  162. }
  163. .tcs-table-battery-column {
  164. min-width: 9.375rem; /* 150px / 16 = 9.375rem */
  165. }
  166. /* 类型列最小宽度 */
  167. .tcs-table-type-column {
  168. min-width: 7.5rem; /* 120px / 16 = 7.5rem */
  169. }
  170. /* 用户名列最小宽度 */
  171. .tcs-table-username-column {
  172. min-width: 7.5rem; /* 120px / 16 = 7.5rem */
  173. }
  174. /* 说明列最小宽度 */
  175. .tcs-table-desc-column {
  176. min-width: 15.5rem; /* 200px / 16 = 12.5rem */
  177. }