teacherList.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <div class='t-container'>
  3. <!-- 头部展示 -->
  4. <div class="headWrap">
  5. <!-- <div class="left">
  6. <div class="headItem">
  7. <p>教学主管: <span> 张三,李四</span></p>
  8. </div>
  9. </div> -->
  10. <div></div>
  11. <div class="right newBand"
  12. @click="gotoRecord">
  13. 上课记录
  14. </div>
  15. </div>
  16. <!-- 搜索类型 -->
  17. <el-form :inline="true"
  18. class="searchForm"
  19. v-model="searchForm">
  20. <el-form-item>
  21. <el-select v-model="searchForm.status"
  22. placeholder="合奏班">
  23. <el-option v-for='(item,index) in mixCourseList'
  24. :key="index"
  25. :value="item.id"
  26. :label="item.name"></el-option>
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item>
  30. <el-input v-model="searchForm.search"></el-input>
  31. </el-form-item>
  32. <el-form-item>
  33. <div class="searchBtn"
  34. @click="getList">搜索</div>
  35. </el-form-item>
  36. </el-form>
  37. <!-- 列表 -->
  38. <div class="tableWrap">
  39. <el-table :data='tableList'
  40. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  41. <el-table-column align='center'
  42. prop="teacherId"
  43. label="老师编号">
  44. </el-table-column>
  45. <el-table-column align='center'
  46. prop="teacherName"
  47. label="老师姓名">
  48. </el-table-column>
  49. <el-table-column align='center'
  50. prop="teacherPhone"
  51. label="联系电话">
  52. </el-table-column>
  53. <el-table-column align='center'
  54. prop="jobNature"
  55. label="工作类型">
  56. <template slot-scope="scope">
  57. <div>
  58. {{ scope.row.jobNature|jobNature}}
  59. </div>
  60. </template>
  61. </el-table-column>
  62. <el-table-column align='center'
  63. prop="classGroupName"
  64. label="合奏班">
  65. </el-table-column>
  66. <el-table-column align='center'
  67. prop="courseScheduleName"
  68. label="执教班级">
  69. </el-table-column>
  70. <el-table-column align='center'
  71. prop="num"
  72. label="出勤次数">
  73. </el-table-column>
  74. <!-- <el-table-column align='center'
  75. label="操作">
  76. <template slot-scope="scope">
  77. <div>
  78. <el-button type="text"
  79. size="small">全职</el-button>
  80. <el-button type="text"
  81. size="small">兼职</el-button>
  82. <el-button type="text"
  83. size="small">全职试用</el-button>
  84. <el-button type="text"
  85. size="small">兼职试用</el-button>
  86. </div>
  87. </template>
  88. </el-table-column> -->
  89. </el-table>
  90. <pagination :total="rules.total"
  91. :page.sync="rules.page"
  92. :limit.sync="rules.limit"
  93. :page-sizes="rules.page_size"
  94. @pagination="getList" />
  95. </div>
  96. </div>
  97. </template>
  98. <script>
  99. import pagination from '@/components/Pagination/index'
  100. import { getTeamTeacherList, getAllClass } from '@/api/buildTeam'
  101. export default {
  102. props: {
  103. teamid: {
  104. type: String,
  105. required: true
  106. },
  107. },
  108. data () {
  109. return {
  110. searchForm: { // 搜索框
  111. status: '', // 工作类型
  112. teachingClass: '', // 合奏班
  113. attendance: '', // 出勤次数
  114. search: ''
  115. },
  116. searchLsit: [],
  117. tableList: [], //
  118. mixCourseList: [],
  119. rules: {
  120. // 分页规则
  121. limit: 2, // 限制显示条数
  122. page: 1, // 当前页
  123. total: 0, // 总条数
  124. page_size: [2, 4, 6, 8] // 选择限制显示条数
  125. },
  126. }
  127. },
  128. components: {
  129. pagination
  130. },
  131. mounted () {
  132. // console.log(this.teamid)
  133. this.getList();
  134. getAllClass({ musicGroupId: this.teamid }).then(res => {
  135. if (res.code == 200) {
  136. this.mixCourseList = res.data;
  137. }
  138. })
  139. },
  140. methods: {
  141. getList () {
  142. // this.teamid
  143. getTeamTeacherList({
  144. 'classGroupName': '',
  145. 'jobNature': '',
  146. 'musicGroupId': this.teamid,
  147. page: this.rules.page,
  148. rows: this.rules.limit,
  149. search: this.searchForm.search
  150. }).then(res => {
  151. if (res.code == 200) {
  152. this.tableList = res.data.rows;
  153. this.rules.total = res.data.total;
  154. }
  155. })
  156. },
  157. gotoRecord () {
  158. this.$router.push({ path: `/business/teamTeacherRecord`, query: { id: this.teamid } })
  159. }
  160. }
  161. }
  162. </script>
  163. <style lang="scss" scope>
  164. .t-container {
  165. .topFrom {
  166. margin: 20px 30px 0;
  167. width: 1000px;
  168. }
  169. // .searchForm {
  170. // }
  171. }
  172. </style>