diff --git a/api/commonRequest.js b/api/commonRequest.js index 3d4348c..22c4448 100644 --- a/api/commonRequest.js +++ b/api/commonRequest.js @@ -1,5 +1,5 @@ let aqEnnable = true // 参数加密开关 -const commonUrl = "http://10.40.92.33:18080/zhgd/"; +const commonUrl = "http://10.40.92.105:18080/zhgd/"; /* 登录相关 */ const login_url = commonUrl + "auth/login"; // 登录url const login_out = commonUrl + "auth/logout"; // 登出url @@ -54,4 +54,24 @@ function ajaxRequestGet(url, type, async, beforeFn, successFn, errorFn, isAes) { success: successFn, error: errorFn }); +} + + +/* GET请求 */ +function ajaxRequestGetExport(url, type, async, beforeFn, successFn, errorFn, isAes) { + $.ajax({ + url: url, + type: type, + headers: { + "authorization": sessionStorage.getItem("zhgd_token"), + "decrypt": isAes ? '' : 'decrypt' + }, + xhrFields: { + responseType: 'blob' // 告诉 xhr 我们期望返回的数据类型是 blob + }, + async: async, + beforeSend: beforeFn, + success: successFn, + error: errorFn + }); } \ No newline at end of file diff --git a/css/accessMge/accessMge.css b/css/accessMge/accessMge.css new file mode 100644 index 0000000..4c82bec --- /dev/null +++ b/css/accessMge/accessMge.css @@ -0,0 +1,207 @@ +html, +body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + color: #fff; + font-family: 'Alibaba PuHuiTi R'; +} + +.layout { + display: flex; + align-items: center; + justify-content: center; +} + +.main-box { + width: 100%; + height: 100%; + justify-content: space-evenly; + flex-direction: column; +} + +.top-box { + width: 100%; + height: 47%; + display: flex; + justify-content: space-around; +} + +.bot-box { + width: 100%; + height: 47%; + display: flex; + justify-content: space-around; +} + +.top-box-left{ + margin-top: 2%; + margin-left: 1%; + width: 49%; + height: 80%; +} + +.top-box-left-top{ + width: 100%; + height: 48%; + display: flex; +} + +.top-box-left-top-left{ + width: 20%; + height: 100%; + display: flex; + flex-direction: column; +} + +.today-font{ + color: #01E8DB; + letter-spacing:1px; + font-size: 16px; + font-weight: 500; + height: 5%; + width: 100%; +} + +.direction{ + display: flex; + flex-direction: row; + height: 30%; + width: 100%; + margin-top: 6%; +} + +.imgs{ + width: 60%; + height: 70%; + margin: 5% 5%; + text-align: center; +} + +.today-img{ + padding: 5% 2% 2% 2%; + background: url("../../img/accessMge/today.png") no-repeat 0 0 / 100% 100%; + display: flex; + justify-content: center; + align-items:center; +} + +.font-style{ + font-family: 'zcoolqingkehuangyouti'; + color: #fff; + font-size: 28px; + display: flex; + align-items: center; + justify-content: center; +} + +.span-style{ + color: #fff; + display: flex; + flex-direction: column-reverse; +} + +.top-box-left-top-center{ + margin-left: 5%; + width: 35%; + height: 100%; + display: flex; + flex-direction: column; +} + +.cumulative-font{ + color: #01E7BE; + letter-spacing:1px; + font-size: 16px; + font-weight: 500; + height: 5%; + width: 100%; +} + +.cumulative-img{ + padding: 0.5% 0% 0% 0%; + width: 12%; + height: 100%; + margin: 5.5% 3% 5% 3%; + text-align: center; + background: url("../../img/accessMge/cumulative.png") no-repeat 0 0 / 100% 100%; + display: flex; + justify-content: center; +} + + +.top-box-left-top-bot{ + width: 40%; + height: 100%; +} + +.abnormalAlarm{ + height: 90%; + width: 100%; + display: flex; + flex-direction: row; +} + +.abnormalAlarmImg{ + width: 20%; + height: 100%; + margin-left: 1%; +} + + +.top-box-left-bot{ + margin-top: 2%; + width: 100%; + height: 48%; +} + + +.top-box-right{ + margin-top: 2%; + margin-left: 1%; + width: 49%; + height: 80%; +} + +.bot-box-left{ + margin-left: 1%; + width: 38.5%; + height: 100%; +} + +.bot-box-right{ + margin-right: 1%; + width: 58.5%; + height: 100%; +} + +.img-style{ + width: 100%; + height: 100%; + box-sizing: border-box; + background-position: center center !important; +} + +.vehicle { + background: url("../../img/accessMge/vehicle.png") no-repeat 0 0 / 100% 100%; + display: flex; +} + +.personnel { + background: url("../../img/accessMge/personnel.png") no-repeat 0 0 / 100% 100%; + display: flex; +} + +.layui-form-item .layui-inline{ + margin-right: 0px +} + +.layui-form-label{ + padding-left: 1px; + padding-right: 1px +} + +.layui-form-item .layui-input-inline{ + width: 150px; +} \ No newline at end of file diff --git a/css/coreTable.css b/css/coreTable.css index 82fb214..17041c2 100644 --- a/css/coreTable.css +++ b/css/coreTable.css @@ -74,6 +74,10 @@ th { justify-content: space-between; } +.layui-laydate-content th{ + background-color: transparent; +} + ::-webkit-scrollbar { width: 6px; diff --git a/img/accessMge/cumulative.png b/img/accessMge/cumulative.png new file mode 100644 index 0000000..2f2750a Binary files /dev/null and b/img/accessMge/cumulative.png differ diff --git a/img/accessMge/personnel.png b/img/accessMge/personnel.png new file mode 100644 index 0000000..40c6dba Binary files /dev/null and b/img/accessMge/personnel.png differ diff --git a/img/accessMge/today.png b/img/accessMge/today.png new file mode 100644 index 0000000..72d12d9 Binary files /dev/null and b/img/accessMge/today.png differ diff --git a/img/accessMge/vehicle.png b/img/accessMge/vehicle.png new file mode 100644 index 0000000..adf1efd Binary files /dev/null and b/img/accessMge/vehicle.png differ diff --git a/js/pages/accessMge/accessMge.js b/js/pages/accessMge/accessMge.js index e69de29..de007c6 100644 --- a/js/pages/accessMge/accessMge.js +++ b/js/pages/accessMge/accessMge.js @@ -0,0 +1,378 @@ +let layer,table,form,laydate; +const bidCode = parent.$('#bidPro').val(); +layui.use(['layer','table','form','laydate'], function () { + layer = layui.layer; + table = layui.table; + form = layui.form; + laydate = layui.laydate; + + //时间范围设置 + laydate.render({ + elem: '#date1', + range: true, + type: 'datetime', + range: '~', + change: function(value, date, endDate){ + + } + }); + + //时间范围设置 + laydate.render({ + elem: '#date2', + range: true, + type: 'datetime', + range: '~', + change: function(value, date, endDate){ + + } + }); + + //今日、当月车辆出入场统计 + getVehicleStatistics(); + + // //今日、当月车辆出入场统计图片 + getVehicleStatisticsPhoto("1","1"); + + // //今日、当月车辆出入场统计列表 + getVehicleStatisticsList(bidCode); + + // //今日、当月人员出入场统计 + getPerStatistics(); + + // //今日、当月人员出入场统计图片 + getPerStatisticsPhoto("1","1"); + + // //今日、当月人员出入场统计列表 + getPerStatisticsList(bidCode); +}); + +function getVehicleStatistics(){ + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId; + let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); + const url = commonUrl + "screen/largeScreen/accessMge/getVehicleStatistics?params="+montageParam; // url + ajaxRequestGet(url, "GET", true, function () { + }, function (result) { + if (result.code === 200) { + if (result.data && result.data.length > 0) { + //今日、当月车辆出入场统计 + getStatistics(result.data) + }else{ + //今日、当月车辆出入场统计 + getStatistics("") + } + } else if (result.code === 500) { + layer.msg(result.msg, { icon: 2 }); + } + }, function (xhr, status, error) { + error(xhr, status, error) + }, aqEnnable); +} + +function getStatistics(data){ + if(data!=""){ + var jtrNum = data[0].jtrNum; + var jrcNum = data[0].jrcNum; + var dyrNum = data[0].dyrNum; + var dycNum = data[0].dycNum; + }else{ + var jtrNum = "000"; + var jrcNum = "000"; + var dyrNum = "0000"; + var dycNum = "0000"; + } + const jtrNums = jtrNum.split("").map(Number); + document.getElementById("oner").textContent=jtrNums[0]; + document.getElementById("twor").textContent=jtrNums[1]; + document.getElementById("threer").textContent=jtrNums[2]; + + const jrcNums = jrcNum.split("").map(Number); + document.getElementById("onec").textContent=jrcNums[0]; + document.getElementById("twoc").textContent=jrcNums[1]; + document.getElementById("threec").textContent=jrcNums[2]; + + const dyrNums = dyrNum.split("").map(Number); + document.getElementById("onesr").textContent=dyrNums[0]; + document.getElementById("twosr").textContent=dyrNums[1]; + document.getElementById("threesr").textContent=dyrNums[2]; + document.getElementById("foursr").textContent=dyrNums[3]; + + const dycNums = dycNum.split("").map(Number); + document.getElementById("onesc").textContent=dycNums[0]; + document.getElementById("twosc").textContent=dycNums[1]; + document.getElementById("threesc").textContent=dycNums[2]; + document.getElementById("foursc").textContent=dycNums[3]; + + var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg"; + var htmls = ''; + $('#photo').empty().append(htmls); + +} + +function getVehicleStatisticsPhoto(accessType,timeType){ + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&accessType=' + accessType + '&timeType=' + timeType; + let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); + const url = commonUrl + "screen/largeScreen/accessMge/getVehicleStatisticsPhoto?params="+montageParam; // url + ajaxRequestGet(url, "GET", true, function () { + }, function (result) { + let html = ''; + if (result.code === 200) { + if (result.data && result.data.length > 0) { + var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg"; + var a = "sss"; + $.each(result.data, function (index, item) { + html +='
'; + html +=''; + html +=''+ a +''; + html +='
'; + }) + }else{ + html += '
未找到关联信息
' + } + } else if (result.code === 500) { + layer.msg(result.msg, { icon: 2 }); + } + $('#abnormalAlarm').empty().append(html); + }, function (xhr, status, error) { + error(xhr, status, error) + }, aqEnnable); +} + +function getVehicleStatisticsList(bidCode){ + const url = commonUrl + "screen/largeScreen/accessMge/getVehicleStatisticsList"; // url + table.render({ + elem: '#demo1', + url: url, + skin: 'line', + page: true, + headers:{ + decrypt:"decrypt", + "Authorization":token + }, + where: { + bidCode:bidCode, + proName:$('#proName1').val(), + carNum:$('#carNum1').val(), + date:$('#date1').val() + }, + cols: [[ + {type: 'numbers', title: '序号'}, // 添加序号列 + {field: 'proName', title: '工程名称',align:'center'}, + {field: 'carNum', title: '车牌号',align:'center'}, + {field: 'userName', title: '司机',align:'center'}, + {field: 'phone', title: '司机电话',align:'center'}, + {field: 'accessType', title: '状态',align:'center'}, + {field: 'accesssTime', title: '时间',align:'center'} + ]], + initComplete: function () { + // 在表格渲染完成后,重新渲染序号列 + var that = this.elem.next(); + var tool = that.children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-body').children('.layui-table'); + tool.find("tr").each(function (index, item) { + $(this).find('td[data-field="LAY_TABLE_INDEX"]').text(index + 1); + }); + }, + done:function(res, curr, count, origin){ + console.log(res); + } + }) +} + +function getPerStatistics(){ + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId; + let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); + const url = commonUrl + "screen/largeScreen/accessMge/getPerStatistics?params="+montageParam; // url + + ajaxRequestGet(url, "GET", true, function () { + }, function (result) { + if (result.code === 200) { + if (result.data && result.data.length > 1) { + getStatisticsPer(result.data) + }else{ + getStatisticsPer("") + } + } else if (result.code === 500) { + layer.msg(result.msg, { icon: 2 }); + } + }, function (xhr, status, error) { + error(xhr, status, error) + setData(null); + }, aqEnnable); +} + +function getStatisticsPer(data){ + if(data!=""){ + var jtrNum = data[0].jtrNum; + var jrcNum = data[0].jrcNum; + var dyrNum = data[0].dyrNum; + var dycNum = data[0].dycNum; + }else{ + var jtrNum = "000"; + var jrcNum = "000"; + var dyrNum = "0000"; + var dycNum = "0000"; + } + + const jtrNums = jtrNum.split("").map(Number); + document.getElementById("onerPer").textContent=jtrNums[0]; + document.getElementById("tworPer").textContent=jtrNums[1]; + document.getElementById("threerPer").textContent=jtrNums[2]; + + const jrcNums = jrcNum.split("").map(Number); + document.getElementById("onecPer").textContent=jrcNums[0]; + document.getElementById("twocPer").textContent=jrcNums[1]; + document.getElementById("threecPer").textContent=jrcNums[2]; + + const dyrNums = dyrNum.split("").map(Number); + document.getElementById("onesrPer").textContent=dyrNums[0]; + document.getElementById("twosrPer").textContent=dyrNums[1]; + document.getElementById("threesrPer").textContent=dyrNums[2]; + document.getElementById("foursrPer").textContent=dyrNums[3]; + + const dycNums = dycNum.split("").map(Number); + document.getElementById("onescPer").textContent=dycNums[0]; + document.getElementById("twoscPer").textContent=dycNums[1]; + document.getElementById("threescPer").textContent=dycNums[2]; + document.getElementById("fourscPer").textContent=dycNums[3]; + + var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg"; + var htmls = ''; + $('#photos').empty().append(htmls); +} + +function getPerStatisticsPhoto(accessType,timeType){ + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&accessType=' + accessType + '&timeType=' + timeType; + let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); + const url = commonUrl + "screen/largeScreen/accessMge/getPerStatisticsPhoto?params="+montageParam; // url + ajaxRequestGet(url, "GET", true, function () { + }, function (result) { + let html = ''; + if (result.code === 200) { + if (result.data && result.data.length > 0) { + var s = "https://unpkg.com/outeres/demo/carousel/720x360-1.jpg"; + var a = "sss"; + $.each(result.data, function (index, item) { + html +='
'; + html +=''; + html +=''+ a +''; + html +='
'; + }) + }else{ + html += '
未找到关联信息
' + } + } else if (result.code === 500) { + layer.msg(result.msg, { icon: 2 }); + } + $('#abnormalAlarms').empty().append(html); + }, function (xhr, status, error) { + error(xhr, status, error) + }, aqEnnable); +} + +function getPerStatisticsList(bidCode){ + const url = commonUrl + "screen/largeScreen/accessMge/getPerStatisticsList"; // url + table.render({ + elem: '#demo2', + url: url, + skin: 'line', + page: true, + headers:{ + decrypt:"decrypt", + "Authorization":token + }, + where: { + bidCode:bidCode, + proName:$('#proName2').val(), + userName:$('#userName').val(), + date:$('#date2').val() + }, + cols: [[ + {type: 'numbers', title: '序号'}, // 添加序号列 + {field: 'proName', title: '工程名称',align:'center'}, + {field: 'userName', title: '姓名',align:'center'}, + {field: 'phone', title: '电话',align:'center'}, + {field: 'accessType', title: '状态',align:'center'}, + {field: 'accesssTime', title: '时间',align:'center'} + ]], + initComplete: function () { + // 在表格渲染完成后,重新渲染序号列 + var that = this.elem.next(); + var tool = that.children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-body').children('.layui-table'); + tool.find("tr").each(function (index, item) { + $(this).find('td[data-field="LAY_TABLE_INDEX"]').text(index + 1); + }); + }, + done:function(res, curr, count, origin){ + console.log(res); + } + }) +} + +function getQueryList(type){ + if(type==1){ + getVehicleStatisticsList(bidCode); + }else{ + getPerStatisticsList(bidCode); + } +} + + +function exportVehicleData(){ + let proName = $('#proName1').val(); + let carNum = $('#carNum1').val(); + let date = $('#date1').val(); + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&proName=' + proName + '&carNum=' + carNum + '&date=' + date; + let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); + const url = commonUrl + "screen/largeScreen/accessMge/exportVehicleData?params=" + montageParam; // url + ajaxRequestGetExport(url, "GET", true, function () { + }, function (blob, status, xhr) { + // 创建一个 Blob 对象 + var url = window.URL.createObjectURL(blob); + // 创建一个隐藏的 标签 + var link = document.createElement('a'); + link.href = url; + link.download = '今日、当月车辆出入场统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件 + // 将 标签添加到文档中 + document.body.appendChild(link); + // 触发 标签的 click 事件来下载文件 + link.click(); + // 释放 URL 对象 + window.URL.revokeObjectURL(url); + // 移除 标签 + document.body.removeChild(link); + }, function (xhr, status, error) { + error(xhr, status, error) + }, aqEnnable); +} + +function exportPerData(){ + let proName = $('#proName2').val(); + let userName = $('#userName').val(); + let date = $('#date2').val(); + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&proName=' + proName + '&userName=' + userName + '&date=' + date; + let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); + const url = commonUrl + "screen/largeScreen/accessMge/exportPerData?params=" + montageParam; // url + ajaxRequestGetExport(url, "GET", true, function () { + }, function (blob, status, xhr) { + + // 创建一个 Blob 对象 + var url = window.URL.createObjectURL(blob); + // 创建一个隐藏的 标签 + var link = document.createElement('a'); + link.href = url; + link.download = '今日、当月人员出入场统计.xlsx'; // 设置下载文件的名称,假设是 Excel 文件 + // 将 标签添加到文档中 + document.body.appendChild(link); + + // 触发 标签的 click 事件来下载文件 + link.click(); + + // 释放 URL 对象 + window.URL.revokeObjectURL(url); + + // 移除 标签 + document.body.removeChild(link); + }, function (xhr, status, error) { + error(xhr, status, error) + }, aqEnnable); +} \ No newline at end of file diff --git a/js/pages/alarmMge/alarmMge.js b/js/pages/alarmMge/alarmMge.js index 3cd7aa7..5883c39 100644 --- a/js/pages/alarmMge/alarmMge.js +++ b/js/pages/alarmMge/alarmMge.js @@ -9,8 +9,10 @@ layui.use(['layer','table'], function () { }); function getBuildLists(){ - const url = commonUrl + "system/sys/select/getBuildLists"; // 建管单位url - ajaxRequest(url, "get", null , true, function () { + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId; + let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); + const url = commonUrl + "system/sys/select/getBuildLists?params=" + montageParam; // url + ajaxRequestGet(url, "GET", true, function () { }, function (result) { if (result.code === 200) { let html = ''; @@ -28,23 +30,25 @@ function getBuildLists(){ } else if (result.code === 500) { layer.msg(result.msg, { icon: 2 }); } - }, function (xhr) { - error(xhr) - }); + }, function (xhr, status, error) { + error(xhr, status, error) + }, aqEnnable); } function getSelectLists(){ - const url = commonUrl + "system/sys/select/getSelectLists"; // 建管单位url - ajaxRequest(url, "get", null , true, function () { + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId; + let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); + const url = commonUrl + "system/sys/select/getSelectLists?params=" + montageParam; // url + ajaxRequestGet(url, "GET", true, function () { }, function (result) { if (result.code === 200) { getSelect(result.data) } else if (result.code === 500) { layer.msg(result.msg, { icon: 2 }); } - }, function (xhr) { - error(xhr) - }); + }, function (xhr, status, error) { + error(xhr, status, error) + }, aqEnnable); } function getSelect(data){ diff --git a/js/pages/towerAssInspect/towerAssInspect.js b/js/pages/towerAssInspect/towerAssInspect.js index 00db87e..43142f6 100644 --- a/js/pages/towerAssInspect/towerAssInspect.js +++ b/js/pages/towerAssInspect/towerAssInspect.js @@ -15,7 +15,7 @@ layui.use(['layer','table','form'], function () { }); function getGtLists(){ - const url = commonUrl + "system/sys/select/getGtLists?bidCode="+ bidCode; // 杆塔url + const url = commonUrl + "system/sys/select/getGtLists?bidCode="+ bidCode; // 杆塔url ajaxRequest(url, "get", null , true, function () { }, function (result) { if (result.code === 200) { @@ -24,31 +24,53 @@ function getGtLists(){ $.each(result.data, function (index, item) { html += '' }) + // 设备列表 + getDeviceList(result.data[0].gtId); + }else{ + html += '' + getDeviceList(""); } $('#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) { 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){ - const params = { - "roleCode": roleCode, - "orgId": orgId, - "userId": userId, - "bidCode":bidCode, - "gtId":gtId - } - const url = commonUrl + "screen/largeScreen/towerAssInspect/getDeviceList?roleCode="+roleCode+"&orgId="+orgId+"&userId="+userId+"&bidCode="+bidCode+">Id="+gtId; // 设备列表url - let encryptStr = encryptCBC(JSON.stringify(params)); - ajaxRequest(url, "get", null, true, function () { + const paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '>Id=' + gtId; + let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); + const url = commonUrl + "screen/largeScreen/towerAssInspect/getDeviceList?params="+montageParam; // url + ajaxRequestGet(url, "get", true, function () { }, function (result) { let html = ''; if (result.code === 200) { @@ -69,14 +91,15 @@ function getDeviceList(gtId){ getInfo(result.data[0].deviceId) }else{ html += '
未找到关联设备
' + getInfo("") } } else if (result.code === 500) { layer.msg(result.msg, { icon: 2 }); } $('#deviceList').empty().append(html); - }, function (xhr) { - layer.msg(xhr, { icon: 2 }); - }); + }, function (xhr , status, error) { + error(xhr, status, error) + }, aqEnnable); } //根据点击的设备去查询其他信息 @@ -85,7 +108,7 @@ function getInfo(deviceId){ getRealTimeDetection(deviceId); //当日检测变化趋势 - // getTrend(deviceId) + getTrend(deviceId) //实时告警 getRealTimeAlarmList(deviceId) @@ -95,16 +118,10 @@ function getInfo(deviceId){ } function getRealTimeDetection(deviceId){ - const params = { - "roleCode": roleCode, - "orgId": orgId, - "userId": userId, - "bidCode":bidCode, - "deviceId":deviceId - } - const url = commonUrl + "screen/largeScreen/towerAssInspect/getRealTimeDetection?roleCode="+roleCode+"&orgId="+orgId+"&userId="+userId+"&bidCode="+bidCode+"&deviceId="+deviceId; // 设备列表url - let encryptStr = encryptCBC(JSON.stringify(params)); - ajaxRequest(url, "get", null, true, function () { + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId; + let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData); + const url = commonUrl + "screen/largeScreen/towerAssInspect/getRealTimeDetection?params="+montageParam; // url + ajaxRequestGet(url, "get", true, function () { }, function (result) { let html = ''; if (result.code === 200) { @@ -140,22 +157,17 @@ function getRealTimeDetection(deviceId){ layer.msg(result.msg, { icon: 2 }); } $('#detection').empty().append(html); - }, function (xhr) { - layer.msg(xhr, { icon: 2 }); - }); + }, function (xhr, status, error) { + error(xhr, status, error) + setData(null); + }, aqEnnable); } function getTrend(deviceId){ - const params = { - "roleCode": roleCode, - "orgId": orgId, - "userId": userId, - "bidCode":bidCode, - "deviceId":deviceId - } - const url = commonUrl + "screen/largeScreen/towerAssInspect/getTrend?roleCode="+roleCode+"&orgId="+orgId+"&userId="+userId+"&bidCode="+bidCode+"&deviceId="+deviceId; // 设备列表url - let encryptStr = encryptCBC(JSON.stringify(params)); - ajaxRequest(url, "get", null, true, function () { + let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId; + 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) { @@ -173,10 +185,11 @@ function getTrend(deviceId){ } else if (result.code === 500) { layer.msg(result.msg, { icon: 2 }); } - $('#deviceList').empty().append(html); - }, function (xhr) { - layer.msg(xhr, { icon: 2 }); - }); + $('#tendency').empty().append(html); + }, function (xhr, status, error) { + error(xhr, status, error) + setData(null); + }, aqEnnable); } diff --git a/pages/accessMge/accessMge.html b/pages/accessMge/accessMge.html index 5572e84..f4ea438 100644 --- a/pages/accessMge/accessMge.html +++ b/pages/accessMge/accessMge.html @@ -3,9 +3,286 @@ + + + + + + + + + + 出入管理 - 出入管理 +
+
+
+
+
+
+
今日累计入场
+
+
+ +
+
+ +
+
+ +
+ +
+
今日累计出场
+
+
+ +
+
+ +
+
+ +
+ +
+
+
+
当月累计入场
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
当月累计出场
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+
+
+ +
+
+
+
+
异常告警
+
+ +
+
+
+
+
+
+
+ +
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
今日累计入场
+
+
+ +
+
+ +
+
+ +
+ +
+
今日累计出场
+
+
+ +
+
+ +
+
+ +
+ +
+
+
+
当月累计入场
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
当月累计出场
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+
+
+ +
+
+
+
+
异常告警
+
+ +
+
+
+
+
+
+
+ +
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+
+ \ No newline at end of file