SX.vue 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804
  1. <template>
  2. <div class="svg-map">
  3. <svg
  4. version="1.1"
  5. xmlns="http://www.w3.org/2000/svg"
  6. xmlns:xlink="http://www.w3.org/1999/xlink"
  7. x="0px"
  8. y="0px"
  9. viewBox="0 0 866 359"
  10. xml:space="preserve"
  11. :width="svgWidth"
  12. :height="svgHeight"
  13. >
  14. <defs>
  15. <g id="nx-map-line">
  16. <line
  17. class="nx-map-line"
  18. x1="25"
  19. y1="35"
  20. x2="25"
  21. y2="55"
  22. stroke="#edbf03"
  23. stroke-width="1"
  24. />
  25. <circle
  26. class="nx-map-up-circle"
  27. cx="25"
  28. cy="35"
  29. r="2"
  30. fill="#edbf03"
  31. />
  32. </g>
  33. <g id="nx-map-line1">
  34. <line
  35. class="nx-map-line"
  36. x1="25"
  37. y1="35"
  38. x2="25"
  39. y2="45"
  40. stroke="#edbf03"
  41. stroke-width="1"
  42. />
  43. <circle
  44. class="nx-map-up-circle"
  45. cx="25"
  46. cy="35"
  47. r="2"
  48. fill="#edbf03"
  49. />
  50. </g>
  51. <g id="nx-map-circle">
  52. <circle
  53. class="nx-map-down-circle-1"
  54. cx="25"
  55. cy="80"
  56. r="3"
  57. fill="#edbf03"
  58. />
  59. <circle
  60. class="nx-map-down-circle-2"
  61. :class="{ 'nx-map-down-circle-loop': c1 }"
  62. cx="25"
  63. cy="80"
  64. r="9"
  65. stroke="#edbf03"
  66. stroke-width="1"
  67. fill="none"
  68. />
  69. <circle
  70. class="nx-map-down-circle-3"
  71. :class="{ 'nx-map-down-circle-loop': c2 }"
  72. cx="25"
  73. cy="80"
  74. r="16"
  75. opacity="0.6"
  76. stroke="#edbf03"
  77. stroke-width="1"
  78. fill="none"
  79. />
  80. </g>
  81. </defs>
  82. <g>
  83. <image
  84. v-if="$store.state.themeName === 'dark'"
  85. style="overflow: visible"
  86. width="400"
  87. height="330"
  88. class="map-base"
  89. xlink:href="./map_sx_h.png"
  90. transform="matrix(1 0 0 1 180 0)"
  91. ></image>
  92. <image
  93. v-if="$store.state.themeName === 'light'"
  94. style="overflow: visible"
  95. width="400"
  96. height="330"
  97. class="map-base"
  98. xlink:href="./map_sx_b.png"
  99. transform="matrix(1 0 0 1 180 0)"
  100. ></image>
  101. <g>
  102. <g
  103. class="item-label-hover"
  104. v-if="
  105. showType === 'all' ||
  106. showType === 'fc' ||
  107. companyid == 'SXJ_KGDL_FLFD_ZGS0'
  108. "
  109. >
  110. <svg
  111. version="1.1"
  112. xmlns="http://www.w3.org/2000/svg"
  113. xmlns:xlink="http://www.w3.org/1999/xlink"
  114. x="415"
  115. y="-15"
  116. width="45"
  117. height="45"
  118. viewBox="0 0 220 392"
  119. enable-background="new 0 0 220 392"
  120. xml:space="preserve"
  121. class="windmill"
  122. >
  123. <image
  124. width="47"
  125. height="345"
  126. class="pillar"
  127. x="68"
  128. y="50"
  129. xlink:href="./pillars.png"
  130. ></image>
  131. <image
  132. width="200"
  133. height="165"
  134. class="fan"
  135. xlink:href="./fl_blue.png"
  136. ></image>
  137. </svg>
  138. <g
  139. :class="
  140. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  141. "
  142. >
  143. <rect
  144. x="441"
  145. y="-8"
  146. width="82"
  147. height="24"
  148. stroke="#46C55A35"
  149. fill="#000000"
  150. opacity="0.8"
  151. />
  152. <text
  153. class="mapKey"
  154. x="444"
  155. y="0"
  156. fill="#919697"
  157. font-size="8"
  158. @click.stop="
  159. clickLabel(
  160. 'SXJ_KGDL_XWT_FDC_STA',
  161. '13风电场',
  162. penetrateType
  163. )
  164. "
  165. >
  166. 13风电场
  167. </text>
  168. <text
  169. x="492"
  170. y="0"
  171. fill="#05bb4c"
  172. font-size="8"
  173. @click.stop="
  174. clickLabel(
  175. 'SXJ_KGDL_XWT_FDC_STA',
  176. '13风电场',
  177. penetrateType
  178. )
  179. "
  180. >
  181. {{ sourceMap?.station?.SXJ_KGDL_XWT_FDC_STA?.zjts }}
  182. </text>
  183. <text
  184. class="mapKey"
  185. x="508"
  186. y="0"
  187. fill="#919697"
  188. font-size="8"
  189. @click.stop="
  190. clickLabel(
  191. 'SXJ_KGDL_XWT_FDC_STA',
  192. '13风电场',
  193. penetrateType
  194. )
  195. "
  196. >
  197. </text>
  198. <text
  199. class="mapKey"
  200. x="444"
  201. y="12"
  202. fill="#919697"
  203. font-size="8"
  204. @click.stop="
  205. clickLabel(
  206. 'SXJ_KGDL_DJY_FDC_STA',
  207. '风电场2',
  208. penetrateType
  209. )
  210. "
  211. >
  212. 风电场2
  213. </text>
  214. <text
  215. x="492"
  216. y="12"
  217. fill="#05bb4c"
  218. font-size="8"
  219. @click.stop="
  220. clickLabel(
  221. 'SXJ_KGDL_DJY_FDC_STA',
  222. '风电场2',
  223. penetrateType
  224. )
  225. "
  226. >
  227. {{ sourceMap?.station?.SXJ_KGDL_DJY_FDC_STA?.zjts }}
  228. </text>
  229. <text
  230. x="508"
  231. y="12"
  232. fill="#919697"
  233. font-size="8"
  234. @click.stop="
  235. clickLabel(
  236. 'SXJ_KGDL_DJY_FDC_STA',
  237. '风电场2',
  238. penetrateType
  239. )
  240. "
  241. >
  242. </text>
  243. </g>
  244. </g>
  245. <g
  246. class="item-label-hover"
  247. v-if="
  248. showType === 'all' ||
  249. showType === 'fc' ||
  250. companyid == 'SXJ_KGDL_FLFD_ZGS0'
  251. "
  252. >
  253. <svg
  254. version="1.1"
  255. xmlns="http://www.w3.org/2000/svg"
  256. xmlns:xlink="http://www.w3.org/1999/xlink"
  257. x="368"
  258. y="45"
  259. width="45"
  260. height="45"
  261. viewBox="0 0 220 392"
  262. enable-background="new 0 0 220 392"
  263. xml:space="preserve"
  264. class="windmill"
  265. >
  266. <image
  267. width="47"
  268. height="345"
  269. class="pillar"
  270. x="68"
  271. y="50"
  272. xlink:href="./pillars.png"
  273. ></image>
  274. <image
  275. v-if="
  276. sourceMap.YF_FDC_fczt === 3 && sourceMap.DJY_FDC_fczt === 3
  277. "
  278. width="200"
  279. height="165"
  280. xlink:href="./fl_white.png"
  281. transform="matrix(1 0 0 1 -20 40)"
  282. ></image>
  283. <image
  284. v-else
  285. width="200"
  286. height="165"
  287. class="fan"
  288. xlink:href="./fl_blue.png"
  289. ></image>
  290. </svg>
  291. <g
  292. :class="
  293. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  294. "
  295. >
  296. <rect
  297. x="310"
  298. y="64"
  299. width="75"
  300. height="15"
  301. stroke="#46C55A35"
  302. fill="#000000"
  303. opacity="0.8"
  304. />
  305. <g
  306. @click.stop="
  307. clickLabel(
  308. 'SXJ_KGDL_NJL_FDC_STA',
  309. '风电场3',
  310. penetrateType
  311. )
  312. "
  313. >
  314. <text
  315. class="mapKey"
  316. x="314"
  317. y="75"
  318. fill="#919697"
  319. font-size="8"
  320. >
  321. 风电场3
  322. </text>
  323. <text x="352" y="75" fill="#05bb4c" font-size="8">
  324. {{ sourceMap?.station?.SXJ_KGDL_NJL_FDC_STA?.zjts }}
  325. </text>
  326. <text x="372" y="75" fill="#919697" font-size="8">台</text>
  327. </g>
  328. </g>
  329. </g>
  330. <g
  331. class="item-label-hover"
  332. v-if="
  333. showType === 'all' ||
  334. showType === 'fc' ||
  335. companyid == 'SXJ_KGDL_FLFD_ZGS0'
  336. "
  337. >
  338. <svg
  339. version="1.1"
  340. xmlns="http://www.w3.org/2000/svg"
  341. xmlns:xlink="http://www.w3.org/1999/xlink"
  342. x="380"
  343. y="9"
  344. width="45"
  345. height="45"
  346. viewBox="0 0 220 392"
  347. enable-background="new 0 0 220 392"
  348. xml:space="preserve"
  349. class="windmill"
  350. >
  351. <image
  352. width="47"
  353. height="345"
  354. class="pillar"
  355. x="68"
  356. y="50"
  357. xlink:href="./pillars.png"
  358. ></image>
  359. <image
  360. v-if="
  361. sourceMap.BHB_FDC_fczt === 3 && sourceMap.BHB3_FDC_fczt === 3
  362. "
  363. width="200"
  364. height="165"
  365. xlink:href="./fl_white.png"
  366. transform="matrix(1 0 0 1 -20 40)"
  367. ></image>
  368. <image
  369. v-else
  370. width="200"
  371. height="165"
  372. class="fan"
  373. xlink:href="./fl_blue.png"
  374. ></image>
  375. </svg>
  376. <g
  377. :class="
  378. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  379. "
  380. >
  381. <rect
  382. x="295"
  383. y="-6"
  384. width="100"
  385. height="36"
  386. stroke="#46C55A35"
  387. fill="#000000"
  388. opacity="0.8"
  389. />
  390. <g
  391. @click.stop="
  392. clickLabel('SXJ_KGDL_YF_FDC_STA', '风电场4', penetrateType)
  393. "
  394. >
  395. <text class="mapKey" x="299" y="3" fill="#919697" font-size="8">
  396. 风电场4
  397. </text>
  398. <text x="355" y="3" fill="#05bb4c" font-size="8">
  399. {{ sourceMap?.station?.SXJ_KGDL_YF_FDC_STA?.zjts }}
  400. </text>
  401. <text x="385" y="3" fill="#919697" font-size="8">台</text>
  402. </g>
  403. <g
  404. @click.stop="
  405. clickLabel(
  406. 'SXJ_KGDL_BHB_FDC_STA',
  407. '风电场5',
  408. penetrateType
  409. )
  410. "
  411. >
  412. <text
  413. class="mapKey"
  414. x="299"
  415. y="14"
  416. fill="#919697"
  417. font-size="8"
  418. >
  419. 风电场5
  420. </text>
  421. <text x="360" y="14" fill="#05bb4c" font-size="8">
  422. {{ sourceMap?.station?.SXJ_KGDL_BHB_FDC_STA?.zjts }}
  423. </text>
  424. <text x="385" y="14" fill="#919697" font-size="8">台</text>
  425. </g>
  426. <g
  427. @click.stop="
  428. clickLabel(
  429. 'SXJ_KGDL_BHB3_FDC_STA',
  430. '风电场6',
  431. penetrateType
  432. )
  433. "
  434. >
  435. <text
  436. class="mapKey"
  437. x="299"
  438. y="26"
  439. fill="#919697"
  440. font-size="8"
  441. >
  442. 风电场6
  443. </text>
  444. <text x="368" y="26" fill="#05bb4c" font-size="8">
  445. {{ sourceMap?.station?.SXJ_KGDL_BHB3_FDC_STA?.zjts }}
  446. </text>
  447. <text x="385" y="26" fill="#919697" font-size="8">台</text>
  448. </g>
  449. </g>
  450. </g>
  451. <g
  452. class="item-label-hover"
  453. v-if="
  454. showType === 'all' ||
  455. showType === 'fc' ||
  456. companyid == 'SXJ_KGDL_FLFD_ZGS0'
  457. "
  458. >
  459. <svg
  460. version="1.1"
  461. xmlns="http://www.w3.org/2000/svg"
  462. xmlns:xlink="http://www.w3.org/1999/xlink"
  463. x="390"
  464. y="110"
  465. width="45"
  466. height="45"
  467. viewBox="0 0 220 392"
  468. enable-background="new 0 0 220 392"
  469. xml:space="preserve"
  470. class="windmill"
  471. >
  472. <image
  473. width="47"
  474. height="345"
  475. class="pillar"
  476. x="68"
  477. y="50"
  478. xlink:href="./pillars.png"
  479. ></image>
  480. <image
  481. v-if="
  482. sourceMap.PTZ_FDC_fczt === 3 &&
  483. sourceMap.YTY_FDC_fczt === 3 &&
  484. sourceMap.YTY_FDC_fczt === 3
  485. "
  486. width="200"
  487. height="165"
  488. xlink:href="./fl_white.png"
  489. transform="matrix(1 0 0 1 -20 40)"
  490. ></image>
  491. <image
  492. v-else
  493. width="200"
  494. height="165"
  495. class="fan"
  496. xlink:href="./fl_blue.png"
  497. ></image>
  498. </svg>
  499. <g
  500. :class="
  501. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  502. "
  503. >
  504. <rect
  505. x="420"
  506. y="110"
  507. width="80"
  508. height="46"
  509. stroke="#46C55A35"
  510. fill="#000000"
  511. opacity="0.8"
  512. />
  513. <text
  514. class="mapKey"
  515. x="423"
  516. y="135"
  517. fill="#919697"
  518. font-size="8"
  519. @click.stop="
  520. clickLabel(
  521. 'SXJ_KGDL_PTZ_FDC_STA',
  522. '风电场7',
  523. penetrateType
  524. )
  525. "
  526. >
  527. 风电场7
  528. </text>
  529. <text
  530. x="468"
  531. y="135"
  532. fill="#05bb4c"
  533. font-size="8"
  534. @click.stop="
  535. clickLabel(
  536. 'SXJ_KGDL_PTZ_FDC_STA',
  537. '风电场7',
  538. penetrateType
  539. )
  540. "
  541. >
  542. {{ sourceMap?.station?.SXJ_KGDL_PTZ_FDC_STA?.zjts }}
  543. </text>
  544. <text
  545. x="485"
  546. y="135"
  547. fill="#919697"
  548. font-size="8"
  549. @click.stop="
  550. clickLabel(
  551. 'SXJ_KGDL_PTZ_FDC_STA',
  552. '风电场7',
  553. penetrateType
  554. )
  555. "
  556. >
  557. </text>
  558. <text
  559. class="mapKey"
  560. x="423"
  561. y="120"
  562. fill="#919697"
  563. font-size="8"
  564. @click.stop="
  565. clickLabel(
  566. 'SXJ_KGDL_YTY_FDC_STA',
  567. '风电场8',
  568. penetrateType
  569. )
  570. "
  571. >
  572. 风电场8
  573. </text>
  574. <text
  575. x="468"
  576. y="120"
  577. fill="#05bb4c"
  578. font-size="8"
  579. @click.stop="
  580. clickLabel(
  581. 'SXJ_KGDL_YTY_FDC_STA',
  582. '风电场8',
  583. penetrateType
  584. )
  585. "
  586. >
  587. {{ sourceMap?.station?.SXJ_KGDL_YTY_FDC_STA?.zjts }}
  588. </text>
  589. <text
  590. x="485"
  591. y="120"
  592. fill="#919697"
  593. font-size="8"
  594. @click.stop="
  595. clickLabel(
  596. 'SXJ_KGDL_YTY_FDC_STA',
  597. '风电场8',
  598. penetrateType
  599. )
  600. "
  601. >
  602. </text>
  603. <text
  604. class="mapKey"
  605. x="423"
  606. y="150"
  607. fill="#919697"
  608. font-size="8"
  609. @click.stop="
  610. clickLabel(
  611. 'SXJ_KGDL_YLZ_FDC_STA',
  612. '风电场9',
  613. penetrateType
  614. )
  615. "
  616. >
  617. 风电场9
  618. </text>
  619. <text
  620. x="468"
  621. y="150"
  622. fill="#05bb4c"
  623. font-size="8"
  624. @click.stop="
  625. clickLabel(
  626. 'SXJ_KGDL_YLZ_FDC_STA',
  627. '风电场9',
  628. penetrateType
  629. )
  630. "
  631. >
  632. {{ sourceMap?.station?.SXJ_KGDL_YLZ_FDC_STA?.zjts }}
  633. </text>
  634. <text
  635. x="485"
  636. y="150"
  637. fill="#919697"
  638. font-size="8"
  639. @click.stop="
  640. clickLabel(
  641. 'SXJ_KGDL_YLZ_FDC_STA',
  642. '风电场9',
  643. penetrateType
  644. )
  645. "
  646. >
  647. </text>
  648. </g>
  649. </g>
  650. <g
  651. class="item-label-hover"
  652. v-if="
  653. showType === 'all' ||
  654. showType === 'fc' ||
  655. companyid == 'SXJ_KGDL_FLFD_ZGS0'
  656. "
  657. @click.stop="
  658. clickLabel('SXJ_KGDL_ZK_FDC_STA', '风电场10', penetrateType)
  659. "
  660. >
  661. <svg
  662. version="1.1"
  663. xmlns="http://www.w3.org/2000/svg"
  664. xmlns:xlink="http://www.w3.org/1999/xlink"
  665. x="365"
  666. y="115"
  667. width="45"
  668. height="45"
  669. viewBox="0 0 220 392"
  670. enable-background="new 0 0 220 392"
  671. xml:space="preserve"
  672. class="windmill"
  673. >
  674. <image
  675. width="47"
  676. height="345"
  677. class="pillar"
  678. x="68"
  679. y="50"
  680. xlink:href="./pillars.png"
  681. ></image>
  682. <image
  683. v-if="
  684. sourceMap.PTZ_FDC_fczt === 3 &&
  685. sourceMap.YTY_FDC_fczt === 3 &&
  686. sourceMap.YTY_FDC_fczt === 3
  687. "
  688. width="200"
  689. height="165"
  690. xlink:href="./fl_white.png"
  691. transform="matrix(1 0 0 1 -20 40)"
  692. ></image>
  693. <image
  694. v-else
  695. width="200"
  696. height="165"
  697. class="fan"
  698. xlink:href="./fl_blue.png"
  699. ></image>
  700. </svg>
  701. <g
  702. :class="
  703. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  704. "
  705. >
  706. <rect
  707. x="310"
  708. y="130"
  709. width="80"
  710. height="12"
  711. stroke="#46C55A35"
  712. fill="#000000"
  713. opacity="0.8"
  714. />
  715. <text class="mapKey" x="313" y="139" fill="#919697" font-size="8">
  716. 风电场10
  717. </text>
  718. <text x="355" y="139" fill="#05bb4c" font-size="8">
  719. {{ sourceMap?.station?.SXJ_KGDL_ZK_FDC_STA?.zjts }}
  720. </text>
  721. <text x="375" y="139" fill="#919697" font-size="8">台</text>
  722. </g>
  723. </g>
  724. <g
  725. class="item-label-hover"
  726. v-if="
  727. showType === 'all' ||
  728. showType === 'gf' ||
  729. companyid == 'SXJ_KGDL_GFFD_ZGS0'
  730. "
  731. @click.stop="
  732. clickLabel('SXJ_KGDL_TZ_GDC_STA', '光伏电站1', penetrateType)
  733. "
  734. >
  735. <image
  736. width="20"
  737. v-if="sourceMap.TZ_GDC_fczt === 3"
  738. height="20"
  739. x="495"
  740. y="10"
  741. xlink:href="./fow_white.png"
  742. ></image>
  743. <image
  744. width="20"
  745. v-else
  746. height="20"
  747. x="495"
  748. y="10"
  749. xlink:href="./fow_blue.png"
  750. ></image>
  751. <g
  752. :class="
  753. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  754. "
  755. >
  756. <rect
  757. x="460"
  758. y="0"
  759. width="160"
  760. height="12"
  761. stroke="#46C55A35"
  762. fill="#000000"
  763. opacity="0.8"
  764. />
  765. <text class="mapKey" x="463" y="9" fill="#919697" font-size="8">
  766. 光伏电站1 集中式:
  767. </text>
  768. <text x="528" y="9" fill="#05bb4c" font-size="8">
  769. {{ sourceMap?.station?.SXJ_KGDL_TZ_GDC_STA?.jzzjts }}
  770. </text>
  771. <text x="545" y="9" fill="#919697" font-size="8">
  772. 台 组串式:
  773. </text>
  774. <text x="585" y="9" fill="#05bb4c" font-size="8">
  775. {{ sourceMap?.station?.SXJ_KGDL_TZ_GDC_STA?.zczjts }}
  776. </text>
  777. <text x="600" y="9" fill="#919697" font-size="8">台</text>
  778. </g>
  779. </g>
  780. <g
  781. class="item-label-hover"
  782. v-if="
  783. showType === 'all' ||
  784. showType === 'gf' ||
  785. companyid == 'SXJ_KGDL_GFFD_ZGS0'
  786. "
  787. @click.stop="
  788. clickLabel('SXJ_KGDL_SY_GDC_STA', '光伏电站2', penetrateType)
  789. "
  790. >
  791. <image
  792. width="20"
  793. v-if="sourceMap.SY_GDC_fczt === 3"
  794. height="20"
  795. x="435"
  796. y="60"
  797. xlink:href="./fow_white.png"
  798. ></image>
  799. <image
  800. width="20"
  801. v-else
  802. height="20"
  803. x="435"
  804. y="60"
  805. xlink:href="./fow_blue.png"
  806. ></image>
  807. <g
  808. :class="
  809. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  810. "
  811. >
  812. <rect
  813. x="455"
  814. y="62"
  815. width="160"
  816. height="12"
  817. stroke="#46C55A35"
  818. fill="#000000"
  819. opacity="0.8"
  820. />
  821. <text class="mapKey" x="458" y="71" fill="#919697" font-size="8">
  822. 光伏电站2 集中式:
  823. </text>
  824. <text x="520" y="71" fill="#05bb4c" font-size="8">
  825. {{ sourceMap?.station?.SXJ_KGDL_SY_GDC_STA?.jzzjts }}
  826. </text>
  827. <text x="540" y="71" fill="#919697" font-size="8">
  828. 台 组串式:
  829. </text>
  830. <text x="580" y="71" fill="#05bb4c" font-size="8">
  831. {{ sourceMap?.station?.SXJ_KGDL_SY_GDC_STA?.zczjts }}
  832. </text>
  833. <text x="600" y="71" fill="#919697" font-size="8">台</text>
  834. </g>
  835. </g>
  836. <g
  837. class="item-label-hover"
  838. v-if="
  839. showType === 'all' ||
  840. showType === 'gf' ||
  841. companyid == 'SXJ_KGDL_GFFD_ZGS0'
  842. "
  843. @click.stop="
  844. clickLabel('SXJ_KGDL_HR_GDC_STA', '光伏电站3', penetrateType)
  845. "
  846. >
  847. <image
  848. width="20"
  849. v-if="sourceMap.HR_GDC_fczt === 3"
  850. height="20"
  851. x="455"
  852. y="25"
  853. xlink:href="./fow_white.png"
  854. ></image>
  855. <image
  856. width="20"
  857. v-else
  858. height="20"
  859. x="455"
  860. y="25"
  861. xlink:href="./fow_blue.png"
  862. ></image>
  863. <g
  864. :class="
  865. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  866. "
  867. >
  868. <rect
  869. x="475"
  870. y="27"
  871. width="110"
  872. height="12"
  873. stroke="#46C55A35"
  874. fill="#000000"
  875. opacity="0.8"
  876. />
  877. <text class="mapKey" x="478" y="36" fill="#919697" font-size="8">
  878. 光伏电站3 组串式:
  879. </text>
  880. <text x="545" y="36" fill="#05bb4c" font-size="8">
  881. {{ sourceMap?.station?.SXJ_KGDL_HR_GDC_STA?.zczjts }}
  882. </text>
  883. <text x="565" y="36" fill="#919697" font-size="8">台</text>
  884. </g>
  885. </g>
  886. <g
  887. class="item-label-hover"
  888. v-if="
  889. showType === 'all' ||
  890. showType === 'gf' ||
  891. companyid == 'SXJ_KGDL_GFFD_ZGS0'
  892. "
  893. @click.stop="
  894. clickLabel('SXJ_KGDL_YG_GDC_STA', '光伏电站4', penetrateType)
  895. "
  896. >
  897. <image
  898. width="20"
  899. v-if="sourceMap.YG_GDC_fczt === 3"
  900. height="20"
  901. x="476"
  902. y="35"
  903. xlink:href="./fow_white.png"
  904. ></image>
  905. <image
  906. width="20"
  907. v-else
  908. height="20"
  909. x="476"
  910. y="35"
  911. xlink:href="./fow_blue.png"
  912. ></image>
  913. <g
  914. :class="
  915. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  916. "
  917. >
  918. <rect
  919. x="455"
  920. y="45"
  921. width="160"
  922. height="12"
  923. stroke="#46C55A35"
  924. fill="#000000"
  925. opacity="0.8"
  926. />
  927. <text class="mapKey" x="458" y="54" fill="#919697" font-size="8">
  928. 光伏电站4 集中式:
  929. </text>
  930. <text x="529" y="54" fill="#05bb4c" font-size="8">
  931. {{ sourceMap?.station?.SXJ_KGDL_YG_GDC_STA?.jzzjts }}
  932. </text>
  933. <text x="545" y="54" fill="#919697" font-size="8">
  934. 台 组串式:
  935. </text>
  936. <text x="585" y="54" fill="#05bb4c" font-size="8">
  937. {{ sourceMap?.station?.SXJ_KGDL_YG_GDC_STA?.zczjts }}
  938. </text>
  939. <text x="605" y="54" fill="#919697" font-size="8">台</text>
  940. </g>
  941. </g>
  942. <g
  943. class="item-label-hover"
  944. v-if="
  945. showType === 'all' ||
  946. showType === 'gf' ||
  947. companyid == 'SXJ_KGDL_GFFD_ZGS0'
  948. "
  949. @click.stop="
  950. clickLabel('SXJ_KGDL_YX_GDC_STA', '光伏电站5', penetrateType)
  951. "
  952. >
  953. <image
  954. width="20"
  955. v-if="sourceMap.YX_GDC_fczt === 3"
  956. height="20"
  957. x="435"
  958. y="45"
  959. xlink:href="./fow_white.png"
  960. ></image>
  961. <image
  962. width="20"
  963. v-else
  964. height="20"
  965. x="435"
  966. y="45"
  967. xlink:href="./fow_blue.png"
  968. ></image>
  969. <g
  970. :class="
  971. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  972. "
  973. >
  974. <rect
  975. x="452"
  976. y="51"
  977. width="110"
  978. height="12"
  979. stroke="#46C55A35"
  980. fill="#000000"
  981. opacity="0.8"
  982. />
  983. <text class="mapKey" x="455" y="60" fill="#919697" font-size="8">
  984. 光伏电站5 集中式:
  985. </text>
  986. <text x="520" y="60" fill="#05bb4c" font-size="8">
  987. {{ sourceMap?.station?.SXJ_KGDL_YX_GDC_STA?.jzzjts }}
  988. </text>
  989. <text x="540" y="60" fill="#919697" font-size="8">台</text>
  990. </g>
  991. </g>
  992. <g
  993. class="item-label-hover"
  994. v-if="
  995. showType === 'all' ||
  996. showType === 'gf' ||
  997. companyid == 'SXJ_KGDL_GFFD_ZGS0'
  998. "
  999. @click.stop="
  1000. clickLabel('SXJ_KGDL_YY_GDC_STA', '光伏电站6', penetrateType)
  1001. "
  1002. >
  1003. <image
  1004. width="20"
  1005. v-if="sourceMap.YY_GDC_fczt === 3"
  1006. height="20"
  1007. x="435"
  1008. y="20"
  1009. xlink:href="./fow_white.png"
  1010. ></image>
  1011. <image
  1012. width="20"
  1013. v-else
  1014. height="20"
  1015. x="435"
  1016. y="20"
  1017. xlink:href="./fow_blue.png"
  1018. ></image>
  1019. <g
  1020. :class="
  1021. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  1022. "
  1023. >
  1024. <rect
  1025. x="440"
  1026. y="10"
  1027. width="160"
  1028. height="12"
  1029. stroke="#46C55A35"
  1030. fill="#000000"
  1031. opacity="0.8"
  1032. />
  1033. <text class="mapKey" x="443" y="19" fill="#919697" font-size="8">
  1034. 光伏电站6 集中式:
  1035. </text>
  1036. <text x="510" y="19" fill="#05bb4c" font-size="8">
  1037. {{ sourceMap?.station?.SXJ_KGDL_YY_GDC_STA?.jzzjts }}
  1038. </text>
  1039. <text x="530" y="19" fill="#919697" font-size="8">
  1040. 台 组串式:
  1041. </text>
  1042. <text x="570" y="19" fill="#05bb4c" font-size="8">
  1043. {{ sourceMap?.station?.SXJ_KGDL_YY_GDC_STA?.zczjts }}
  1044. </text>
  1045. <text x="590" y="19" fill="#919697" font-size="8">台</text>
  1046. </g>
  1047. </g>
  1048. <g
  1049. class="item-label-hover"
  1050. v-if="
  1051. showType === 'all' ||
  1052. showType === 'gf' ||
  1053. companyid == 'SXJ_KGDL_GFFD_ZGS0'
  1054. "
  1055. @click.stop="
  1056. clickLabel('SXJ_KGDL_JR_GDC_STA', '光伏电站7', penetrateType)
  1057. "
  1058. >
  1059. <image
  1060. width="20"
  1061. v-if="sourceMap.JR_GDC_fczt === 3"
  1062. height="20"
  1063. x="445"
  1064. y="80"
  1065. xlink:href="./fow_white.png"
  1066. ></image>
  1067. <image
  1068. width="20"
  1069. v-else
  1070. height="20"
  1071. x="445"
  1072. y="80"
  1073. xlink:href="./fow_blue.png"
  1074. ></image>
  1075. <g
  1076. :class="
  1077. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  1078. "
  1079. >
  1080. <rect
  1081. x="462"
  1082. y="82"
  1083. width="110"
  1084. height="12"
  1085. stroke="#46C55A35"
  1086. fill="#000000"
  1087. opacity="0.8"
  1088. />
  1089. <text class="mapKey" x="465" y="91" fill="#919697" font-size="8">
  1090. 光伏电站7 组串式:
  1091. </text>
  1092. <text x="530" y="91" fill="#05bb4c" font-size="8">
  1093. {{ sourceMap?.station?.SXJ_KGDL_JR_GDC_STA?.zczjts }}
  1094. </text>
  1095. <text x="545" y="91" fill="#919697" font-size="8">台</text>
  1096. </g>
  1097. </g>
  1098. <g
  1099. class="item-label-hover"
  1100. v-if="
  1101. showType === 'all' ||
  1102. showType === 'gf' ||
  1103. companyid == 'SXJ_KGDL_GFFD_ZGS0'
  1104. "
  1105. @click.stop="
  1106. clickLabel('SXJ_KGDL_TL_GDC_STA', '光伏电站8', penetrateType)
  1107. "
  1108. >
  1109. <image
  1110. v-if="sourceMap.TL_GDC_fczt === 3"
  1111. width="20"
  1112. height="20"
  1113. x="375"
  1114. y="230"
  1115. xlink:href="./fow_white.png"
  1116. ></image>
  1117. <image
  1118. v-else
  1119. width="20"
  1120. height="20"
  1121. x="375"
  1122. y="230"
  1123. xlink:href="./fow_blue.png"
  1124. ></image>
  1125. <g
  1126. :class="
  1127. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  1128. "
  1129. >
  1130. <rect
  1131. x="394"
  1132. y="233"
  1133. width="110"
  1134. height="12"
  1135. stroke="#46C55A35"
  1136. fill="#000000"
  1137. opacity="0.8"
  1138. />
  1139. <text class="mapKey" x="398" y="242" fill="#919697" font-size="8">
  1140. 光伏电站8 组串式:
  1141. </text>
  1142. <text x="460" y="242" fill="#05bb4c" font-size="8">
  1143. {{ sourceMap?.station?.SXJ_KGDL_TL_GDC_STA?.zczjts }}
  1144. </text>
  1145. <text x="485" y="242" fill="#919697" font-size="8">台</text>
  1146. </g>
  1147. </g>
  1148. <g
  1149. class="item-label-hover"
  1150. v-if="
  1151. showType === 'all' ||
  1152. showType === 'gf' ||
  1153. companyid == 'SXJ_KGDL_GFFD_ZGS0'
  1154. "
  1155. @click.stop="
  1156. clickLabel('SXJ_KGDL_FS_GDC_STA', '光伏电站9', penetrateType)
  1157. "
  1158. >
  1159. <image
  1160. v-if="sourceMap.FS_GDC_fczt === 3"
  1161. width="20"
  1162. height="20"
  1163. x="315"
  1164. y="115"
  1165. xlink:href="./fow_white.png"
  1166. ></image>
  1167. <image
  1168. v-else
  1169. width="20"
  1170. height="20"
  1171. x="315"
  1172. y="115"
  1173. xlink:href="./fow_blue.png"
  1174. ></image>
  1175. <g
  1176. :class="
  1177. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  1178. "
  1179. >
  1180. <rect
  1181. x="245"
  1182. y="117"
  1183. width="110"
  1184. height="12"
  1185. stroke="#46C55A35"
  1186. fill="#000000"
  1187. opacity="0.8"
  1188. />
  1189. <text class="mapKey" x="247" y="126" fill="#919697" font-size="8">
  1190. 光伏电站9 集中式:
  1191. </text>
  1192. <text x="320" y="126" fill="#05bb4c" font-size="8">
  1193. {{ sourceMap?.station?.SXJ_KGDL_FS_GDC_STA?.jzzjts }}
  1194. </text>
  1195. <text x="340" y="126" fill="#919697" font-size="8">台</text>
  1196. </g>
  1197. </g>
  1198. <g
  1199. class="item-label-hover"
  1200. v-if="
  1201. showType === 'all' ||
  1202. showType === 'gf' ||
  1203. companyid == 'SXJ_KGDL_GFFD_ZGS0'
  1204. "
  1205. @click.stop="
  1206. clickLabel('SXJ_KGDL_PL_GDC_STA', '光伏电站10', penetrateType)
  1207. "
  1208. >
  1209. <image
  1210. v-if="sourceMap.PL_GDC_fczt === 3"
  1211. width="20"
  1212. height="20"
  1213. x="365"
  1214. y="40"
  1215. xlink:href="./fow_white.png"
  1216. ></image>
  1217. <image
  1218. v-else
  1219. width="20"
  1220. height="20"
  1221. x="365"
  1222. y="40"
  1223. xlink:href="./fow_blue.png"
  1224. ></image>
  1225. <g
  1226. :class="
  1227. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  1228. "
  1229. >
  1230. <rect
  1231. x="255"
  1232. y="38"
  1233. width="110"
  1234. height="12"
  1235. stroke="#46C55A35"
  1236. fill="#000000"
  1237. opacity="0.8"
  1238. />
  1239. <text class="mapKey" x="258" y="47" fill="#919697" font-size="8">
  1240. 光伏电站10 集中式:
  1241. </text>
  1242. <text x="325" y="47" fill="#05bb4c" font-size="8">
  1243. {{ sourceMap?.station?.SXJ_KGDL_PL_GDC_STA?.jzzjts }}
  1244. </text>
  1245. <text x="345" y="47" fill="#919697" font-size="8">台</text>
  1246. </g>
  1247. </g>
  1248. <g
  1249. class="item-label-hover"
  1250. v-if="
  1251. showType === 'all' ||
  1252. showType === 'fc' ||
  1253. companyid == 'SXJ_KGDL_FLFD_ZGS0'
  1254. "
  1255. >
  1256. <svg
  1257. version="1.1"
  1258. xmlns="http://www.w3.org/2000/svg"
  1259. xmlns:xlink="http://www.w3.org/1999/xlink"
  1260. x="375"
  1261. y="40"
  1262. width="45"
  1263. height="45"
  1264. viewBox="0 0 220 392"
  1265. enable-background="new 0 0 220 392"
  1266. xml:space="preserve"
  1267. class="windmill"
  1268. >
  1269. <image
  1270. width="47"
  1271. height="345"
  1272. class="pillar"
  1273. x="68"
  1274. y="50"
  1275. xlink:href="./pillars.png"
  1276. ></image>
  1277. <image
  1278. v-if="
  1279. sourceMap.GJY_FDC_fczt === 3 &&
  1280. sourceMap.HSM_FDC_fczt === 3 &&
  1281. sourceMap.NJL_FDC_fczt === 3
  1282. "
  1283. width="200"
  1284. height="165"
  1285. xlink:href="./fl_white.png"
  1286. transform="matrix(1 0 0 1 -20 40)"
  1287. ></image>
  1288. <image
  1289. v-else
  1290. width="200"
  1291. height="165"
  1292. class="fan"
  1293. xlink:href="./fl_blue.png"
  1294. ></image>
  1295. </svg>
  1296. <g
  1297. :class="
  1298. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  1299. "
  1300. >
  1301. <g>
  1302. <rect
  1303. x="310"
  1304. y="48"
  1305. width="80"
  1306. height="25"
  1307. stroke="#46C55A35"
  1308. fill="#000000"
  1309. opacity="0.8"
  1310. />
  1311. <g
  1312. @click.stop="
  1313. clickLabel(
  1314. 'SXJ_KGDL_GJY_FDC_STA',
  1315. '风电场11',
  1316. penetrateType
  1317. )
  1318. "
  1319. >
  1320. <text
  1321. class="mapKey"
  1322. x="314"
  1323. y="57"
  1324. fill="#919697"
  1325. font-size="8"
  1326. >
  1327. 风电场11
  1328. </text>
  1329. <text x="362" y="57" fill="#05bb4c" font-size="8">
  1330. {{ sourceMap?.station?.SXJ_KGDL_GJY_FDC_STA?.zjts }}
  1331. </text>
  1332. <text x="379" y="57" fill="#919697" font-size="8">台</text>
  1333. </g>
  1334. <g
  1335. @click.stop="
  1336. clickLabel(
  1337. 'SXJ_KGDL_HSM_FDC_STA',
  1338. '风电场12',
  1339. penetrateType
  1340. )
  1341. "
  1342. >
  1343. <text
  1344. class="mapKey"
  1345. x="314"
  1346. y="69"
  1347. fill="#919697"
  1348. font-size="8"
  1349. >
  1350. 风电场12
  1351. </text>
  1352. <text x="365" y="69" fill="#05bb4c" font-size="8">
  1353. {{ sourceMap?.station?.SXJ_KGDL_HSM_FDC_STA?.zjts }}
  1354. </text>
  1355. <text x="379" y="69" fill="#919697" font-size="8">台</text>
  1356. </g>
  1357. </g>
  1358. </g>
  1359. </g>
  1360. <g
  1361. class="item-label-hover"
  1362. v-if="
  1363. showType === 'all' ||
  1364. showType === 'fc' ||
  1365. companyid == 'SXJ_KGDL_FLFD_ZGS0'
  1366. "
  1367. @click.stop="
  1368. clickLabel(
  1369. 'SXJ_KGDL_PDL_FDC_STA',
  1370. '风电场13',
  1371. penetrateType
  1372. )
  1373. "
  1374. >
  1375. <svg
  1376. version="1.1"
  1377. xmlns="http://www.w3.org/2000/svg"
  1378. xmlns:xlink="http://www.w3.org/1999/xlink"
  1379. x="400"
  1380. y="40"
  1381. width="45"
  1382. height="45"
  1383. viewBox="0 0 220 392"
  1384. enable-background="new 0 0 220 392"
  1385. xml:space="preserve"
  1386. class="windmill"
  1387. >
  1388. <image
  1389. width="47"
  1390. height="345"
  1391. class="pillar"
  1392. x="68"
  1393. y="50"
  1394. xlink:href="./pillars.png"
  1395. ></image>
  1396. <image
  1397. v-if="sourceMap.PDL_FDC_fczt === 3"
  1398. width="200"
  1399. height="165"
  1400. xlink:href="./fl_white.png"
  1401. transform="matrix(1 0 0 1 -20 40)"
  1402. ></image>
  1403. <image
  1404. v-else
  1405. width="200"
  1406. height="165"
  1407. class="fan"
  1408. xlink:href="./fl_blue.png"
  1409. ></image>
  1410. </svg>
  1411. <g
  1412. :class="
  1413. $store.state.themeName === 'light' ? 'isshow-light' : 'isshow'
  1414. "
  1415. >
  1416. <rect
  1417. x="430"
  1418. y="48"
  1419. width="80"
  1420. height="12"
  1421. stroke="#46C55A35"
  1422. fill="#000000"
  1423. opacity="0.8"
  1424. />
  1425. <text class="mapKey" x="433" y="58" fill="#919697" font-size="8">
  1426. 风电场13
  1427. </text>
  1428. <text x="480" y="58" fill="#05bb4c" font-size="8">
  1429. {{ sourceMap?.station?.SXJ_KGDL_PDL_FDC_STA?.zjts }}
  1430. </text>
  1431. <text x="495" y="58" fill="#919697" font-size="8">台</text>
  1432. </g>
  1433. </g>
  1434. </g>
  1435. </g>
  1436. </svg>
  1437. </div>
  1438. </template>
  1439. <script>
  1440. export default {
  1441. // 名称
  1442. name: "SvgMap",
  1443. // 使用组件
  1444. components: {},
  1445. // 传入参数
  1446. props: {
  1447. data: {
  1448. type: Object,
  1449. default: () => {},
  1450. },
  1451. showType: {
  1452. type: String,
  1453. default: "all",
  1454. },
  1455. companyid: {
  1456. type: String,
  1457. default: "SXJ_RGN",
  1458. },
  1459. },
  1460. // 自定义事件
  1461. emits: {
  1462. changePeriod: null,
  1463. },
  1464. // 数据
  1465. data() {
  1466. return {
  1467. penetrateType: 3,
  1468. sourceMap: {},
  1469. c1: false,
  1470. c2: false,
  1471. svgTop: 0,
  1472. svgLeft: 0,
  1473. svgWidth: "100%",
  1474. svgHeight: "100%",
  1475. };
  1476. },
  1477. // 函数
  1478. methods: {
  1479. clickLabel(wpId, planBtnName, penetrateType) {
  1480. this.$emit("clickLabel", wpId, planBtnName, penetrateType);
  1481. },
  1482. // 绑定鼠标浮动事件
  1483. initMapFloat: function () {
  1484. const els = this.$el.querySelectorAll(".map-float"); // 获取全部map-float元素
  1485. const elsImage = this.$el.querySelectorAll(".map-float-image"); // 获取全部map-float元素
  1486. Array.prototype.forEach.call(els, (element, index) => {
  1487. // 遍历map-float元素
  1488. element.addEventListener("mouseover", function () {
  1489. // 绑定事件修改前兄弟节点的display
  1490. this.style.opacity = 0.2;
  1491. });
  1492. element.addEventListener("mouseout", function () {
  1493. if (elsImage[index].style.display != "block") {
  1494. this.style.opacity = 0;
  1495. }
  1496. });
  1497. // 点击事件
  1498. element.addEventListener("click", function () {
  1499. Array.prototype.forEach.call(elsImage, (ele, index) => {
  1500. // 遍历map-float元素 清空凸起
  1501. ele.style.display = "none";
  1502. els[index].style.opacity = 0;
  1503. });
  1504. elsImage[index].style.display = "block";
  1505. });
  1506. });
  1507. },
  1508. },
  1509. // 生命周期钩子
  1510. beforeCreate() {
  1511. // 创建前
  1512. },
  1513. created() {
  1514. // 创建后
  1515. this.sourceMap = this.data;
  1516. debugger
  1517. setTimeout(() => {
  1518. this.c1 = true;
  1519. setTimeout(() => {
  1520. this.c2 = true;
  1521. }, 500);
  1522. }, 2000);
  1523. },
  1524. mounted() {
  1525. // 渲染后
  1526. this.svgWidth = this.$el.scrollWidth.toFixed(0);
  1527. this.svgHeight = this.$el.scrollHeight.toFixed(0);
  1528. this.svgTop = `calc(50% - ${this.svgHeight / 2}px)`;
  1529. this.svgLeft = `calc(50% - ${this.svgWidth / 2}px)`;
  1530. },
  1531. watch: {
  1532. data(res) {
  1533. this.sourceMap = res;
  1534. },
  1535. },
  1536. };
  1537. </script>
  1538. <style lang="less" scoped>
  1539. .svg-map {
  1540. position: relative;
  1541. width: 100%;
  1542. height: 100%;
  1543. .curStyle {
  1544. cursor: pointer;
  1545. }
  1546. .item-label {
  1547. cursor: pointer;
  1548. }
  1549. svg {
  1550. position: absolute;
  1551. left: 50%;
  1552. top: 50%;
  1553. transform: translate(-45%, -50%);
  1554. }
  1555. .map-float {
  1556. cursor: pointer;
  1557. }
  1558. .map-float-image {
  1559. display: none;
  1560. }
  1561. #nx-map-circle {
  1562. transform-origin: 50% 20%;
  1563. transform: rotateX(38deg);
  1564. }
  1565. .nx-map-up-circle {
  1566. animation: nxMapUpCircle 4s linear;
  1567. }
  1568. @keyframes nxMapUpCircle {
  1569. 0% {
  1570. r: 0;
  1571. }
  1572. 10% {
  1573. r: 2;
  1574. }
  1575. 99% {
  1576. r: 2;
  1577. }
  1578. 100% {
  1579. r: 0;
  1580. }
  1581. }
  1582. .nx-map-line {
  1583. stroke-dasharray: 60, 100;
  1584. animation: nxMapLine 4s linear;
  1585. }
  1586. @keyframes nxMapLine {
  1587. 0% {
  1588. stroke-dashoffset: 60;
  1589. }
  1590. 10% {
  1591. stroke-dashoffset: 60;
  1592. }
  1593. 20% {
  1594. stroke-dashoffset: 0;
  1595. }
  1596. 99% {
  1597. stroke-dashoffset: 0;
  1598. }
  1599. 100% {
  1600. stroke-dashoffset: 60;
  1601. }
  1602. }
  1603. .nx-map-down-circle-1 {
  1604. animation: nxMapDownCircle1 4s linear;
  1605. }
  1606. @keyframes nxMapDownCircle1 {
  1607. 0% {
  1608. r: 0;
  1609. }
  1610. 20% {
  1611. r: 0;
  1612. }
  1613. 30% {
  1614. r: 3;
  1615. }
  1616. 50% {
  1617. r: 3;
  1618. }
  1619. 99% {
  1620. r: 3;
  1621. }
  1622. 100% {
  1623. r: 3;
  1624. }
  1625. }
  1626. .nx-map-down-circle-2 {
  1627. animation: nxMapDownCircle2 4s linear infinite;
  1628. }
  1629. @keyframes nxMapDownCircle2 {
  1630. 0% {
  1631. r: 0;
  1632. }
  1633. 20% {
  1634. r: 0;
  1635. }
  1636. 40% {
  1637. r: 9;
  1638. }
  1639. 50% {
  1640. r: 9;
  1641. }
  1642. 99% {
  1643. r: 9;
  1644. }
  1645. 100% {
  1646. r: 0;
  1647. }
  1648. }
  1649. .nx-map-down-circle-3 {
  1650. animation: nxMapDownCircle3 4s linear infinite;
  1651. }
  1652. @keyframes nxMapDownCircle3 {
  1653. 0% {
  1654. r: 0;
  1655. }
  1656. 20% {
  1657. r: 0;
  1658. }
  1659. 50% {
  1660. r: 16;
  1661. }
  1662. 99% {
  1663. r: 16;
  1664. }
  1665. 100% {
  1666. r: 0;
  1667. }
  1668. }
  1669. .nx-map-down-circle-loop {
  1670. // animation: nxMapDownCircleLoop 2s linear infinite;
  1671. }
  1672. @keyframes nxMapDownCircleLoop {
  1673. 0% {
  1674. r: 0;
  1675. opacity: 1;
  1676. }
  1677. 80% {
  1678. r: 6;
  1679. opacity: 0.8;
  1680. }
  1681. 100% {
  1682. r: 10;
  1683. opacity: 0;
  1684. }
  1685. }
  1686. }
  1687. .item-label-hover:hover .isshow {
  1688. display: flex;
  1689. }
  1690. .item-label-hover:hover .isshow-light {
  1691. display: flex;
  1692. }
  1693. .isshow {
  1694. display: none;
  1695. color: #ffffff;
  1696. }
  1697. .isshow-light {
  1698. display: none;
  1699. color: #ffffff;
  1700. rect {
  1701. fill: @deepblue;
  1702. transition: @transition;
  1703. }
  1704. .mapKey {
  1705. fill: #fff;
  1706. transition: @transition;
  1707. }
  1708. }
  1709. .windmill-1,
  1710. .windmill-2,
  1711. .windmill-3,
  1712. .windmill-4,
  1713. .windmill-5 {
  1714. position: absolute;
  1715. }
  1716. .windmill-1 {
  1717. top: 23.148vh;
  1718. left: 28.333vh;
  1719. width: 4.167vh;
  1720. }
  1721. .fan {
  1722. transform-origin: 46% 29%;
  1723. transform: rotateY(45deg);
  1724. animation: rotate 2.5s linear infinite;
  1725. }
  1726. @keyframes rotate {
  1727. from {
  1728. transform: rotate(0);
  1729. }
  1730. to {
  1731. transform: rotate(360deg);
  1732. }
  1733. }
  1734. </style>