| | |
| | | body .layui-layer-dialog {
|
| | | min-width:400px;
|
| | | }
|
| | | .add-panel .addr {
|
| | | width: 210px;
|
| | | height: 22px;
|
| | | border: 1px solid #ccc;
|
| | | }
|
| | | </style>
|
| | | <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
|
| | | <script type="text/javascript" src="js/echarts.js"></script>
|
| | |
| | | <div class="map-info-detail">
|
| | | <div class="layui-collapse" lay-filter="test" lay-accordion="">
|
| | | <div class="layui-colla-item">
|
| | | <h2 class="layui-colla-title">搜索机房</h2>
|
| | | <h2 class="layui-colla-title">筛选机房</h2>
|
| | | <div class="layui-colla-content layui-show">
|
| | | <table>
|
| | | <tbody>
|
| | |
| | | }
|
| | |
|
| | | //需要实时查询的方法
|
| | | function Repeatoperation(){ |
| | | searchBattmaintrecords();
|
| | | searchUserTask(); |
| | | searchAnnounceall();
|
| | | searchTestsCale();
|
| | | |
| | | function Repeatoperation(){ |
| | | // 判断页面是否正在被访问
|
| | | if(pageIsVisit) {
|
| | | searchBattmaintrecords();
|
| | | searchUserTask(); |
| | | searchAnnounceall();
|
| | | searchTestsCale();
|
| | | } |
| | | setTimeout(Repeatoperation,10000);
|
| | | }
|
| | |
|
| | |
| | | if($('#content .warn-pie').length==0){
|
| | | return;
|
| | | }
|
| | | |
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchalarm_data, 10000);
|
| | | return;
|
| | | }
|
| | | |
| | | //生成电池告警率饼状图
|
| | | var $warn=$('#content .pie-con .warn-pie'); //获取告警容器的jquery对象
|
| | | if($warn.length!=0){
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchmaintByMap, 10000);
|
| | | return;
|
| | | }
|
| | | |
| | | // 判断是否为Echarts对象
|
| | | var isEcharts = isObject(brdnPie)?true:false;
|
| | |
|
| | |
| | | if($('#content .repair-pie').length==0){
|
| | | return;
|
| | | }
|
| | | |
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchBatt_maint_inf, 10000);
|
| | | return;
|
| | | }
|
| | | |
| | | // 判断是否为Echarts对象
|
| | | var isEcharts = isObject(repairPie)?true:false;
|
| | | if(!isEcharts) {
|
| | |
| | | if($('#content .health-pie').length==0){
|
| | | return;
|
| | | }
|
| | | |
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchGood, 10000);
|
| | | return;
|
| | | }
|
| | | |
| | | //生成电池健康率
|
| | | var $health=$('#content .pie-con .health-pie'); //获取故障容器的jquery对象
|
| | | if($health.length!=0){
|
| | |
| | | var endurPie;
|
| | | function searchEndurHome() {
|
| | | if($('#content .endur-pie').length==0){
|
| | | return;
|
| | | }
|
| | | |
| | | // 判断页面是否被访问
|
| | | if(!pageIsVisit) {
|
| | | setTimeout(searchEndurHome, 10000);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | // 生成图标的说明
|
| | | function createIconExplain(mapEle) {
|
| | | var iconExplain = $('<div id="mapImgDesc" style="position:absolute;background-color: #fff; border: 1px solid #ccc; right: 10px; bottom: 10px; z-index: 99999"></div>'); // 地图图标说明容器
|
| | | var iconExplainHt = $('<div class="explain-header" style="padding:4px 8px; border-bottom:1px solid #ccc; background-color: #CDDCFA">地图图标说明<img src="image/explain-down.gif" style="float:right;"/></div>');
|
| | | var iconExplainHt = $('<div class="explain-header" style="padding:4px 8px; border-bottom:1px solid #ccc; background-color: #CDDCFA">图标显示与选择<img src="image/explain-down.gif" style="float:right;"/></div>');
|
| | | iconExplain.append(iconExplainHt);
|
| | |
|
| | | changeMapImgDesc(iconExplain, 'normal');
|
| | |
| | | var powercut = mapImgDesc.find('.badge-powercut'); // 停电机房
|
| | | var normal = mapImgDesc.find('.badge-normal'); // 正常机房
|
| | | var weak = mapImgDesc.find('.badge-xuhang'); // 续航不足3小时机房
|
| | | console.log(warn.length);
|
| | | // console.log(warn.length);
|
| | | // 请求后台数据
|
| | | $.ajax({
|
| | | type: 'post'
|
| | |
| | |
|
| | | var content = '<div class="add-panel">'+
|
| | | '<div style="padding: 6px 4px"><span>地址:</span>'+
|
| | | '<span class="addr">'+addComp.province+'-'+addComp.city+'-'+addComp.district+'-'+addComp.street+'</span></div>'+
|
| | | '<input type="text" class="addr" value="'+addComp.province+'-'+addComp.city+'-'+addComp.district+'-'+addComp.street+'"></div>'+
|
| | | '<div style="padding: 6px 4px">经度:<span class="lng">'+rs.point.lng+'</span>,纬度:<span class="lat">'+rs.point.lat+'</span></div>'+
|
| | | '<div style="padding: 6px 4px"><span>设置站点名:</span>'+'<select style="border: 1px solid #ccc; width: 180px">'+options+'</select></div>'+
|
| | | '<div style="padding: 6px 4px; margin-top: 20px">'+
|
| | | '<div style="padding: 6px 4px"><span>设置站点名:</span>'+'<select style="border: 1px solid #ccc; width: 180px;height: 22px;">'+options+'</select></div>'+
|
| | | '<div style="padding: 6px 4px; margin-top: 15px">'+
|
| | | '<a href="javascript:getAddHomeInfo();" class="map-panel-btn">确定</a></div>'
|
| | | +'</div>';
|
| | |
|
| | |
| | | var lat = $('.add-panel .lat').text(); // 获取纬度
|
| | | var wgsPoint = GPS.bd2wgs(lat, lng); // 百度地图坐标转化为GPS
|
| | |
|
| | | var addr = $('.add-panel .addr').text(); // 获取地址
|
| | | var addr = $('.add-panel .addr').val(); // 获取地址
|
| | | var homeName = $('.add-panel select option:selected').text(); // 机房名称
|
| | | var homeId = $('.add-panel select option:selected').val(); // 机房ID
|
| | | if(homeId !=0 && confirm("确认将"+homeName+"机房设置到该位置吗?")){
|
| | |
| | | var bmap = GLOBAL.BMap; // BMap的命名空间
|
| | | var updateStationData = [];
|
| | |
|
| | | // 判断是否被访问
|
| | | if(!pageIsVisit) {
|
| | | // 关闭并添加延时执行
|
| | | clearInterval(updateTimeout);
|
| | | updateTimeout = setTimeout(updateStation, 4000);
|
| | | }
|
| | | |
| | | if(isLoad) {
|
| | | updateLoad = layer.load(1);
|
| | | }
|