index.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {extend name="public/container"}
  2. {block name="content"}
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox">
  6. <div class="ibox-title">
  7. <button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}')">添加数据组</button>
  8. <div class="ibox-tools">
  9. </div>
  10. </div>
  11. <div class="ibox-content">
  12. <div class="row">
  13. <div class="col-sm-8 m-b-xs">
  14. <?php /* <form action="" class="form-inline">
  15. <i class="fa fa-search" style="margin-right: 10px;"></i>
  16. <select name="is_show" aria-controls="editable" class="form-control input-sm">
  17. <option value="">是否显示</option>
  18. <option value="1" {eq name="params.is_show" value="1"}selected="selected"{/eq}>显示</option>
  19. <option value="0" {eq name="params.is_show" value="0"}selected="selected"{/eq}>不显示</option>
  20. </select>
  21. <select name="access" aria-controls="editable" class="form-control input-sm">
  22. <option value="">子管理员是否可用</option>
  23. <option value="1" {eq name="params.access" value="1"}selected="selected"{/eq}>可用</option>
  24. <option value="0" {eq name="params.access" value="0"}selected="selected"{/eq}>不可用</option>
  25. </select>
  26. <div class="input-group">
  27. <input type="text" name="keyword" value="{$params.keyword}" placeholder="请输入关键词" class="input-sm form-control"> <span class="input-group-btn">
  28. <button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
  29. </div>
  30. </form> */ ?>
  31. </div>
  32. </div>
  33. <div class="table-responsive">
  34. <table class="table table-striped table-bordered">
  35. <thead>
  36. <tr>
  37. <th class="text-center">编号</th>
  38. <th class="text-center">KEY</th>
  39. <th class="text-center">数据组名称</th>
  40. <th class="text-center">简介</th>
  41. <th class="text-center">操作</th>
  42. </tr>
  43. </thead>
  44. <tbody class="">
  45. {volist name="list" id="vo"}
  46. <tr>
  47. <td class="text-center">
  48. {$vo.id}
  49. </td>
  50. <td class="text-center">
  51. {$vo.config_name}
  52. </td>
  53. <td class="text-center">
  54. {$vo.name}
  55. </td>
  56. <td class="text-center">
  57. {$vo.info}
  58. </td>
  59. <td class="text-center">
  60. <a class="btn btn-info btn-xs" href="{:Url('setting.systemGroupData/index',array('gid'=>$vo['id']))}"><i class="fa fa-edit"></i> 数据列表</a>
  61. <button class="btn btn-info btn-xs" onclick="$eb.createModalFrame(this.innerText,'{:Url('edit',array('id'=>$vo['id']))}')" ><i class="fa fa-edit"></i> 编辑</button>
  62. <button class="btn btn-danger btn-xs " data-url="{:Url('delete',array('id'=>$vo['id']))}" type="button"><i class="fa fa-times"></i> 删除</button>
  63. </td>
  64. </tr>
  65. {/volist}
  66. </tbody>
  67. </table>
  68. </div>
  69. {include file="public/inner_page"}
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. {/block}
  75. {block name="script"}
  76. <script>
  77. $('.btn-danger').on('click',function(){
  78. window.t = $(this);
  79. var _this = $(this),url =_this.data('url');
  80. $eb.$swal('delete',function(){
  81. $eb.axios.get(url).then(function(res){
  82. console.log(res);
  83. if(res.status == 200 && res.data.code == 200) {
  84. $eb.$swal('success',res.data.msg);
  85. _this.parents('tr').remove();
  86. }else
  87. return Promise.reject(res.data.msg || '删除失败')
  88. }).catch(function(err){
  89. $eb.$swal('error',err);
  90. });
  91. })
  92. });
  93. </script>
  94. {/block}