Brak opisu

Safety.html 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>不安全信息统计表</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <link href="../css/init.css" rel="stylesheet" />
  8. <script src="../Script/Common/huayi.load.js"></script>
  9. <script src="../Script/Common/huayi.config.js"></script>
  10. <link href="../css/Table/table1.css" rel="stylesheet" />
  11. <script src="../js/laydate/laydate.js"></script>
  12. <style>
  13. .LY:hover {
  14. color: #fff;
  15. }
  16. .LY:active {
  17. color: #fff!important;
  18. }
  19. #Task thead tr th {
  20. color: #fff;
  21. background-color: #1ab394;
  22. text-align: center;
  23. }
  24. .sc_btn {
  25. line-height: 34px;
  26. }
  27. </style>
  28. </head>
  29. <body class="gray-bg">
  30. <div class="wrapper wrapper-content animated fadeInRight">
  31. <div class="daoHang clearfix">
  32. <div class="dhLeft">
  33. <sapn><i class="syIcon"></i>位置:
  34. <a id="ReIndex">首页</a>&gt;
  35. <a href="javaScript:;">外呼管理</a>&gt;
  36. <a href="" style="color: #000;">不安全原因比例报表</a>
  37. </sapn>
  38. </div>
  39. </div>
  40. <div class="th-box">
  41. <div class="th-bar">
  42. <div class="seach-box fr">
  43. <ul>
  44. <li>
  45. <label for="">起止时间:</label>
  46. <input type="text" id="ss_kssj" class="photo laydate-icon" />
  47. </li>
  48. <li>
  49. <a class="sc_btn seach">搜索</a>
  50. </li>
  51. <li>
  52. <a class="sc_btn export">导出</a>
  53. </li>
  54. </ul>
  55. </div>
  56. </div>
  57. </div>
  58. <div style="width: 100%;padding: 10px;">
  59. <div class="table-head">
  60. <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
  61. <thead>
  62. <tr>
  63. <th data-field="Reasons" data-align="center">原因</th>
  64. <th data-field="Counts" data-align="center"> 数量</th>
  65. <th data-field="Rates" data-align="center"> 比例(%)</th>
  66. </tr>
  67. </thead>
  68. </table>
  69. </div>
  70. </div>
  71. </div>
  72. <script>
  73. $(document).ready(function() {
  74. laydate.render({
  75. elem: '#ss_kssj',
  76. range: '~',
  77. value: helper.DateFormat.getNowDate() + ' ~ ' + helper.DateFormat.getNowDate(),
  78. calendar: true,
  79. theme: '#1ab394',
  80. });
  81. IndexCategoryGe();
  82. $(".seach").click(function() {
  83. IndexCategoryGe();
  84. })
  85. })
  86. //问卷列表
  87. function IndexCategoryGe() {
  88. $.ajax({
  89. url: huayi.config.callcenter_url + '/Questionnaire/GetUnsafeRate',
  90. type: 'get',
  91. data: {
  92. startdate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0],
  93. enddate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1],
  94. token: $.cookie("token")
  95. },
  96. dataType: "json",
  97. async: true,
  98. success: function(returnValue) {
  99. //异步获取数据
  100. //console.log(returnValue);
  101. var resultData1 = returnValue.data;
  102. //console.log(resultData1);
  103. $('#Task').bootstrapTable('load', resultData1);
  104. }
  105. });
  106. $('#Task').bootstrapTable('destroy').bootstrapTable({
  107. striped: true
  108. });
  109. }
  110. //导出功能
  111. $('.export').click(function() {
  112. dcexcel(this);
  113. })
  114. function dcexcel(obj) {
  115. var url = huayi.config.callcenter_url + "/Questionnaire/GetUnsafeRateExpt?token=" + $.cookie("token");
  116. url += "&startdate=" + ($("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0]) + "&enddate=" + ($("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1]);
  117. obj.href = url;
  118. console.log(url);
  119. }
  120. </script>
  121. </body>
  122. </html>