

document.write("<script type='text/javascript' src='../static/bootstrap/bootstrap/js/bootstrap.js'></script>");
document.write("<link rel='stylesheet' href='../static/bootstrap/bootstrap/css/bootstrap.css'  media='all'>");
document.write("<script type='text/javascript' src='../static/echarts/echarts.min.js'></script>");
document.write("<script type='text/javascript' src='../public/interface.js'></script>");
document.write("<script type='text/javascript' src='../public/public.js'></script>");


document.write("<script type='text/javascript' src='../static/layui/layui.all.js'></script>");
document.write("<link rel='stylesheet' href='../static/layui/css/layui.css'  media='all'>");


$(function(){
    var interface = new Interface(16);
    var obj = {cnt:new Array(16), delay:0, set_delay:1, delay1:500, delay2:500, overDelay:1200, get_delay:100, TaktTimeDelay:50, OverTimeDelay:200};

    //电流电压轮询
    {

        window.t1 = function() {

            let PortState = JSON.parse(interface.getSerialInfo());
            function get_idn(i,dat){
                if(dat.length > 0){
                    $("#Text_Model_" + i + "_text").text(dat.substring(0,7));
                    $("#Text_Port_" + i + "_text").text(PortState.data[i]["PortName"]);
                }else{
                    $("#Text_model_" + i + "_text").text("未应答");
                }
                obj.cnt[i]++;
            }
            window.get_idn_0 = function(i, dat){get_idn(i,dat);}
            window.get_idn_1 = function(i, dat){get_idn(i,dat);}
            window.get_idn_2 = function(i, dat){get_idn(i,dat);}
            window.get_idn_3 = function(i, dat){get_idn(i,dat);}
            window.get_idn_4 = function(i, dat){get_idn(i,dat);}
            window.get_idn_5 = function(i, dat){get_idn(i,dat);}
            window.get_idn_6 = function(i, dat){get_idn(i,dat);}
            window.get_idn_7 = function(i, dat){get_idn(i,dat);}
            window.get_idn_8 = function(i, dat){get_idn(i,dat);}
            window.get_idn_9 = function(i, dat){get_idn(i,dat);}
            window.get_idn_10 = function(i, dat){get_idn(i,dat);}
            window.get_idn_11 = function(i, dat){get_idn(i,dat);}
            window.get_idn_12 = function(i, dat){get_idn(i,dat);}
            window.get_idn_13 = function(i, dat){get_idn(i,dat);}
            window.get_idn_14 = function(i, dat){get_idn(i,dat);}
            window.get_idn_15 = function(i, dat){get_idn(i,dat);}


            function get_vcm(i,dat){
                if(dat.length > 0){
                    let volt = dat.substring(0, dat.indexOf(","));
                    let curr = dat.substring(dat.indexOf(",")+1, dat.length-1);
                    $("#Text_Volt_" + i + "_text").text(volt);
                    $("#Text_Curr_" + i + "_text").text(curr);
                }
                obj.cnt[i] = 0;
            }
            window.get_vcm_0 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_1 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_2 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_3 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_4 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_5 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_6 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_7 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_8 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_9 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_10 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_11 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_12 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_13 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_14 = function(i, dat){get_vcm(i,dat);}
            window.get_vcm_15 = function(i, dat){get_vcm(i,dat);}


            for(let a=0; a<16; a++){
                if(interface.getSerialIsOpen(a) != "True"){
                    $("#Text_Volt_" + a + "_text").text("");
                    $("#Text_Curr_" + a + "_text").text("");
                    $("#Text_Port_" + a + "_text").text("");
                    $("#Text_model_" + a + "_text").text("未连接");
                }
                else if(interface.getFreeTime(a) < 100){

                }
                else if(obj.cnt[a] == 0){
                    interface.getSerialComm(a, "*idn?", "get_idn_" + a, obj.TaktTimeDelay, obj.OverTimeDelay);
                }
                else if(obj.cnt[a] == 1){
                    interface.getSerialComm(a, "MEAS:VCM?", "get_vcm_" + a, obj.TaktTimeDelay, obj.OverTimeDelay);
                }
                else{
                    obj.cnt[a] = 0;
                }
            }

            /*
            if(obj.cnt == 0){//获得版本
                obj.cnt++;
                var PortState = JSON.parse(interface.getSerialInfo());
                for(var i=0; i<16; i++){
                    if(interface.getSerialIsOpen(i) == "True"){
                        var dat = serial_comm(i, "*idn?", 100, 500, 1);
                        if(dat.sta == "ok"){
                            $("#Text_Model_" + i + "_text").text(dat.val.substring(0,7));
                            $("#Text_Port_" + i + "_text").text(PortState.data[i]["PortName"]);
                        }else{
                            $("#Text_Model_" + i + "_text").text("未应答");
                        }
                    }else{
                        $("#Text_Model_" + i + "_text").text("未连接");
                    }
                }
            }
            else if(obj.cnt == 1){//获得电压
                obj.cnt++ ;
                for(var i=0; i<16; i++){
                    if(interface.getSerialIsOpen(i) == "True"){
                        var dat = serial_comm(i, "MEAS:VOLT?", 100, 500, 1);
                        if(dat.sta == "ok"){
                            $("#Text_Volt_" + i + "_text").text(dat.val);
                        }
                    }else{
                        $("#Text_Volt_" + i + "_text").text("");
                    }
                }
            }
            else if(obj.cnt == 2){//获得电流
                obj.cnt = 0;
                for(var i=0; i<16; i++){
                    if(interface.getSerialIsOpen(i) == "True"){
                        var dat = serial_comm(i, "MEAS:CURR?", 100, 500, 1);
                        if(dat.sta == "ok"){
                            $("#Text_Curr_" + i + "_text").text(dat.val);
                        }
                    }else{
                        $("#Text_Curr_" + i + "_text").text("");
                    }
                }
            }
            */

        }
    }

    //测试结果记录
    {
        let TestResultsData = new defObj(16);
        function defObj(sum){
            var temp = {
                PassSum: 0,
                // YieldPercent: 0,
                data: [],
            };
            this.all = [];
            this.rows =  [];
            this.times = [];
            this.tests = [];
            this.num = parseInt($("#Input_RepeatNumber_input").val()) + 1;
            for(var i=0; i<sum; i++){
                this.rows.push(0);
                this.times.push(0);
                this.tests.push(this.num);
                this.all.push(JSON.parse(JSON.stringify(temp)));
            }

            this.celerTestResultsData = function (ch){
                this.rows[ch] = 0;
                this.times[ch] = 0;
                this.tests[ch] = 0;
                this.all[ch]["data"] = [];
                this.all[ch]["PassSum"] = 0;
                // this.all[ch]["YieldPercent"] = 0;
            }
        }

        //判断设置按钮
        $("#Button_JudgeSet").click(function () {
            for(let i=0; i<16; i++){TestResultsData.celerTestResultsData(i);}
            layer.msg("<h1>判断设定完成</h1>");
            var img = $("#Button_YieldReset_All").find("img")[0]; set_img_select("#" + img.id, false);
            var img = $("#Button_JudgeSet").find("img")[0];set_img_select("#" + img.id, false);
        });

        //重置所有良品率
        $("#Button_YieldReset_All").click(function () {
            for(let i=0; i<16; i++){TestResultsData.celerTestResultsData(i);}
            layer.msg("<h1>全部重置完成</h1>");
            var img = $("#Button_YieldReset_All").find("img")[0]; set_img_select("#" + img.id, false);
        });

        //清良率按钮
        {
            for(var num = 0; num < 16; num++) {
                $("#Button_YieldReset_" + num).bind("click", {
                    index: num
                }, clickYieldResetHandler);
            }
            function clickYieldResetHandler(event) {
                TestResultsData.celerTestResultsData(event.data.index);
                layer.msg("<h1>设备" + str_num[event.data.index] + "重置完成</h1>");
                // layer.msg(event.data.index.toString());
            }
        }

        //
        {
            window.t3 = function() {
                let StartNumber = parseInt($("#Input_StartNumber_input").val())-1;
                let RepeatNumber = parseInt($("#Input_RepeatNumber_input").val());
                for(let ch=0; ch<16; ch++){
                    if(RepeatNumber >  TestResultsData.tests[ch]){
                        let dat = get_list_data();
                        if(TestResultsData.rows[ch] < StartNumber){
                            TestResultsData.rows[ch] = StartNumber;
                        }
                        if(dat.length > 1 && TestResultsData.rows[ch] < dat.length-1){
                            if($("#Text_Model_" + ch + "_text").text().indexOf("UDP") >= 0){//查询是否有通信
                                let SetTime = dat[TestResultsData.rows[ch]+1][ch*5+4][1];
                                if(TestResultsData.times[ch] == 0){
                                    let temp = [];
                                    temp["SetTime"] = SetTime;
                                    temp["volt_max"] = parseFloat(dat[TestResultsData.rows[ch]+1][ch*5+0][1]);
                                    temp["volt_min"] = parseFloat(dat[TestResultsData.rows[ch]+1][ch*5+1][1]);
                                    temp["curr_max"] = parseFloat(dat[TestResultsData.rows[ch]+1][ch*5+2][1]);
                                    temp["curr_min"] = parseFloat(dat[TestResultsData.rows[ch]+1][ch*5+3][1]);
                                    temp["NowCurr"] = parseFloat($("#Text_Curr_" + ch + "_text").text());
                                    temp["NowVolt"] = parseFloat($("#Text_Volt_" + ch + "_text").text());
                                    temp["NowTime"] = new Date().getHours() + ":" + new Date().getMinutes() + ":"  + new Date().getSeconds();

                                    if(temp["NowCurr"] <= temp["curr_max"] && temp["NowCurr"] >= temp["curr_min"] && temp["NowVolt"] <= temp["volt_max"] && temp["NowVolt"] >= temp["volt_min"]){
                                        temp["Yield"] = "PASS";
                                        TestResultsData.all[ch]["PassSum"]++;
                                    }else{temp["Yield"] = "FAIL";}
                                    var Percent = parseFloat(TestResultsData.all[ch]["PassSum"]) / parseFloat(TestResultsData.all[ch]["data"].length + 1) * 100;
                                    Percent = parseInt(Percent * 1000)/1000;//保留3位小数
                                    temp["YieldPercent"] = Percent;
                                    //layer.msg("PassSum:" + TestResultsData.all[ch]["PassSum"] + ", length:"+ TestResultsData.all[ch]["data"].length.toString() + ", Percent:" +Percent);
                                    TestResultsData.all[ch]["data"].push(temp);
                                    $("#Text_Yield_" + ch + "_text").text(Percent + "%");
                                }
                                if(TestResultsData.times[ch] < SetTime){
                                    TestResultsData.times[ch]++;
                                }else{
                                    TestResultsData.rows[ch]++;
                                    TestResultsData.times[ch] = 0;
                                    // layer.msg(ch + "_" + TestResultsData.rows[ch] + "_完成一行测试");
                                }
                            }
                        }else{
                            TestResultsData.tests[ch]++;
                            TestResultsData.rows[ch] = 0;
                            if(RepeatNumber <=  TestResultsData.tests[ch]){
                                layer.msg("<h1>设备" + str_num[ch] + "测试结束</h1>");
                            }
                        }
                    }
                }
            }
        }


        //结果导出
        {
            function SaveSelect(sel){
                if(sel == 0){
                    $("#CheckBox_SaveAll_img").css("visibility", "hidden");
                    $("#CheckBox_SavePass_img").css("visibility", "visible");
                    $("#CheckBox_SaveFail_img").css("visibility", "hidden");
                }else if(sel == 1){
                    $("#CheckBox_SaveAll_img").css("visibility", "hidden");
                    $("#CheckBox_SavePass_img").css("visibility", "hidden");
                    $("#CheckBox_SaveFail_img").css("visibility", "visible");
                }else if(sel == 2){
                    $("#CheckBox_SaveAll_img").css("visibility", "visible");
                    $("#CheckBox_SavePass_img").css("visibility", "hidden");
                    $("#CheckBox_SaveFail_img").css("visibility", "hidden");
                }
            }

            $("#CheckBox_SaveAll").click(function () {
                SaveSelect(2);
            });
            $("#CheckBox_SavePass").click(function () {
                SaveSelect(0);
            });
            $("#CheckBox_SaveFail").click(function () {
                SaveSelect(1);
            });
            $("#Button_ResultExport").click(function () {
                let  str = "通道, 时间, 间隔时间, 电压, 电流, 电压上限, 电压下限, 电流上限, 电流下限, 测试结果, 良率(%)\r\n\r\n";
                for(let ch=0; ch<TestResultsData.all.length; ch++){
                    for(let row=0; row<TestResultsData.all[ch]["data"].length; row++){
                        if(($("#CheckBox_SavePass_img").css("visibility") == "visible" && TestResultsData.all[ch]["data"][row].Yield == "PASS") ||
                            ($("#CheckBox_SaveFail_img").css("visibility") == "visible" && TestResultsData.all[ch]["data"][row].Yield == "FAIL") ||
                            ($("#CheckBox_SaveAll_img").css("visibility") == "visible")
                        ){
                            str +=  str_num[ch] + ", " +
                                TestResultsData.all[ch]["data"][row].NowTime + ", " +
                                TestResultsData.all[ch]["data"][row].SetTime + ", " +
                                TestResultsData.all[ch]["data"][row].NowVolt + ", " +
                                TestResultsData.all[ch]["data"][row].NowCurr + ", " +
                                TestResultsData.all[ch]["data"][row].volt_max + ", " +
                                TestResultsData.all[ch]["data"][row].volt_min + ", " +
                                TestResultsData.all[ch]["data"][row].curr_max + ", " +
                                TestResultsData.all[ch]["data"][row].curr_min + ", " +
                                TestResultsData.all[ch]["data"][row].Yield + ", " +
                                TestResultsData.all[ch]["data"][row].YieldPercent + " " +
                                "\r\n";
                        }
                    }
                }
                interface.saveFile(str, "DcPower_listmodejudgmentYield");
            });
        }
    }

    //判断列表
    {
        //初始化表头
        {
            var str_num = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P"];
            var str_html1 = "<table border='1' id='TableCell_List_ListTestTable' class='table table-bordered table-condensed' style='background: white; word-break:keep-all '>";
            str_html1 += "<tr>";
            str_html1 += "<th style='text-align: center; width: 50px'>序号</th>";
            for (var i = 0; i < str_num.length; i++) {
                str_html1 += "<th style='width: 200px '>设备" + str_num[i] + "上限电压(V)</th>";
                str_html1 += "<th style='width: 200px '>设备" + str_num[i] + "下限电压(V)</th>";
                str_html1 += "<th style='width: 200px '>设备" + str_num[i] + "上限电流(A)</th>";
                str_html1 += "<th style='width: 200px '>设备" + str_num[i] + "下限电流(A)</th>";
                str_html1 += "<th style='width: 300px '>设备" + str_num[i] + "时间(S)</th>";
            }
            str_html1 += "</tr></table>"

            $("#ListTable").html(str_html1);
            $("#ListTable").css("overflow", "auto");
            $("#ListTable").css("margin-top", $("#ListTable").data("top"));
            $("#ListTable").css("left", $("#ListTable").data("left"));
            $("#ListTable").css("width", $("#ListTable").data("width"));
            $("#ListTable").css("height", $("#ListTable").data("height"));
            // $("th").css({'padding':'5px', 'vertical-align': 'middle', 'margin': '0 0 0 0'});
            $("td").css({'padding': '5px', 'vertical-align': 'middle', 'margin': '0 0 0 0'});
        }

        //行的增删操作
        {
            function select(str1, str2) {
                if (str1 == str2) {
                    return "selected='selected'";
                } else {
                    return "";
                }
            }

            function add_row(row, data) {
                var newRow = "\
                <tr style='background: white'>\
                    <td style=''></td>";
                for (var i = 0; i < str_num.length; i++) {
                    newRow += "<td style=''><input placeholder='上限电压' class='form-control' style='' value='" + data[i * 5 + 0] + "'></td>"
                    newRow += "<td style=''><input placeholder='下限电压' class='form-control' style='' value='" + data[i * 5 + 1] + "'></td>"
                    newRow += "<td style=''><input placeholder='上限电流' class='form-control' style='' value='" + data[i * 5 + 2] + "'></td>"
                    newRow += "<td style=''><input placeholder='下限电流' class='form-control' style='' value='" + data[i * 5 + 3] + "'></td>"
                    newRow += "<td style=''><input placeholder='时间'     class='form-control' style='' value='" + data[i * 5 + 4] + "'></td>"
                }
                newRow += "</tr>";

                if (row < 0) {
                    $("#TableCell_List_ListTestTable tr:last").after(newRow);//追加
                } else {
                    $("#TableCell_List_ListTestTable tr:gt(0):eq(" + row + ")").before(newRow);//指定位置前插入
                }
                tabSelectSetBackground(row + 1);
                // $("th").css({'padding':'0px', 'vertical-align': 'middle', 'margin': '0 0 0 0'});
                $("td").css({'padding': '0px', 'vertical-align': 'middle', 'margin': '0 0 0 0'});
            };
            //删除行
            $("#Button_Del").click(function () {//删除行
                var state = get_NowRowSelect("TableCell_List_ListTestTable");
                if (state.SelectRow > 0) {
                    $("#TableCell_List_ListTestTable tr").eq(state.SelectRow).remove();
                    if (state.SelectRow > 1) {
                        tabSelectSetBackground(state.SelectRow);
                    } else {
                        tabSelectSetBackground(1);
                    }
                } else {
                    layer.msg("<h1>请选择删除位置</h1>");
                }
            });

            function define_dat() {
                var data = [];
                for (var i = 0; i < 16; i++) {
                    data.push("2.00", "1.00", "0.50", "0.25", "1");
                }
                return data;
            }

            //添加行
            $("#Button_Add").click(function () {
                var state = get_NowRowSelect("TableCell_List_ListTestTable");
                if (state.RowSum > 16) {
                    layer.msg("<h1>不能超过16行</h1>");
                }
                else {
                    add_row(-1, define_dat());
                }
            });
            //插入行
            $("#Button_Insert").click(function () {
                var state = get_NowRowSelect("TableCell_List_ListTestTable");
                if (state.RowSum > 16) {
                    layer.msg("<h1>不能超过16行</h1>");
                }
                else if (state.SelectRow > 0) {
                    add_row(state.SelectRow - 1, define_dat());
                } else {
                    layer.msg("<h1>请选择插入位置</h1>")
                }
            });
        }

        //行状态获取及选中颜色设置
        {
            //获得当前选择的行
            function get_NowRowSelect(id) {
                var ob = {RowSum: -1, SelectRow: -1}
                var tbl = document.getElementById(id);
                var trs = tbl.getElementsByTagName("tr");
                ob.RowSum = trs.length;
                for (var i = 0; i < trs.length; i++) {
                    if (trs[i].style.background != "" && trs[i].style.background != "white") {
                        ob.SelectRow = i;
                        break;
                    }
                }
                return ob;
            }

            //选中行颜色
            $(document).on('click', '#TableCell_List_ListTestTable tr', function () {
                tabSelectSetBackground(this);
            });

            function tabSelectSetBackground(a) {
                var tbl = document.getElementById("TableCell_List_ListTestTable");
                var trs = tbl.getElementsByTagName("tr");
                for (var i = 1; i < trs.length; i++) {
                    if (trs[i] == a || a == i) {  //判断是不是当前选择的行
                        trs[i].style.background = "#02f5ff";
                    }
                    else {
                        trs[i].style.background = "white";
                    }
                    trs[i].cells[0].innerText = i;
                }
            }
        }

        //表数据的导入与导出
        {
            //导出表中所有输入数据
            $("#Button_ListExport").click(function () {
                var StartNumber = $('#Input_StartNumber_input').val();
                var RepeatNumber = $('#Input_RepeatNumber_input').val();
                var str = "{";
                str += "\"RepeatNumber\":\"" + RepeatNumber + "\", \"StartNumber\":\"" + StartNumber + "\", \"data\":[";
                var dat = get_list_data();
                for (var row = 1; row < dat.length; row++) {
                    str += "{";
                    for (var col = 0; col < dat[row].length; col++) {
                        str += "\"" + dat[row][col][0] + "\":";
                        str += "\"" + dat[row][col][1] + "\",";
                    }
                    str = str.substr(0, str.length - 1);//去除多余逗号
                    str += "},";
                }
                str = str.substr(0, str.length - 1);//去除多余逗号
                str += "]}";
                interface.saveFile(str, "DcPower_listmodejudgment");
            });

            function get_list_data() {
                var dat = [];
                $("#TableCell_List_ListTestTable tr").each(function (row) {
                    var row_dat = []
                    $(this).find("input").each(function (col) {
                        row_dat.push(["input" + col, $(this).val()]);
                    })
                    dat.push(row_dat);
                })
                return dat;
            }

            //导入数据到表中
            $("#Button_Import").click(function () {
                var json = JSON.parse(interface.readFile());
                if (json != false) {
                    var state = get_NowRowSelect("TableCell_List_ListTestTable");
                    $('#Input_RepeatNumber_input').val(json["RepeatNumber"]);
                    $('#Input_StartNumber_input').val(json["StartNumber"]);
                    for (var i = 1; i < state.RowSum; i++) {
                        $("#TableCell_List_ListTestTable tr").eq(1).remove();
                    }
                    for (var row = 0; row < json["data"].length; row++) {
                        var data = Object.values(json["data"][row]);
                        add_row(-1, data);
                    }
                }
            });
        }

    }

    $("#button_exit").click(function () {
        interface.exit_windows();
    });

    //input值恢复与定时备份
    {
        var userAgent = myBrowser().indexOf("WOW64");
        if(userAgent >= 0){
            {//取列表测试数据
                $("#Input_StartNumber_input").val(interface.getIni("Dc_PowerListJudgmentMode", "StartNumber",  "1"));
                $("#Input_RepeatNumber_input").val(interface.getIni("Dc_PowerListJudgmentMode", "RepeatNumber",  "1"));
                var rows = parseInt(interface.getIni("Dc_PowerListJudgmentMode", "ListTableRows",  "0"));
                for(let a=0; a<rows; a++){
                    let temp = [];
                    for(let b=0; b<16; b++){
                        temp.push(interface.getIni("Dc_PowerListJudgmentMode", "ListTableRow_" + (a+1) + "_Col" + (b*5+0),  "2.00"));
                        temp.push(interface.getIni("Dc_PowerListJudgmentMode", "ListTableRow_" + (a+1) + "_Col" + (b*5+1),  "1.00"));
                        temp.push(interface.getIni("Dc_PowerListJudgmentMode", "ListTableRow_" + (a+1) + "_Col" + (b*5+2),  "0.50"));
                        temp.push(interface.getIni("Dc_PowerListJudgmentMode", "ListTableRow_" + (a+1) + "_Col" + (b*5+3),  "0.25"));
                        temp.push(interface.getIni("Dc_PowerListJudgmentMode", "ListTableRow_" + (a+1) + "_Col" + (b*5+4),  "1"));
                    }
                    add_row(-1, temp);
                }
                $("#CheckBox_SaveAll_img").css("visibility", interface.getIni("Dc_PowerListJudgmentMode", "SaveAll_img",  "visible"));
                $("#CheckBox_SavePass_img").css("visibility", interface.getIni("Dc_PowerListJudgmentMode", "SavePass_img",  "hidden"));
                $("#CheckBox_SaveFail_img").css("visibility", interface.getIni("Dc_PowerListJudgmentMode", "SaveFail_img",  "hidden"));
            }

            window.t_save = function() {
                {//存列表测试数据
                    let Listdat = get_list_data();
                    interface.setIni("Dc_PowerListJudgmentMode", "ListTableRows",  Listdat.length - 1);
                    interface.setIni("Dc_PowerListJudgmentMode", "StartNumber",  $("#Input_StartNumber_input").val());
                    interface.setIni("Dc_PowerListJudgmentMode", "RepeatNumber",  $("#Input_RepeatNumber_input").val());
                    for(let a=1; a<Listdat.length; a++){
                        for(let b=0; b<Listdat[a].length; b++){
                            interface.setIni("Dc_PowerListJudgmentMode", "ListTableRow_" + a + "_Col" + b,  JSON.stringify(Listdat[a][b][1]));
                        }
                    }
                    interface.setIni("Dc_PowerListJudgmentMode", "SaveAll_img",  $("#CheckBox_SaveAll_img").css("visibility"));
                    interface.setIni("Dc_PowerListJudgmentMode", "SavePass_img",  $("#CheckBox_SavePass_img").css("visibility"));
                    interface.setIni("Dc_PowerListJudgmentMode", "SaveFail_img",  $("#CheckBox_SaveFail_img").css("visibility"));
                }
            }
        }
    }


    interface.setTime([["t1", 100], ["t3", 1000], ["t_save", 10000]]);

});





