xufenglei
2018-11-14 c398d5256db186bd280156fa63d62e13a3baa8d1
update
2 files modified
48 ■■■■■ changed files
src/main/webapp/js/moralmap.js 41 ●●●●● patch | view | raw | blame | history
src/main/webapp/view/map.jsp 7 ●●●●● patch | view | raw | blame | history
src/main/webapp/js/moralmap.js
@@ -968,23 +968,19 @@
        var new_point = new BMap.Point(condition.longitude, condition.latitude);
        baiduMap.panTo(new_point);
        baiduMap.setCenter(new_point);
        if (condition.type == "mpoint") {
            baiduMap.setZoom(17);
            new moralMap.Monitorpoint(condition);
            moralMap.openInfoWindow(showMonitorpointInfoWindow, new_point);
            showMonitorpointInfoWindow = null;
        } else if (condition.type == "device") {
            var parma={};
            parma["layer"] = "equipments";
            parma["markerKeys"] = [condition.mac];
            parma["areaCode"] = moralMap['params']["areaCode"];
            parma["orgId"] = moralMap['params']["orgId"];
            baiduMap.setZoom(18);
            //condition.data = {};
            new moralMap.Equipment(condition);
            moralMap.openInfoWindow(showEquipmentInfoWindow, new_point);
            showEquipmentInfoWindow = null;
            /*$.ajax({
        if (condition.type == "mpoint") {
            parma["layer"] = "monitorpoints";
            parma["markerKeys"] = [condition.id];
        } else if (condition.type == "device") {
            parma["layer"] = "equipments";
            parma["markerKeys"] = [condition.mac];
        }
        //$("#searchParam").val(JSON.stringify(parma));
        return;
        $.ajax({
                type: "post",
                url: "get-real-state-data",
                data:JSON.stringify(parma),
@@ -993,10 +989,21 @@
                cache: false,
                async: true,
                success: function(data) {
                condition.state = data["extData"]["markers"][0]["state"];
                if (condition.type == "mpoint") {
                    baiduMap.setZoom(17);
                    new moralMap.Monitorpoint(condition);
                    moralMap.openInfoWindow(showMonitorpointInfoWindow, new_point);
                    showMonitorpointInfoWindow = null;
                } else if (condition.type == "device") {
                    baiduMap.setZoom(18);
                    new moralMap.Equipment(condition);
                    moralMap.openInfoWindow(showEquipmentInfoWindow, new_point);
                    showEquipmentInfoWindow = null;
                }
            }
        });
                    
                }
            });*/
        }
    }
src/main/webapp/view/map.jsp
@@ -281,8 +281,8 @@
        <!-- <div class="search_box">
        <button id="searchBtn" type="button">搜索</button>
        <input id="searchParam"/>
        </div>
      <div id="popup_box">
        </div> -->
      <!-- <div id="popup_box">
            <div id="equ_list" class="listview">
            </div>
      </div> -->
@@ -319,7 +319,7 @@
        //$("#searchParam").val(mpoint['name']);
        var url = 'get-devices-by-mid-oid?mpId=' + mpoint['id'] + "&orgId=" + params['orgId'];
        listView.load(url); 
        //moralMap.showPopupbox("#popup_box");
        moralMap.showPopupbox("#popup_box");
    }
    function loadLazy(url,paramMap,callBack,lazyKeyer){
        if(lazyKeyer==undefined){
@@ -654,6 +654,5 @@
    
    function callJS(jsonData){
        moralMap.callJS(jsonData);
        refreshAllState();
    }
</script>