Visualization.wxss 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. /* 顶部固定区域 */
  2. .top-container {
  3. position: sticky;
  4. top: 0;
  5. background-color: white;
  6. z-index: 100; /* 保证顶部元素位于表格之上 */
  7. }
  8. .topsearch {
  9. width: 90%;
  10. margin-left: 5%;
  11. display: flex;
  12. align-items: center;
  13. justify-content: space-between; /* 确保搜索框和按钮分开 */
  14. }
  15. .frame {
  16. background-color: white;
  17. width: 75%;
  18. border-radius: 1px;
  19. padding: 0 3%;
  20. }
  21. .frame > input {
  22. font-size: 24rpx;
  23. margin: 6rpx 0;
  24. }
  25. .topsearch > text {
  26. width: 10%;
  27. margin-left: 5%;
  28. color: #a8a7a7fa;
  29. }
  30. /* 新增按钮容器 */
  31. .add-btn-container {
  32. position: sticky;
  33. top: 0;
  34. background-color: #fff; /* 背景色为白色 */
  35. z-index: 101; /* 确保新增按钮高于表格 */
  36. padding: 1rpx; /* 增加按钮的上内边距 */
  37. display: flex;
  38. justify-content: center;
  39. margin-top: 1rpx; /* 新增按钮的上边距 */
  40. }
  41. /* 新增按钮 */
  42. .add-btn {
  43. padding: 1px 12px;
  44. background-color: #3EC01E;
  45. color: #fff;
  46. border-radius: 4px;
  47. font-size: 14px;
  48. }
  49. /* 表格容器 */
  50. .table-container {
  51. width: 100%;
  52. overflow-x: auto; /* 启用横向滚动 */
  53. white-space: nowrap; /* 禁止换行 */
  54. background-color: #fff;
  55. border: 1rpx solid #ddd;
  56. margin-top: 10rpx; /* 添加上边距,确保不会和顶部元素重叠 */
  57. white-space: nowrap; /* 禁止换行 */
  58. }
  59. /* 表头样式 */
  60. .table-header {
  61. display: flex;
  62. background-color: #61E054; /* 表头背景色 */
  63. font-weight: bold;
  64. text-align: center;
  65. }
  66. /* 表格单元格样式 */
  67. .table-cell {
  68. flex: none;
  69. width: 170rpx; /* 固定宽度 */
  70. padding: 10rpx;
  71. text-align: center;
  72. font-size: 28rpx;
  73. color: #030803; /* 表头文字颜色 */
  74. border-right: 1rpx solid #ddd;
  75. white-space: nowrap;
  76. overflow: hidden;
  77. text-overflow: ellipsis;
  78. }
  79. /* 表格行样式 */
  80. .table-row:nth-child(odd) {
  81. background-color: #E4FBE5; /* 奇数行背景色 */
  82. }
  83. .table-row:nth-child(even) {
  84. background-color: #fff; /* 偶数行背景色 */
  85. }
  86. /* 表格内容样式 */
  87. .table-body {
  88. display: flex;
  89. flex-direction: column;
  90. width: max-content;
  91. }
  92. .table-row {
  93. display: flex;
  94. flex-direction: row;
  95. border-bottom: 1rpx solid #ddd;
  96. }
  97. /* 模态框背景 */
  98. .modal {
  99. display: flex;
  100. justify-content: center;
  101. align-items: center;
  102. position: fixed;
  103. top: 0;
  104. left: 0;
  105. width: 100%;
  106. height: 100%;
  107. background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
  108. z-index: 1000; /* 确保弹窗在最上层 */
  109. }
  110. /* 模态框内容 */
  111. /* 编辑删除弹窗样式 */
  112. .modal-content {
  113. background-color: #fff; /* 白色背景 */
  114. padding: 20px;
  115. border-radius: 12rpx;
  116. width: 80%; /* 调整宽度,居中效果更好 */
  117. max-width: 400px; /* 限制最大宽度 */
  118. text-align: center; /* 居中对齐内容 */
  119. box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); /* 添加阴影效果 */
  120. animation: fadeIn 0.3s ease-in-out; /* 添加淡入动画 */
  121. }
  122. /* 弹窗选项样式 */
  123. .modal-item {
  124. padding: 20rpx;
  125. font-size: 16px;
  126. border-bottom: 1px solid #f1f1f1; /* 添加下边框分隔 */
  127. color: #333; /* 设置字体颜色 */
  128. cursor: pointer; /* 鼠标变成手型 */
  129. }
  130. .modal-item:last-child {
  131. border-bottom: none; /* 去掉最后一项的下边框 */
  132. }
  133. .modal-item:hover {
  134. background-color: #f9f9f9; /* 悬停时背景变浅 */
  135. }
  136. /* 删除按钮特殊样式 */
  137. .modal-item.delete {
  138. color: #e74c3c; /* 删除按钮红色字体 */
  139. font-weight: bold; /* 加粗字体 */
  140. }
  141. .modal-item.delete:hover {
  142. background-color: #fceaea; /* 删除按钮悬停时红色背景 */
  143. }
  144. /* 取消按钮特殊样式 */
  145. .modal-item.cancel {
  146. color: #666; /* 取消按钮灰色字体 */
  147. }
  148. .modal-item.cancel:hover {
  149. background-color: #f4f4f4; /* 取消按钮悬停时浅灰背景 */
  150. }
  151. /* 动画效果 */
  152. @keyframes fadeIn {
  153. from {
  154. opacity: 0;
  155. transform: translateY(-20px); /* 从顶部滑入 */
  156. }
  157. to {
  158. opacity: 1;
  159. transform: translateY(0);
  160. }
  161. }
  162. /* 按钮容器样式 */
  163. .button-container {
  164. display: flex; /* 使用 Flexbox 布局 */
  165. justify-content: space-between; /* 按钮两端对齐 */
  166. align-items: center; /* 垂直居中对齐 */
  167. gap: 20rpx; /* 按钮之间的间距 */
  168. margin-top: 20rpx; /* 上边距 */
  169. }
  170. /* 提交按钮样式 */
  171. .submit-btn {
  172. flex: 1; /* 均分空间 */
  173. background-color: #4CAF50; /* 绿色背景 */
  174. color: white;
  175. padding: 12rpx 0;
  176. font-size: 16px;
  177. text-align: center;
  178. border-radius: 8rpx; /* 圆角 */
  179. cursor: pointer;
  180. border: none; /* 去除边框 */
  181. }
  182. /* 取消按钮样式 */
  183. .cancel-btn {
  184. flex: 1; /* 均分空间 */
  185. background-color: #e74c3c; /* 红色背景 */
  186. color: white;
  187. padding: 12rpx 0;
  188. font-size: 16px;
  189. text-align: center;
  190. border-radius: 8rpx; /* 圆角 */
  191. cursor: pointer;
  192. border: none; /* 去除边框 */
  193. }
  194. /* 按钮悬停效果 */
  195. .submit-btn:hover {
  196. background-color: #45a049; /* 提交按钮悬停颜色 */
  197. }
  198. .cancel-btn:hover {
  199. background-color: #c0392b; /* 取消按钮悬停颜色 */
  200. }