liuyg
2021-05-09 6f178bf24071959fc7e015418254d3cdb34e6f88
修复天气和地图弹窗
3 files modified
48 ■■■■■ changed files
public/map/popup/html/FlareClusterLayer_v3 copy.html 40 ●●●●● patch | view | raw | blame | history
public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js 4 ●●●● patch | view | raw | blame | history
public/weather/index.html 4 ●●●● patch | view | raw | blame | history
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);
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');
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();