From 96da92e9056c9c02e77867998424d623261daab0 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期四, 25 七月 2024 15:09:32 +0800 Subject: [PATCH] 1. 添加地图罗盘的显隐 2. 修复数据表格中O3数据列实际显示NO2的值的问题 3. 优化风向的中文描述 --- src/utils/map/dialog.js | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/utils/map/dialog.js b/src/utils/map/dialog.js index 54292bd..900ac0c 100644 --- a/src/utils/map/dialog.js +++ b/src/utils/map/dialog.js @@ -1,6 +1,8 @@ -import { factorName } from '../../constant/factor-name'; -import { factorUnit } from '../../constant/factor-unit'; -import { windDir } from '../../constant/wind-dir'; +import $ from 'jquery'; +import { factorName } from '@/constant/factor-name'; +import { factorUnit } from '@/constant/factor-unit'; +import { windDir } from '@/constant/wind-dir'; +import { map } from './index_old'; export const DialogUtil = { show: true, @@ -31,7 +33,8 @@ 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; }, @@ -102,7 +105,7 @@ 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鲁'; } @@ -152,7 +155,8 @@ // 瀹氫箟椤堕儴鏍囬 var top = document.createElement('div'); // top.className = "info-top"; - top.className = 'ff-content ff-content-top-left ff-content-small-borderless-t info-top'; + top.className = + 'ff-content ff-content-top-left ff-content-small-borderless-t info-top'; var top_b = document.createElement('div'); top_b.className = 'ff-border-bottom'; var top_t = document.createElement('div'); @@ -163,9 +167,9 @@ 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(); @@ -185,11 +189,8 @@ 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') @@ -246,13 +247,13 @@ return info; }, - openNewWindow(factorDatas, i, map, position, onClose) { + openNewWindow(factorDatas, i, onClose) { if (!this.show) return; const window = this.createInfoWindow(factorDatas, i, onClose); - window.open(map, position); + window.open(map, factorDatas.lnglats_GD[i]); }, - openNewWindow2(factorData, map, position, onClose) { + openNewWindow2(factorData, position, onClose) { if (!this.show) return; const window = this.createInfoWindow2(factorData, onClose); window.open(map, position); -- Gitblit v1.9.3