index.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <template>
  2. <div class="history-content">
  3. <div class="right-panel">
  4. <div class="event-card">
  5. <div class="card-header">
  6. <div class="header-icon">📜</div>
  7. <div class="header-title">历史沿革</div>
  8. </div>
  9. <div class="event-list">
  10. <div
  11. v-for="(event, index) in events"
  12. :key="index"
  13. class="event-item"
  14. :class="{ active: selectedIndex === index }"
  15. @click="selectEvent(index)"
  16. >
  17. <div class="event-year">{{ event.year }}</div>
  18. <div class="event-title">{{ event.title }}</div>
  19. </div>
  20. </div>
  21. <div class="event-detail">
  22. <div class="detail-header">
  23. <div class="detail-year">{{ currentEvent.year }}</div>
  24. <div class="detail-title">{{ currentEvent.title }}</div>
  25. </div>
  26. <div class="detail-content">{{ currentEvent.description }}</div>
  27. <div class="detail-impact">
  28. <div class="impact-label">重要意义</div>
  29. <div class="impact-text">{{ currentEvent.impact }}</div>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="timeline-panel">
  35. <div class="timeline-container">
  36. <div class="timeline-track">
  37. <div
  38. v-for="(event, index) in events"
  39. :key="index"
  40. class="timeline-item"
  41. :class="{ active: selectedIndex === index }"
  42. @click="selectEvent(index)"
  43. >
  44. <div class="timeline-dot"></div>
  45. <div class="timeline-year">{{ event.year }}</div>
  46. <div class="timeline-label">{{ event.shortTitle }}</div>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </template>
  53. <script setup>
  54. import { ref, computed } from "vue"
  55. const emit = defineEmits(["changeVideo"])
  56. const events = ref([
  57. {
  58. year: "1954",
  59. title: "昆山水文站成立",
  60. shortTitle: "水文站成立",
  61. description: "昆山水文站正式成立,开始系统开展水文监测工作,建立了首个水文观测点,开启了昆山水文事业的起点。",
  62. impact: "奠定了昆山水文监测体系的基础,为后续水资源管理提供了数据支撑。"
  63. },
  64. {
  65. year: "1978",
  66. title: "自动化监测起步",
  67. shortTitle: "自动化起步",
  68. description: "引入自动化水位自动记录设备,逐步实现水位监测数据的自动采集,提高了数据采集效率。",
  69. impact: "提升了水文监测的准确性和时效性。"
  70. },
  71. {
  72. year: "2005",
  73. title: "信息化建设启动",
  74. shortTitle: "信息化建设",
  75. description: "启动水文信息化建设,建立数据中心,实现监测数据远程传输和集中管理。",
  76. impact: "推动了水文管理向数字化、智能化方向发展。"
  77. },
  78. {
  79. year: "2015",
  80. title: "智慧水务平台上线",
  81. shortTitle: "智慧水务平台",
  82. description: "智慧水务综合管理平台正式上线,整合各类监测数据,实现统一可视化展示。",
  83. impact: "实现了水文数据的全面整合和智能分析。"
  84. },
  85. {
  86. year: "2023",
  87. title: "融合发展新阶段",
  88. shortTitle: "融合发展",
  89. description: "进入多部门融合发展新阶段,建立协同工作机制,提升综合管理能力。",
  90. impact: "开启了水文管理现代化的新篇章。"
  91. }
  92. ])
  93. const selectedIndex = ref(0)
  94. const currentEvent = computed(() => events.value[selectedIndex.value])
  95. function selectEvent(index) {
  96. selectedIndex.value = index
  97. if (index === 1) {
  98. emit("changeVideo", "auto")
  99. } else if (index === 2) {
  100. emit("changeVideo", "3d")
  101. } else if (index === 3) {
  102. emit("changeVideo", "smart")
  103. } else if (index === 4) {
  104. emit("changeVideo", "wisdom")
  105. } else {
  106. emit("changeVideo", "manual")
  107. }
  108. }
  109. </script>
  110. <style lang="scss">
  111. .history-content {
  112. position: absolute;
  113. top: 0;
  114. left: 0;
  115. right: 0;
  116. bottom: 0;
  117. z-index: 2;
  118. pointer-events: none;
  119. }
  120. .right-panel {
  121. position: absolute;
  122. z-index: 4;
  123. width: 380px;
  124. right: 32px;
  125. top: 150px;
  126. bottom: 400px;
  127. perspective: 800px;
  128. perspective-origin: 50% 50%;
  129. }
  130. .event-card {
  131. position: absolute;
  132. left: 0;
  133. top: 0;
  134. right: 0;
  135. bottom: 0;
  136. background: rgba(0, 20, 40, 0.85);
  137. border: 1px solid rgba(48, 220, 255, 0.3);
  138. border-radius: 10px;
  139. box-shadow: 0 0 20px rgba(48, 220, 255, 0.1);
  140. transform: translate3d(0px, 0px, 0px) scaleX(1) scaleY(1) rotateX(0deg) rotateY(-6deg) rotateZ(0deg) skewX(0deg) skewY(0deg);
  141. padding: 15px;
  142. display: flex;
  143. flex-direction: column;
  144. gap: 15px;
  145. transform: translateX(150%);
  146. opacity: 0;
  147. }
  148. .card-header {
  149. display: flex;
  150. align-items: center;
  151. gap: 10px;
  152. padding-bottom: 10px;
  153. border-bottom: 1px solid rgba(48, 220, 255, 0.2);
  154. .header-icon {
  155. font-size: 24px;
  156. }
  157. .header-title {
  158. font-size: 18px;
  159. font-weight: bold;
  160. color: #30dcff;
  161. letter-spacing: 2px;
  162. }
  163. }
  164. .event-list {
  165. display: flex;
  166. flex-wrap: wrap;
  167. gap: 8px;
  168. .event-item {
  169. padding: 8px 12px;
  170. background: rgba(48, 220, 255, 0.1);
  171. border: 1px solid rgba(48, 220, 255, 0.2);
  172. border-radius: 6px;
  173. cursor: pointer;
  174. transition: all 0.3s ease;
  175. pointer-events: auto;
  176. &:hover {
  177. background: rgba(48, 220, 255, 0.2);
  178. border-color: rgba(48, 220, 255, 0.4);
  179. }
  180. &.active {
  181. background: rgba(48, 220, 255, 0.3);
  182. border-color: rgba(48, 220, 255, 0.6);
  183. box-shadow: 0 0 10px rgba(48, 220, 255, 0.3);
  184. }
  185. .event-year {
  186. font-size: 12px;
  187. color: #00bfff;
  188. font-weight: bold;
  189. }
  190. .event-title {
  191. font-size: 13px;
  192. color: #c4f3fe;
  193. }
  194. }
  195. }
  196. .event-detail {
  197. flex: 1;
  198. background: rgba(0, 180, 255, 0.05);
  199. border-radius: 8px;
  200. padding: 15px;
  201. border: 1px solid rgba(48, 220, 255, 0.1);
  202. .detail-header {
  203. display: flex;
  204. align-items: baseline;
  205. gap: 10px;
  206. margin-bottom: 10px;
  207. .detail-year {
  208. font-size: 28px;
  209. font-weight: bold;
  210. color: #30dcff;
  211. }
  212. .detail-title {
  213. font-size: 16px;
  214. color: #fff;
  215. }
  216. }
  217. .detail-content {
  218. font-size: 14px;
  219. color: #a3dcde;
  220. line-height: 1.6;
  221. margin-bottom: 15px;
  222. }
  223. .detail-impact {
  224. padding-top: 10px;
  225. border-top: 1px solid rgba(48, 220, 255, 0.2);
  226. .impact-label {
  227. font-size: 12px;
  228. color: #43e97b;
  229. margin-bottom: 5px;
  230. }
  231. .impact-text {
  232. font-size: 13px;
  233. color: #c4f3fe;
  234. line-height: 1.5;
  235. }
  236. }
  237. }
  238. .timeline-panel {
  239. position: absolute;
  240. left: 100px;
  241. right: 100px;
  242. bottom: 30px;
  243. height: 100px;
  244. z-index: 4;
  245. }
  246. .timeline-container {
  247. position: absolute;
  248. left: 0;
  249. right: 0;
  250. bottom: 0;
  251. height: 100%;
  252. background: rgba(0, 20, 40, 0.7);
  253. border: 1px solid rgba(48, 220, 255, 0.2);
  254. border-radius: 10px;
  255. padding: 15px 20px;
  256. transform: translateY(100%);
  257. opacity: 0;
  258. }
  259. .timeline-track {
  260. display: flex;
  261. justify-content: space-between;
  262. align-items: flex-end;
  263. height: 100%;
  264. position: relative;
  265. &::before {
  266. content: "";
  267. position: absolute;
  268. left: 0;
  269. right: 0;
  270. bottom: 20px;
  271. height: 2px;
  272. background: linear-gradient(90deg, transparent, rgba(48, 220, 255, 0.5), transparent);
  273. }
  274. }
  275. .timeline-item {
  276. display: flex;
  277. flex-direction: column;
  278. align-items: center;
  279. cursor: pointer;
  280. pointer-events: auto;
  281. transition: all 0.3s ease;
  282. &:hover {
  283. transform: translateY(-5px);
  284. }
  285. .timeline-dot {
  286. width: 12px;
  287. height: 12px;
  288. border-radius: 50%;
  289. background: rgba(48, 220, 255, 0.3);
  290. border: 2px solid rgba(48, 220, 255, 0.5);
  291. margin-bottom: 8px;
  292. transition: all 0.3s ease;
  293. }
  294. .timeline-year {
  295. font-size: 12px;
  296. color: #a3dcde;
  297. margin-bottom: 5px;
  298. }
  299. .timeline-label {
  300. font-size: 11px;
  301. color: #c4f3fe;
  302. text-align: center;
  303. max-width: 80px;
  304. }
  305. &.active {
  306. .timeline-dot {
  307. background: #30dcff;
  308. box-shadow: 0 0 10px rgba(48, 220, 255, 0.5);
  309. transform: scale(1.3);
  310. }
  311. .timeline-year {
  312. color: #30dcff;
  313. font-weight: bold;
  314. }
  315. .timeline-label {
  316. color: #fff;
  317. }
  318. }
  319. }
  320. </style>