rivermessage.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. * {
  72. margin: 0;
  73. padding: 0;
  74. box-sizing: border-box;
  75. font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  76. }
  77. body {
  78. background-color: #f5f9fc;
  79. color: #333;
  80. line-height: 1.6;
  81. padding: 20px;
  82. }
  83. .container {
  84. max-width: 1200px;
  85. margin: 0 auto;
  86. padding: 20px 0;
  87. }
  88. .main-content {
  89. width: 100%;
  90. background: white;
  91. border-radius: 12px;
  92. padding: 30px;
  93. box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  94. }
  95. .section {
  96. margin-bottom: 40px;
  97. padding-bottom: 30px;
  98. }
  99. h3 {
  100. color: #1e5799;
  101. font-size: 1.6rem;
  102. margin-bottom: 20px;
  103. position: relative;
  104. padding-left: 25px;
  105. }
  106. h3:before {
  107. content: "";
  108. position: absolute;
  109. left: 0;
  110. top: 50%;
  111. transform: translateY(-50%);
  112. width: 15px;
  113. height: 15px;
  114. background: #2989d8;
  115. border-radius: 4px;
  116. }
  117. /* 缩小段落字体 */
  118. p {
  119. font-size: 0.9rem; /* 原来可能是1rem,现在缩小 */
  120. color: #444;
  121. line-height: 1.8;
  122. text-align: justify;
  123. margin-bottom: 15px;
  124. }
  125. /* 图片容器:放大图片 + 并排布局 */
  126. .image-container {
  127. background-color: #f8fbff;
  128. border: 1px solid #dbe9f5;
  129. border-radius: 10px;
  130. margin: 20px auto;
  131. padding: 20px;
  132. text-align: center;
  133. max-width: 90%;
  134. }
  135. /* 图片行:并排展示 */
  136. .image-row {
  137. display: flex;
  138. gap: 20px;
  139. justify-content: center;
  140. flex-wrap: wrap; /* 屏幕小的时候自动换行 */
  141. }
  142. /* 单个图片项:放大显示 */
  143. .image-item {
  144. flex: 1;
  145. min-width: 250px; /* 保证最小宽度 */
  146. }
  147. .image-item img {
  148. width: 100%; /* 占满容器,自然放大 */
  149. height: auto; /* 保持比例 */
  150. border-radius: 8px;
  151. }
  152. .image-caption {
  153. font-style: italic;
  154. color: #666;
  155. margin-top: 8px;
  156. font-size: 0.85rem;
  157. }
  158. footer {
  159. text-align: center;
  160. margin-top: 30px;
  161. padding-top: 20px;
  162. color: #777;
  163. font-size: 0.9rem;
  164. border-top: 1px solid #eee;
  165. }
  166. </style>