Index.cshtml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. @{
  2. Layout = "~/Views/Shared/Main.cshtml";
  3. }
  4. <div class="layui-form">
  5. <div class="layui-col-md3" >
  6. <div class="layui-inline">
  7. <div class="layui-form-text">查询</div>
  8. <input id="search" name="search" class="layui-text" />
  9. </div>
  10. </div>
  11. </div>
  12. <div id="demo" class="layui-table"></div>
  13. <script>
  14. layui.use('table', function () {
  15. var table = layui.table;
  16. table.render({
  17. elem: '#demo',
  18. url: '/Point/GetData',
  19. data: {},
  20. toolbar:'defaultToolbar',
  21. cols: [[
  22. { title: '序号', fixed: 'left',type:'numbers' },
  23. { field: 'academeName', title: '学院名', align: 'center' },
  24. { field: 'gradeName', title: '年级名称', align: 'center' },
  25. { field: 'specialtyName', title: '专业名称', align: 'center' },
  26. { field: 'className', title: '班级名称', align: 'center' },
  27. { field: 'studentName', title: '学生名', align: 'center' },
  28. { field: 'studentSex', title: '性别', align: 'center' },
  29. { field: 'studentIDNum', title: '身份证号码', align: 'center' },
  30. { field: 'studentNumber', title: '学生编号', align: 'center' }
  31. ]]
  32. })
  33. })
  34. window.tablereload = function () {
  35. table.reload('demo', {
  36. //where: { // 传递数据异步请求时携带的字段
  37. // aaa: '111',
  38. // bbb: '222'
  39. // //…
  40. //},
  41. //height: 1000 // 重设高度
  42. });
  43. }
  44. //$.post("/index/select", function (myg) {//印证有没有获取数据
  45. // console.log(myg);
  46. //})
  47. </script>