teacherList.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <html xmlns:th="http://www.thymeleaf.org">
  2. <head>
  3. <title>私塾家</title>
  4. <script th:include="sys/common/metaCSS" th:remove="tag"></script>
  5. <script th:include="sys/common/metaJS" th:remove="tag"></script>
  6. <script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/sys/js/My97DatePicker/WdatePicker.js}"></script>
  7. </head>
  8. <style>
  9. .tablelink{margin-right:10px;}
  10. .stylecss{
  11. color: red;
  12. }
  13. .select_width{
  14. width: 220px;
  15. }
  16. .date_width{
  17. width: 150px;
  18. }
  19. </style>
  20. <body>
  21. <div class="place">
  22. <span>位置:</span>
  23. <ul class="placeul">
  24. <li><a th:href="@{/sys/imuser/school/list}">导入老师/学生</a></li>
  25. <li><a href="#">老师列表</a></li>
  26. </ul>
  27. </div>
  28. <div class="rightinfo">
  29. <form id="seachform" th:action="${sysUrl+'/sys/imuser/teacher/list/'+tbClass.id}" method="post">
  30. <input type="hidden" name="reportType" id="reportType" />
  31. <ul class="seachform">
  32. <li>
  33. <input style="width: 250px;" name="name" placeholder="输入老师名称" type="text" class="scinput" />
  34. </li>
  35. <li>
  36. <input type="button" class="scbtn" value="查询" />
  37. </li>
  38. <li style="line-height: 35px;">
  39. <span th:text="${tbClass.school +'' + tbClass.grade +''+ tbClass.className} "></span>
  40. </li>
  41. </ul>
  42. </form>
  43. <ul class="seachform">
  44. <li>
  45. <input type="button" onclick="javascript:teacherAdd();" style="width: 100px;height: 30px" class="scbtn" value="添加老师" />
  46. </li>
  47. </ul>
  48. <table class="tablelist">
  49. <thead>
  50. <tr>
  51. <th>老师姓名</th>
  52. <th>所受科目</th>
  53. <th>老师电话</th>
  54. <th>操作</th>
  55. </tr>
  56. </thead>
  57. <tbody>
  58. <tr th:each="item:${list}" >
  59. <td th:text="${item.teacher_name}"></td>
  60. <td th:text="${item.subject}"></td>
  61. <td th:text="${item.teacher_phone}"></td>
  62. <td>
  63. <a th:href="${'javascript:teacherDel(''' + item.im_lib_teacher_id + ''')'}" class="tablelink">删除老师</a>
  64. </td>
  65. </tr>
  66. </tbody>
  67. </table>
  68. <!-- 分页 -->
  69. <div class="pagin">
  70. <div class="message">共<i class="blue">[[${page.rowCnt}]]</i>条记录,当前显示第&nbsp;<i class="blue">[[${page.pageNo }]]&nbsp;</i>页</div>
  71. <div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
  72. </div>
  73. </div>
  74. </body>
  75. <script type="text/javascript">
  76. function teacherAdd(){
  77. layer.open({
  78. type: 2,
  79. title: '添加老师',
  80. closeBtn: 1, //不显示关闭按钮
  81. shift: 0.8,
  82. offset: '100px',
  83. area: ['50%', '50%'],
  84. content: '[[${sysUrl}]]/sys/imuser/teacher/add/[[${tbClass.id}]]'
  85. });
  86. }
  87. function teacherDel(studentId){
  88. parent.layer.confirm("您确定要删除老师关联?", {
  89. icon: 4, btn: ['确定','关闭'],offset: '100px' //按钮
  90. }, function(){
  91. var url="[[${sysUrl}]]/sys/imuser/teacher/data/del/"+studentId;
  92. var params ={};
  93. $.post(url,params,function(data){
  94. if(data.meta.success){
  95. parent.layer.msg("删除成功",{icon:1});
  96. parent.location.reload();
  97. }else{
  98. parent.layer.msg(data.meta.message,{icon:11});
  99. }
  100. });
  101. });
  102. }
  103. </script>
  104. </html>