rivermessage.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <div>
  3. <router-view></router-view> <!-- 关键:子路由渲染位置 -->
  4. </div>
  5. <div class="container">
  6. <div class="main-content">
  7. <section id="sampling" class="section">
  8. <h3>采样过程</h3>
  9. <!-- 采样设备图片:3张并排展示 -->
  10. <div class="image-container">
  11. <div class="image-row">
  12. <div class="image-item">
  13. <img :src="samplingDeviceImg1" alt="灌溉水采样设备1">
  14. <div class="image-caption">图3-1 灌溉水采样设备</div>
  15. </div>
  16. <div class="image-item">
  17. <img :src="samplingDeviceImg2" alt="灌溉水采样设备2">
  18. <div class="image-caption">图3-2 灌溉水采样设备</div>
  19. </div>
  20. <div class="image-item">
  21. <img :src="samplingDeviceImg3" alt="灌溉水采样设备3">
  22. <div class="image-caption">图3-3 灌溉水采样设备</div>
  23. </div>
  24. </div>
  25. </div>
  26. <h4>采样容器均为500mL的白色聚乙烯瓶,采样体积均为500mL,采样过程在不同天气条件下进行,主要天气状况包括多云、阴天和小雨,采样点周边环境主要为河流,只有少数样品采集于水渠或瀑布区域。</h4>
  27. <br>
  28. <h4>绝大多数样品状态为无色、无沉淀、无味、无悬浮物,只有少量样品稍显浑浊并含有沉淀物。为了保证样品的完整性和数据的准确性,采样后的保存方式包括了冷藏、避光、确保标签完好以及采取有效的减震措施,以避免运输过程中的振动和损坏。</h4>
  29. <!-- 工作人员采样现场:3张并排展示 -->
  30. <div class="image-container">
  31. <div class="image-row">
  32. <div class="image-item">
  33. <img :src="workerSamplingImg1" alt="工作人员采样现场1">
  34. <div class="image-caption">图4-1 工作人员采样现场</div>
  35. </div>
  36. <div class="image-item">
  37. <img :src="workerSamplingImg2" alt="工作人员采样现场2">
  38. <div class="image-caption">图4-2 工作人员采样现场</div>
  39. </div>
  40. <div class="image-item">
  41. <img :src="workerSamplingImg3" alt="工作人员采样现场3">
  42. <div class="image-caption">图4-3 工作人员采样现场</div>
  43. </div>
  44. </div>
  45. </div>
  46. </section>
  47. </div>
  48. <footer>
  49. <p>韶关市环境科学研究院 &copy; 2024 | 水质研究报告</p>
  50. </footer>
  51. </div>
  52. </template>
  53. <script setup>
  54. import { ref } from 'vue';
  55. // 导入所有图片(确保文件名和路径完全匹配!)
  56. import samplingDeviceImg1 from '@/assets/samplingequipment1.png';
  57. import samplingDeviceImg2 from '@/assets/samplingequipment2.png';
  58. import samplingDeviceImg3 from '@/assets/samplingequipment3.png';
  59. import workerSamplingImg1 from '@/assets/samplingsite1.png';
  60. import workerSamplingImg2 from '@/assets/samplingsite2.png';
  61. import workerSamplingImg3 from '@/assets/samplingsite3.png';
  62. import { onMounted } from 'vue'
  63. import { useRoute } from 'vue-router'
  64. const route = useRoute()
  65. onMounted(() => {
  66. console.log('当前路由参数:', route.params)
  67. console.log('匹配的子路由:', route.matched)
  68. })
  69. </script>
  70. <style scoped>
  71. .container {
  72. max-width: 1200px;
  73. margin: 0 auto;
  74. padding: 20px 0;
  75. }
  76. .main-content {
  77. width: 100%;
  78. background: white;
  79. border-radius: 12px;
  80. padding: 30px;
  81. box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  82. }
  83. .section {
  84. margin-bottom: 40px;
  85. padding-bottom: 30px;
  86. }
  87. h3 {
  88. color: #1e5799;
  89. font-size: 1.6rem;
  90. margin-bottom: 20px;
  91. position: relative;
  92. padding-left: 25px;
  93. }
  94. h3:before {
  95. content: "";
  96. position: absolute;
  97. left: 0;
  98. top: 50%;
  99. transform: translateY(-50%);
  100. width: 15px;
  101. height: 15px;
  102. background: #2989d8;
  103. border-radius: 4px;
  104. }
  105. /* 缩小段落字体 */
  106. p {
  107. font-size: 0.9rem; /* 原来可能是1rem,现在缩小 */
  108. color: #444;
  109. line-height: 1.8;
  110. text-align: justify;
  111. margin-bottom: 15px;
  112. }
  113. /* 图片容器:放大图片 + 并排布局 */
  114. .image-container {
  115. background-color: #f8fbff;
  116. border: 1px solid #dbe9f5;
  117. border-radius: 10px;
  118. margin: 20px auto;
  119. padding: 20px;
  120. text-align: center;
  121. max-width: 90%;
  122. }
  123. /* 图片行:并排展示 */
  124. .image-row {
  125. display: flex;
  126. gap: 20px;
  127. justify-content: center;
  128. flex-wrap: wrap; /* 屏幕小的时候自动换行 */
  129. }
  130. /* 单个图片项:放大显示 */
  131. .image-item {
  132. flex: 1;
  133. min-width: 250px; /* 保证最小宽度 */
  134. }
  135. .image-item img {
  136. width: 100%; /* 占满容器,自然放大 */
  137. height: auto; /* 保持比例 */
  138. border-radius: 8px;
  139. }
  140. .image-caption {
  141. font-style: italic;
  142. color: #666;
  143. margin-top: 8px;
  144. font-size: 0.85rem;
  145. }
  146. footer {
  147. text-align: center;
  148. margin-top: 30px;
  149. padding-top: 20px;
  150. color: #777;
  151. font-size: 0.9rem;
  152. border-top: 1px solid #eee;
  153. }
  154. </style>