yangle
2022-09-26 b44f1627e300a9fb5bea8e281a20637ccba5a37e
KB_ProductionEquipmentOutputAnalysis.html
@@ -332,6 +332,8 @@
        //配置参数
        var LineCode = '11111'//生产资源编码
        var LineCodeList = 'BM000002';//流水线看板今日全部流水线编码:产线1、产线2、产线3、产线4、产线5、产线6
        var SourceList = [];
        var SourceNum = 0;
@@ -346,6 +348,7 @@
        var LineOrderCloseQty = [];  //流水线当天订单总完成数量数组
        var Week = 0;  //本周分析
        var Month = 0; //本月分析
        $(document).ready(function () {
            // 创建两个变量,一个数组中的月和日的名称
            var monthNames = ["1 月", "2 月", "3 月", "4 月", "5 月", "6 月", "7 月", "8 月", "9 月", "10 月", "11 月", "12 月"];
@@ -395,6 +398,18 @@
                //$("#tb_order").bootstraptable('refreshoptions',{offset:num});  // pagenumber:1, 指定页码为第1页
                $("#tb_order").bootstrapTable('refresh');
            }, 10000);
            //更换下拉框资源
            setInterval(function () {
                if (SourceNum < SourceList.data.length) {
                    LineCode = SourceList.data[SourceNum].HNumber;
                    $("#hospitalCodeSelect").find("option[value='" + SourceList.data[SourceNum].HNumber + "']").attr("selected", true);//更新下拉框选中数据
                    $("#hospitalCodeSelect").selectpicker('refresh')//页面渲染
                    SourceNum += 1;
                } else {
                    showHospitalCode();
                    SourceNum = 0;
                }
            }, 30000);
            //根据窗口的大小变动图表 --- 重点
            window.onresize = function () {
                mychart1.resize();
@@ -941,14 +956,15 @@
                type: "get",
                success: function (Data) {
                    var hospitals = JSON.parse(Data);//反序列化
                    SourceList = hospitals;
                    var content = '';
                    $.each(hospitals.data, function (i, n) {
                        content += "<option value='" + n.HNumber + "'>" + n.HNumber + '-' + n.HName + "</option>";
                    });
                    $("#hospitalCodeSelect").empty();
                    $("#hospitalCodeSelect").append(content);//append 添加进去并展示
                    $("#hospitalCodeSelect").find("option[value='" + hospitals.data[0].HNumber + "']").attr("selected", true);
                    $("#hospitalCodeSelect").selectpicker('refresh');
                }
            })
        }