<%@ 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>

   
          #monthBtn .btn{
               margin-left:10px;
          }

       
</style>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>




    
    <div class="alert alert-danger">
    <b>说明：</b>以下所说的“本月”是指下面您选择的年份与月份
    </div>


     
     
    <asp:HiddenField id="hf_dtfrom" runat="server" ClientIDMode="Static" />
     <asp:HiddenField id="hf_dtto" runat="server" ClientIDMode="Static"/>
     
      
    
     <div id="monthBtn">
    
    
     <asp:PlaceHolder runat="server" ID="ph_month">


    <asp:DropDownList OnSelectedIndexChanged="ddl_year_SelectedIndexChanged"  AutoPostBack="true" runat="server" ID="ddl_year"   CssClass="form-control inline" Width="150px" style="margin-right:10px;"></asp:DropDownList>

    <asp:LinkButton CommandArgument="1" OnClick="lbm_click" CssClass="btn" runat="server" ID="lb_m1">1月</asp:LinkButton>
    <asp:LinkButton CommandArgument="2" OnClick="lbm_click"  CssClass="btn" runat="server" ID="lb_m2">2月</asp:LinkButton>
    <asp:LinkButton CommandArgument="3" OnClick="lbm_click"  CssClass="btn" runat="server" ID="lb_m3">3月</asp:LinkButton>
    <asp:LinkButton CommandArgument="4"  OnClick="lbm_click" CssClass="btn" runat="server" ID="lb_m4">4月</asp:LinkButton>
    <asp:LinkButton CommandArgument="5"  OnClick="lbm_click" CssClass="btn" runat="server" ID="lb_m5">5月</asp:LinkButton>
    <asp:LinkButton CommandArgument="6"  OnClick="lbm_click" CssClass="btn" runat="server" ID="lb_m6">6月</asp:LinkButton>
    <asp:LinkButton CommandArgument="7"  OnClick="lbm_click" CssClass="btn" runat="server" ID="lb_m7">7月</asp:LinkButton>
    <asp:LinkButton CommandArgument="8"  OnClick="lbm_click" CssClass="btn" runat="server" ID="lb_m8">8月</asp:LinkButton>
    <asp:LinkButton CommandArgument="9"  OnClick="lbm_click" CssClass="btn" runat="server" ID="lb_m9">9月</asp:LinkButton>
    <asp:LinkButton CommandArgument="10" OnClick="lbm_click"  CssClass="btn" runat="server" ID="lb_m10">10月</asp:LinkButton>
    <asp:LinkButton CommandArgument="11" OnClick="lbm_click"  CssClass="btn" runat="server" ID="lb_m11">11月</asp:LinkButton>
    <asp:LinkButton CommandArgument="12" OnClick="lbm_click"  CssClass="btn" runat="server" ID="lb_m12">12月</asp:LinkButton>
   
     </asp:PlaceHolder>
 
     </div>



            <h4>1.问题解决率</h4>


        <div id="echart" style="width:300px; height:300px;">
  <img src="Images/loading.gif" />  数据加载中 
 </div>

     已解决或关闭(Solved):<b><asp:Label runat="server" ClientIDMode="Static" ID="lbl_solvedclosed"></asp:Label>个</b> ; 
                   问题总数(Total):<b><asp:Label runat="server" ClientIDMode="Static" ID="lbl_totalticket"></asp:Label></b> ; 
            解决率(Rate)=Solved/Total * 100%= <b><asp:Label runat="server" ClientIDMode="Static" ID="lbl_fs1"></asp:Label>%</b>

    <br /><br />
 <br /><br />




     

  <h4>2.问题概述</h4>
  
 <div ID="div_intro">
 
 <table  class="table table-hover">
 
 <tr   >
   <th>时间 </th>
   <th>Ticket数(A)</th> 
   <th>总花费时间(B)</th> 
   <th>工作日(C)</th>
   <th>每天处理数<br />(D=A/C)</th>
   <th>平均处理时间<br />(E=B/A)</th>

 </tr>

 <tr   >
    <td> 本月（<asp:label runat="server" ID="month1"></asp:label>月）  </td> 
   <td><asp:label runat="server" ID="total1"></asp:label> 个</td>   
   <td><asp:label runat="server" ID="spend1"></asp:label> 小时 </td> 
   <td> <asp:label runat="server" ID="workday1" ></asp:label> 天  </td>
    <td> <asp:label runat="server" ID="avgcount1" ClientIDMode="Static"></asp:label> 
      <span id="span_count">个</span> 
     <img src="Images/s.gif" id=comp1  title="与上月相比对比趋势"  > 
    
       </td>
     <td> 
     <asp:label runat="server" ID="avgtime1"  ClientIDMode="Static"></asp:label> 
       <span id="span_time">小时</span>
     
         <img src="Images/s.gif" id=comp2  title="与上月相比对比趋势"> 
    </td>
 </tr>
     
 <tr  >
  <td> 上月 （<asp:label runat="server" ID="month2"></asp:label>月） </td> 
   <td><asp:label runat="server" ID="total2"></asp:label> 个 </td>  
   <td> <asp:label runat="server" ID="spend2"></asp:label> 小时  </td> 
   <td> <asp:label runat="server" ID="workday2"></asp:label> 天  </td>
    <td> <asp:label runat="server" ID="avgcount2" ClientIDMode="Static"></asp:label> 个 </td>
     <td> <asp:label runat="server" ID="avgtime2"  ClientIDMode="Static"></asp:label> 小时  </td>

 </tr>
   
     <tr>
         <td colspan="6"></td>
     </tr>
 </table>
 </div>


 <br /><br />




     <h4>3.最近三个月问题统计</h4>

     
 <div runat="server" ID="div_last3month">
 
 <table  class="table table-hover">
 
 <tr   >
  <th>状态\时间 </th> <th><asp:Literal runat="server" ID="lm1"></asp:Literal></th> <th><asp:Literal runat="server" ID="lm2"></asp:Literal></th> <th><asp:Literal runat="server" ID="lm3"></asp:Literal></th>
 </tr>

 <tr   >
  <td>solved </td>  <td><asp:Literal runat="server" ID="ls1"></asp:Literal> </td>  <td> <asp:Literal runat="server" ID="ls2"></asp:Literal> </td>  <td><asp:Literal runat="server" ID="ls3"></asp:Literal>  </td>
 </tr>
 
 <tr   >
  <td>unsolved </td>  <td><asp:Literal runat="server" ID="lus1"></asp:Literal> </td>  <td> <asp:Literal runat="server" ID="lus2"></asp:Literal></td>  <td><asp:Literal runat="server" ID="lus3"></asp:Literal> </td>
 </tr>

 
 <tr   >
  <td>pending </td> <td><asp:Literal runat="server" ID="lpd1"></asp:Literal> </td>  <td><asp:Literal runat="server" ID="lpd2"></asp:Literal> </td>  <td><asp:Literal runat="server" ID="lpd3"></asp:Literal> </td>
 </tr>
  

  <tr style=" background-color:#808080; color:#ffffff  " >
  <td>共计 </td> <td><asp:Literal runat="server" ID="lt1"></asp:Literal> </td>  <td><asp:Literal runat="server" ID="lt2"></asp:Literal> </td>  <td><asp:Literal runat="server" ID="lt3"></asp:Literal> </td>
 </tr>

 </table>

     </div>













            
        </ContentTemplate>

    </asp:UpdatePanel>



    
    <script>

        function Comp() {


            var _avgcount1 = parseFloat($("#avgcount1").html());
            var _avgcount2 = parseFloat($("#avgcount2").html());

            if (_avgcount1 > _avgcount2) {
                $("#comp1").attr("src", "Images/up.gif");
                $("#avgcount1").css("color", "red");
                $("#span_count").css("color", "red");
            }
            else {
                if (_avgcount1 < _avgcount2) {
                    $("#comp1").attr("src", "Images/down.gif");
                    $("#avgcount1").css("color", "green");
                    $("#span_count").css("color", "green");
                }
            }



            var _avgtime1 = parseFloat($("#avgtime1").html());
            var _avgtime2 = parseFloat($("#avgtime2").html());

            if (_avgtime1 > _avgtime2) {
                $("#comp2").attr("src", "Images/up.gif");
                $("#avgtime1").css("color", "red");
                $("#span_time").css("color", "red");
            }
            else {
                if (_avgtime1 < _avgtime2) {
                    $("#comp2").attr("src", "Images/down.gif");
                    $("#avgtime1").css("color", "green");
                    $("#span_time").css("color", "green");
                }
            }
            var fs1 =$("#lbl_fs1").html();
            DrawGauge(fs1, "echart", "满意度指标");

            

        }



        $(document).ready(

          function ()
          {
              Comp();
          }

      );


    </script>





 </asp:Content>
