index.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <template>
  2. <div class="app-container">
  3. <div class="separation2-container">
  4. <el-tooltip class="item" effect="dark" content="热火炬罐" placement="top">
  5. <div class="separation-rhjg"
  6. id="separation-rhjg"
  7. @mouseover="handleMouseover1"
  8. @mouseleave="handleMouseleave1"
  9. @click="handleDevClick('热火炬罐')">
  10. </div>
  11. </el-tooltip>
  12. <el-tooltip class="item" effect="dark" content="冷剂压缩机" placement="top">
  13. <div class="separation-ljysj"
  14. id="separation-ljysj"
  15. @mouseover="handleMouseover2"
  16. @mouseleave="handleMouseleave2"
  17. @click="handleDevClick('冷剂压缩机')">
  18. </div>
  19. </el-tooltip>
  20. <el-tooltip class="item" effect="dark" content="VOC压缩机" placement="top">
  21. <div class="separation-voc"
  22. id="separation-voc"
  23. @mouseover="handleMouseover4"
  24. @mouseleave="handleMouseleave4"
  25. @click="handleDevClick('VOC压缩机')">
  26. </div>
  27. </el-tooltip>
  28. <el-tooltip class="item" effect="dark" content="冷火炬罐" placement="top">
  29. <div class="separation-lhjg"
  30. id="separation-lhjg"
  31. @mouseover="handleMouseover5"
  32. @mouseleave="handleMouseleave5"
  33. @click="handleDevClick('冷火炬罐')">
  34. </div>
  35. </el-tooltip>
  36. <el-tooltip class="item" effect="dark" content="脱甲烷塔" placement="top">
  37. <div class="separation-tjwt"
  38. id="separation-tjwt"
  39. @mouseover="handleMouseover6"
  40. @mouseleave="handleMouseleave6"
  41. @click="handleDevClick('脱甲烷塔')">
  42. </div>
  43. </el-tooltip>
  44. <el-tooltip class="item" effect="dark" content="C-425塔" placement="top">
  45. <div class="separation-c425"
  46. id="separation-c425"
  47. @mouseover="handleMouseover7"
  48. @mouseleave="handleMouseleave7"
  49. @click="handleDevClick('C-425塔')">
  50. </div>
  51. </el-tooltip>
  52. <el-tooltip class="item" effect="dark" content="冷箱" placement="top">
  53. <div class="separation-lx"
  54. id="separation-lx"
  55. @mouseover="handleMouseover8"
  56. @mouseleave="handleMouseleave8"
  57. @click="handleDevClick('冷箱')">
  58. </div>
  59. </el-tooltip>
  60. <el-tooltip class="item" effect="dark" content="乙烯热泵压缩机" placement="top">
  61. <div class="separation-yxrbysj"
  62. id="separation-yxrbysj"
  63. @mouseover="handleMouseover9"
  64. @mouseleave="handleMouseleave9"
  65. @click="handleDevClick('乙烯热泵压缩机')">
  66. </div>
  67. </el-tooltip>
  68. <el-tooltip class="item" effect="dark" content="预脱甲烷塔" placement="top">
  69. <div class="separation-ytjwt"
  70. id="separation-ytjwt"
  71. @mouseover="handleMouseover10"
  72. @mouseleave="handleMouseleave10"
  73. @click="handleDevClick('预脱甲烷塔')">
  74. </div>
  75. </el-tooltip>
  76. <el-tooltip class="item" effect="dark" content="乙烯精馏塔" placement="top">
  77. <div class="separation-yxjlt"
  78. id="separation-yxjlt"
  79. @mouseover="handleMouseover11"
  80. @mouseleave="handleMouseleave11"
  81. @click="handleDevClick('乙烯精馏塔')">
  82. </div>
  83. </el-tooltip>
  84. </div>
  85. </div>
  86. </template>
  87. <script>
  88. export default {
  89. props: {
  90. area: {
  91. type: String,
  92. default: ''
  93. },
  94. },
  95. methods: {
  96. handleDevClick(devName) {
  97. this.$emit('handleDevClick', devName);
  98. },
  99. /* mouseover事件 */
  100. handleMouseover1() {
  101. let box = document.getElementById("separation-rhjg");
  102. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  103. box.style.cursor = "pointer";
  104. },
  105. handleMouseover2() {
  106. let box = document.getElementById("separation-ljysj");
  107. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  108. box.style.cursor = "pointer";
  109. },
  110. handleMouseover3() {
  111. let box = document.getElementById("separation-ljqdegzq");
  112. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  113. box.style.cursor = "pointer";
  114. },
  115. handleMouseover4() {
  116. let box = document.getElementById("separation-voc");
  117. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  118. box.style.cursor = "pointer";
  119. },
  120. handleMouseover5() {
  121. let box = document.getElementById("separation-lhjg");
  122. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  123. box.style.cursor = "pointer";
  124. },
  125. handleMouseover6() {
  126. let box = document.getElementById("separation-tjwt");
  127. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  128. box.style.cursor = "pointer";
  129. },
  130. handleMouseover7() {
  131. let box = document.getElementById("separation-c425");
  132. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  133. box.style.cursor = "pointer";
  134. },
  135. handleMouseover8() {
  136. let box = document.getElementById("separation-lx");
  137. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  138. box.style.cursor = "pointer";
  139. },
  140. handleMouseover9() {
  141. let box = document.getElementById("separation-yxrbysj");
  142. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  143. box.style.cursor = "pointer";
  144. },
  145. handleMouseover10() {
  146. let box = document.getElementById("separation-ytjwt");
  147. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  148. box.style.cursor = "pointer";
  149. },
  150. handleMouseover11() {
  151. let box = document.getElementById("separation-yxjlt");
  152. box.style.backgroundColor = "rgba(64,158,255,0.3)";
  153. box.style.cursor = "pointer";
  154. },
  155. /* mouseleave事件 */
  156. handleMouseleave1() {
  157. let box = document.getElementById("separation-rhjg");
  158. box.style.backgroundColor = "transparent";
  159. },
  160. handleMouseleave2() {
  161. let box = document.getElementById("separation-ljysj");
  162. box.style.backgroundColor = "transparent";
  163. },
  164. handleMouseleave3() {
  165. let box = document.getElementById("separation-ljqdegzq");
  166. box.style.backgroundColor = "transparent";
  167. },
  168. handleMouseleave4() {
  169. let box = document.getElementById("separation-voc");
  170. box.style.backgroundColor = "transparent";
  171. },
  172. handleMouseleave5() {
  173. let box = document.getElementById("separation-lhjg");
  174. box.style.backgroundColor = "transparent";
  175. },
  176. handleMouseleave6() {
  177. let box = document.getElementById("separation-tjwt");
  178. box.style.backgroundColor = "transparent";
  179. },
  180. handleMouseleave7() {
  181. let box = document.getElementById("separation-c425");
  182. box.style.backgroundColor = "transparent";
  183. },
  184. handleMouseleave8() {
  185. let box = document.getElementById("separation-lx");
  186. box.style.backgroundColor = "transparent";
  187. },
  188. handleMouseleave9() {
  189. let box = document.getElementById("separation-yxrbysj");
  190. box.style.backgroundColor = "transparent";
  191. },
  192. handleMouseleave10() {
  193. let box = document.getElementById("separation-ytjwt");
  194. box.style.backgroundColor = "transparent";
  195. },
  196. handleMouseleave11() {
  197. let box = document.getElementById("separation-yxjlt");
  198. box.style.backgroundColor = "transparent";
  199. },
  200. }
  201. }
  202. </script>
  203. <style>
  204. .separation2-container {
  205. position: relative;
  206. width: 1200px;
  207. height: 500px;
  208. padding: 0px;
  209. margin: 0px auto;
  210. overflow: hidden;
  211. background: url('../../../assets/images/aerial/separation2.png') center/cover; /* 替换为实际背景图路径 */
  212. background-size: contain;
  213. background-repeat: no-repeat;
  214. }
  215. .separation-rhjg {
  216. position:absolute;
  217. top: 0px;
  218. left: 880px;
  219. padding: 0px;
  220. margin: 0px;
  221. width: 90px;
  222. height: 180px;
  223. }
  224. .separation-ljysj {
  225. position:absolute;
  226. top: 20px;
  227. left: 410px;
  228. padding: 0px;
  229. margin: 0px;
  230. width: 250px;
  231. height: 140px;
  232. }
  233. .separation-voc {
  234. position:absolute;
  235. top: 360px;
  236. left: 1060px;
  237. padding: 0px;
  238. margin: 0px;
  239. width: 60px;
  240. height: 60px;
  241. }
  242. .separation-lhjg {
  243. position:absolute;
  244. top: 250px;
  245. left: 790px;
  246. padding: 0px;
  247. margin: 0px;
  248. width: 50px;
  249. height: 120px;
  250. }
  251. .separation-tjwt {
  252. position:absolute;
  253. top: 250px;
  254. left: 570px;
  255. padding: 0px;
  256. margin: 0px;
  257. width: 50px;
  258. height: 150px;
  259. }
  260. .separation-c425 {
  261. position:absolute;
  262. top: 440px;
  263. left: 520px;
  264. padding: 0px;
  265. margin: 0px;
  266. width: 50px;
  267. height: 50px;
  268. }
  269. .separation-lx {
  270. position:absolute;
  271. top: 270px;
  272. left: 520px;
  273. padding: 0px;
  274. margin: 0px;
  275. width: 50px;
  276. height: 150px;
  277. }
  278. .separation-yxrbysj {
  279. position:absolute;
  280. top: 330px;
  281. left: 240px;
  282. padding: 0px;
  283. margin: 0px;
  284. width: 80px;
  285. height: 100px;
  286. }
  287. .separation-ytjwt {
  288. position:absolute;
  289. top: 270px;
  290. left: 250px;
  291. padding: 0px;
  292. margin: 0px;
  293. width: 40px;
  294. height: 50px;
  295. }
  296. .separation-yxjlt {
  297. position:absolute;
  298. top: 260px;
  299. left: 210px;
  300. padding: 0px;
  301. margin: 0px;
  302. width: 40px;
  303. height: 50px;
  304. }
  305. </style>