index.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/14
  6. * Time: 下午3:24
  7. */
  8. use backend\assets\AppAsset;
  9. AppAsset::addScript($this,Yii::$app->request->baseUrl."/js/news.js");
  10. ?>
  11. <style>
  12. body {padding: 15px;}
  13. .layui-elem-quote {margin-bottom: 0;border-left: none;padding: 10px;}
  14. .layui-table-view .layui-form-switch {right:15px;}
  15. .layui-form-switch {height:18px;line-height:18px;padding:0 4px;}
  16. .layui-form-switch i {top:1px;left:2px}
  17. .layui-form-onswitch i {left:32px;}
  18. .layui-table-page .layui-laypage {float:right;margin-right:1%;}
  19. .layui-table-view .layui-form-switch{right:0px}
  20. </style>
  21. <form class="layui-form" >
  22. <fieldset class="layui-elem-field">
  23. <legend>搜索信息</legend>
  24. <div class="layui-field-box">
  25. <blockquote class="quoteBox demoTable">
  26. <div class="layui-input-inline" style="width:100px">
  27. <select name="input_house" >
  28. <option value="name" selected="">标题</option>
  29. <option value="id" >文档id</option>
  30. <option value="author">作者</option>
  31. </select>
  32. </div>
  33. <div class="layui-inline">
  34. <div class="layui-input-inline">
  35. <input type="text" name="input_house_text" class="layui-input searchVal" placeholder="请输入搜索的内容" />
  36. </div>
  37. </div>
  38. <div class="layui-input-inline">
  39. <select name="input_news" lay-filter="category" lay-search>
  40. <option value="">请选择资讯栏目</option>
  41. <?php foreach ($category as $val){?>
  42. <option value="<?php echo $val['id']?>"><?php echo $val['news_name']?></option>
  43. <?php }?>
  44. </select>
  45. </div>
  46. <div class="layui-input-inline">
  47. <select name="input_city" lay-search="">
  48. <option value="" >请选择区域</option>
  49. <?php foreach ($city as $val){?>
  50. <option value="<?php echo $val['id']?>" ><?php echo $val['city_name']?></option>
  51. <?php }?>
  52. </select>
  53. </div>
  54. <!-- <div class="layui-inline">-->
  55. <!-- <a class="layui-btn layui-btn-danger layui-btn-normal delAll_btn">批量删除</a>-->
  56. <!-- </div>-->
  57. <div class="layui-inline">
  58. <a class="layui-btn search_btn wu_search_btn" data-type="reload" ><i class="layui-icon layui-icon-search"></i>搜索</a>
  59. </div>
  60. <div class="layui-inline">
  61. <a class="layui-btn search_btn " data-type="batch_sync" >同步资料</a>
  62. </div>
  63. </blockquote>
  64. </div></fieldset>
  65. <blockquote class="layui-elem-quote quoteBox demoTable">
  66. <div class="layui-inline">
  67. <a class="layui-btn layui-btn-normal " data-type="addData">添加资讯</a>
  68. </div></blockquote>
  69. <table id="newsList" lay-filter="newsList"></table>
  70. <!-- <div class="layui-inline ">
  71. <a class="layui-btn search_btn" style="margin-left: 400px;margin-top:15px;" lay-submit="" lay-filter="del_alls_news">批量删除</a>
  72. </div> -->
  73. <!--操作-->
  74. <script type="text/html" id="housesListBar">
  75. <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  76. <!-- <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>-->
  77. </script>
  78. </form>
  79. <!-- 排序 -->
  80. <script type="text/html" id="sortBox">
  81. {{# if(d.sort){ }}
  82. <div style="border:1px solid #E6E6E6;height:27px;line-height:27px;box-shadow:1px 1px 1px 1px rgba(224, 224, 224, 0.76);">{{ d.clicks }}</div>
  83. {{# } }}
  84. </script>
  85. <!-- 点击数 -->
  86. <script type="text/html" id="clicksBox">
  87. {{# if(d.clicks){ }}
  88. <div style="border:1px solid #E6E6E6;height:27px;line-height:27px;box-shadow:1px 1px 1px 1px rgba(224, 224, 224, 0.76);">{{ d.clicks }}</div>
  89. {{# } }}
  90. </script>