三元财务UI

WorkPeriod.html 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>工单时间点分布分析</title>
  7. <!--[if lt IE 9]>
  8. <meta http-equiv="refresh" content="0;ie.html" />
  9. <![endif]-->
  10. <meta name="keywords" content="">
  11. <meta name="description" content="">
  12. <script src="../../Script/Common/huayi.load.js"></script>
  13. <script src="../../Script/Common/huayi.config.js"></script>
  14. <!--<link rel="stylesheet" href="../../css/huTotal.css" />-->
  15. <link rel="stylesheet" href="../../css/init.css" />
  16. <style>
  17. .clearfix:after {
  18. content: "";
  19. display: block;
  20. clear: both;
  21. }
  22. .kpi-top {
  23. background: #f3f3f4;
  24. height: 60px;
  25. padding: 10px 20px;
  26. }
  27. .topCon {
  28. float: right;
  29. margin-right: 45px;
  30. }
  31. .content h2 {
  32. font-size: 18px;
  33. margin-bottom: 20px;
  34. }
  35. .topCon input {
  36. width: 128px;
  37. padding: 2px 2PX 2PX 10PX;
  38. height: 28px;
  39. border: 1px solid #ebebeb;
  40. color: #1ab394;
  41. outline: none;
  42. vertical-align: middle;
  43. }
  44. .content {
  45. width: 90%;
  46. margin: 0 auto;
  47. }
  48. </style>
  49. </head>
  50. <body class="gray-bg" style="background: #fefefe;">
  51. <div class="hwkpi">
  52. <div class="daoHang clearfix">
  53. <div class="dhLeft">
  54. <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>&gt;<a href="javaScript:;">报表分析</a>&gt;<a href="javaScript:;">业务数据分析</a>&gt;<a href="" style="color: #000;">工单时间点分布分析</a></sapn>
  55. </div>
  56. </div>
  57. <div class="kpi-top clearfix">
  58. <div class="topCon">
  59. 开始时间:
  60. <input type="text" class="laydate-icon" id="startTime" /> 结束时间:
  61. <input type="text" class="laydate-icon" id="endTime" />
  62. <button class="btns sear">搜索</button>
  63. <!--<button class="btn daochu ">导出</button>-->
  64. </div>
  65. </div>
  66. <ul class="nav nav-tabs th-tab">
  67. <li role="presentation" class="active">
  68. <a href="javascript:;">折线图</a>
  69. </li>
  70. <li role="presentation">
  71. <a href="javascript:;">柱状图</a>
  72. </li>
  73. </ul>
  74. <div class="content">
  75. <div class="zhexian">
  76. <h2 style="text-align: center;">工单时间点分布情况</h2>
  77. <div id="zhe" style="width: 100%; height: 500px;margin: 0 auto;"></div>
  78. </div>
  79. <div class="zhutu" style="display: none;">
  80. <h2 style="text-align: center;">工单时间点分布情况</h2>
  81. <div id="zhu" style="width: 950px; height: 500px;margin: 0 auto;"></div>
  82. </div>
  83. </div>
  84. </div>
  85. <script src="../../css/laydate/laydate.js"></script>
  86. <script src="../../js/echarts.common.min.js"></script>
  87. <script>
  88. $(function () {
  89. laydate.skin('molv');
  90. laydate({
  91. elem: '#startTime',
  92. event: 'focus',
  93. format: 'YYYY-MM-DD'
  94. });
  95. laydate({
  96. elem: '#endTime',
  97. event: 'focus',
  98. format: 'YYYY-MM-DD'
  99. });
  100. //tab切换
  101. $('.th-tab li').click(function () {
  102. $(this).addClass('active')
  103. .siblings().removeClass('active');
  104. var index = $(this).index();
  105. $('.content >div').eq(index).show().siblings().hide();
  106. })
  107. bind();
  108. $(".sear").click(function () {
  109. bind();
  110. })
  111. })
  112. //折线图
  113. var zhe = echarts.init(document.getElementById('zhe'));
  114. var zheoption = {
  115. color: ['#1ab394'],
  116. tooltip: {
  117. trigger: 'axis',
  118. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  119. type: 'line' // 默认为直线,可选为:'line' | 'shadow'
  120. }
  121. },
  122. legend: {
  123. data: ['工单数量']
  124. },
  125. grid: {
  126. left: '3%',
  127. right: '4%',
  128. bottom: '3%',
  129. containLabel: true
  130. },
  131. xAxis: [{
  132. type: 'category',
  133. data: ['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00'],
  134. }],
  135. yAxis: [{
  136. type: 'value',
  137. name: '工单数量/个',
  138. nameLocation: 'middle',
  139. nameGap: 35
  140. }],
  141. series: [{
  142. name: '工单数量',
  143. type: 'line',
  144. barWidth: '60%',
  145. data: [10, 52, 200, 334, 390, 330, 220, 210, 200, 52]
  146. }]
  147. };
  148. //柱形图
  149. var zhu = echarts.init(document.getElementById('zhu'));
  150. var zhuoption = {
  151. color: ['#1ab394'],
  152. tooltip: {
  153. trigger: 'axis',
  154. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  155. type: 'line' // 默认为直线,可选为:'line' | 'shadow'
  156. }
  157. },
  158. legend: {
  159. data: ['工单数量']
  160. },
  161. grid: {
  162. left: '3%',
  163. right: '4%',
  164. bottom: '3%',
  165. containLabel: true
  166. },
  167. xAxis: [{
  168. type: 'category',
  169. data: ['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00'],
  170. }],
  171. yAxis: [{
  172. type: 'value',
  173. name: '工单数量/个',
  174. nameLocation: 'middle',
  175. nameGap: 35
  176. }],
  177. series: [{
  178. name: '工单数量',
  179. type: 'bar',
  180. barWidth: '30%',
  181. data: [10, 52, 200, 334, 390, 330, 220, 210, 200, 52]
  182. }]
  183. };
  184. function bind() {
  185. $.getJSON(huayi.config.callcenter_url + 'Business/GetWorkPeriod', { starttime: $("#startTime").val(), endtime: $("#endTime").val(), "token": $.cookie("token") }, function (result) {
  186. if (result.state.toLowerCase() == "success") {
  187. zheoption.series[0].data = result.data.count;
  188. zheoption.xAxis[0].data = result.data.col;
  189. zhuoption.series[0].data = result.data.count;
  190. zhuoption.xAxis[0].data = result.data.col;
  191. zhe.setOption(zheoption);
  192. zhu.setOption(zhuoption);
  193. }
  194. })
  195. }
  196. </script>
  197. </body>
  198. </html>