IGD3000系列(一体屏)网关的app和文件系统的打包目录
local/www/js/page/warn-list.js
@@ -29,7 +29,7 @@
            , trigger: 'click'
            , theme: 'custom'
        });
        renderPageInfo(2,50);
        //渲染按钮位置
        renderParamBtn();
@@ -119,7 +119,7 @@
        $.each(data, function (index, item) {
            // if(item.flag == 0){
                html += '<tr><td><input class="ckeck" name="ckeck" type="checkbox" id="'+item.sn+'"/></td>';
                html += '<tr>';
                // html += '<td>' + (index + 1) + '</td>';
                html += '<td>' + item.sn + '</td>';
                html += '<td>' + item.name + '</td>';
@@ -172,7 +172,7 @@
            "processTime": timeStr1(data.processTime),
            "id": data.id
        };
        console.log(comData);
        // console.log(comData);
        $.post("./cgi-bin/warn-list/update", JSON.stringify(comData), function (data, status) {
            if ("success" == status) {
@@ -205,40 +205,19 @@
        "processTime": new Date().Format("yyyy-MM-dd hh:mm:ss")
    });
    if(screen.width==1920 && screen.height==1080){
        layer.open({
            skin: 'mypop',
            type: 1,
            title: false,
            area: ['50%', '62%'],
            closeBtn: 0,
            shade: 0,
            scrollbar: false,
            content: $('#editWarnDom')
        });
    }else if(screen.width==1280 && screen.height==1024){
        layer.open({
            skin: 'mypop',
            type: 1,
            title: false,
            area: ['80%', '64%'],
            closeBtn: 0,
            shade: 0,
            scrollbar: false,
            content: $('#editWarnDom')
        });
    }else{
        layer.open({
            skin: 'mypop',
            type: 1,
            title: false,
            area: ['50%', '62%'],
            closeBtn: 0,
            shade: 0,
            scrollbar: false,
            content: $('#editWarnDom')
        });
    }
    var paramWH = getWH("detail");
    layer.open({
        skin: 'mypop',
        type: 1,
        title: false,
        // area: ['50%', '62%'],
        area: [paramWH.w, paramWH.h],
        closeBtn: 0,
        shade: 0,
        scrollbar: false,
        content: $('#editWarnDom')
    });
};
@@ -260,11 +239,13 @@
        "processTime": new Date().Format("yyyy-MM-dd hh:mm:ss")
    });
    var paramWH = getWH("detail");
    layer.open({
        skin: 'mypop',
        type: 1,
        title: false,
        area: ['50%', '62%'],
        // area: ['50%', '62%'],
        area: [paramWH.w, paramWH.h],
        closeBtn: 0,
        shade: 0,
        scrollbar: false,
@@ -409,41 +390,18 @@
//批处理
function batchHandle() {
    console.log("=============批处理============");
    checkbox_warn = [];
    var b;
    var id= "";
    $('[name=ckeck]:checked').each(function() {
        id= "";
        b = false;
        b = $(this).prop('checked');
        if(b){
            id = $(this).attr('id');
            checkbox_warn.push(warnMap[id]);
        }
    });
    if(checkbox_warn.length <= 0){
        layer.msg("选择不能为空!");
        return;
    }
    console.log(checkbox_warn);
    for(var i=0;i<checkbox_warn.length;i++){
        if(checkbox_warn[i].flag !=0 ){
            console.log(checkbox_warn[i]);
            console.log("选中的数据中存在已经处理过的数据!");
            layer.msg("选中的数据中存在已经处理过的数据!");
            return;
        }
    }
    $("#batch_processTime").attr("readOnly","readOnly");
    $("#batch_processTime").val(new Date().Format("yyyy-MM-dd hh:mm:ss"));
    var paramWH = getWH("batchHandle");
    layer.open({
        skin: 'mypop',
        type: 1,
        // title: '警报信息',
        title: false,
        area: ['50%', '35%'],
        // area: ['50%', '35%'],
        area: [paramWH.w, paramWH.h],
        closeBtn: 0,
        shade: 0,
        scrollbar: false,
@@ -458,46 +416,6 @@
//批量修改警报状态
function warnUpdateBatch() {
    // //同步进行
    // $.ajaxSettings.async = false;
    // var param = {};
    // var note = $("#batch_note").val();
    // var processTime = $("#batch_processTime").val();
    // if(note){
    //     if(checkbox_warn && checkbox_warn.length > 0){
    //         for(var i=0;i<checkbox_warn.length;i++){
    //             param = {};
    //             param = {
    //                 "sn": checkbox_warn[i].sn,
    //                 "flag": 1,
    //                 "note": note,
    //                 "processTime": timeStr1(processTime),
    //                 "id": checkbox_warn[i].id
    //             };
    //             $.post("./cgi-bin/warn-list/update-batch", JSON.stringify(param), function (data, status) {
    //                 if ("success" == status) {
    //                     //关闭弹窗
    //                     // closepopBtn();
    //                     //重新刷新此页面数据
    //                     // queryWarn();
    //                 } else {
    //                     window.parent.notify("处理失败,请重新操作!");
    //                 }
    //             }, "json");
    //         }
    //         //关闭弹窗
    //         closepopBtn();
    //         //重新刷新此页面数据
    //         queryWarn();
    //     }else{
    //         layer.msg("没有选中数据,请先选中数据!");
    //         console.log("没有选中数据,请先选中数据!");
    //     }
    // }else{
    //     layer.msg("处理说明不能为空!");
    //     console.log("处理说明不能为空!");
    // }
    //同步进行
    $.ajaxSettings.async = false;
@@ -509,7 +427,7 @@
    if(note){
        param = {
            "sn": sns,
            // "sn": sns,
            "note": note,
            "processTime": timeStr1(processTime)
        };
@@ -524,38 +442,6 @@
            }
        }, "json");
        // if(checkbox_warn && checkbox_warn.length > 0){
        //     for(var i=0;i<checkbox_warn.length;i++){
        //         sns += checkbox_warn[i].sn;
        //         ids += checkbox_warn[i].id;
        //         if(i < checkbox_warn.length -1){
        //             sns += ",";
        //             ids += ",";
        //         }
        //     }
        //     param = {
        //         "sn": sns,
        //         "note": note,
        //         "processTime": timeStr1(processTime)
        //     };
        //     $.post("./cgi-bin/warn-list/update-batch", JSON.stringify(param), function (data, status) {
        //         if ("success" == status) {
        //             //关闭弹窗
        //             closepopBtn();
        //             //重新刷新此页面数据
        //             queryWarn();
        //         } else {
        //             window.parent.notify("处理失败,请重新操作!");
        //         }
        //     }, "json");
        //     // //关闭弹窗
        //     // closepopBtn();
        //     // //重新刷新此页面数据
        //     // queryWarn();
        // }else{
        //     layer.msg("没有选中数据,请先选中数据!");
        //     console.log("没有选中数据,请先选中数据!");
        // }
    }else{
        layer.msg("处理说明不能为空!");
        console.log("处理说明不能为空!");
@@ -570,6 +456,9 @@
    }else if(screen.width==1280 && screen.height==1024){
        // $("#param-btn").addClass("layui-col-md4");
        $("#param-btn").removeClass("layui-col-md4");
    }else if(screen.width==1280 && screen.height==800){
        // $("#param-btn").addClass("layui-col-md4");
        $("#param-btn").removeClass("layui-col-md4");
    }else{
        // $("#param-btn").addClass("layui-col-md6");
        $("#param-btn").removeClass("layui-col-md6");
@@ -578,4 +467,34 @@
}
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;
}