控制台应用,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.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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('cms.models/add')}"
  8. data-auth-edit="{:$auth->check('cms.models/edit')}"
  9. data-auth-delete="{:$auth->check('cms.models/del')}"
  10. data-auth-field="{:$auth->check('cms.field/index')}"
  11. ></table>
  12. </div>
  13. </div>
  14. {/block}
  15. {block name="script"}
  16. <script>
  17. layui.use('yznTable', function() {
  18. var table = layui.yznTable;
  19. var init = {
  20. table_elem: '#currentTable',
  21. table_render_id: 'currentTable',
  22. add_url: "{:url('add')}",
  23. edit_url: "{:url('edit')}",
  24. delete_url: "{:url('del')}",
  25. modify_url:'{:url("multi")}',
  26. field_url:'{:url("admin/cms.field/index")}',
  27. };
  28. table.render({
  29. init: init,
  30. toolbar: ['refresh', 'add'],
  31. url: '{:url("index")}',
  32. search:false,
  33. cols: [
  34. [
  35. { field: 'id', width: 60, title: 'ID' },
  36. { field: 'name', width: 120, title: '模型名称' },
  37. { field: 'tablename', width:120,title: '数据表' },
  38. { field: 'description', align: "left", title: '描述' },
  39. { field: 'type', width:120,title: '类型',templet: '<div>{{# if(d.type==1){ }} 独立表 {{# } else { }} 主附表 {{# } }} </div>' },
  40. { field: 'create_time',width:180, title: '创建时间' },
  41. { field: 'status', width: 100, title: '状态', unresize: true,templet: yznTable.formatter.switch },
  42. { width:150, title: '操作',templet: yznTable.formatter.tool,operat: [
  43. [{
  44. text: '字段管理',
  45. url: init.field_url,
  46. method: 'href',
  47. auth: 'field',
  48. class: 'layui-btn layui-btn-xs layui-btn-normal',
  49. extend: '',
  50. }],
  51. 'edit','delete']}
  52. ]
  53. ]
  54. });
  55. yznTable.bindevent();
  56. });
  57. </script>
  58. {/block}