Index.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!-- header start -->
  2. <include file="Public/Header" />
  3. <!-- header end -->
  4. <!-- right content start -->
  5. <div class="content-right">
  6. <div class="content">
  7. <form class="am-form view-list" id="form" action="{{:U('Admin/Theme/Save')}}" method="POST">
  8. <div class="am-g">
  9. <label>名称</label>
  10. <input type="text" required="required" class="am-radius form-keyword" style="width: 20rem;display: inline-block;" placeholder="活动名称" name="name"/>
  11. <label>类型</label>
  12. <select name="type" id="type" style="display: inline-block;width: 10rem;margin-right: 1rem;">
  13. <option value="1" <if condition="isset($type) && $type eq 1">selected</if>>活动</option>
  14. <option value="2" <if condition="isset($type) && $type eq 2">selected</if>>专题</option>
  15. </select>
  16. <button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">增加</button>
  17. </div>
  18. </form>
  19. <table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
  20. <thead>
  21. <tr>
  22. <th>序号</th>
  23. <th class="am-hide-sm-only">ThemeID</th>
  24. <th class="am-hide-sm-only">名称</th>
  25. <th class="am-hide-sm-only">类型</th>
  26. <th class="am-hide-sm-only">pv</th>
  27. <th class="am-hide-sm-only">uv</th>
  28. <th class="am-hide-sm-only">同步时间</th>
  29. <th>{{:L('common_operation_name')}}</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. <if condition="!empty($List)">
  34. <foreach name="List" item="v">
  35. <tr id="data-list-{{$v.id}}">
  36. <input type="hidden" value="{{$v.id}}" />
  37. <td class="am-hide-sm-only">{{$key+1}}</td>
  38. <td class="am-hide-sm-only">{{$v.id}}</td>
  39. <td class="am-hide-sm-only">{{$v.name}}</td>
  40. <td class="am-hide-sm-only">
  41. <?php
  42. if($v['type'] == 1){
  43. echo "活动";
  44. }elseif($v['type'] == 2){
  45. echo "专题";
  46. }
  47. ?>
  48. </td>
  49. <td class="am-hide-sm-only">{{$v.page_view}}</td>
  50. <td class="am-hide-sm-only">{{$v.user_view}}</td>
  51. <td class="am-hide-sm-only">{{$v.data_update}}</td>
  52. <td class="view-operation">
  53. <button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/SourceOrigin/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
  54. <button class="am-btn am-btn-primary am-btn-xs am-radius" onclick="exportExcel({{$v.id}});">导出数据</button>
  55. </td>
  56. </tr>
  57. </foreach>
  58. <else />
  59. <tr><td colspan="10" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
  60. </if>
  61. </tbody>
  62. </table>
  63. <!-- list end -->
  64. <!-- page start -->
  65. <if condition="!empty($List)">
  66. {{$page_html}}
  67. </if>
  68. <!-- page end -->
  69. </div>
  70. </div>
  71. <!-- right content end -->
  72. <!-- footer start -->
  73. <include file="Public/Footer" />
  74. <!-- footer end-->
  75. <script type="text/javascript">
  76. function exportExcel(theme_id) {
  77. window.location.href = './index.php?m=Admin&c=Theme&a=export&theme_id='+theme_id;
  78. }
  79. </script>