| | |
| | | import $ from 'jquery'; |
| | | import { factorName } from '@/constant/factor-name'; |
| | | import { factorUnit } from '@/constant/factor-unit'; |
| | | import { windDir } from '@/constant/wind-dir'; |
| | |
| | | isCustom: true, //使用自定义窗体 |
| | | content: this.createWindowContent(m), |
| | | // eslint-disable-next-line no-undef |
| | | offset: new AMap.Pixel(16, -45) |
| | | offset: new AMap.Pixel(16, -45), |
| | | autoMove: false |
| | | }); |
| | | return m.window; |
| | | }, |
| | |
| | | n = 0; |
| | | } |
| | | var v = f.factorData.toFixed(n); |
| | | var unit = factorUnit[f.factorName]; |
| | | var unit = factorUnit[f.factorName].unit; |
| | | if (f.factorName == 'CO') { |
| | | unit = 'μg/m³'; |
| | | } |
| | |
| | | var titleD = document.createElement('div'); |
| | | var closeX = document.createElement('i'); |
| | | titleD.innerHTML = title; |
| | | closeX.className = 'fa fa-times'; |
| | | // eslint-disable-next-line no-undef |
| | | closeX.className = 'text-close'; |
| | | $(closeX).attr('aria-hidden', 'true'); |
| | | $(closeX).text('X'); |
| | | closeX.onclick = function () { |
| | | marker.close(); |
| | | marker.window.close(); |
| | |
| | | refreshV.className = 'refresh-btn'; |
| | | var refresh = document.createElement('i'); |
| | | refresh.className = 'fa fa-refresh'; |
| | | // eslint-disable-next-line no-undef |
| | | $(refresh).attr('aria-hidden', 'true'); |
| | | // eslint-disable-next-line no-undef |
| | | $(refresh).css('color', '#ffffffc0'); |
| | | // eslint-disable-next-line no-undef |
| | | $(refresh).css('cursor', 'pointer'); |
| | | refresh.onclick = function () { |
| | | // $(this).addClass('fa-spin') |