Index.html 3.5 KB

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