| | |
| | | <!-- <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> --> |
| | |
| | | //$("#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){ |
| | |
| | | var maxBounds = moralMap.getMaxBounds(); |
| | | var paramMap = {}; |
| | | paramMap["orgId"]= params['orgId']; |
| | | paramMap["regionCode"]= params['regionCode']; |
| | | // 为了适配旧接口 |
| | | paramMap["Fe"]= maxBounds.northeastLat;//东北角纬度,大一点 |
| | | paramMap["Ge"]= maxBounds.northeastLng;//东北角经度,大一点 |
| | |
| | | obj['mouseover'] = function (type) { |
| | | if(type.target.getData()==null){ |
| | | //当前设备数据为空时,设备悬停事件中 刷新一下数据 |
| | | refreshAllState(); |
| | | //refreshAllState(); |
| | | } |
| | | } |
| | | obj['click'] = function(){ |
| | |
| | | paramMap["Ke"]= bounds.southwestLat;//西北角纬度坐标,小一点 |
| | | paramMap["Le"]= bounds.southwestLng;//西北角经度坐标,小一点 |
| | | loadLazy("getMonitorpointList",paramMap,addOverMpoints); |
| | | startRefreshPage(); |
| | | //startRefreshPage(); |
| | | showGrid(); |
| | | }); |
| | | //地图加载完成后 加载监控点,速度慢 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | var equ = { |
| | | methodName : 'refreshState', |
| | | markers : markers, |
| | | layer : layer |
| | | } |
| | | var equStr = JSON.stringify(equ); |
| | | if(window["console"]!=undefined){ |
| | | } |
| | | if(!!window['external']&&!!window['external']['callWin']){ |
| | | window['external'].callWin(equStr); |
| | | } |
| | | } |
| | | if(resultMap["popupEquStates"]!=null){ |
| | | listView.refreshState(resultMap["popupEquStates"]); |
| | |
| | | } |
| | | |
| | | function callJS(jsonData){ |
| | | moralMap.callJS(jsonData); |
| | | refreshAllState(); |
| | | var jsonData = JSON.parse(jsonData); |
| | | var methodName = jsonData.methodName; |
| | | if("JumpBaiduMap" == methodName){ |
| | | moralMap.callJS(jsonData); |
| | | } else if ("RefreshState" == methodName) { |
| | | //$("#searchParam").val(JSON.stringify(jsonData)); |
| | | var states = jsonData.states; |
| | | for(var i in states){ |
| | | var state = states[i]; |
| | | var mpoint = moralMap.getMpoint(state.id); |
| | | if(mpoint!=null){ |
| | | mpoint.refreshState(state.state); |
| | | } |
| | | for(var j in state.devices){ |
| | | var marker = state.devices[j]; |
| | | var marker_mac = marker["mac"]; |
| | | var equipment = moralMap.getEquipment(marker_mac); |
| | | if(equipment!=null){ |
| | | equipment.refreshState(marker); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |