let form, layer, table, laydate, tableIns, user = getUser(); let mapPointList = [], mainMapPointList = []; layui.use(['form', 'layer', 'table', 'laydate'], function () { form = layui.form; layer = layui.layer; table = layui.table; laydate = layui.laydate; initData(); }) /* 数据初始化 */ function initData() { getHyd(); getFgd(); getMap(); getErrorNum(); getWatchNum(); getCoverRate(); getSpeedNum(); } /* 获取监控活跃度分析 */ function getHyd() { let params = {}; let url = dataUrl + "proteam/pot/monitoringCoverage/getHyd"; ajaxRequest(url, "GET", params, true, function () { }, function (result) { if (result.code === 200) { initEchartsOne(result.data); } else if (result.code === 500) { layer.alert(result.msg, { icon: 2 }) } }, function (xhr, status, error) { errorFn(xhr, status, error) }, null); } /* 获取监控覆盖度分析 */ function getFgd() { let params = {}; let url = dataUrl + "proteam/pot/monitoringCoverage/getFgd"; ajaxRequest(url, "GET", params, true, function () { }, function (result) { if (result.code === 200) { initEchartsTwo(result.data); } else if (result.code === 500) { layer.alert(result.msg, { icon: 2 }) } }, function (xhr, status, error) { errorFn(xhr, status, error) }, null); } /* 获取地图球机 */ function getMap() { let params = {}; let url = dataUrl + "proteam/pot/monitoringCoverage/getMap"; ajaxRequest(url, "GET", params, true, function () { }, function (result) { if (result.code === 200) { let dataList = []; $.each(result.data, function (index, item) { item.coordinate = [parseFloat(item.lon), parseFloat(item.lat)] dataList.push(item); }) mainMapPointList = dataList; loadMap(dataList); } else if (result.code === 500) { layer.alert(result.msg, { icon: 2 }) } }, function (xhr, status, error) { errorFn(xhr, status, error) }, null); } /* 获取球机异常类型 */ function getErrorNum() { let params = {}; let url = dataUrl + "proteam/pot/monitoringCoverage/getErrorNum"; ajaxRequest(url, "GET", params, true, function () { }, function (result) { if (result.code === 200) { $.each(result.data, function (index, item) { $('#num' + item.name).html(item.num); }) } else if (result.code === 500) { layer.alert(result.msg, { icon: 2 }) } }, function (xhr, status, error) { errorFn(xhr, status, error) }, null); } /* 下行观看分析 */ function getWatchNum() { let params = {}; let url = dataUrl + "proteam/pot/monitoringCoverage/getWatchNum"; ajaxRequest(url, "GET", params, true, function () { }, function (result) { console.error(result); if (result.code === 200) { initEchartsThree(result.data); } else if (result.code === 500) { layer.alert(result.msg, { icon: 2 }) } }, function (xhr, status, error) { errorFn(xhr, status, error) }, null); } /* 风险球机覆盖度 */ function getCoverRate() { let params = {}; let url = dataUrl + "proteam/pot/monitoringCoverage/getCoverRate"; ajaxRequest(url, "GET", params, true, function () { }, function (result) { console.error(result); if (result.code === 200) { initEchartsFour(result.data); } else if (result.code === 500) { layer.alert(result.msg, { icon: 2 }) } }, function (xhr, status, error) { errorFn(xhr, status, error) }, null); } /* 球机速率正常/异常数量 */ function getSpeedNum() { let params = {}; let url = dataUrl + "proteam/pot/monitoringCoverage/getSpeedNum"; ajaxRequest(url, "GET", params, true, function () { }, function (result) { if (result.code === 200) { $('#normalNum').html(result.data[0].normalNum); $('#errorNum').html(result.data[0].errorNum); } else if (result.code === 500) { layer.alert(result.msg, { icon: 2 }) } }, function (xhr, status, error) { errorFn(xhr, status, error) }, null); } function openHyd() { let obj = { type: 1, title: '监控活跃度分析', id: '' } openIframeByParamObj3("hyd_detail", "监控活跃度分析", "../supplement/child/monitoring_hyd_list.html", "62%", "85%", obj); } function openWatch() { let obj = { type: 3, title:'下行观看分析', id:'' } openIframeByParamObj3("watch_detail", "下行观看分析", "../supplement/child/monitoring_watch_list.html", "62%", "85%", obj); }