forecast-list.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <div class="forecastName">
  3. <div class="m-core">
  4. <save-form
  5. :inline="true"
  6. @reset="onReSet"
  7. @submit="search"
  8. :model="searchForm"
  9. ref="searchForm"
  10. >
  11. <el-form-item>
  12. <el-input
  13. v-model.trim="searchForm.name"
  14. clearable
  15. @keyup.enter.native="search"
  16. placeholder="学生编号/姓名/手机号"
  17. ></el-input>
  18. </el-form-item>
  19. <el-form-item prop="isAllowAdjust">
  20. <el-select
  21. v-model.trim="searchForm.isAllowAdjust"
  22. clearable
  23. placeholder="是否允许调剂"
  24. >
  25. <el-option label="是" :value="1"></el-option>
  26. <el-option label="否" :value="0"></el-option>
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item>
  30. <el-select clearable v-model="searchForm.subjectId" placeholder="所选专业">
  31. <el-option v-for="item in selects.subjects" :value="item.id" :label="item.name" :key="item.id"></el-option>
  32. </el-select>
  33. </el-form-item>
  34. <el-form-item prop="cloudTeacherMethod">
  35. <el-select
  36. v-model.trim="searchForm.cloudTeacherMethod"
  37. clearable
  38. placeholder="系统意向"
  39. >
  40. <el-option label="团购" value="GROUP"></el-option>
  41. <el-option label="自备" value="OWNED"></el-option>
  42. </el-select>
  43. </el-form-item>
  44. <el-form-item>
  45. <el-button type="danger" native-type="seach">搜索</el-button>
  46. <el-button native-type="reset" type="primary">重置</el-button>
  47. </el-form-item>
  48. </save-form>
  49. <div class="tableWrap">
  50. <el-table
  51. style="width: 100%"
  52. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  53. :data="tableList"
  54. >
  55. <el-table-column
  56. align="center"
  57. prop="userId"
  58. label="学员编号"
  59. >
  60. <template slot-scope="scope">
  61. <copy-text>{{ scope.row.userId }}</copy-text>
  62. </template>
  63. </el-table-column>
  64. <el-table-column
  65. align="center"
  66. prop="userName"
  67. label="学员姓名"
  68. ></el-table-column>
  69. <el-table-column
  70. align="center"
  71. prop="gender"
  72. label="性别"
  73. >
  74. <template slot-scope="scope">
  75. {{ scope.row.gender ? '男' : '女' }}
  76. </template>
  77. </el-table-column>
  78. <el-table-column
  79. align="center"
  80. prop="phone"
  81. label="联系电话"
  82. >
  83. <template slot-scope="scope">
  84. <copy-text>{{ scope.row.phone }}</copy-text>
  85. </template>
  86. </el-table-column>
  87. <el-table-column
  88. align="center"
  89. label="年级班级"
  90. >
  91. <template slot-scope="scope">
  92. {{ scope.row.currentGrade }}{{ scope.row.currentClass }}
  93. </template>
  94. </el-table-column>
  95. <el-table-column
  96. align="center"
  97. prop="subjectFirstName"
  98. label="选报声部"
  99. >
  100. <template slot-scope="scope">
  101. {{ scope.row.subjectFirstName ? scope.row.subjectFirstName : null }}
  102. {{ !scope.row.subjectFirstName && scope.row.subjectFirst == 999 ? '听从老师安排' : null }},
  103. {{ scope.row.subjectSecondName ? scope.row.subjectSecondName : null }}
  104. {{ !scope.row.subjectSecondName && scope.row.subjectSecond == 999 ? '听从老师安排' : null }}
  105. <!-- {{ scope.row.subjectFirstName }},{{ scope.row.subjectSecondName }} -->
  106. </template>
  107. </el-table-column>
  108. <el-table-column
  109. align="center"
  110. prop="isAllowAdjust"
  111. label="是否服从调剂"
  112. >
  113. <template slot-scope="scope">
  114. {{ scope.row.isAllowAdjust ? '是' : '否' }}
  115. </template>
  116. </el-table-column>
  117. <el-table-column
  118. align="center"
  119. prop="realName"
  120. label="乐器准备方式"
  121. >
  122. <template slot-scope="scope">
  123. {{ scope.row.kitPurchaseMethod | instrumentType }}
  124. </template>
  125. </el-table-column>
  126. <el-table-column
  127. align="center"
  128. label="系统意向"
  129. >
  130. <template slot-scope="scope">
  131. {{ scope.row.cloudTeacherMethod | instrumentType }}
  132. </template>
  133. </el-table-column>
  134. <el-table-column
  135. align="center"
  136. prop="isRegistered"
  137. label="是否已报名"
  138. >
  139. <template slot-scope="scope">
  140. {{ scope.row.isRegistered ? '是' : '否' }}
  141. </template>
  142. </el-table-column>
  143. </el-table>
  144. <pagination
  145. sync
  146. :total.sync="pageInfo.total"
  147. :page.sync="pageInfo.page"
  148. :limit.sync="pageInfo.limit"
  149. :page-sizes="pageInfo.page_size"
  150. @pagination="getList"
  151. />
  152. </div>
  153. </div>
  154. </div>
  155. </template>
  156. <script>
  157. import pagination from "@/components/Pagination/index";
  158. import { queryPreApplyList } from '../api'
  159. export default {
  160. name: 'forecastName',
  161. components: { pagination },
  162. data() {
  163. const query = this.$route.query
  164. return {
  165. musicGroupId: query.id,
  166. searchForm: {
  167. name: null,
  168. subjectId: null,
  169. isAllowAdjust: null,
  170. cloudTeacherMethod: null
  171. },
  172. tableList: [],
  173. pageInfo: {
  174. // 分页规则
  175. limit: 10, // 限制显示条数
  176. page: 1, // 当前页
  177. total: 0, // 总条数
  178. page_size: [10, 20, 40, 50], // 选择限制显示条数
  179. },
  180. }
  181. },
  182. mounted() {
  183. this.$store.dispatch('setSubjects')
  184. this.getList()
  185. },
  186. methods: {
  187. onReSet() {
  188. this.$refs['searchForm'].resetFields()
  189. this.search()
  190. },
  191. search() {
  192. this.pageInfo.page = 1
  193. this.getList()
  194. },
  195. async getList() {
  196. try {
  197. const result = await queryPreApplyList({
  198. ...this.searchForm,
  199. musicGroupId: this.musicGroupId,
  200. page: this.pageInfo.page,
  201. rows: this.pageInfo.limit
  202. })
  203. this.tableList = result.data.rows
  204. this.pageInfo.total = result.data.total
  205. } catch (error) {}
  206. }
  207. }
  208. }
  209. </script>
  210. <style lang="less" scoped>
  211. </style>