crossSection.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div class="cross-container">
  3. <h3 class="table-title">断面数据地图展示</h3>
  4. <div class="map-holder"><crosssectionmap/></div>
  5. <h3 class="table-title">断面数据详情</h3>
  6. <div><CrossSectionSamplelineData/></div>
  7. <h3 class="table-title"> 各河流Cd的平均浓度柱状图</h3>
  8. <div><CrossSetionData1/></div>
  9. <h3 class="table-title">各区县的Cd平均浓度柱状图</h3>
  10. <div><CrossSetionData2/></div>
  11. </div>
  12. </template>
  13. <script setup lang="ts">
  14. import CrossSectionSamplelineData from '@/components/irrpollution/crossSectionSamplelineData.vue'
  15. import CrossSetionData1 from '@/components/irrpollution/crossSetionData1.vue';
  16. import CrossSetionData2 from '@/components/irrpollution/crossSetionData2.vue';
  17. import crosssectionmap from '@/components/irrpollution/crosssectionmap.vue';
  18. </script>
  19. <style scoped>
  20. .map-holder {
  21. position: relative;
  22. height: 600px; /* 减去标题高度,避免覆盖 */
  23. overflow: visible;
  24. z-index: 100;
  25. }
  26. .cross-container {
  27. position: relative !important; /* 防止被 Leaflet 修改 */
  28. overflow: visible !important; /* 确保标题不被裁剪 */
  29. }
  30. .table-title {
  31. /* 基础布局:左对齐 + 紧凑间距 */
  32. text-align: left; /* 强制左对齐,告别居中 */
  33. margin: 12px 0; /* 上下间距缩小,更紧凑(原16px→12px) */
  34. padding-left: 24px; /* 给蓝色方块留空间 */
  35. position: relative; /* 为伪元素定位做准备 */
  36. z-index: 200;
  37. /* 文字样式:简约但醒目 */
  38. font-size: 1.5rem; /* 稍小一号,更克制(原1.5rem→1.25rem) */
  39. font-weight: 600; /* 适度加粗,比正文突出但不夸张 */
  40. color: #1e88e5; /* 统一蓝色,和方块颜色呼应 */
  41. line-height: 1.2; /* 紧凑行高,避免臃肿 */
  42. }
  43. /* 蓝色小方块:用伪元素实现,无额外HTML */
  44. .table-title::before {
  45. content: "";
  46. position: absolute;
  47. left: 0; /* 靠最左侧 */
  48. top: 50%; /* 垂直居中 */
  49. transform: translateY(-50%);
  50. width: 12px; /* 方块大小,适中即可 */
  51. height: 12px;
  52. background-color: #1e88e5; /* 和文字同色,统一感 */
  53. border-radius: 2px; /* 轻微圆角,比直角更柔和 */
  54. }
  55. </style>