Browse Source

打印页面

Ming 4 years ago
parent
commit
44a18b8111
6 changed files with 1325 additions and 513 deletions
  1. 59 41
      css/per-manage.css
  2. BIN
      images/111.pdf
  3. 6 4
      js/index.js
  4. 836 114
      js/monthReport.js
  5. 240 191
      monthReport.html
  6. 184 163
      pages/device-manage/deviceType.html

+ 59 - 41
css/per-manage.css

@@ -141,7 +141,7 @@ ul.depart-opera {
     margin-right: 0.2rem;
     font-size: 0.2rem;
     border: none;
-    background:#fff;
+    background: #fff;
     -webkit-appearance: auto;
 }
 
@@ -220,8 +220,9 @@ ul.depart-opera {
     background-color: #0e70cb;
     border-style: dotted;
 }
-.pure-table .selected td:not(:first-child) .view-detail{
-    color:#fff
+
+.pure-table .selected td:not(:first-child) .view-detail {
+    color: #fff
 }
 
 .pure-table .selected td {
@@ -526,6 +527,7 @@ ul.depart-opera {
 
 
 /* 月度考评导出 */
+
 .exportBox {
     position: absolute;
     left: 0;
@@ -534,20 +536,23 @@ ul.depart-opera {
     top: 30px;
     font-size: 14px;
     width: 100%;
-    height: 95%;
+    height: 90%;
     z-index: 10;
-  }
-  .exportBox table,
-  .exportBox table tr th,
-  .exportBox table tr td {
+}
+
+.exportBox table,
+.exportBox table tr th,
+.exportBox table tr td {
     border: 1px solid #eee;
     margin: 0 auto;
-  }
-  .exportBox td,
-  .exportBox th {
+}
+
+.exportBox td,
+.exportBox th {
     padding: 3px 0;
-  }
-  .exportBox .exportContainer {
+}
+
+.exportBox .exportContainer {
     z-index: 19000;
     /* width: 650px; */
     margin: 0 auto;
@@ -555,57 +560,70 @@ ul.depart-opera {
     display: block;
     background: #1f2833;
     color: #fff;
-    height: calc(100% - .6rem);
+    height: 100%;
     overflow: auto;
     padding: 15px;
-  }
-  .exportBox h3.title {
+}
+
+.exportBox h3.title {
     text-align: center;
     background: #1f2833;
     font-size: 16px;
-  }
-  .exportBox section {
+}
+
+.exportBox section {
     padding-bottom: 30px;
-  }
-  .exportBox section .table-sub {
+}
+
+.exportBox section .table-sub {
     margin-top: 10px;
     font-size: 13px;
-  }
-  .exportBox section .innerChart {
+}
+
+.exportBox section .innerChart {
     width: 100%;
     height: 220px;
     padding: 10px 0;
-  }
-  .exportBox section .summary2 {
+}
+
+.exportBox section .summary2 {
     display: flex;
     margin: 0 10px;
     line-height: 1.5;
-  }
-  .exportBox section .summary2 > div:first-child {
+}
+
+.exportBox section .summary2>div:first-child {
     width: 60px;
-  }
-  .exportBox section .summary2 > div:last-child {
+}
+
+.exportBox section .summary2>div:last-child {
     width: calc(100% - 30px);
-  }
-  .exportBox section .big-tit {
+}
+
+.exportBox section .big-tit {
     padding: 10px 0;
     background: #1f2833;
-  }
-  .exportBox .section1 {
+}
+
+.exportBox .section1 {
     background: #1f2833;
-  }
-  .layui-layer-title {
+}
+
+.layui-layer-title {
     background: #081A32 !important;
     color: #fff !important;
     border-bottom: 1px solid #1E9FFF !important;
-  }
-  .layui-layer {
+}
+
+.layui-layer {
     background: #072442 !important;
     color: #fff;
-  }
-  .layui-layer-ico {
+}
+
+.layui-layer-ico {
     border-radius: 50%;
-  }
-  .layui-layer-btn .layui-layer-btn0 {
+}
+
+.layui-layer-btn .layui-layer-btn0 {
     font-size: 0.3rem;
-  }
+}

BIN
images/111.pdf


+ 6 - 4
js/index.js

@@ -352,14 +352,15 @@ function getIndexDate(queryParam = {}) {
                 grid: {
                     // width: '100%',
                     top: '15%',
-                    right: '0%',
+                    right: '10%',
                     bottom: '0%',
                     left: '10%'
                 },
 
                 color: ['#6F99FA', '#EAF665', '#FF5801'],
                 xAxis: [{
-                    show: false
+                    show: false,
+                    max: totalNum ? totalNum : 100,
                 }],
                 yAxis: [{
                         axisTick: 'none',
@@ -385,7 +386,7 @@ function getIndexDate(queryParam = {}) {
                             show: true,
                             verticalAlign: 'bottom',
                             align: 'right',
-                            padding: [0, 45, 15, 0],
+                            padding: [0, 15, 15, 0],
                             textStyle: {
                                 color: '#fff',
                             },
@@ -422,7 +423,8 @@ function getIndexDate(queryParam = {}) {
                         type: 'bar',
                         barGap: '-100%',
                         // data: [1054, 1054, 1054],
-                        data: [totalNum, totalNum, totalNum],
+                        // data: [totalNum, totalNum, totalNum],
+                        data: totalNum ? [totalNum, totalNum, totalNum] : [100, 100, 100],
                         barWidth: 10,
                         itemStyle: {
                             normal: {

+ 836 - 114
js/monthReport.js

@@ -1,83 +1,84 @@
- // 筛选弹框
- var layer = layui.layer;
- var layerCreateIndex = '';
- var layerCreateIndex2 = '';
- layui.use('layer', function () {
-     layerCreateIndex = layer.open({
-         type: 1,
-         title: false,
-         closeBtn: 0,
-         // shadeClose: true,
-         skin: 'yourclass',
-         area: [
-             '380px', '300px'
-         ],
-         content: $(".reportOut"),
-         success: function () {
-             $('.clsBtn,.cancel').click(function () {
-                 layer.close(layerCreateIndex);
-             })
-         }
-     })
- })
- layui.use([
-     'form', 'layedit', 'laydate'
- ], function () {
- });
-
- //时间日期选择
- layui.use('laydate', function () {
-     var laydate = layui.laydate;
-     // 开始日期
-     var insStart = laydate.render({
-         elem: '#startTime',
-         trigger: 'click',
-         done: function (value, date) { // 更新结束日期的最小日期
-             insEnd.config.min = lay.extend({}, date, {
-                 month: date.month - 1
-             });
-             // 自动弹出结束日期的选择器
-             insEnd.config.elem[0].focus();
-         }
-     });
-
-     // 结束日期
-     var insEnd = laydate.render({
-         elem: '#endTime',
-         trigger: 'click',
-         done: function (value, date) { // 更新开始日期的最大日期
-             insStart.config.max = lay.extend({}, date, {
-                 month: date.month - 1
-             });
-         }
-     });
-
- });
-
- getNameList()
- // 单位下拉 ajax请求
- function getNameList() {
-     ajaxRequest(DEVICE_TYPE_COMPANYLIST, "POST", {}, function (result) {
-         let data = result.RESULT;
-         let items = '';
-         data.forEach(function (item, key) {
-             items += `<option value=''>请选择</option><option value="${
+// 筛选弹框
+var layer = layui.layer;
+var layerCreateIndex = '';
+var layerCreateIndex2 = '';
+layui.use('layer', function() {
+    layerCreateIndex = layer.open({
+        type: 1,
+        // title: false,
+        closeBtn: 0,
+        // shadeClose: true,
+        skin: 'yourclass',
+        area: [
+            '380px', '300px'
+        ],
+        content: $(".reportOut"),
+        success: function() {
+            $('.clsBtn,.cancel').click(function() {
+                layer.close(layerCreateIndex);
+            })
+        }
+    })
+})
+
+
+//时间日期选择
+layui.use([
+    'form', 'layedit', 'laydate'
+], function() {});
+layui.use('laydate', function() {
+    var laydate = layui.laydate;
+    // 开始日期
+    var insStart = laydate.render({
+        elem: '#startTime',
+        trigger: 'click',
+        value: '2021-04-01',
+        isInitValue: true,
+        done: function(value, date) { // 更新结束日期的最小日期
+            insEnd.config.min = lay.extend({}, date, {
+                month: date.month - 1
+            });
+            // 自动弹出结束日期的选择器
+            insEnd.config.elem[0].focus();
+        }
+    });
+    // 结束日期
+    var insEnd = laydate.render({
+        elem: '#endTime',
+        trigger: 'click',
+        value: '2021-04-30',
+        done: function(value, date) { // 更新开始日期的最大日期
+            insStart.config.max = lay.extend({}, date, {
+                month: date.month - 1
+            });
+        }
+    });
+});
+
+// 单位下拉 ajax请求
+getNameList()
+
+function getNameList() {
+    ajaxRequest(DEVICE_TYPE_COMPANYLIST, "POST", {}, function(result) {
+        let data = result.RESULT;
+        let items = '';
+        data.forEach(function(item, key) {
+            items += `<option value=''>请选择</option><option value="${
                  item.owner_id
              }">${
                  item.owner_name
              }</option>`
-         })
-         $('#getNameList').html(items);
+        })
+        $('#getNameList').html(items);
 
-     }, function (errorMsg) {
-         alert("请求数据失败!");
-     })
- }
+    }, function(errorMsg) {
+        alert("请求数据失败!");
+    })
+}
 
 
- /* 筛选提交发送请求 */
+/* 筛选提交发送请求 */
 $('#nextStep').click(function() {
-
     //获取表单的值 并转换成对象
     let allParam = serializeArrayToObj($("#reportOutForm").serializeArray());
 
@@ -91,55 +92,776 @@ $('#nextStep').click(function() {
         alert(res.msg);
         return;
     }
-    //验证通过 请求ajax
-    ajaxRequest(MONTH_REPORT, "POST", allParam, function(result) {
-        layer.close(layerCreateIndex);
-        layer.msg('添加成功!', { icon: 6 });
-        $('#reportOutForm')[0].reset();
-
-        layui.use('layer', function () {
-            layerCreateIndex2 = layer.open({
-                type: 1,
-                title: false,
-                closeBtn: 0,
-                skin: 'yourclass',
-                area: [
-                    '700px', '800px'
-                ],
-                content: $(".reportContentOut"),
-                success: function () {
-                    $('.clsBtn,.cancel').click(function () {
-                        window.open("./index.html");
+    // //验证通过 请求ajax
+    // ajaxRequest(MONTH_REPORT, "POST", allParam, function(result) {
+    //     layer.close(layerCreateIndex);
+    //     layer.msg('添加成功!', { icon: 6 });
+    //     $('#reportOutForm')[0].reset();
+
+    //     layui.use('layer', function () {
+    //         layerCreateIndex2 = layer.open({
+    //             type: 1,
+    //             title: false,
+    //             closeBtn: 0,
+    //             skin: 'yourclass',
+    //             area: [
+    //                 '700px', '800px'
+    //             ],
+    //             content: $(".reportContentOut"),
+    //             success: function () {
+
+    //                 console.log(result.data);
+    //                 var data=result.data;
+    //                 var deviceStatistic=data.deviceStatistic;//告警处理情况统计
+    //                 var deviceOnly=data.deviceOnly; //设备离线情况统计
+
+    //                 (function(){
+    //                     var companyInfo=data.companyInfo;  //单位信息
+    //                     $('#companyName').html(companyInfo.ownerName);
+    //                 })();
+
+    //                 (function(){
+    //                     var typeList=data.typeList;  //设备类型统计信息
+    //                     let items = '';
+    //                     console.log(typeList)
+    //                     typeList.forEach(function(item, key) {
+    //                         items+= `
+    //                         <tr>
+    //                             <td>${item.TypeName} </td>
+    //                             <td>${item.Num}</td>
+    //                             <td>${item.TransmissionModel}</td>
+    //                             <td>${item.Business}</td>
+    //                         </tr>`
+    //                     })
+    //                     $('#typeList').html(items);
+
+    //                 })()
+
+
+    //                 //关闭弹框
+    //                 $('.clsBtn,.cancel').click(function () {
+    //                     window.open("./index.html");
+    //                 })
+    //             }
+    //         })
+    //     })
+    // }, function(errorMsg) {
+    //     alert("异常错误!");
+    // })
+})
+
+
+
+//验证通过 请求ajax  
+ajaxRequest(MONTH_REPORT, "POST", {
+    'companyId': 10012,
+    'startTime': 2021 - 04 - 01,
+    'endTime': 2021 - 04 - 30
+}, function(result) {
+    // layer.close(layerCreateIndex);
+    // layer.msg('添加成功!', { icon: 6 });
+    $('#reportOutForm')[0].reset();
+
+    layui.use('layer', function() {
+        layerCreateIndex2 = layer.open({
+            type: 1,
+            title: false,
+            closeBtn: 0,
+            skin: 'yourclass',
+            area: [
+                '700px', '800px'
+            ],
+            content: $(".reportContentOut"),
+            success: function() {
+
+                console.log(result.data);
+                var data = result.data;
+                var deviceOnly = data.deviceOnly; //设备离线情况统计
+                var companyInfo = data.companyInfo; //单位信息
+                //  大标题
+                (function() {
+                    $('#companyName').html(companyInfo.ownerName);
+                })();
+
+                //设备类型统计信息
+                (function() {
+                    var typeList = data.typeList.deviceType;
+                    let items = '';
+                    let items2 = ''
+                    typeList.forEach(function(item, key) {
+                        items += ` <tr>
+                            <td>${item.TypeName} </td>
+                            <td>${item.Num}</td>
+                            <td>${item.TransmissionModel}</td>
+                        	<td>${item.Business}</td>
+                        </tr>`
                     })
-                }
-            })
+                    items2 = ` <tr>
+                        <td>统计总数</td>
+                        <td>${data.typeList.deviceNum} </td>
+                        <td ></td>
+                        <td ></td>
+                    </tr>`
+                    $('#typeList').html(items + items2);
+                })();
+
+                //单位信息
+                (function() {
+                    let items = '';
+                    items = ` <tr>
+                            <td>${companyInfo.ownerName}</td>
+                            <td>${companyInfo.ownerAddress} </td>
+                        </tr>`
+                    $('#companyData').html(items);
+                })();
+
+                //告警处理情况统计
+                (function() {
+                    var deviceStatistic = data.deviceStatistic; //告警处理情况统计
+                    var waterAlarm = deviceStatistic.waterAlarm;
+                })();
+
+                // 告警处理水系统折线图
+                (function() {
+                    var myChart = echarts.init(document.querySelector("#waterChart1"));
+                    var option = {
+                        tooltip: {
+                            trigger: "axis",
+                        },
+                        legend: {
+                            data: ["水系统"],
+                            bottom: "0",
+                            textStyle: {
+                                color: "#0184d5",
+                                fontSize: "12",
+                            },
+                        },
+                        grid: {
+                            left: "10",
+                            right: "10",
+                            top: "30",
+                            bottom: "30",
+                            containLabel: true,
+                        },
+                        xAxis: [{
+                            type: "category",
+                            boundaryGap: false,
+                            data: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "26", "28", "29", "30"],
+                            axisLabel: {
+                                textStyle: {
+                                    color: "rgba(255, 255, 255, .3)",
+                                    fontSize: 12,
+                                },
+                                axisLine: {
+                                    lineStyle: {
+                                        color: "rgba(255, 255, 255, .1)",
+                                    },
+                                },
+                            },
+                        }, ],
+                        yAxis: [{
+                            type: "value",
+                            // 去除刻度线
+                            axisTick: {
+                                show: false,
+                            },
+                            // y轴的线颜色
+                            axisLine: {
+                                lineStyle: {
+                                    color: "rgba(255, 255, 255, .1)",
+                                },
+                            },
+                            // 文字的颜色
+                            axisLabel: {
+                                textStyle: {
+                                    color: "rgba(255, 255, 255, .6)",
+                                    fontSize: 12,
+                                },
+                            },
+                            // 修改分割线的颜色
+                            splitLine: {
+                                lineStyle: {
+                                    color: "#aaa", // 分割线颜色
+                                    opacity: .5
+                                }
+                            },
+                        }, ],
+                        series: [{
+                            name: "水系统",
+                            type: "line",
+                            smooth: true,
+                            // 单独修改当前线条的样式
+                            lineStyle: {
+                                color: "#0184d5",
+                                width: 2,
+                            },
+                            areaStyle: {
+                                // 渐变色,只需要复制即可
+                                color: new echarts.graphic.LinearGradient(
+                                    0,
+                                    0,
+                                    0,
+                                    1, [{
+                                            offset: 0,
+                                            color: "rgba(1, 132, 213, 0.4)", // 渐变色的起始颜色
+                                        },
+                                        {
+                                            offset: 0.8,
+                                            color: "rgba(1, 132, 213, 0.1)", // 渐变线的结束颜色
+                                        },
+                                    ],
+                                    false
+                                ),
+                                // 影子效果
+                                shadowColor: "rgba(0, 0, 0, 0.1)",
+                            },
+                            // 设置拐点形状
+                            symbol: "circle",
+                            // 拐点大小
+                            symbolSize: 8,
+                            // 刚开始时不显示拐点,鼠标经过才显示
+                            showSymbol: false,
+                            // 设置拐点颜色以及边框
+                            itemStyle: {
+                                color: "#0184d5",
+                                borderColor: "rgba(221, 220, 107, .1)",
+                                borderWidth: 12,
+                            },
+                            data: [30, 40, 30, 40, 30, 40, 30, 60, 20, 40, 30, 40, 30, 40, 30, 40, 30, 60, 20, 40, 30, 40, 30, 40, 30, 40, 20, 50, 40, 30, 40, 20, 50, 40, 30, ]
+                        }],
+                    };
+                    myChart.setOption(option);
+                    //echarts赋值到src
+                    var img1 = document.getElementById('waterChart1_img');
+                    setTimeout(function() {
+                        img1.src = myChart.getDataURL();
+                    }, 1200)
+
+                })();
+
+                // 告警处理火系统折线图
+                (function() {
+                    var myChart = echarts.init(document.querySelector("#fireChart1"));
+                    var option = {
+                        tooltip: {
+                            trigger: "axis",
+                        },
+                        legend: {
+                            data: ["火系统"],
+                            bottom: "0",
+                            textStyle: {
+                                color: "#ed3f35",
+                                fontSize: "12",
+                            },
+                        },
+                        grid: {
+                            left: "10",
+                            right: "10",
+                            top: "30",
+                            bottom: "30",
+                            containLabel: true,
+                        },
+                        xAxis: [{
+                            type: "category",
+                            boundaryGap: false,
+                            data: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "26", "28", "29", "30"],
+                            axisLabel: {
+                                textStyle: {
+                                    color: "rgba(255, 255, 255, .3)",
+                                    fontSize: 12,
+                                },
+                                axisLine: {
+                                    lineStyle: {
+                                        color: "red",
+                                    },
+                                },
+                            },
+                        }, ],
+                        yAxis: [{
+                            type: "value",
+                            // 去除刻度线
+                            axisTick: {
+                                show: false,
+                            },
+                            // y轴的线颜色
+                            axisLine: {
+                                lineStyle: {
+                                    color: "rgba(255, 255, 255, .1)",
+                                },
+                            },
+                            // 文字的颜色
+                            axisLabel: {
+                                textStyle: {
+                                    color: "rgba(255, 255, 255, .6)",
+                                    fontSize: 12,
+                                },
+                            },
+                            // 修改分割线的颜色
+                            splitLine: {
+                                lineStyle: {
+                                    color: "#aaa", // 分割线颜色
+                                    opacity: .5
+                                }
+                            },
+                        }, ],
+                        series: [{
+                            name: "火系统",
+                            type: "line",
+                            smooth: true,
+                            // 单独修改当前线条的样式
+                            lineStyle: {
+                                color: "#ed3f35",
+                                width: 2,
+                            },
+                            areaStyle: {
+                                // 渐变色,只需要复制即可
+                                color: new echarts.graphic.LinearGradient(
+                                    0,
+                                    0,
+                                    0,
+                                    1, [{
+                                            offset: 0,
+                                            color: "rgba(237,63,53, 0.4)", // 渐变色的起始颜色
+                                        },
+                                        {
+                                            offset: 0.8,
+                                            color: "rgba(237,63,53, 0.1)", // 渐变线的结束颜色
+                                        },
+                                    ],
+                                    false
+                                ),
+                                // 影子效果
+                                shadowColor: "rgba(0, 0, 0, 0.1)",
+                            },
+                            // 设置拐点形状
+                            symbol: "circle",
+                            // 拐点大小
+                            symbolSize: 8,
+                            // 刚开始时不显示拐点,鼠标经过才显示
+                            showSymbol: false,
+                            // 设置拐点颜色以及边框
+                            itemStyle: {
+                                color: "#ed3f35",
+                                borderColor: "rgba(221, 220, 107, .1)",
+                                borderWidth: 12,
+                            },
+                            data: [130, 10, 20, 40, 30, 40, 80, 60, 20, 40, 90, 40, 20, 140, 30, 40, 130, 20, 20, 40, 80, 70, 30, 40, 30, 120, 20, 99, 50, 20, ],
+                        }, ],
+                    };
+                    myChart.setOption(option);
+                    //echarts赋值到src
+                    var img1 = document.getElementById('fireChart1_img');
+                    setTimeout(function() {
+                        img1.src = myChart.getDataURL();
+                    }, 1200)
+
+                })();
+
+                // 设备离线水系统折线图
+                (function() {
+                    var myChart = echarts.init(document.querySelector("#waterOnlyChart"));
+                    var option = {
+                        tooltip: {
+                            trigger: "axis",
+                        },
+                        legend: {
+                            data: ["水系统"],
+                            bottom: "0",
+                            textStyle: {
+                                color: "#0184d5",
+                                fontSize: "12",
+                            },
+                        },
+                        grid: {
+                            left: "10",
+                            right: "10",
+                            top: "30",
+                            bottom: "30",
+                            containLabel: true,
+                        },
+                        xAxis: [{
+                            type: "category",
+                            boundaryGap: false,
+                            data: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "26", "28", "29", "30"],
+                            axisLabel: {
+                                textStyle: {
+                                    color: "rgba(255, 255, 255, .3)",
+                                    fontSize: 12,
+                                },
+                                axisLine: {
+                                    lineStyle: {
+                                        color: "red",
+                                    },
+                                },
+                            },
+                        }, ],
+                        yAxis: [{
+                            type: "value",
+                            // 去除刻度线
+                            axisTick: {
+                                show: false,
+                            },
+                            // y轴的线颜色
+                            axisLine: {
+                                lineStyle: {
+                                    color: "rgba(255, 255, 255, .1)",
+                                },
+                            },
+                            // 文字的颜色
+                            axisLabel: {
+                                textStyle: {
+                                    color: "rgba(255, 255, 255, .6)",
+                                    fontSize: 12,
+                                },
+                            },
+                            // 修改分割线的颜色
+                            splitLine: {
+                                lineStyle: {
+                                    color: "#aaa", // 分割线颜色
+                                    opacity: .5
+                                }
+                            },
+                        }, ],
+                        series: [{
+                            name: "水系统",
+                            type: "line",
+                            smooth: true,
+                            // 单独修改当前线条的样式
+                            lineStyle: {
+                                color: "#0184d5",
+                                width: 2,
+                            },
+                            areaStyle: {
+                                // 渐变色,只需要复制即可
+                                color: new echarts.graphic.LinearGradient(
+                                    0,
+                                    0,
+                                    0,
+                                    1, [{
+                                            offset: 0,
+                                            color: "rgba(1, 132, 213, 0.4)", // 渐变色的起始颜色
+                                        },
+                                        {
+                                            offset: 0.8,
+                                            color: "rgba(1, 132, 213, 0.1)", // 渐变线的结束颜色
+                                        },
+                                    ],
+                                    false
+                                ),
+                                // 影子效果
+                                shadowColor: "rgba(0, 0, 0, 0.1)",
+                            },
+                            // 设置拐点形状
+                            symbol: "circle",
+                            // 拐点大小
+                            symbolSize: 8,
+                            // 刚开始时不显示拐点,鼠标经过才显示
+                            showSymbol: false,
+                            // 设置拐点颜色以及边框
+                            itemStyle: {
+                                color: "#0184d5",
+                                borderColor: "rgba(221, 220, 107, .1)",
+                                borderWidth: 12,
+                            },
+                            data: [30, 40, 30, 40, 30, 40, 30, 60, 20, 40, 30, 40, 30, 40, 30, 40, 30, 60, 20, 40, 30, 40, 30, 40, 30, 40, 20, 50, 40, 30]
+                        }],
+                    };
+                    myChart.setOption(option);
+                    //echarts赋值到src
+                    var img1 = document.getElementById('waterOnlyChart_img');
+                    setTimeout(function() {
+                        img1.src = myChart.getDataURL();
+                    }, 1200)
+
+                })();
+
+                // 设备离线火系统折线图
+                (function() {
+                    var myChart = echarts.init(document.querySelector("#fireOnlyChart"));
+                    var option = {
+                        tooltip: {
+                            trigger: "axis",
+                        },
+                        legend: {
+                            data: ["火系统"],
+                            bottom: "0",
+                            textStyle: {
+                                color: "#ed3f35",
+                                fontSize: "12",
+                            },
+                        },
+                        grid: {
+                            left: "10",
+                            right: "10",
+                            top: "30",
+                            bottom: "30",
+                            containLabel: true,
+                        },
+                        xAxis: [{
+                            type: "category",
+                            boundaryGap: false,
+                            data: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "26", "28", "29", "30"],
+                            axisLabel: {
+                                textStyle: {
+                                    color: "rgba(255, 255, 255, .3)",
+                                    fontSize: 12,
+                                },
+                                axisLine: {
+                                    lineStyle: {
+                                        color: "red",
+                                    },
+                                },
+                            },
+                        }, ],
+                        yAxis: [{
+                            type: "value",
+                            // 去除刻度线
+                            axisTick: {
+                                show: false,
+                            },
+                            // y轴的线颜色
+                            axisLine: {
+                                lineStyle: {
+                                    color: "rgba(255, 255, 255, .1)",
+                                },
+                            },
+                            // 文字的颜色
+                            axisLabel: {
+                                textStyle: {
+                                    color: "rgba(255, 255, 255, .6)",
+                                    fontSize: 12,
+                                },
+                            },
+                            // 修改分割线的颜色
+                            splitLine: {
+                                lineStyle: {
+                                    color: "#aaa", // 分割线颜色
+                                    opacity: .5
+                                }
+                            },
+                        }, ],
+                        series: [{
+                            name: "火系统",
+                            type: "line",
+                            smooth: true,
+                            // 单独修改当前线条的样式
+                            lineStyle: {
+                                color: "#ed3f35",
+                                width: 2,
+                            },
+                            areaStyle: {
+                                // 渐变色,只需要复制即可
+                                color: new echarts.graphic.LinearGradient(
+                                    0,
+                                    0,
+                                    0,
+                                    1, [{
+                                            offset: 0,
+                                            color: "rgba(237,63,53, 0.4)", // 渐变色的起始颜色
+                                        },
+                                        {
+                                            offset: 0.8,
+                                            color: "rgba(237,63,53, 0.1)", // 渐变线的结束颜色
+                                        },
+                                    ],
+                                    false
+                                ),
+                                // 影子效果
+                                shadowColor: "rgba(0, 0, 0, 0.1)",
+                            },
+                            // 设置拐点形状
+                            symbol: "circle",
+                            // 拐点大小
+                            symbolSize: 8,
+                            // 刚开始时不显示拐点,鼠标经过才显示
+                            showSymbol: false,
+                            // 设置拐点颜色以及边框
+                            itemStyle: {
+                                color: "#ed3f35",
+                                borderColor: "rgba(221, 220, 107, .1)",
+                                borderWidth: 12,
+                            },
+                            data: [130, 10, 20, 40, 30, 40, 80, 60, 20, 40, 90, 40, 20, 140, 30, 40, 130, 20, 20, 40, 80, 70, 30, 40, 30, 120, 20, 99, 50, 20, ],
+                        }, ],
+                    };
+
+
+                    myChart.setOption(option);
+                    //echarts赋值到src
+                    var img1 = document.getElementById('fireOnlyChart_img');
+                    setTimeout(function() {
+                        img1.src = myChart.getDataURL();
+                    }, 1200)
+
+                })();
+
+                // 设备离线烟感折线图
+                (function() {
+                    var myChart = echarts.init(document.querySelector("#smokeOnlyChart"));
+                    var option = {
+                        tooltip: {
+                            trigger: "axis",
+                        },
+                        legend: {
+                            data: ["烟感"],
+                            bottom: "0",
+                            textStyle: {
+                                color: "#F4A460",
+                                fontSize: "12",
+                            },
+                        },
+                        grid: {
+                            left: "10",
+                            right: "10",
+                            top: "30",
+                            bottom: "30",
+                            containLabel: true,
+                        },
+                        xAxis: [{
+                            type: "category",
+                            boundaryGap: false,
+                            data: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "26", "28", "29", "30"],
+                            axisLabel: {
+                                textStyle: {
+                                    color: "rgba(255, 255, 255, .3)",
+                                    fontSize: 12,
+                                },
+                                axisLine: {
+                                    lineStyle: {
+                                        color: "red",
+                                    },
+                                },
+                            },
+                        }, ],
+                        yAxis: [{
+                            type: "value",
+                            // 去除刻度线
+                            axisTick: {
+                                show: false,
+                            },
+                            // y轴的线颜色
+                            axisLine: {
+                                lineStyle: {
+                                    color: "rgba(255, 255, 255, .1)",
+                                },
+                            },
+                            // 文字的颜色
+                            axisLabel: {
+                                textStyle: {
+                                    color: "rgba(255, 255, 255, .6)",
+                                    fontSize: 12,
+                                },
+                            },
+                            // 修改分割线的颜色
+                            splitLine: {
+                                lineStyle: {
+                                    color: "#aaa", // 分割线颜色
+                                    opacity: .5
+                                }
+                            },
+                        }, ],
+                        series: [{
+                            name: "烟感",
+                            type: "line",
+                            smooth: true,
+                            // 单独修改当前线条的样式
+                            lineStyle: {
+                                color: "#F4A460",
+                                width: 2,
+                            },
+                            areaStyle: {
+                                // 渐变色,只需要复制即可
+                                color: new echarts.graphic.LinearGradient(
+                                    0,
+                                    0,
+                                    0,
+                                    1, [{
+                                            offset: 0,
+                                            color: "rgba(244,164,96, 0.4)", // 渐变色的起始颜色
+                                        },
+                                        {
+                                            offset: 0.8,
+                                            color: "rgba(244,164,96, 0.1)", // 渐变线的结束颜色
+                                        },
+                                    ],
+                                    false
+                                ),
+                                // 影子效果
+                                shadowColor: "rgba(0, 0, 0, 0.1)",
+                            },
+                            // 设置拐点形状
+                            symbol: "circle",
+                            // 拐点大小
+                            symbolSize: 8,
+                            // 刚开始时不显示拐点,鼠标经过才显示
+                            showSymbol: false,
+                            // 设置拐点颜色以及边框
+                            itemStyle: {
+                                color: "#F4A460",
+                                borderColor: "rgba(221, 220, 107, .1)",
+                                borderWidth: 12,
+                            },
+                            data: [130, 10, 20, 40, 30, 40, 80, 60, 20, 40, 90, 40, 20, 140, 30, 40, 130, 20, 20, 40, 80, 70, 30, 40, 30, 120, 20, 99, 50, 20, ],
+                        }, ],
+                    };
+                    myChart.setOption(option);
+                    //echarts赋值到src
+                    var img1 = document.getElementById('smokeOnlyChart_img');
+                    setTimeout(function() {
+                        img1.src = myChart.getDataURL();
+                    }, 1200)
+                })();
+
+                //关闭弹框
+                $('.clsBtn,.cancel').click(function() {
+                    window.open("./index.html");
+                })
+            }
         })
-    }, function(errorMsg) {
-        alert("异常错误!");
     })
-})
+}, function(errorMsg) {
+    alert("异常错误!");
+});
 
 
+// 打印
+(function() {
 
-layui.use('layer', function () {
-    layerCreateIndex2 = layer.open({
-        type: 1,
-        title: false,
-        closeBtn: 0,
-        skin: 'yourclass',
-        area: [
-            '700px', '800px'
-        ],
-        content: $(".reportContentOut"),
-        success: function () {
-            $('.clsBtn,.cancel').click(function () {
-                layer.close(layerCreateIndex2);
+    $("#btnPrint").click(function() {
+        print_detail()
+    });
 
-                // window.open("./index.html");
-            })
-        }
-    })
-})
+    var print_detail = function() {
 
+        //打印前echarts图表转换成图片 start 
+        $('#waterChart1_img,#fireChart1_img,#waterOnlyChart_img,#fireOnlyChart_img,#smokeOnlyChart_img').show()
+        $('waterChart1,#fireChart1,#waterOnlyChart,#fireOnlyChart,#smokeOnlyChart').hide()
 
+        //  end
 
+        var div1_label1 = document.getElementById('printArea').innerHTML;
+        var hkey_key;
+        var hkey_root = 'HKEY_CURRENT_USER';
+        var hkey_path = '\\Software\\Micorsoft\\Internet Explorer\\PageSetup\\';
+        var print_win = window.open('打印窗口', '_blank');
+        var div = document.createElement('div');
+        div.setAttribute('width', '100%');
+        div.setAttribute('height', '100%');
+        var div_print = document.createElement('div');
+        div_print.setAttribute('style', 'width:595px;height:842px;padding:50px 20px;margin:0px auto 0px auto');
+        div_print.innerHTML = div1_label1;
+        div.appendChild(div_print);
+
+        print_win.document.write(div.innerHTML);
+        print_win.document.close();
+        try {
+            var RegWsh = new ActiveXObject('WScript.Shell');
+            hkey_key = 'header';
+            RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, '');
+            hkey_key = 'footer';
+            RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, '');
+        } catch (e) {}
+        print_win.print();
+        print_win.close();
+    }
+})()

+ 240 - 191
monthReport.html

@@ -1,226 +1,275 @@
-<!DOCTYPE html > <html lang="zh">
+<!DOCTYPE html >
+<html lang="zh">
 
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
-        <title>工作月报</title>
-        <link rel="shortcut icon" href="favicon.ico">
-        <script src="js/flexible-inner.js"></script>
-        <link rel="stylesheet" href="layui/css/layui.css"/>
-        <link rel="stylesheet" href="css/common.css"/>
-        <link rel="stylesheet" href="css/per-manage.css"/>
+<head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>工作月报</title>
+    <link rel="shortcut icon" href="favicon.ico">
+    <script src="js/flexible-inner.js"></script>
+    <link rel="stylesheet" href="layui/css/layui.css" />
+    <link rel="stylesheet" href="css/common.css" />
+    <link rel="stylesheet" href="css/per-manage.css" />
 
-    </head>
+</head>
 
-    <body style=" background-size: cover;background-color:#000;background-image:none">
+<body style=" background-size: cover;background-color:#000;background-image:none">
 
 
-        <div class="xcConfirm reportOut" style="display:none" >
-            <div class="popBox">
-                <div class="ttBox">
-                    <a class="clsBtn"></a>
-                    <span class="tt">工作月报</span>
-                </div>
-                <form id="reportOutForm">
-                    <div class="txtBox " style="padding-right:0!important">
+    <div class="xcConfirm reportOut" style="display:none">
+        <div class="popBox">
+            <div class="ttBox">
+                <a class="clsBtn"></a>
+                <span class="tt">工作月报</span>
 
-                        <div>
-                            <span>开始日期:<i class="necessary">*</i>
+            </div>
+            <form id="reportOutForm">
+                <div class="txtBox " style="padding-right:0!important">
+
+                    <div>
+                        <span>开始日期:<i class="necessary">*</i>
                             </span>
-                            <input type="text" id="startTime" name="startTime">
-                        </div>
+                        <input type="text" id="startTime" name="startTime">
+                    </div>
 
-                        <div>
-                            <span>结束日期:<i class="necessary">*</i>
+                    <div>
+                        <span>结束日期:<i class="necessary">*</i>
                             </span>
-                            <input type="text" id="endTime" name="endTime">
-                        </div>
-                        <div>
-                            <span >建筑物名称:<i class="necessary">*</i>
+                        <input type="text" id="endTime" name="endTime">
+                    </div>
+                    <div>
+                        <span>建筑物名称:<i class="necessary">*</i>
                             </span>
-                            <select id="getNameList" name="companyId" >
+                        <select id="getNameList" name="companyId">
                                 <option value="">所有</option>
                             </select>
-                        </div>
                     </div>
-                    <div class="btnArea">
-                        <div class="btnGroup">
-                            <a id="nextStep" class="sgBtn ok"><img src="../../images/accept.png" alt="">
-                                &nbsp;&nbsp;下一步</a>
-                            <a class="sgBtn cancel"><img src="../../images/cancel.png" alt="">关闭</a>
-                        </div>
+                </div>
+                <div class="btnArea">
+                    <div class="btnGroup">
+                        <a id="nextStep" class="sgBtn ok"><img src="../../images/accept.png" alt=""> &nbsp;&nbsp;下一步
+                        </a>
+                        <a class="sgBtn cancel"><img src="../../images/cancel.png" alt="">关闭</a>
                     </div>
-                </form>
-            </div>
+                </div>
+            </form>
         </div>
+    </div>
 
 
-        <!-- 工作考评主页面start -->
-        <div class="xcConfirm reportContentOut" >
-            <div class="popBox">
-                <div class="ttBox">
-                    <a class="clsBtn"></a>
-                </div>
-                <div class="exportBox">
-                    
-                    <div class="exportContainer" id="printArea">
-            
-                        <h3 style="text-align:center">虹泾总部园工作月报分析</h3>
-            
-                        <section class="section">
-                            <h4 class="big-tit">1 设备类型统计信息</h4>
-            
-                            <div>
-                                <table width="100%" border=1 style="text-align: center;border-collapse: collapse;
-                                border-spacing: 0;">
-                                    <tr>
-                                        <td>设备类型名称</td>
-                                        <td>数量</td>
-                                        <td>传输类型</td>
-                                        <td>厂家名称</td>
-                                        <td>设备总数</td>
-                                    </tr>
-                                    <tbody id="equipment_list">
-                                    </tbody>
-            
-                                </table>
-                                <p class="table-sub" style="text-align:center">表2:安装设备清单</p>
-                            </div>
-            
-            
-            
-            
-            
-                        </section>
-            
-                        <section class="">
-                            <h4 class="big-tit">2 单位信息</h4>
-                            <table width="100%" border=1 style="text-align: center;border-collapse: collapse;
-                            border-spacing: 0;">
+    <!-- 工作考评主页面start -->
+    <div class="xcConfirm reportContentOut" style="display:none">
+        <div class="popBox">
+            <div class="ttBox">
+                <span class="tt">工作月报</span>
+
+                <a class="clsBtn"></a>
+            </div>
+            <div class="exportBox">
+
+                <div class="exportContainer" id="printArea">
+
+                    <h3 style="text-align:center">
+                        <span id="companyName"></span>工作月报分析
+                    </h3>
+
+                    <h4 style="text-align:center;margin-top:10px;">2021-04月报表</h4>
+
+
+                    <section class="section">
+                        <h4 class="big-tit">1 设备类型统计信息</h4>
+
+                        <div>
+                            <table width="100%" border="1" style="text-align: center;border-collapse: collapse;border-spacing: 0;">
                                 <tr>
-                                    <td>报警总数</td>
-                                    <td>处理数</td>
+                                    <td>设备类型名称</td>
+                                    <td>数量</td>
+                                    <td>传输类型</td>
+                                    <td>厂家名称</td>
+                                </tr>
+                                <tbody id="typeList"></tbody>
+
+                            </table>
+                            <p class="table-sub" style="text-align:center">表1:设备类型统计信息表</p>
+                        </div>
+
+
+                    </section>
+
+                    <section class="">
+                        <h4 class="big-tit">2 单位信息</h4>
+                        <table width="100%" border="1" style="text-align: center;border-collapse: collapse; border-spacing: 0;">
+                            <tr>
+                                <td>单位名称</td>
+                                <td>单位地址</td>
+
+                            </tr>
+                            <tbody id="companyData"></tbody>
+
+                        </table>
+
+                        <p class="table-sub" style="text-align:center">表2:单位信息统计表</p>
+                    </section>
+                    <!-- 告警处理start -->
+                    <section class="alarm-handing">
+                        <h4 class="big-tit">3 告警处理情况统计</h4>
+                        <div>
+                            <h4 class="big-tit">3.1 水系统告警处理统计</h4>
+                            <table width="100%" border="1" style="text-align: center;border-collapse: collapse;border-spacing: 0;">
+                                <tr>
+                                    <td>总数</td>
+                                    <td>已处理数</td>
                                     <td>未处理数</td>
-                                    <td>处置率</td>
-                                    <td>未处置率</td>
+                                    <td>处理率</td>
                                 </tr>
                                 <tbody id="data_statistics"></tbody>
-                                <!-- <tr>
-                                    <td>1568</td>
-                                    <td>1300</td>
-                                    <td>268</td>
+                                <tr>
+                                    <td>100</td>
+                                    <td>30</td>
+                                    <td>70</td>
                                     <td>30%</td>
-                                    <td>备注信息</td>
-                                </tr> -->
+                                </tr>
                             </table>
-            
-                            <p class="table-sub" style="text-align:center">表3:数据统计计算</p>
-                        </section>
-            
-                        <section class="divergence">
-                            <h4 class="big-tit">3 告警处理情况统计</h4>
-                            <h4 class="big-tit">3.1 三相电压</h4>
-                            <div id="divergenceChart1" class="innerChart"></div>
-                            <img id="divergenceChart1_img" style="width:100%;display:none;">
-            
-                            <h4 class="big-tit">3.2 三相电流</h4>
-                            <div id="divergenceChart2" class=" innerChart"></div>
-                            <img id="divergenceChart2_img" style="width:100%;display:none;">
-            
-                            <h4 class="big-tit">3.3 三相温度</h4>
-                            <div id="divergenceChart3" class=" innerChart"></div>
-                            <img id="divergenceChart3_img" style="width:100%;display:none;">
-            
-                            <h4 class="big-tit">3.4 漏电电流</h4>
-                            <div id="divergenceChart4" class=" innerChart"></div>
-                            <img id="divergenceChart4_img" style="width:100%;display:none;">
-            
-                            <div class="summary2 ">
-                                <div>
-                                    <p>结论:</p>
-                                </div>
-                                <div class="summaryDetail">
-                                    <!-- <div>1、请检查绝缘皮出现硬化、裂纹;接触电阻变大,现硬化、裂纹;</div>
-                                    <div>2、请检查绝缘皮出现硬化、裂纹;接触电阻变大,现硬化、裂纹;</div>
-                                    <div>3、请检查绝缘皮出现硬化、裂纹;接触电阻变大,现硬化、裂纹;</div>
-                                    <div>4、请检查绝缘皮出现硬化、裂纹;接触电阻变大,现硬化、裂纹;</div> -->
-                                </div>
-                            </div>
-            
-                        </section>
-            
-            
-                        <section class="oldAnalysis">
-                            <h4 class="big-tit">4 设备离线情况统计</h4>
-            
-                            <h4 class="big-tit">4.1 异常设备监控电缆数据</h4>
-                            <div id="oldAnalysisChart1" class="innerChart"></div>
-                            <img id="oldAnalysisChart1_img" style="width:100%;display:none;">
-            
-                            <h4 class="big-tit">4.2 漏电告警数据</h4>
-                            <div id="oldAnalysisChart2" class="innerChart"></div>
-                            <img id="oldAnalysisChart2_img" style="width:100%;display:none;">
-            
-                            <div class="summary2">
-                                <div>
-                                    <p>结论:</p>
-                                </div>
-                                <div class="summaryDetail">
-                                    <!-- <div>1、请检查绝缘皮出现硬化、裂纹;接触电阻变大,现硬化、裂纹;</div> -->
-                                </div>
-                            </div>
-            
-                        </section>
-            
-                        <section class="hotAnalysis">
-                            <h4 class="big-tit">5 热老化分析</h4>
-            
-                            <div id="hotAnalysisChart1" class="innerChart"></div>
-                            <img id="hotAnalysisChart1_img" style="width:100%;display:none;">
-            
-            
-                            <div class="summary2">
-                                <div>
-                                    <p>结论:</p>
-                                </div>
-                                <div class="summaryDetail">
-                                    <!-- <div>1、请检查绝缘皮出现硬化、裂纹;接触电阻变大,现硬化、裂纹;1、请检查绝缘皮出现硬化、裂纹;接触电阻变大,现硬化、裂纹;1、请检查绝缘皮出现硬化、裂纹;接触电阻变大,现硬化、裂纹;1、请检查绝缘皮出现硬化、裂纹;接触电阻变大,现硬化、裂纹;</div> -->
-                                </div>
-                            </div>
-            
-                        </section>
-            
-            
-            
-            
-                    </div>
+                            <p class="table-sub" style="text-align:center">表3-1:水系统告警处理统计表</p>
+                            <div id="waterChart1" class="innerChart"></div>
+                            <br>
+                            <img id="waterChart1_img" style="width:100%;display:none;">
+
+
+                        </div>
+                        <div>
+                            <h4 class="big-tit">3.2 火系统告警处理统计</h4>
+                            <table width="100%" border="1" style="text-align: center;border-collapse: collapse;border-spacing: 0;">
+                                <tr>
+                                    <td>告警总数</td>
+                                    <td>已处理数</td>
+                                    <td>未处理数</td>
+                                    <td>处理率</td>
+                                </tr>
+                                <tbody id="data_statistics"></tbody>
+                                <tr>
+                                    <td>100</td>
+                                    <td>40</td>
+                                    <td>60</td>
+                                    <td>40%</td>
+                                </tr>
+                            </table>
+                            <p class="table-sub" style="text-align:center">表3-2:水系统告警处理统计表</p>
+
+                            <div id="fireChart1" class="innerChart"></div>
+                            <br>
+                            <img id="fireChart1_img" style="width:100%;display:none;">
+                        </div>
+
+                    </section>
+                    <!-- 告警处理end -->
+
+
+                    <!-- 设备离线情况统计start -->
+                    <section class="device-only">
+                        <h4 class="big-tit">4 设备离线情况统计</h4>
+                        <div>
+                            <h4 class="big-tit">4.1 水系统设备离线情况统计</h4>
+                            <table width="100%" border="1" style="text-align: center;border-collapse: collapse;border-spacing: 0;">
+                                <tr>
+                                    <td>总数</td>
+                                    <td>已处理数</td>
+                                    <td>未处理数</td>
+                                    <td>处理率</td>
+                                </tr>
+                                <tbody id="data_statistics"></tbody>
+                                <tr>
+                                    <td>100</td>
+                                    <td>10</td>
+                                    <td>90</td>
+                                    <td>10%</td>
+                                </tr>
+                            </table>
+                            <p class="table-sub" style="text-align:center">表4-1:水系统设备离线情况统计表</p>
+                            <div id="waterOnlyChart" class="innerChart"></div>
+                            <br>
+                            <img id="waterOnlyChart_img" style="width:100%;display:none;">
+
+
+                        </div>
+                        <div>
+                            <h4 class="big-tit">4.2 火系统设备离线情况统计</h4>
+                            <table width="100%" border="1" style="text-align: center;border-collapse: collapse;border-spacing: 0;">
+                                <tr>
+                                    <td>告警总数</td>
+                                    <td>已处理数</td>
+                                    <td>未处理数</td>
+                                    <td>处理率</td>
+                                </tr>
+                                <tbody id="data_statistics"></tbody>
+                                <tr>
+                                    <td>100</td>
+                                    <td>20</td>
+                                    <td>80</td>
+                                    <td>20%</td>
+                                </tr>
+                            </table>
+                            <p class="table-sub" style="text-align:center">表4-2:火系统设备离线情况统计表</p>
+
+                            <div id="fireOnlyChart" class="innerChart"></div>
+                            <br>
+                            <img id="fireOnlyChart_img" style="width:100%;display:none;">
+                        </div>
+
+                        <div>
+                            <h4 class="big-tit">4.3 烟感设备离线情况统计</h4>
+                            <table width="100%" border="1" style="text-align: center;border-collapse: collapse;border-spacing: 0;">
+                                <tr>
+                                    <td>告警总数</td>
+                                    <td>已处理数</td>
+                                    <td>未处理数</td>
+                                    <td>处理率</td>
+                                </tr>
+                                <tbody id="data_statistics"></tbody>
+                                <tr>
+                                    <td>100</td>
+                                    <td>30</td>
+                                    <td>70</td>
+                                    <td>30%</td>
+                                </tr>
+                            </table>
+                            <p class="table-sub" style="text-align:center">表4-3:烟感设备离线情况统计表</p>
+
+                            <div id="smokeOnlyChart" class="innerChart"></div>
+                            <br>
+                            <img id="smokeOnlyChart_img" style="width:100%;display:none;">
+                        </div>
+
+                    </section>
+                    <!-- 设备离线情况统计end -->
+
+
                 </div>
+            </div>
 
-                <div class="btnArea">
-                    <div class="btnGroup">
-                        <a id="nextStep" class="sgBtn ok"><img src="../../images/accept.png" alt="">
-                            &nbsp;&nbsp;下一步</a>
-                        <a class="sgBtn cancel"><img src="../../images/cancel.png" alt="">关闭</a>
-                    </div>
+            <div class="btnArea">
+                <div class="btnGroup">
+                    <a id="btnPrint" class="sgBtn ok"><img src="../../images/accept.png" alt="">导出</a>
+                    <a class="sgBtn cancel"><img src="../../images/cancel.png" alt="">关闭</a>
                 </div>
             </div>
         </div>
-        <!-- 工作考评主页面end -->
+    </div>
+    <!-- 工作考评主页面end -->
+
 
-        
-        <script src="js/jquery.js"></script>
-        <script src="api/request.js"></script>
-        <script src="layui/layui.js"></script>
-        <script src="js/valid.js"></script>
-        <script src="js/monthReport.js"></script>
+    <script src="js/jquery.js"></script>
+    <script src="api/request.js"></script>
+    <script src="layui/layui.js"></script>
+    <script src="js/echarts.min.js"></script>
 
+    <script src="js/valid.js"></script>
+    <script src="js/monthReport.js"></script>
 
-        <script>
 
-           
-        </script>
+    <script></script>
 
 
-    </body>
+</body>
 
-</html>
+</html>

+ 184 - 163
pages/device-manage/deviceType.html

@@ -1,182 +1,203 @@
-<!DOCTYPE html>
-<html lang="zh">
+< !DOCTYPE html > <html lang="zh">
 
-<head>
-    <meta charset="UTF-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>设备管理(设备类型)</title>
-    <link rel="shortcut icon" href="../../favicon.ico">
-    <link rel="stylesheet" href="../../layui/css/layui.css" />
-    <link rel="stylesheet" href="../../css/common.css" />
-    <link rel="stylesheet" href="../../css/per-manage.css" />
-    <script src="../../js/flexible-inner.js"></script>
-</head>
+    <head>
+        <meta charset="UTF-8"/>
+        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+        <title>设备管理(设备类型)</title>
+        <link rel="shortcut icon" href="../../favicon.ico">
+        <link rel="stylesheet" href="../../layui/css/layui.css"/>
+        <link rel="stylesheet" href="../../css/common.css"/>
+        <link rel="stylesheet" href="../../css/per-manage.css"/>
+        <script src="../../js/flexible-inner.js"></script>
+    </head>
 
-<body style="background:rgba(0,0,0,0)">
-    <div class="memberbox">
-        <div class="membertit">设备类型</div>
-        <div class="member-choose">
-            <span>厂家</span>
-            <input type="text" id="business">
-            <span>类型值</span>
-            <input type="text" id="type_value">
-            <a class="button" id="buttonClick">确定</a>
-            <a class="button reset">重置</a>
+    <body style="background:rgba(0,0,0,0)">
+        <div class="memberbox">
+            <div class="membertit">设备类型</div>
+            <div class="member-choose">
+                <span>厂家</span>
+                <input type="text" id="business">
+                <span>类型值</span>
+                <input type="text" id="type_value">
+                <a class="button" id="buttonClick">确定</a>
+                <a class="button reset">重置</a>
+            </div>
+            <div class="operatebox"></div>
+            <ul class="member-operate">
+                <a class="button edit">修改</a>
+                <a class="button add">+ 新增</a>
+                <a class="button delete ">- 删除</a>
+                <a class="button export">导出</a>
+            </ul>
+            <table class="pure-table " cellspacing="0px" id="test">
+                <thead>
+                    <tr>
+                        <th style="width: 24px "></th>
+                        <th>序号</th>
+                        <th>类型名称</th>
+                        <th>类型参数</th>
+                        <th>传输方式</th>
+                        <th>厂家(商家)</th>
+                        <th>所属单位</th>
+                        <th>添加人</th>
+                        <th>添加时间</th>
+                    </tr>
+                </thead>
+                <tbody id="dataList"></tbody>
+            </table>
         </div>
-        <div class="operatebox"></div>
-        <ul class="member-operate">
-            <a class="button edit">修改</a>
-            <a class="button add">+ 新增</a>
-            <a class="button delete ">- 删除</a>
-            <a class="button export">导出</a>
-        </ul>
-        <table class="pure-table " cellspacing="0px" id="test">
-            <thead>
-                <tr>
-                    <th style="width: 24px ">
-                    </th>
-                    <th>序号</th>
-                    <th>类型名称</th>
-                    <th>类型参数</th>
-                    <th>传输方式</th>
-                    <th>厂家(商家)</th>
-                    <th>所属单位</th>
-                    <th>添加人</th>
-                    <th>添加时间</th>
-                </tr>
-            </thead>
-            <tbody id="dataList">
-            </tbody>
-        </table>
-    </div>
 
-    <div class="pager has-data flex">
-        <div class="pager-left flex1 align-left">
-            <ul>
-                <li id="firstPageButton" class="pg-first disabled"></li>
-                <li id="prevPageButton" class="pg-prev disabled"></li>
-                <li class="pg-des">
-                    第 <input id="currentPage" type="text" size="1" value="1"> 页,共 <span id="totalPage">1</span> 页
-                </li>
-                <li id="nextPageButton" class="pg-next"></li>
-                <li id="lastPageButton" class="pg-last"></li>
-                <li class="pg-refresh">
-                    <a href="javascript:location.reload();"></a>
-                </li>
-            </ul>
+        <div class="pager has-data flex">
+            <div class="pager-left flex1 align-left">
+                <ul>
+                    <li id="firstPageButton" class="pg-first disabled"></li>
+                    <li id="prevPageButton" class="pg-prev disabled"></li>
+                    <li class="pg-des">
+                        第
+                        <input id="currentPage" type="text" size="1" value="1">
+                        页,共
+                        <span id="totalPage">1</span>
+                        页
+                    </li>
+                    <li id="nextPageButton" class="pg-next"></li>
+                    <li id="lastPageButton" class="pg-last"></li>
+                    <li class="pg-refresh">
+                        <a href="javascript:location.reload();"></a>
+                    </li>
+                </ul>
+            </div>
+            <div class="pager-right  flex1 align-right">显示第
+                <span id="pageFrom">
+                    1
+                </span>
+                条到
+                <span id="pageTo">
+                    1
+                </span>条记录,总共
+                <span id="dataTotal">
+                    1
+                </span>条
+            </div>
         </div>
-        <div class="pager-right  flex1 align-right">显示第 <span id="pageFrom"> 1 </span> 条到 <span id="pageTo">
-                            1 </span>条记录,总共 <span id="dataTotal">
-                            1 </span>条
+        <div class="pager no-data" style="display:none;text-align:right">
+            暂无数据
         </div>
-    </div>
-    <div class="pager no-data" style="display:none;text-align:right">
-        暂无数据
-    </div>
 
 
-    <!-- 新增 -->
-    <div class="xcConfirm addDeviceTypeOut" style="display:none">
-        <div class="xc_layer"></div>
-        <div class="popBox">
-            <div class="ttBox">
-                <a class="clsBtn"></a>
-                <span class="tt">新增</span>
-            </div>
-            <form id="addMenuForm">
-                <div class="txtBox">
-                    <div>
-                        <span>类型名称:<i class="necessary">*</i></span>
-                        <input type="text" name="type_name">
-                    </div>
-                    <div>
-                        <span>类型参数:<i class="necessary">*</i></span>
-                        <input type="text" name="type_value">
-                    </div>
-                    <div>
-                        <span>传输方式:<i class="necessary">*</i></span>
-                        <select name="transmission_model">
-                            <option value="">所有</option>
-                            <option value="1">NB-IOT</option>
-                            <option value="2">Lora-IOT</option>
-                            <option value="3">2G/4G/5G</option>
-                        </select>
-                    </div>
-                    <div>
-                        <span>厂家(商家):<i class="necessary">*</i></span>
-                        <input type="text" name="business">
-                    </div>
-                    <div>
-                        <span>所属单位:<i class="necessary">*</i></span>
-                        <select id="getNameList" name="company_code">
-                            <option value="">所有</option>
-                        </select>
-                    </div>
+        <!-- 新增 -->
+        <div class="xcConfirm addDeviceTypeOut" style="display:none">
+            <div class="xc_layer"></div>
+            <div class="popBox">
+                <div class="ttBox">
+                    <a class="clsBtn"></a>
+                    <span class="tt">新增</span>
                 </div>
-                <div class="btnArea">
-                    <div class="btnGroup">
-                        <a class="sgBtn ok" id="addMenu"><img src="../../images/accept.png" alt=""> 提交</a>
-                        <a class="sgBtn cancel"><img src="../../images/cancel.png" alt="">关闭</a>
+                <form id="addMenuForm">
+                    <div class="txtBox">
+                        <div>
+                            <span>类型名称:<i class="necessary">*</i>
+                            </span>
+                            <input type="text" name="type_name">
+                        </div>
+                        <div>
+                            <span>类型参数:<i class="necessary">*</i>
+                            </span>
+                            <input type="text" name="type_value">
+                        </div>
+                        <div>
+                            <span>传输方式:<i class="necessary">*</i>
+                            </span>
+                            <select name="transmission_model">
+                                <option value="">所有</option>
+                                <option value="1">NB-IOT</option>
+                                <option value="2">Lora-IOT</option>
+                                <option value="3">2G/4G/5G</option>
+                            </select>
+                        </div>
+                        <div>
+                            <span>厂家(商家):<i class="necessary">*</i>
+                            </span>
+                            <input type="text" name="business">
+                        </div>
+                        <div>
+                            <span>所属单位:<i class="necessary">*</i>
+                            </span>
+                            <select id="getNameList" name="company_code">
+                                <option value="">所有</option>
+                            </select>
+                        </div>
                     </div>
-                </div>
-            </form>
+                    <div class="btnArea">
+                        <div class="btnGroup">
+                            <a class="sgBtn ok" id="addMenu"><img src="../../images/accept.png" alt="">
+                                提交</a>
+                            <a class="sgBtn cancel"><img src="../../images/cancel.png" alt="">关闭</a>
+                        </div>
+                    </div>
+                </form>
+            </div>
         </div>
-    </div>
 
-    <!-- 修改 -->
-    <div class="xcConfirm editDeviceTypeOut" style="display:none">
-        <div class="xc_layer"></div>
-        <div class="popBox">
-            <div class="ttBox">
-                <a class="clsBtn"></a>
-                <span class="tt">修改</span>
-            </div>
-            <form id="updateMenuForm">
-                <div class="txtBox">
-                    <div>
-                        <span>类型名称:<i class="necessary">*</i></span>
-                        <input type="text" name="type_name">
-                    </div>
-                    <div>
-                        <span>类型参数:<i class="necessary">*</i></span>
-                        <input type="text" name="type_value">
-                    </div>
-                    <div>
-                        <span>传输方式:<i class="necessary">*</i></span>
-                        <select name="transmission_model">
-                            <option value="1">NB-IOT</option>
-                            <option value="2">Lora-IOT</option>
-                            <option value="3">2G/4G/5G</option>
-                        </select>
-                    </div>
-                    <div>
-                        <span>厂家(商家):<i class="necessary">*</i></span>
-                        <input type="text" name="business">
-                    </div>
-                    <div style="opacity:0">
-                        <span>数据ID:<i class="necessary">*</i></span>
-                        <input type="hidden" name="id" readonly>
-                    </div>
+        <!-- 修改 -->
+        <div class="xcConfirm editDeviceTypeOut" style="display:none">
+            <div class="xc_layer"></div>
+            <div class="popBox">
+                <div class="ttBox">
+                    <a class="clsBtn"></a>
+                    <span class="tt">修改</span>
                 </div>
-                <div class="btnArea">
-                    <div class="btnGroup">
-                        <a class="sgBtn ok" id="dataUpdate"><img src="../../images/accept.png" alt=""> 提交</a>
-                        <a class="sgBtn cancel"><img src="../../images/cancel.png" alt="">关闭</a>
+                <form id="updateMenuForm">
+                    <div class="txtBox">
+                        <div>
+                            <span>类型名称:<i class="necessary">*</i>
+                            </span>
+                            <input type="text" name="type_name">
+                        </div>
+                        <div>
+                            <span>类型参数:<i class="necessary">*</i>
+                            </span>
+                            <input type="text" name="type_value">
+                        </div>
+                        <div>
+                            <span>传输方式:<i class="necessary">*</i>
+                            </span>
+                            <select name="transmission_model">
+                                <option value="1">NB-IOT</option>
+                                <option value="2">Lora-IOT</option>
+                                <option value="3">2G/4G/5G</option>
+                            </select>
+                        </div>
+                        <div>
+                            <span>厂家(商家):<i class="necessary">*</i>
+                            </span>
+                            <input type="text" name="business">
+                        </div>
+                        <div style="opacity:0">
+                            <span>数据ID:<i class="necessary">*</i>
+                            </span>
+                            <input type="hidden" name="id" readonly>
+                        </div>
                     </div>
-                </div>
-            </form>
+                    <div class="btnArea">
+                        <div class="btnGroup">
+                            <a class="sgBtn ok" id="dataUpdate"><img src="../../images/accept.png" alt="">
+                                提交</a>
+                            <a class="sgBtn cancel"><img src="../../images/cancel.png" alt="">关闭</a>
+                        </div>
+                    </div>
+                </form>
+            </div>
         </div>
-    </div>
 
 
-    <script src="../../js/jquery.js"></script>
-    <script src="../../js/util.js"></script>
-    <script src="../../api/request.js"></script>
-    <script src="../../js/main.js"></script>
-    <script src="../../layui/layui.js"></script>
-    <script src="../../js/valid.js"></script>
-    <script src="../../js/device-type.js"></script>
+        <script src="../../js/jquery.js"></script>
+        <script src="../../js/util.js"></script>
+        <script src="../../api/request.js"></script>
+        <script src="../../js/main.js"></script>
+        <script src="../../layui/layui.js"></script>
+        <script src="../../js/valid.js"></script>
+        <script src="../../js/device-type.js"></script>
 
-</body>
+    </body>
 
-</html>
+</html>