index.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/6
  6. * Time: 下午2:30
  7. */
  8. use backend\assets\AppAsset;
  9. AppAsset::addCss($this,Yii::$app->request->baseUrl."/static/layui/css/treetable.css");
  10. //AppAsset::addScript($this,Yii::$app->request->baseUrl."/company/ceshi.js");
  11. //AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/layui/layui-xtree.js");
  12. AppAsset::addScript($this,Yii::$app->request->baseUrl."/js/frontend.js");
  13. ?>
  14. <style>
  15. body {
  16. padding: 15px;
  17. }
  18. .layui-elem-quote {
  19. margin-bottom: 0;
  20. border-left: none;
  21. padding: 10px;
  22. }
  23. .layui-table-page .layui-laypage {float:right;margin-right:1%;}
  24. </style>
  25. <blockquote class="layui-elem-quote quoteBox demoTable">
  26. <div class="layui-btn-group demoTable" >
  27. <button class="layui-btn" data-type="addData">新增</button>
  28. <!-- <button class="layui-btn" data-type="getCheckLength">获取选中数目</button>-->
  29. <!-- <button class="layui-btn" data-type="isAll">验证是否全选</button>-->
  30. </div>
  31. </blockquote>
  32. <table id="menulist" lay-filter="menulist"></table>
  33. <script type="text/html" id="operate">
  34. {{# if(d.pid == 0){ }}
  35. <a class="layui-btn layui-btn-xs" lay-event="addson">添加</a>
  36. {{# } }}
  37. <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  38. <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
  39. {{# if(d.pid != 0){ }}
  40. <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="produce">生成代码</a>
  41. {{# } }}
  42. </script>
  43. <!-- 判断数据 -->
  44. <script type="text/html" id="Toexamine">
  45. {{# if(d.status === 2){ }}
  46. <span style="color: #ff5722;">{{ d.status }}</span>
  47. {{# } else { }}
  48. {{ d.status }}
  49. {{# } }}
  50. </script>