diff --git a/js/pages/accessMge/accessMge.js b/js/pages/accessMge/accessMge.js index de007c6..0b682db 100644 --- a/js/pages/accessMge/accessMge.js +++ b/js/pages/accessMge/accessMge.js @@ -103,7 +103,7 @@ function getStatistics(data){ document.getElementById("threesc").textContent=dycNums[2]; document.getElementById("foursc").textContent=dycNums[3]; - var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg"; + var s = "../../img/video/voi_photo4.png"; var htmls = ''; $('#photo').empty().append(htmls); @@ -127,7 +127,27 @@ function getVehicleStatisticsPhoto(accessType,timeType){ html +=''; }) }else{ - html += '
未找到关联信息
' + // html += '
无数据
' + + html +='
'; + html +=''; + html +='告警1'; + html +='
'; + + html +='
'; + html +=''; + html +='告警2'; + html +='
'; + + html +='
'; + html +=''; + html +='告警3'; + html +='
'; + + html +='
'; + html +=''; + html +='告警4'; + html +='
'; } } else if (result.code === 500) { layer.msg(result.msg, { icon: 2 }); @@ -235,7 +255,7 @@ function getStatisticsPer(data){ document.getElementById("threescPer").textContent=dycNums[2]; document.getElementById("fourscPer").textContent=dycNums[3]; - var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg"; + var s = "../../img/video/voi_photo4.png"; var htmls = ''; $('#photos').empty().append(htmls); } @@ -253,12 +273,31 @@ function getPerStatisticsPhoto(accessType,timeType){ var a = "sss"; $.each(result.data, function (index, item) { html +='
'; - html +=''; + html +=''; html +=''+ a +''; html +='
'; }) }else{ - html += '
未找到关联信息
' + // html += '
无数据
' + html +='
'; + html +=''; + html +='告警1'; + html +='
'; + + html +='
'; + html +=''; + html +='告警2'; + html +='
'; + + html +='
'; + html +=''; + html +='告警3'; + html +='
'; + + html +='
'; + html +=''; + html +='告警4'; + html +='
'; } } else if (result.code === 500) { layer.msg(result.msg, { icon: 2 }); diff --git a/js/pages/towerAssInspect/towerAssInspect.js b/js/pages/towerAssInspect/towerAssInspect.js index 43142f6..5c2bf58 100644 --- a/js/pages/towerAssInspect/towerAssInspect.js +++ b/js/pages/towerAssInspect/towerAssInspect.js @@ -20,14 +20,14 @@ function getGtLists(){ }, function (result) { if (result.code === 200) { let html = ''; - if (result.data && result.data.length > 0) { + if (result.data && result.data.length > 0 && result.data[0] !== null) { $.each(result.data, function (index, item) { html += '' }) // 设备列表 getDeviceList(result.data[0].gtId); }else{ - html += '' + html += '' getDeviceList(""); } $('#gt').empty().append(html); @@ -38,32 +38,6 @@ function getGtLists(){ }, function (xhr) { layer.msg(xhr, { icon: 2 }); }); - - - // let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId; - // let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); - // const url = commonUrl + "system/sys/select/getGtLists?params="+ montageParam; // 杆塔url - // ajaxRequestGet(url, "GET", true, function () { - // }, function (result) { - // if (result.code === 200) { - // let html = ''; - // if (result.data && result.data.length > 0) { - // $.each(result.data, function (index, item) { - // html += '' - // }) - // } - // $('#gt').empty().append(html); - // layui.form.render(); - // // 设备列表 - // getDeviceList(result.data[0].gtId); - // // updateSelection(); - // } else if (result.code === 500) { - // layer.msg(result.msg, { icon: 2 }); - // } - // }, function (xhr, status, error) { - // error(xhr, status, error) - // setData(null); - // }, aqEnnable); } function getDeviceList(gtId){ @@ -74,7 +48,7 @@ function getDeviceList(gtId){ }, function (result) { let html = ''; if (result.code === 200) { - if (result.data && result.data.length > 1) { + if (result.data && result.data.length > 0 && result.data[0] !== null) { $.each(result.data, function (index, item) { html += '
'; html +=''; @@ -90,7 +64,7 @@ function getDeviceList(gtId){ }) getInfo(result.data[0].deviceId) }else{ - html += '
未找到关联设备
' + html += '
无数据
' getInfo("") } } else if (result.code === 500) { @@ -107,9 +81,6 @@ function getInfo(deviceId){ //实时检测 getRealTimeDetection(deviceId); - //当日检测变化趋势 - getTrend(deviceId) - //实时告警 getRealTimeAlarmList(deviceId) @@ -125,33 +96,21 @@ function getRealTimeDetection(deviceId){ }, function (result) { let html = ''; if (result.code === 200) { - if (result.data && result.data.length > 1) { + if (result.data && result.data.length > 0 && result.data[0] !== null) { $.each(result.data, function (index, item) { - if(item.dataType=="1"){ - html +='
'; + let modeName = nullToEmpty(item.modeName); + let val = nullToEmpty(item.val); + html +='
' ; html +='
'; - html +='
倾斜检测
'; - html +='
倾角'+item.val +'
'; + html +='
'+ modeName +'
'; + html +='
'+ val +'
'; html +='
'; html +='
'; - }else if(item.dataType=="2"){ - html +='
'; - html +='
'; - html +='
张力检测
'; - html +='
张力'+item.val +'
'; - html +='
'; - html +='
'; - }else if(item.dataType=="3"){ - html +='
'; - html +='
'; - html +='
碰撞检测
'; - html +='
碰撞'+item.val +'
'; - html +='
'; - html +='
'; - } }) + //当日检测变化趋势 + getTrend(deviceId,result.data[0].id) }else{ - html += '
未找到关联设备
' + html += '
无数据
' } } else if (result.code === 500) { layer.msg(result.msg, { icon: 2 }); @@ -163,15 +122,22 @@ function getRealTimeDetection(deviceId){ }, aqEnnable); } -function getTrend(deviceId){ - let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId; +function nullToEmpty(name){ + if (name === null || name === undefined) { + name = ""; + } + return name +} + +function getTrend(deviceId,id){ + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId + '&id=' + id; let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); const url = commonUrl + "screen/largeScreen/towerAssInspect/getTrend?params="+montageParam; // url ajaxRequestGet(url, "GET", true, function () { }, function (result) { let html = ''; if (result.code === 200) { - if (result.data && result.data.length > 1) { + if (result.data && result.data.length > 0 && result.data[0] !== null) { let xLabel =[]; let dataValue = []; $.each(result.data, function (index, item) { @@ -180,12 +146,12 @@ function getTrend(deviceId){ }); initEchartsOne(xLabel,dataValue); }else{ - html += '
未找到关联设备
' + initEchartsOne([],[]); } + } else if (result.code === 500) { layer.msg(result.msg, { icon: 2 }); } - $('#tendency').empty().append(html); }, function (xhr, status, error) { error(xhr, status, error) setData(null); diff --git a/pages/towerAssInspect/towerAssInspect.html b/pages/towerAssInspect/towerAssInspect.html index 245815e..788c2ab 100644 --- a/pages/towerAssInspect/towerAssInspect.html +++ b/pages/towerAssInspect/towerAssInspect.html @@ -76,8 +76,8 @@
-
- +
+