1 files added
4 files modified
| | |
| | | return new ResultBean("操作成功",SUCCESS);
|
| | | }
|
| | | public static ResultBean fail(){
|
| | | return new ResultBean("操作失败",FAIL);
|
| | | return fail("操作失败");
|
| | | }
|
| | | public static ResultBean fail(String msg){
|
| | | return new ResultBean(msg,FAIL);
|
| | | }
|
| | | public ResultBean(Throwable e) {
|
| | | this.message = e.toString();
|
| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.alibaba.fastjson.JSONReader;
|
| | | import com.alibaba.fastjson.TypeReference;
|
| | | import com.alibaba.fastjson.*;
|
| | | import com.moral.common.util.StringUtils;
|
| | | import com.moral.entity.*;
|
| | | import com.moral.entity.alarm.AlarmConfig;
|
| | |
| | | import org.springframework.web.bind.annotation.*;
|
| | | import org.springframework.web.servlet.ModelAndView;
|
| | | import org.xml.sax.InputSource;
|
| | | import com.alibaba.fastjson.JSONArray;
|
| | | import com.alibaba.fastjson.JSONObject;
|
| | | import com.moral.common.bean.Constants;
|
| | | import com.moral.common.bean.JsonData;
|
| | | import com.moral.common.bean.PageResult;
|
| | |
| | | DeviceVersion deviceVersion = deviceVersionService.queryVersionById(device.getDeviceVersionId());
|
| | | rtdLayout = orgLayoutService.queryRtdLayoutWithUnit(orgId,deviceVersion.getVersion());
|
| | | }else {
|
| | | return ResultBean.fail();
|
| | | String errMsg = "device 数据异常:"+ JSON.toJSONString(device);
|
| | | log.warn(errMsg);
|
| | | return ResultBean.fail(errMsg);
|
| | | }
|
| | |
|
| | | } else {
|
| | |
| | | * 百度地图初始化 |
| | | */ |
| | | moralMap.mapInit = function() { |
| | | baiduMap = new BMap.Map("mapCanvas", { |
| | | minZoom: 12, |
| | | maxZoom: 20 |
| | | }); // 创建Map实例,设置地图允许的最小/大级别 |
| | | var defaultParam = { |
| | | minZoom: 12, |
| | | maxZoom: 20 |
| | | }; |
| | | debugger; |
| | | if(!!arguments[1]) { |
| | | $.extend(defaultParam,arguments[1]); |
| | | } |
| | | baiduMap = new BMap.Map("mapCanvas",defaultParam); // 创建Map实例,设置地图允许的最小/大级别 |
| | | var map = baiduMap; |
| | | var mapStyle = { |
| | | features: ["road", "building", "water", "land"], //隐藏地图上的poi |
| | |
| | | width: 110, // 信息窗口宽度 |
| | | height: 80, // 信息窗口高度 |
| | | title: getTitleOutHtml(), // 信息窗口标题 |
| | | offset: new BMap.Size(-2,0) //设置信息窗偏移 |
| | | offset: new BMap.Size(-8,-5) //设置信息窗偏移 |
| | | } |
| | | |
| | | function getTitleOutHtml() { |
New file |
| | |
| | | //paraName 等找参数的名称 |
| | | function getUrlParam(paraName) { |
| | | var url = document.location.toString(); |
| | | var arrObj = url.split("?"); |
| | | |
| | | if (arrObj.length > 1) { |
| | | var arrPara = arrObj[1].split("&"); |
| | | var arr; |
| | | |
| | | for (var i = 0; i < arrPara.length; i++) { |
| | | arr = arrPara[i].split("="); |
| | | |
| | | if (arr != null && arr[0] == paraName) { |
| | | return arr[1]; |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | else { |
| | | return ""; |
| | | } |
| | | } |
| | |
| | | <title></title> |
| | | <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=rER1sgBIcQxkfNSlm2wmBGZGgEERrooM"></script> |
| | | <script type="text/javascript" src="/js/jquery.min.js"></script> |
| | | <script type="text/javascript" src="/js/utils.js"></script> |
| | | <script type="text/javascript"> |
| | | if(typeof (JSON) == 'undefined'){ |
| | | $.getScript("js/json2.js"); |
| | |
| | | var moralMap = window.moralMap; |
| | | var params = $.parseJSON($("#mapParams").html()); |
| | | moralMap['params'] = params; |
| | | var mapType = getUrlParam("mapType"); |
| | | var mapOption = {}; |
| | | if(!!mapType && !!eval(mapType)) { |
| | | mapOption["mapType"] = eval(mapType); |
| | | } |
| | | //通过地区名称加载地图 |
| | | moralMap.mapInit(params["regionName"]); |
| | | moralMap.mapInit(params["regionName"],mapOption); |
| | | //列表对象 |
| | | var listView =moralMap.initListView({id: "#equ_list",pageSize:12}); |
| | | window["listView"] = listView; |