From 6f178bf24071959fc7e015418254d3cdb34e6f88 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sun, 09 May 2021 16:46:00 +0800
Subject: [PATCH] 修复天气和地图弹窗
---
public/map/popup/html/FlareClusterLayer_v3 copy.html | 40 +++++++++++++++++++++++-----------------
public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js | 4 ++--
public/weather/index.html | 4 ++--
3 files changed, 27 insertions(+), 21 deletions(-)
diff --git a/public/map/popup/html/FlareClusterLayer_v3 copy.html b/public/map/popup/html/FlareClusterLayer_v3 copy.html
index d8d0ae1..7fb44db 100644
--- a/public/map/popup/html/FlareClusterLayer_v3 copy.html
+++ b/public/map/popup/html/FlareClusterLayer_v3 copy.html
@@ -382,24 +382,30 @@
var xhr = null
, my = this
, url = '/api/blade-jfpts/equipment/equipment/detail?id=' + dat;
- if (XMLHttpRequest) { //http请求
- xhr = new XMLHttpRequest();
- } else {
- xhr = new ActiveXObject("Microsoft.XMLHTTP");
+ // if (XMLHttpRequest) { //http请求
+ // xhr = new XMLHttpRequest();
+ // } else {
+ // xhr = new ActiveXObject("Microsoft.XMLHTTP");
- }
- xhr.open("get", url, true);
- xhr.send();
- xhr.onreadystatechange = function () {
- if (xhr.readyState === 4) {
- if (xhr.status === 200) {
- // 判断isJson是否传进来了
- var data = JSON.parse(xhr.responseText);// JSON转js
- my.ourd = data.data;
- my.deptname = my.ourd.deptName;
- }
- }
- }
+ // }
+ // xhr.open("get", url, true);
+ // xhr.send();
+ // xhr.onreadystatechange = function () {
+ // if (xhr.readyState === 4) {
+ // if (xhr.status === 200) {
+ // // 判断isJson是否传进来了
+ // var data = JSON.parse(xhr.responseText);// JSON转js
+ // my.ourd = data.data;
+ // my.deptname = my.ourd.deptName;
+ // }
+ // }
+ // }
+ axios.get(url).then((res) => {
+ var data = JSON.parse(res);// JSON转js
+ my.ourd = data.data;
+ my.deptname = my.ourd.deptName;
+ })
+
},
handleClick(tab, event) {//标签tab点击事件
// console.log(tab, event);
diff --git a/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js b/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
index 39032cb..9a47933 100644
--- a/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
+++ b/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
@@ -205,7 +205,7 @@
var mySelf = this;
// console.log(und)
if (und == '控制端') {//控制端弹窗关闭
- parent[0].layer.close(indexControl);
+ // parent[0].layer.close(indexControl);
// parent[0].layer.close(+indexControl + 1);
}
@@ -526,7 +526,7 @@
var position = new esri.geometry.Point(lgtd, lttd, new esri.SpatialReference({ wkid: 4326 }));//根据输入坐标信息找地图上的点
this._map.centerAndZoom(position, this.map.getZoom() + 1);//缩放,10是缩放级别,可以自定义,数值越大缩放越大
- parent[0].layer.close(this.indexs)
+ // parent[0].layer.close(this.indexs)
// parent[0].layer.close(+this.indexs + 1)
// console.log('111:', this.map.zoomToFullExtent(), '222:', evt, evt.graphic._extent, 'zoom');
diff --git a/public/weather/index.html b/public/weather/index.html
index 5da9d84..b35b529 100644
--- a/public/weather/index.html
+++ b/public/weather/index.html
@@ -54,8 +54,8 @@
methods: {
getNewTime() {
this.nowTime.year = (new Date()).getFullYear();
- this.nowTime.month = (new Date()).getMonth();
- this.nowTime.day = (new Date()).getDay();
+ this.nowTime.month = (new Date()).getMonth() + 1;
+ this.nowTime.day = (new Date()).getDate();
this.nowTime.hour = (new Date()).getHours() < 10 ? '0' + (new Date()).getHours() : (new Date()).getHours();
this.nowTime.minute = (new Date()).getMinutes() < 10 ? '0' + (new Date()).getMinutes() : (new Date()).getMinutes();
this.nowTime.second = (new Date()).getSeconds() < 10 ? '0' + (new Date()).getSeconds() : (new Date()).getSeconds();
--
Gitblit v1.9.3