point.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <div class="page-container">
  3. <div class="point-map">
  4. <div class="component-title">采样点地图展示</div>
  5. <TencentMapView/>
  6. </div>
  7. <div class="point-line">
  8. <div class="component-title">采样点数据列表展示</div>
  9. <Waterdataline/>
  10. </div>
  11. <div class="charts-line">
  12. <div class="component-title">韶关市各区县重金属平均浓度</div>
  13. <Waterassaydata2/>
  14. </div>
  15. </div>
  16. </template>
  17. <script setup>
  18. import { ref, onMounted, watch, computed } from 'vue';
  19. import * as echarts from 'echarts';
  20. import TencentMapView from './tencentMapView.vue';
  21. import Waterdataline from './waterdataline.vue';
  22. import Waterassaydata2 from './waterassaydata2.vue';
  23. </script>
  24. <style scoped>
  25. .page-container {
  26. display: flex;
  27. flex-direction: column;
  28. height: 100vh; /* 整屏高度 */
  29. padding: 0;
  30. box-sizing: border-box;
  31. background-color: #f5f7fa;
  32. gap: 20px;
  33. margin: 0;
  34. }
  35. .point-map {
  36. flex: 0 0 70%;
  37. margin-bottom: 20px;
  38. background-color: white;
  39. border-radius: 8px;
  40. box-shadow: 0 2px 4px rgba(0,0,0,1);
  41. overflow: hidden;
  42. }
  43. .point-line {
  44. background-color: white;
  45. border-radius: 12px;/*圆角 */
  46. box-shadow: 0 2px 8px rgba(0, 0,0, 0.08);
  47. padding: 16px;/*内部间距 */
  48. box-sizing: border-box;
  49. }
  50. .charts-line{
  51. background-color: white;
  52. border-radius: 12px;
  53. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  54. padding: 16px;
  55. box-sizing: border-box;
  56. max-width: 1800px;
  57. width: 100%;
  58. margin: 20px auto;
  59. }
  60. .component-title {
  61. /* 基础布局:左对齐 + 紧凑间距 */
  62. text-align: left; /* 强制左对齐,告别居中 */
  63. margin: 12px 0; /* 上下间距缩小,更紧凑(原16px→12px) */
  64. padding-left: 24px; /* 给蓝色方块留空间 */
  65. position: relative; /* 为伪元素定位做准备 */
  66. /* 文字样式:简约但醒目 */
  67. font-size: 1.7rem; /* 稍小一号,更克制(原1.5rem→1.25rem) */
  68. font-weight: 600; /* 适度加粗,比正文突出但不夸张 */
  69. color: #1e88e5; /* 统一蓝色,和方块颜色呼应 */
  70. line-height: 1.2; /* 紧凑行高,避免臃肿 */
  71. }
  72. /* 蓝色小方块:用伪元素实现,无额外HTML */
  73. .component-title::before {
  74. content: "";
  75. position: absolute;
  76. left: 0; /* 靠最左侧 */
  77. top: 50%; /* 垂直居中 */
  78. transform: translateY(-50%);
  79. width: 12px; /* 方块大小,适中即可 */
  80. height: 12px;
  81. background-color: #1e88e5; /* 和文字同色,统一感 */
  82. border-radius: 2px; /* 轻微圆角,比直角更柔和 */
  83. }
  84. </style>