控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {extend name="admin@index_layout"/}
  2. {block name="main"}
  3. <div class="layui-card">
  4. <div class="layui-card-header">字段列表</div>
  5. <div class="layui-card-body">
  6. <table class="layui-hide" id="currentTable" lay-filter="currentTable"
  7. data-auth-add="{:$auth->check('formguide.field/add')}"
  8. ></table>
  9. </div>
  10. </div>
  11. <script type="text/html" id="barTool">
  12. {{# if(!d.iffixed){ }}
  13. <a data-open='{:url("edit")}?id={{ d.id }}' class="layui-btn layui-btn-xs {:$auth->check('formguide.field/edit')?'':'layui-hide'}" title="编辑"><i class='iconfont icon-brush_fill'></i></a>
  14. <a href='{:url("del")}?id={{ d.id }}' class="layui-btn layui-btn-danger layui-btn-xs layui-tr-del {:$auth->check('formguide.field/del')?'':'layui-hide'}"><i class='iconfont icon-trash_fill'></i></a>
  15. {{# } }}
  16. </script>
  17. {/block}
  18. {block name="script"}
  19. <script>
  20. layui.use('yznTable', function() {
  21. var table = layui.yznTable;
  22. var init = {
  23. table_elem: '#currentTable',
  24. table_render_id: 'currentTable',
  25. add_url: "{:url('add',['id'=>$id])}",
  26. modify_url: '{:url("multi")}',
  27. };
  28. table.render({
  29. init: init,
  30. toolbar: ['refresh',
  31. [{
  32. html: '<a class="layui-btn layui-btn-sm" type="button" href="{:url("admin/formguide.formguide/index")}"><i class="iconfont icon-undo"></i>&nbsp;返回</a>'
  33. }], 'add',
  34. ],
  35. url: '{:url("index",["id"=>$id])}',
  36. cols: [
  37. [
  38. { field: 'listorder', width: 60, title: '排序', edit: 'text' },
  39. { field: 'id', width: 60, title: 'ID' },
  40. { field: 'name',title: '字段名称' },
  41. { field: 'title', title: '标题' },
  42. { field: 'type', width: 120, title: '字段类型' },
  43. { field: 'create_time', width: 180, title: '创建时间', search: 'range' },
  44. { field: 'ifrequire', width: 60,title: '必填',templet: yznTable.formatter.label,selectList:{0:'否',1:'是'}},
  45. { field: 'status', width: 80,title: '状态',templet: yznTable.formatter.label,selectList:{0:'禁用',1:'启用'}},
  46. { fixed: 'right', width: 90, title: '操作', templet: '#barTool' }
  47. ]
  48. ],
  49. page: {}
  50. });
  51. yznTable.bindevent();
  52. });
  53. </script>
  54. {/block}