teacherList.vue 5.8 KB

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