王 垚
2022-09-14 0c5d5ee5e9274bdf5fcd6756237c1e08346aeea7
优化
1个文件已添加
2个文件已修改
304 ■■■■ 已修改文件
HDEquipment.html 248 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
KB_ProductionEquipmentOutputAnalysis.html 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/webConfig.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDEquipment.html
@@ -18,6 +18,7 @@
    <script src="js/jquery.SuperSlide.2.1.3.js"></script>
    <script src='js/template.js'></script>
    <script src="js/jquery.qrcode.min.js"></script>
    <script src="js/webConfig.js"></script>
    <style>
        .clock {
            font-family: 'BebasNeueRegular', Arial, Helvetica, sans-serif;
@@ -28,33 +29,30 @@
            margin-top: -75px;
            margin-right: 5px;
            color: #09d1ea;
        }
        .clock #Date {
            text-align: center;
            text-shadow: 0 0 0px #00c6ff;
            .clock #Date {
                text-align: center;
                text-shadow: 0 0 0px #00c6ff;
            }
            .clock ul {
                width: 450px;
                margin: 0 auto;
                padding: 0px;
                list-style: none;
                text-align: right;
                margin-left: 15px;
                position: relative;
            }
        }
        .clock ul {
            width: 450px;
            margin: 0 auto;
            padding: 0px;
            list-style: none;
            text-align: right;
            margin-left: 15px;
            position: relative;
        }
        .clock ul li {
            display: inline;
            font-size: 24px;
            text-align: left;
            font-family: 'BebasNeueRegular', Arial, Helvetica, sans-serif;
            text-shadow: 0 0 0px #00c6ff;
        }
                .clock ul li {
                    display: inline;
                    font-size: 24px;
                    text-align: left;
                    font-family: 'BebasNeueRegular', Arial, Helvetica, sans-serif;
                    text-shadow: 0 0 0px #00c6ff;
                }
        body {
            padding-left: 50px;
@@ -62,7 +60,6 @@
        }
        .title {
            font-size: 44px;
            font-family: PingFangSC;
            font-weight: 500;
@@ -165,28 +162,27 @@
            float: left;
        }
        #cList1 li {
            float: left;
            height: 450px;
            color: #00c6ff;
            font-size: 20px;
            /*文字居中*/
            text-align: center;
            /*display: flex;*/
        }
            #cList1 li {
                float: left;
                height: 450px;
                color: #00c6ff;
                font-size: 20px;
                /*文字居中*/
                text-align: center;
                /*display: flex;*/
            }
        #cList1 li span {
            /*文字居中*/
            display: inline-block;
            height: 100%;
            /*文字居中*/
            /*文字竖排*/
            writing-mode: vertical-lr;
            /*从左向右 从右向左是 writing-mode: vertical-rl;*/
            writing-mode: tb-lr;
            /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl;*/
        }
                #cList1 li span {
                    /*文字居中*/
                    display: inline-block;
                    height: 100%;
                    /*文字居中*/
                    /*文字竖排*/
                    writing-mode: vertical-lr;
                    /*从左向右 从右向左是 writing-mode: vertical-rl;*/
                    writing-mode: tb-lr;
                    /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl;*/
                }
        #cList2 {
            height: 450px;
@@ -207,15 +203,14 @@
            border: none;
        }
        .table>caption+thead>tr:first-child>td,
        .table>caption+thead>tr:first-child>th,
        .table>colgroup+thead>tr:first-child>td,
        .table>colgroup+thead>tr:first-child>th,
        .table>thead:first-child>tr:first-child>td,
        .table>thead:first-child>tr:first-child>th {
        .table > caption + thead > tr:first-child > td,
        .table > caption + thead > tr:first-child > th,
        .table > colgroup + thead > tr:first-child > td,
        .table > colgroup + thead > tr:first-child > th,
        .table > thead:first-child > tr:first-child > td,
        .table > thead:first-child > tr:first-child > th {
            background-color: #000;
            color: #3bff72;
        }
        .fixed-table-container tbody td .th-inner,
@@ -342,44 +337,43 @@
            interval = setInterval(function () {
                $("#tb_order").bootstrapTable('refresh');
            }, 10000);
             interval2 = setInterval(function () {
                 CallData = [];
                 CAllDataX = [];
                 CAllDataXval = [];
                 Chart(mychart1, mychart2);
             }, 20000);
            interval2 = setInterval(function () {
                CallData = [];
                CAllDataX = [];
                CAllDataXval = [];
                Chart(mychart1, mychart2);
            }, 20000);
            //根据窗口的大小变动图表 --- 重点
             window.onresize = function () {
                 myChart1.resize();
                 myChart2.resize();
             }
            window.onresize = function () {
                mychart1.resize();
                mychart2.resize();
            }
        })
        function Chart(mychart1, mychart2) {
             $.ajax({
                 url: "http://localhost:12298/api/loaddata/SearchGetWorkStepBillPie",
                 dataType: "JSON",
                 async: false,//使用同步的方式,true为异步方式
                 type: "Get",
                 data: { "CallHouseCode": CallHouseCode },
                 success: function (data) {
                     //饼图
                     CallData.push(data.Table[0]["column3"]);
                     CallData.push(data.Table[0]["column4"]);
                     CallData.push(data.Table[0]["column5"]);
                     CallData.push(data.Table[0]["column6"]);
                     CallData.push(data.Table[0]["column7"]);
                     //柱状图
                     $.each(data.Table1 ,function (index, val) {
                         CAllDataX.push(val.countDay);
                         CAllDataXval.push(val.HName);
                     });
                 },
                 error: function (data) {
            $.ajax({
                url: GetWEBURL() + "/loaddata/SearchGetWorkStepBillPie",
                dataType: "JSON",
                async: false,//使用同步的方式,true为异步方式
                type: "Get",
                data: { "CallHouseCode": CallHouseCode },
                success: function (data) {
                    //饼图
                    CallData.push(data.Table[0]["column3"]);
                    CallData.push(data.Table[0]["column4"]);
                    CallData.push(data.Table[0]["column5"]);
                    CallData.push(data.Table[0]["column6"]);
                    CallData.push(data.Table[0]["column7"]);
                    //柱状图
                    $.each(data.Table1, function (index, val) {
                        CAllDataX.push(val.countDay);
                        CAllDataXval.push(val.HName);
                    });
                },
                error: function (data) {
                 }
             })
                }
            })
            const colorList = ['#91CC75 ', '#5470C6', '#73C0DE', '#EE6666', '#FAC858']
            option1 = {
@@ -421,7 +415,7 @@
                    }
                ]
            };
            option2 = {
                title: {
                    text: '总产值',
@@ -523,7 +517,7 @@
        }
        function TopData() {
            $('#tb_order').bootstrapTable({
                url: 'http://localhost:12298/api/loaddata/EquipMentData',
                url: GetWEBURL() + '/loaddata/EquipMentData',
                //data: dataJson,
                method: 'get',                      //请求方式(*)
                dataType: "json",
@@ -569,48 +563,48 @@
            })
        }
        function BottomData() {
             $.ajax({
                 url: "http://localhost:12298/api/loaddata/SearchGetWorkStepBillList",
                 dataType: "JSON",
                 async: false,//使用同步的方式,true为异步方式
                 type: "Get",
                 data: { "CallHouseCode": CallHouseCode },
                 success: function (data) {
                     for (var i = 0; i < data.Table.length; i++) {
                         var html1 = '';
            $.ajax({
                url: GetWEBURL() + "/loaddata/SearchGetWorkStepBillList",
                dataType: "JSON",
                async: false,//使用同步的方式,true为异步方式
                type: "Get",
                data: { "CallHouseCode": CallHouseCode },
                success: function (data) {
                    for (var i = 0; i < data.Table.length; i++) {
                        var html1 = '';
                         html1 += '<div class="col-sm-12 col-md-2" >';
                         if (data.Table[i]["设备状态"] == '离线')
                             html1 += '<div class="cns" id="bs' + (i + 1) + '" style="background:#9A9999">';
                         else if (data.Table[i]["设备状态"] == '工作')
                             html1 += '<div class="cns" id="bs' + (i + 1) + '" style="background:#259D27">';
                         else if (data.Table[i]["设备状态"] == '待机')
                             html1 += '<div class="cns" id="bs' + (i + 1) + '" style="background:#199687">';
                         else if (data.Table[i]["设备状态"] == '报警')
                             html1 += '<div class="cns" id="bs' + (i + 1) + '" style="background:#FC522A">';
                         html1 += '<dl>';
                         //html1 += '<img src="img/device.png">'
                         html1 += '<dd class="tcenter">';
                         html1 += '<h1><span></span><span id="ptn' + (i + 1) + '">' + data.Table[i]["设备名称"] + '</span></h1>';
                         html1 += '<h1><span>工单:' + data.Table[i]["工单"] + '</span></h1>';
                         html1 += '<h1><span>' + data.Table[i]["产品编码"] + '</span><span id="pts' + (i + 1) + '">' + '' + '</span></h1>';
                         html1 += '<h1><span>' + data.Table[i]["产品名称"] + '</span><span id="pts' + (i + 1) + '">' + '' + '</span></h1>';
                         html1 += '<h1><span>计划数量:</span><span>' + data.Table[i]["计划数量"] + '</span><span style="margin-left:20px;">汇报总数:</span><span>' + data.Table[i]["汇报总数"] + '</span></h1>';
                         html1 += '<h1><span>设备状态:' + data.Table[i]["设备状态"] + '</span><span id="pts' + (i + 1) + '">' + '' + '</span></h1>';
                         html1 += '</div > ';
                         html1 += '</div>';
                         html1 += '</dd>';
                         html1 += '</dl>';
                         html1 += '</div>';
                         html1 += '</div>';
                         $("#btomleft").append(html1);
                     }
                 },
                 error: function (data) {
                        html1 += '<div class="col-sm-12 col-md-2" >';
                        if (data.Table[i]["设备状态"] == '离线')
                            html1 += '<div class="cns" id="bs' + (i + 1) + '" style="background:#9A9999">';
                        else if (data.Table[i]["设备状态"] == '工作')
                            html1 += '<div class="cns" id="bs' + (i + 1) + '" style="background:#259D27">';
                        else if (data.Table[i]["设备状态"] == '待机')
                            html1 += '<div class="cns" id="bs' + (i + 1) + '" style="background:#199687">';
                        else if (data.Table[i]["设备状态"] == '报警')
                            html1 += '<div class="cns" id="bs' + (i + 1) + '" style="background:#FC522A">';
                 }
             })
                        html1 += '<dl>';
                        //html1 += '<img src="img/device.png">'
                        html1 += '<dd class="tcenter">';
                        html1 += '<h1><span></span><span id="ptn' + (i + 1) + '">' + data.Table[i]["设备名称"] + '</span></h1>';
                        html1 += '<h1><span>工单:' + data.Table[i]["工单"] + '</span></h1>';
                        html1 += '<h1><span>' + data.Table[i]["产品编码"] + '</span><span id="pts' + (i + 1) + '">' + '' + '</span></h1>';
                        html1 += '<h1><span>' + data.Table[i]["产品名称"] + '</span><span id="pts' + (i + 1) + '">' + '' + '</span></h1>';
                        html1 += '<h1><span>计划数量:</span><span>' + data.Table[i]["计划数量"] + '</span><span style="margin-left:20px;">汇报总数:</span><span>' + data.Table[i]["汇报总数"] + '</span></h1>';
                        html1 += '<h1><span>设备状态:' + data.Table[i]["设备状态"] + '</span><span id="pts' + (i + 1) + '">' + '' + '</span></h1>';
                        html1 += '</div > ';
                        html1 += '</div>';
                        html1 += '</dd>';
                        html1 += '</dl>';
                        html1 += '</div>';
                        html1 += '</div>';
                        $("#btomleft").append(html1);
                    }
                },
                error: function (data) {
                }
            })
            //for (var i = 0; i < 20; i++) {
            //    var html1 = '';
KB_ProductionEquipmentOutputAnalysis.html
@@ -17,6 +17,7 @@
    <script src="js/jquery.SuperSlide.2.1.3.js"></script>
    <script src='js/template.js'></script>
    <script src="js/jquery.qrcode.min.js"></script>
    <script src="js/webConfig.js"></script>
    <style>
        .clock0 {
            font-family: 'BebasNeueRegular', Arial, Helvetica, sans-serif;
@@ -377,36 +378,36 @@
            var mychart5 = echarts.init(document.getElementById('mychart5'));
            Chart(mychart1, mychart2, mychart3, mychart4, mychart5);
            DataTable();
            // 定时器
           //  定时器
            interval = setInterval(function () {
                hours = [];
                hoursqty = [];
                CloseProgress = 0;  //完工率
                LineName = [];  //流水线数组
                LineOrderQty = [];  //流水线当天订单总任务数量数组
                LineOrderCloseQty = [];  //流水线当天订单总完成数量数组
                Week = 0;  //本周分析
                Month = 0; //本月分析
                Chart(mychart1, mychart2, mychart3, mychart4, mychart5);
                closeprogress = 0;  //完工率
                linename = [];  //流水线数组
                lineorderqty = [];  //流水线当天订单总任务数量数组
                lineordercloseqty = [];  //流水线当天订单总完成数量数组
                week = 0;  //本周分析
                month = 0; //本月分析
                chart(mychart1, mychart2, mychart3, mychart4, mychart5);
            }, 20000);
            setInterval(function () {
                //num+=1;
                //$("#tb_order").bootstrapTable('refreshOptions',{offset:num});  // pageNumber:1, 指定页码为第1页
                $("#tb_order").bootstrapTable('refresh');
                //$("#tb_order").bootstraptable('refreshoptions',{offset:num});  // pagenumber:1, 指定页码为第1页
                $("#tb_order").bootstraptable('refresh');
            }, 10000);
            //根据窗口的大小变动图表 --- 重点
            window.onresize = function () {
                myChart1.resize();
                myChart2.resize();
                myChart3.resize();
                myChart4.resize();
                myChart5.resize();
                mychart1.resize();
                mychart2.resize();
                mychart3.resize();
                mychart4.resize();
                mychart5.resize();
            }
        })
        function Chart(mychart1, mychart2, mychart3, mychart4, mychart5) {
            $.ajax({
                url: "http://localhost:12298/api/loaddata/KB_ProductData",
                url: GetWEBURL() + "/loaddata/KB_ProductData",
                dataType: "JSON",
                async: false,//使用同步的方式,true为异步方式
                type: "Get",
@@ -840,7 +841,7 @@
        function DataTable() {
            $('#tb_order').bootstrapTable({
                url: 'http://localhost:12298/api/loaddata/KB_ProductTableData',
                url: GetWEBURL() + '/loaddata/KB_ProductTableData',
                //data: dataJson,
                method: 'get',                      //请求方式(*)
                dataType: "json",
@@ -925,16 +926,16 @@
            };
            return temp;
        }
            //选择事件
            function selectOnchang(obj) {
                LineCode = obj.options[obj.selectedIndex].value;
                Chart(mychart1, mychart2, mychart3, mychart4, mychart5)
                //DataTable();
                $('#tb_order').bootstrapTable('refresh');
        //选择事件
        function selectOnchang(obj) {
            LineCode = obj.options[obj.selectedIndex].value;
            Chart(mychart1, mychart2, mychart3, mychart4, mychart5)
            //DataTable();
            $('#tb_order').bootstrapTable('refresh');
        }
        function showHospitalCode() {
            $.ajax({
                url: "http://localhost:12298/api/loaddata/Gy_Source",//跳转到控制器HospitalController
                url: GetWEBURL() + "/loaddata/Gy_Source",//跳转到控制器HospitalController
                type: "get",
                success: function (Data) {
                    var hospitals = JSON.parse(Data);//反序列化
@@ -945,7 +946,7 @@
                    $("#hospitalCodeSelect").append(content);//append 添加进去并展示
                    $("#hospitalCodeSelect").find("option[value='" + hospitals.data[0].HNumber + "']").attr("selected", true);
                    $("#hospitalCodeSelect").selectpicker('refresh');
                }
            })
        }
js/webConfig.js
New file
@@ -0,0 +1,5 @@
function GetWEBURL() {
    //var WEBURL = "http://183.129.128.86:9090/KanBanApi/";    //凯贝奈特服务器地址
    var WEBURL = "http://192.168.1.253:12298/Api/";
    return WEBURL
}