Index.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <!-- header start -->
  2. <include file="Public/Header" />
  3. <style>
  4. .yearset{display: inline-block;}
  5. .monthset{display: inline-block;}
  6. .dayset{display: inline-block;}
  7. .datebb{padding: 0.4rem 0;}
  8. </style>
  9. <!-- header end -->
  10. <!-- right content start -->
  11. <div style="border-bottom: 0.1rem solid #ddd;margin-bottom: 2rem ;">
  12. <b>新增设备用户:</b>
  13. </div>
  14. <div class="am-g">
  15. <form class="am-form view-list mybform" name="mybform" action="{{:U('Admin/Statistic/Index')}}" method="POST">
  16. <div style="display: inline-block;margin-left: 5rem;">
  17. <select name="type" style="display: inline-block;width: 10rem;margin-right: 1rem;">
  18. <option value="-1">请选择</option>
  19. <option value="1" <if condition="isset($type) and $type eq 1">selected</if> >日走势</option>
  20. <option value="2" <if condition="isset($type) and $type eq 2">selected</if> >月走势</option>
  21. <option value="3" <if condition="isset($type) and $type eq 3">selected</if> >年走势</option>
  22. </select>
  23. </div>
  24. <div style="width:500px;display: inline-block;">
  25. <label>时间:</label>
  26. <input name="time" class="datebb" value="{{$time}}" autocomplete="off" style="width:12rem;border-left: 0.1rem solid;" />
  27. </div>
  28. <button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit" style="display: inline-block;position: absolute;top:4rem;left: 45rem;">查询</button>
  29. </form>
  30. </div>
  31. <div id="container" style="width: 1200px; height: 400px; margin: 2rem 5rem 5rem 5rem;"></div>
  32. <div>
  33. <div>
  34. <button class="watch_list">查看列表</button>
  35. </div>
  36. <div class="data_list">
  37. <table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
  38. <thead>
  39. <tr>
  40. <th>序号</th>
  41. <th class="am-hide-sm-only">平台</th>
  42. <th>用户ID(设备id)</th>
  43. <th class="am-hide-sm-only">手机号</th>
  44. <th class="am-hide-sm-only">会员到期时间</th>
  45. <th class="am-hide-sm-only">最后登录时间</th>
  46. <th class="am-hide-sm-only">创建时间</th>
  47. <th>{{:L('common_operation_name')}}</th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. <if condition="!empty($List)">
  52. <foreach name="List" item="v">
  53. <tr id="data-list-{{$v.id}}">
  54. <td class="am-hide-sm-only">{{$key+1}}</td>
  55. <td class="am-hide-sm-only">{{$v.user_origin}}</td>
  56. <td class="am-hide-sm-only">{{$v.uid}}</td>
  57. <td class="am-hide-sm-only">{{$v.phone}}</td>
  58. <td class="am-hide-sm-only">{{$v.member_time}}</td>
  59. <td class="am-hide-sm-only">{{$v.last_login_at}}</td>
  60. <td class="am-hide-sm-only">{{$v.created_at}}</td>
  61. <td class="view-operation">
  62. <button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/User/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.user_id}}"></button>
  63. </td>
  64. </tr>
  65. </foreach>
  66. <else />
  67. <tr><td colspan="10" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
  68. </if>
  69. </tbody>
  70. </table>
  71. <!-- list end -->
  72. <!-- page start -->
  73. <div id="pages" class="p">{{$page}}</div>
  74. </div>
  75. </div>
  76. <script src="__PUBLIC__/Admin/Default/Js/lyz.calendar.min.js" type="text/javascript"></script>
  77. <script type="text/javascript">
  78. data_list(2);
  79. $('.watch_list').click(function(){
  80. var value = $('.watch_list').attr('data');
  81. data_list(value);
  82. });
  83. var chart;
  84. $(document).ready(function() {
  85. chart = new Highcharts.Chart({
  86. chart: {
  87. renderTo: 'container',
  88. defaultSeriesType: 'line',
  89. marginRight: 130,
  90. marginBottom: 25
  91. },
  92. title: {//标题
  93. text: '新增设备用户',
  94. x: -20 //center
  95. },
  96. // subtitle: {//副标题
  97. // text: 'Source: WorldClimate.com',
  98. // x: -20
  99. // },
  100. xAxis: {//x轴
  101. categories: [<volist name="user_data" id="vo">'{{$vo.time}}',</volist>]
  102. },
  103. yAxis: {//y轴项
  104. title: {
  105. text: '新增数量'
  106. },
  107. plotLines: [{
  108. value: 0,
  109. width: 1,
  110. color: '#808080'
  111. }]
  112. },
  113. tooltip: {//鼠标移动位置提示
  114. formatter: function() {
  115. return '<b>'+ this.series.name +'</b><br/>'+
  116. this.x +'<br/>'+
  117. Highcharts.numberFormat(this.y,0)+'人';
  118. }
  119. },
  120. legend: {//设置图表向右对齐
  121. layout: 'vertical',
  122. align: 'right',
  123. verticalAlign: 'top',
  124. x: -10,
  125. y: 100,
  126. borderWidth: 0
  127. },
  128. series: [{//数据
  129. name:'新增设备用户',
  130. data:[<volist name="user_data" id="vo">{{$vo.total}},</volist>]
  131. }]
  132. });
  133. });
  134. $("select[name='type']").change(function(){
  135. var type = $(this).val();
  136. if(type ==2 || type ==3){
  137. $(".yearset").css('display','inline-block');
  138. $(".monthset").css('display','none');
  139. }else{
  140. $(".yearset").css('display','inline-block');
  141. $(".monthset").css('display','inline-block');
  142. }
  143. });
  144. function check(obj){
  145. $('.checksearch li').removeClass('checkin');
  146. $(obj).addClass('checkin');
  147. }
  148. function data_list($value){
  149. if($value == 1){//列表展示
  150. $('.data_list').css('display','block');
  151. $('.watch_list').attr('data','2');
  152. $('.watch_list').text('隐藏列表');
  153. }else{
  154. $('.data_list').css('display','none');
  155. $('.watch_list').attr('data','1');
  156. $('.watch_list').text('显示列表');
  157. }
  158. }
  159. </script>
  160. <!-- right content end -->
  161. <script>
  162. jeDate("input[name=time]",{
  163. //onClose:false,
  164. format: "YYYY-MM-DD"
  165. });
  166. </script>
  167. <!-- footer start -->
  168. <include file="Public/Footer" />
  169. <!-- footer end