Visualizatio.wxss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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. display: flex;
  121. flex-direction: column; /* 默认垂直方向布局 */
  122. align-items: flex-start; /* 左对齐 */
  123. }
  124. /* 每个输入项 */
  125. .modal-item {
  126. display: flex; /* 使用 flex 布局 */
  127. align-items: center; /* 垂直居中 */
  128. width: 100%;
  129. margin-bottom: 15rpx; /* 每个输入项之间的间隔 */
  130. }
  131. /* 输入框标签 */
  132. .item-label {
  133. width: 30%; /* 标签宽度 */
  134. font-size: 16px;
  135. margin-right: 15rpx; /* 标签与输入框之间的间隔 */
  136. text-align: right; /* 标签文本右对齐 */
  137. }
  138. /* 输入框样式 */
  139. .input-field {
  140. flex: 1; /* 输入框占据剩余空间 */
  141. padding: 8px;
  142. font-size: 16px;
  143. border: 1px solid #ccc;
  144. border-radius: 4px;
  145. }
  146. /* 按钮容器 */
  147. .button-container {
  148. display: flex; /* 使用 flexbox 布局 */
  149. justify-content: space-between; /* 按钮之间均匀分布 */
  150. width: 100%;
  151. margin-top: 20rpx; /* 上边距 */
  152. }
  153. /* 每个按钮样式 */
  154. .submit-btn, .cancel-btn {
  155. flex: 1; /* 使按钮宽度相等 */
  156. margin: 0 10rpx; /* 按钮间隔 */
  157. padding: 10px;
  158. border-radius: 5px;
  159. font-size: 16px;
  160. cursor: pointer;
  161. }
  162. /* 提交按钮样式 */
  163. .submit-btn {
  164. background-color: #4CAF50; /* 绿色背景 */
  165. color: white;
  166. }
  167. /* 取消按钮样式 */
  168. .cancel-btn {
  169. background-color: #e74c3c; /* 红色背景 */
  170. color: white;
  171. }
  172. /* 提交按钮悬停效果 */
  173. .submit-btn:hover {
  174. background-color: #45a049;
  175. }
  176. /* 取消按钮悬停效果 */
  177. .cancel-btn:hover {
  178. background-color: #c0392b;
  179. }