IGD3000系列(一体屏)网关的app和文件系统的打包目录
lgq
2025-07-19 a7e0c81a31f5cbafaeaf97dab7f08caadadd1257
local/www/js/page/record-his.js
@@ -162,7 +162,7 @@
//渲染历史数据列表
function renderRecordInfo(data) {
    var num = getWHNum();
    var div_body_x = false;
    var thead = "";
    thead += "<tr><th style='width: 100px'>ID</th>";
@@ -172,22 +172,6 @@
    var theadData = [];
    if (data != null && data.length > 0) {
        // $.each(data, function (index, item) {
        //     html += "<tr><td>" + item.id + "</td>";
        //     html += "<td>" + item.name + "</td>";
        //     html += "<td>" + timeStr(item.time) + "</td>";
        //     var tempData = eval(item.value);
        //     var temp = '';
        //     for (var i = 0; i < tempData.length; i++) {
        //         if (i != 0) {
        //             temp += ",";
        //         }
        //         temp += tempData[i].name + "=" + tempData[i].value;
        //     }
        //     html += "</tr>";
        // });
        //获取表头
        $.each(data, function (index, item) {
            var tempData = eval(item.value);
@@ -197,12 +181,12 @@
        });
        // console.log(theadData);
        for(var i=0;i<theadData.length;i++){
            if(i >= 5){
            if(i >= num){
                break;
            }
            thead += "<th style='width: 150px'>"+ theadData[i].name +"</th>";
        }
        thead += "<th style='width: 150px'>详情</th>";
        thead += "<th style=''>详情</th>";
        thead += "</tr>";
        $.each(data, function (index, item) {
@@ -211,7 +195,7 @@
            tbody += "<td>" + timeStr(item.time) + "</td>";
            var tempData = eval(item.value);
            for (var i = 0; i < theadData.length; i++) {
                if(i >= 5){
                if(i >= num){
                    break;
                }
                if(i < tempData.length){
@@ -226,10 +210,10 @@
            dataMap[key] = tempData;
        });
    } else {
        thead += "<th style='width: 150px'>数据</th></tr>";
        thead += "<th style=''>数据</th></tr>";
        tbody += '<tr><td colspan="4">暂未查到数据</td></tr>';
    }
    $("#div-body").attr("style","height: 615px;");
    // $("#div-body").attr("style","height: 615px;");
    $("#thead").html(thead);
    $("#recordList").html(tbody);
}
@@ -261,7 +245,6 @@
//导出Excel点击事件
function generateClick(){
    // var tableId = "record-his-list";
    var request = {};
    request.id = $("#deviceId").val();
    if(!request.id)
@@ -365,6 +348,7 @@
}
function getTable(data) {
    var thead = "";
    thead += "<tr><th style='width: 100px'>ID</th>";
    thead += "<th style='width: 180px'>设备名称</th>";
@@ -445,11 +429,14 @@
    });
    $("#tbody").html(html);
    var paramWH = getWH("detail");
    layer.open({
        skin: 'mypop',
        type: 1,
        title: false,
        area: ['40%', '65%'],
        // area: ['40%', '65%'],
        area: [paramWH.w, paramWH.h],
        closeBtn: 0,
        shade: 0,
        scrollbar: false,
@@ -464,3 +451,43 @@
function getWH(tag) {
    var res = {
        w:"50%",
        h:"64%"
    };
    if(screen.width==1920 && screen.height==1080){
        res = {w:"80%",h:"64%"};
        if(tag == "batchHandle"){
            res = {w:"80%",h:"64%"};
        }
    }else if(screen.width==1280 && screen.height==1024){
        res = {w:"80%",h:"64%"};
        if(tag == "detail"){
            res = {w:"80%",h:"95%"};
        }
        if(tag == "batchHandle"){
            res = {w:"80%",h:"64%"};
        }
    }else if(screen.width==1280 && screen.height==800){
        res = {w:"80%",h:"64%"};
        if(tag == "detail"){
            res = {w:"80%",h:"95%"};
        }
        if(tag == "batchHandle"){
            res = {w:"80%",h:"64%"};
        }
    }
    return res;
}
function getWHNum() {
    var res = 5;
    if(screen.width==1920){
        res = 5;
    }else if(screen.width==1280){
        res = 1;
    }
    return res;
}