Visualization.wxss 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. /* 确保搜索框和新增按钮固定在顶部 */
  2. .top {
  3. position: sticky; /* 使搜索框在页面滚动时固定 */
  4. top: 0; /* 固定在顶部 */
  5. z-index: 100; /* 确保在表格之上 */
  6. background-color: #f7f7f7; /* 背景色 */
  7. padding: 2% 0; /* 上下内边距 */
  8. }
  9. .topsearch {
  10. width: 90%;
  11. margin-left: 5%;
  12. display: flex;
  13. align-items: center;
  14. justify-content: space-between; /* 确保搜索框和按钮分开 */
  15. }
  16. .frame {
  17. background-color: white;
  18. width: 75%;
  19. border-radius: 20rpx;
  20. padding: 0 3%;
  21. }
  22. .frame > input {
  23. font-size: 24rpx;
  24. margin: 6rpx 0;
  25. }
  26. .topsearch > text {
  27. width: 10%;
  28. margin-left: 5%;
  29. color: #a8a7a7fa;
  30. }
  31. /* 新增按钮容器 */
  32. .add-btn-container {
  33. position: sticky;
  34. top: 0;
  35. background-color: #fff; /* 背景色为白色 */
  36. z-index: 101; /* 确保新增按钮高于表格 */
  37. padding: 10rpx; /* 增加按钮的上内边距 */
  38. display: flex;
  39. justify-content: center;
  40. margin-top: 10rpx; /* 新增按钮的上边距 */
  41. }
  42. /* 新增按钮 */
  43. .add-btn {
  44. padding: 5px 12px;
  45. background-color: #007aff;
  46. color: #fff;
  47. border-radius: 4px;
  48. font-size: 14px;
  49. }
  50. /* 表格容器 */
  51. .table-container {
  52. width: 100%;
  53. overflow-x: auto; /* 启用横向滚动 */
  54. background-color: #fff;
  55. border: 1rpx solid #ddd;
  56. margin-top: 20rpx; /* 添加上边距,确保不会和顶部元素重叠 */
  57. white-space: nowrap; /* 禁止换行 */
  58. }
  59. /* 表头样式 */
  60. .table-header {
  61. display: flex;
  62. width: max-content;
  63. background-color: #FFD700;
  64. font-weight: bold;
  65. border-bottom: 1rpx solid #ddd;
  66. z-index: 99; /* 确保表头高于表格内容 */
  67. }
  68. /* 表格单元格样式 */
  69. .table-cell {
  70. flex: none;
  71. width: 250rpx;
  72. padding: 10rpx;
  73. text-align: center;
  74. font-size: 28rpx;
  75. color: #333;
  76. border-right: 1rpx solid #ddd;
  77. white-space: nowrap;
  78. overflow: hidden;
  79. text-overflow: ellipsis;
  80. }
  81. /* 表格内容样式 */
  82. .table-body {
  83. display: flex;
  84. flex-direction: column;
  85. width: max-content;
  86. }
  87. .table-row {
  88. display: flex;
  89. }
  90. .table-row:nth-child(odd) {
  91. background-color: #f9f9f9;
  92. }
  93. .table-row:nth-child(even) {
  94. background-color: #ffffff;
  95. }
  96. /* 模态框背景 */
  97. .modal {
  98. display: flex;
  99. justify-content: center;
  100. align-items: center;
  101. position: fixed;
  102. top: 0;
  103. left: 0;
  104. width: 100%;
  105. height: 100%;
  106. background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
  107. z-index: 1000; /* 确保弹窗在最上层 */
  108. }
  109. /* 模态框内容 */
  110. .modal-content {
  111. background-color: #fff; /* 白色背景 */
  112. padding: 20px;
  113. border-radius: 8px;
  114. width: 90%;
  115. max-width: 400px; /* 最大宽度 */
  116. max-height: 80vh; /* 最大高度,留出一些空间以便滚动条显示 */
  117. overflow-y: auto; /* 垂直方向溢出时显示滚动条 */
  118. overflow-x: hidden; /* 隐藏水平滚动条 */
  119. }
  120. /* 每个选项项 */
  121. .modal-item {
  122. text-align: center; /* 每个项的文本居中 */
  123. font-size: 32rpx; /* 字体大小 */
  124. padding: 20rpx 0; /* 内边距 */
  125. border-top: 1rpx solid #eee; /* 上边框为浅灰色 */
  126. cursor: pointer; /* 鼠标悬停时显示为手指 */
  127. transition: background-color 0.2s; /* 添加鼠标悬停的平滑过渡 */
  128. }
  129. /* 第一项不显示上边框 */
  130. .modal-item:first-child {
  131. border-top: none;
  132. }
  133. /* 提交按钮样式 */
  134. .submit-btn {
  135. background-color: #4CAF50; /* 绿色背景 */
  136. color: white; /* 白色字体 */
  137. border: none; /* 去掉边框 */
  138. padding: 10rpx 20rpx; /* 内边距 */
  139. font-size: 32rpx; /* 字体大小 */
  140. border-radius: 8rpx; /* 圆角 */
  141. cursor: pointer; /* 鼠标悬停时显示为手指 */
  142. transition: background-color 0.3s ease; /* 背景色变化平滑过渡 */
  143. }
  144. /* 提交按钮悬停效果 */
  145. .submit-btn:hover {
  146. background-color: #45a049; /* 悬停时变为更深的绿色 */
  147. }
  148. /* 取消按钮样式 */
  149. .cancel-btn {
  150. background-color: #e74c3c; /* 红色背景 */
  151. color: white; /* 白色字体 */
  152. border: none; /* 去掉边框 */
  153. padding: 10rpx 20rpx; /* 内边距 */
  154. font-size: 32rpx; /* 字体大小 */
  155. border-radius: 8rpx; /* 圆角 */
  156. cursor: pointer; /* 鼠标悬停时显示为手指 */
  157. transition: background-color 0.3s ease; /* 背景色变化平滑过渡 */
  158. }
  159. /* 取消按钮悬停效果 */
  160. .cancel-btn:hover {
  161. background-color: #c0392b; /* 悬停时变为更深的红色 */
  162. }
  163. /* 新增数据弹窗的按钮容器 */
  164. .modal-content {
  165. display: flex;
  166. flex-direction: column; /* 默认垂直方向布局 */
  167. align-items: center; /* 居中对齐内容 */
  168. }
  169. /* 按钮容器 */
  170. .button-container {
  171. display: flex; /* 使用 flexbox 布局 */
  172. justify-content: space-between; /* 按钮之间均匀分布 */
  173. width: 100%; /* 按钮容器宽度为 100% */
  174. margin-top: 20rpx; /* 上边距 */
  175. }
  176. /* 每个按钮样式 */
  177. .submit-btn, .cancel-btn {
  178. flex: 1; /* 使按钮宽度相等 */
  179. margin: 0 10rpx; /* 按钮间隔 */
  180. }
  181. .picker-placeholder {
  182. flex-grow: 1;
  183. color: #888;
  184. margin-right: 10px;
  185. }
  186. .picker {
  187. flex-shrink: 0;
  188. width: 100px; /* 根据需要调整宽度 */
  189. }
  190. /* 选择器容器样式 */
  191. .picker-container {
  192. display: flex;
  193. align-items: center;
  194. margin-bottom: 15px;
  195. }
  196. /* 选择器文本样式 */
  197. .picker-container text {
  198. margin-right: 10px;
  199. }
  200. /* 按钮悬停效果 */
  201. .submit-btn:hover,
  202. .cancel-btn:hover {
  203. opacity: 0.8;
  204. }
  205. /* 输入字段样式 */
  206. .input-field {
  207. width: 100%;
  208. padding: 10rpx;
  209. font-size: 28rpx;
  210. color: #333;
  211. border: none;
  212. border-bottom: 1px solid #ddd;
  213. }
  214. /* 输入字段聚焦时的样式 */
  215. .input-field:focus {
  216. border-color: #007bff; /* 聚焦时边框颜色 */
  217. outline: none; /* 去除默认的聚焦轮廓 */
  218. box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); /* 聚焦时的阴影效果 */
  219. }
  220. /* 输入字段禁用时的样式 */
  221. .input-field:disabled {
  222. background-color: #e9ecef; /* 背景色 */
  223. opacity: 0.65; /* 不透明度 */
  224. cursor: not-allowed; /* 禁用时的鼠标样式 */
  225. }
  226. /* 输入字段的占位符样式 */
  227. .input-field::placeholder {
  228. color: #6c757d; /* 占位符文本颜色 */
  229. font-style: italic; /* 斜体 */
  230. }
  231. /* 输入字段的动画效果 */
  232. .input-field:active, .input-field:focus {
  233. transition: all 0.15s ease-in-out;
  234. }
  235. /* 输入字段的响应式设计 */
  236. @media (max-width: 768px) {
  237. .input-field {
  238. font-size: 14px; /* 在小屏幕上减小字体大小 */
  239. }
  240. }
  241. /* 页面标题样式 */
  242. .page-section-title {
  243. font-size: 30rpx;
  244. font-weight: bold;
  245. color: #333;
  246. margin-bottom: 10rpx;
  247. }