Visualization.wxss 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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: 250rpx; /* 固定宽度 */
  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. .modal-content {
  112. background-color: #fff; /* 白色背景 */
  113. padding: 20px;
  114. border-radius: 8px;
  115. width: 90%;
  116. max-width: 400px; /* 最大宽度 */
  117. max-height: 80vh; /* 最大高度,留出一些空间以便滚动条显示 */
  118. overflow-y: auto; /* 垂直方向溢出时显示滚动条 */
  119. overflow-x: hidden; /* 隐藏水平滚动条 */
  120. }
  121. /* 每个选项项 */
  122. .modal-item {
  123. text-align: center; /* 每个项的文本居中 */
  124. font-size: 32rpx; /* 字体大小 */
  125. padding: 20rpx 0; /* 内边距 */
  126. border-top: 1rpx solid #eee; /* 上边框为浅灰色 */
  127. cursor: pointer; /* 鼠标悬停时显示为手指 */
  128. transition: background-color 0.2s; /* 添加鼠标悬停的平滑过渡 */
  129. }
  130. /* 第一项不显示上边框 */
  131. .modal-item:first-child {
  132. border-top: none;
  133. }
  134. /* 提交按钮样式 */
  135. .submit-btn {
  136. background-color: #4CAF50; /* 绿色背景 */
  137. color: white; /* 白色字体 */
  138. border: none; /* 去掉边框 */
  139. padding: 10rpx 20rpx; /* 内边距 */
  140. font-size: 32rpx; /* 字体大小 */
  141. border-radius: 8rpx; /* 圆角 */
  142. cursor: pointer; /* 鼠标悬停时显示为手指 */
  143. transition: background-color 0.3s ease; /* 背景色变化平滑过渡 */
  144. }
  145. /* 提交按钮悬停效果 */
  146. .submit-btn:hover {
  147. background-color: #45a049; /* 悬停时变为更深的绿色 */
  148. }
  149. /* 取消按钮样式 */
  150. .cancel-btn {
  151. background-color: #e74c3c; /* 红色背景 */
  152. color: white; /* 白色字体 */
  153. border: none; /* 去掉边框 */
  154. padding: 10rpx 20rpx; /* 内边距 */
  155. font-size: 32rpx; /* 字体大小 */
  156. border-radius: 8rpx; /* 圆角 */
  157. cursor: pointer; /* 鼠标悬停时显示为手指 */
  158. transition: background-color 0.3s ease; /* 背景色变化平滑过渡 */
  159. }
  160. /* 取消按钮悬停效果 */
  161. .cancel-btn:hover {
  162. background-color: #c0392b; /* 悬停时变为更深的红色 */
  163. }
  164. /* 新增数据弹窗的按钮容器 */
  165. .modal-content {
  166. display: flex;
  167. flex-direction: column; /* 默认垂直方向布局 */
  168. align-items: center; /* 居中对齐内容 */
  169. }
  170. /* 按钮容器 */
  171. .button-container {
  172. display: flex; /* 使用 flexbox 布局 */
  173. justify-content: space-between; /* 按钮之间均匀分布 */
  174. width: 100%; /* 按钮容器宽度为 100% */
  175. margin-top: 20rpx; /* 上边距 */
  176. }
  177. /* 每个按钮样式 */
  178. .submit-btn, .cancel-btn {
  179. flex: 1; /* 使按钮宽度相等 */
  180. margin: 0 10rpx; /* 按钮间隔 */
  181. }