<%@ Page Title="" Language="C#" MasterPageFile="~/helpdesk/Reporting.master" AutoEventWireup="true" CodeBehind="Reporting_Ticket.aspx.cs" Inherits="helpdesk.helpdesk.Reporting_Ticket" %>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
     
   

   <style>
       h2 {
        color:#666
       }
   </style>

   
    
    
        选择年份：
         
         <asp:Label runat="server" ID="lbl_year"></asp:Label>

    
   
    <br /><br />
    

        系统共有问题：<asp:Label runat="server" ID="lbl_total"></asp:Label>  个，
    其中 <asp:Label runat="server" ID="lbl_selYear"></asp:Label> 年提交问题
    <asp:Label runat="server" ID="lbl_currentcount"></asp:Label>
    个。 本月提交  <asp:Label runat="server" ID="lbl_thismonth"></asp:Label> 个问题。
   
    <br /><br />

    <table class="table">
        <tr valign="top">
            <td colspan="3">
                 <h2> <%=selYear %>年度问题（按分类）统计</h2>
            </td>
            </tr>

        <tr valign="top">
            <td>


     <div id="div_total" style="width:700px; height:400px;  ">
          <img src="images/loading.gif"  id="img_total"/>
      </div>


            </td>


             <td>

               <h4>问题统计表</h4>                                
  <table id="tbl_total"  class="table  table-hover">
    <tr>
        <th width="300px">问题分类</th>
        <th width="200px">数量</th>      
    </tr> 

    </table>



            </td>
        </tr>


    </table>




    <script> 

        $.ajax({
            url: "ajax/data.aspx",
            data: { t: "intro_pie_cat", year:<%=selYear %> },
            cache: true,
            dataType: 'json',
            success: function (data) {
               
                var tr_data = "";
                $.each(data, function (i, item) {
                    tr_data += "<tr><td>" + item.name + "</td><td>" + item.value + "个</td> </tr>"; 
                })
                $("#tbl_total").append(tr_data); 
                $("#img_total").hide();
                 

                var _option = {
                    legend: {
                        show:false
                    },

                    tooltip: {
                        formatter:  "{b} : {c} ({d}%)"
                    } 
                     
                }

                var optionPara = ECharts.Pie2(data,"", _option);
                Draw(optionPara, "div_total");
          
            
                



            }
        });




    </script>









    <br><br> 

<table class="table">
        <tr valign="top">
            <td colspan="3">
                 <h2> <%=selYear %>年度问题（按部门）统计</h2>
            </td>
            </tr>

        <tr valign="top">
            <td>


     <div id="div_dept" style="width:700px; height:400px;  ">
          <img src="images/loading.gif"  id="img_dept"/>
      </div>


            </td>


             <td>

               <h4>问题统计表</h4>                                
  <table id="tbl_dept"  class="table  table-hover">
    <tr>
        <th width="300px">问题分类</th>
        <th width="200px">数量</th>      
    </tr> 

    </table>



            </td>
        </tr>


    </table>






    
    <script> 

        $.ajax({
            url: "ajax/data.aspx",
            data: { t: "intro_pie_dept", year:<%=selYear %> },
            cache: true,
            dataType: 'json',
            success: function (data) {
               
                var tr_data = "";
                $.each(data, function (i, item) {
                    tr_data += "<tr><td>" + item.name + "</td><td>" + item.value + "个</td> </tr>"; 
                })
                $("#tbl_dept").append(tr_data); 
                $("#img_dept").hide();
                 

                var _option = {
                    legend: {
                        show:false
                    },

                    tooltip: {
                        formatter:  "{b} : {c} ({d}%)"
                    } 
                     
                }

                var optionPara = ECharts.Pie2(data,"", _option);
                Draw(optionPara, "div_dept");
          
            
                



            }
        });




    </script>





    <table class="table">
        <tr valign="top">
            <td  >
                 <h2> <%=selYear %>月度问题趋势图</h2>
            </td>
         </tr>

        <tr>
            <td>

                <div style="width:900px; height:500px;" id="div_month">

                </div>

            </td>
        </tr>










    <script>



       $.ajax({
            url: "ajax/data.aspx",
            data: { t: "intro_month", year:<%=selYear %> },
            cache: true,
            async: true,
            dataType: 'json',
            success: function (data) { 
                DrawBars(data, "div_month","",true,false, "bar");
            }
        });

      
        </script>



 </asp:Content>
