teamCourseList.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <div class='m-container'>
  3. <h2>
  4. <div class="squrt"></div>课表列表
  5. </h2>
  6. <div class="m-core">
  7. <!-- 搜索类型 -->
  8. <el-form :inline="true"
  9. class="searchForm"
  10. v-model="searchForm">
  11. <el-form-item>
  12. <el-input v-model="searchForm.search" placeholder="乐团名或VIP课名" />
  13. </el-form-item>
  14. <el-form-item>
  15. <el-select v-model="searchForm.teacherIdList"
  16. clearable
  17. filterable
  18. placeholder="请选择老师">
  19. <el-option v-for="(item, index) in teacherList"
  20. :key="index"
  21. :value="item.id"
  22. :label="item.realName"></el-option>
  23. </el-select>
  24. </el-form-item>
  25. <el-form-item>
  26. <el-select class='multiple'
  27. v-model="searchForm.organIdList"
  28. filterable
  29. clearable
  30. placeholder="请选择分部">
  31. <el-option v-for="(item,index) in organList"
  32. :key="index"
  33. :label="item.name"
  34. :value="item.id"></el-option>
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item>
  38. <el-select v-model="searchForm.courseType"
  39. clearable
  40. filterable
  41. placeholder="课程类型">
  42. <el-option v-for="(item, index) in courseType" :key="index" :value="item.value" :label="item.label"></el-option>
  43. </el-select>
  44. </el-form-item>
  45. <el-form-item>
  46. <el-select v-model="searchForm.courseStatus"
  47. clearable
  48. filterable
  49. placeholder="课程状态">
  50. <el-option label="未开始"
  51. value="NOT_START"></el-option>
  52. <el-option label="进行中"
  53. value="UNDERWAY"></el-option>
  54. <el-option label="已结束"
  55. value="OVER"></el-option>
  56. </el-select>
  57. </el-form-item>
  58. <el-form-item>
  59. <el-date-picker v-model="searchForm.timer"
  60. style="width:420px;"
  61. type="daterange"
  62. value-format="yyyy-MM-dd"
  63. range-separator="至"
  64. start-placeholder="开始日期"
  65. end-placeholder="结束日期">
  66. </el-date-picker>
  67. </el-form-item>
  68. <el-form-item>
  69. <div class='searchBtn'
  70. @click="search">搜索</div>
  71. </el-form-item>
  72. </el-form>
  73. <div class="btnWraps">
  74. </div>
  75. <!-- 列表 -->
  76. <div class="tableWrap">
  77. <el-table :data='tableList'
  78. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  79. <!-- <el-table-column align='center'
  80. prop="organName"
  81. label="所属分部">
  82. </el-table-column> -->
  83. <el-table-column align='center'
  84. width="200px"
  85. label="时间">
  86. <template slot-scope="scope">
  87. {{ scope.row.startClassTime ? scope.row.startClassTime.substr(0, 16) : '' }}-{{ scope.row.endClassTime ? scope.row.endClassTime.substr(11,5) : ''}}
  88. </template>
  89. </el-table-column>
  90. <el-table-column align='center'
  91. prop="classGroupName"
  92. label="班级名称">
  93. </el-table-column>
  94. <el-table-column align='center'
  95. prop="name"
  96. label="课程名称">
  97. </el-table-column>
  98. <el-table-column align='center'
  99. label="课程类型">
  100. <template slot-scope="scope">
  101. <div>
  102. {{ scope.row.type | coursesType}}
  103. </div>
  104. </template>
  105. </el-table-column>
  106. <el-table-column align='center'
  107. label="教学模式">
  108. <template slot-scope="scope">
  109. <div>
  110. {{ scope.row.teachMode | teachMode}}
  111. </div>
  112. </template>
  113. </el-table-column>
  114. <el-table-column align='center'
  115. prop="schoolName"
  116. label="教学点">
  117. </el-table-column>
  118. <el-table-column align='center'
  119. prop="courseScheduleStatus"
  120. label="课程状态">
  121. <template slot-scope="scope">
  122. <div>
  123. {{ scope.row.status | coursesStatus }}
  124. </div>
  125. </template>
  126. </el-table-column>
  127. <el-table-column align='center'
  128. label="是否签到">
  129. <template slot-scope="scope">
  130. <div>
  131. {{ scope.row.isSignIn | attendanceType}}
  132. </div>
  133. </template>
  134. </el-table-column>
  135. <el-table-column align='center'
  136. label="是否签退">
  137. <template slot-scope="scope">
  138. <div>
  139. {{ scope.row.isSignOut | attendanceOutType}}
  140. </div>
  141. </template>
  142. </el-table-column>
  143. <el-table-column align='center'
  144. prop="isCallNames"
  145. label="是否点名">
  146. <template slot-scope="scope">
  147. {{ scope.row.isCallNames ? '是' : '否' }}
  148. </template>
  149. </el-table-column>
  150. <el-table-column align='center'
  151. prop="teacherName"
  152. label="指导老师">
  153. </el-table-column>
  154. <!-- <el-table-column align='center'
  155. prop="subTeacherName"
  156. label="助教老师">
  157. </el-table-column> -->
  158. </el-table>
  159. <pagination :total="rules.total"
  160. :page.sync="rules.page"
  161. :limit.sync="rules.limit"
  162. :page-sizes="rules.page_size"
  163. @pagination="getList" />
  164. </div>
  165. </div>
  166. </div>
  167. </template>
  168. <script>
  169. import pagination from '@/components/Pagination/index'
  170. import { getTeacher, getMusicGroupAllClass, superFindCourseSchedules, getEmployeeOrgan } from '@/api/buildTeam'
  171. import { courseType } from '@/utils/searchArray'
  172. let nowTime = new Date()
  173. nowTime = nowTime.getFullYear() + '-' + (nowTime.getMonth() + 1) + '-' + nowTime.getDate()
  174. export default {
  175. data () {
  176. return {
  177. timerVisible: false,
  178. courseVisible: false,
  179. courseType: courseType,
  180. searchForm: {
  181. organIdList: null,
  182. courseStatus: null,
  183. courseType: null,
  184. timer: [nowTime, nowTime], // 时间
  185. class: null,
  186. search: null, // 乐团名称 编号 vip课名称
  187. teacherIdList: null, // 老师编号
  188. },
  189. tableList: [],
  190. searchLsit: [],
  191. organList: [],
  192. rules: {
  193. // 分页规则
  194. limit: 10, // 限制显示条数
  195. page: 1, // 当前页
  196. total: 0, // 总条数
  197. page_size: [10, 20, 40, 50] // 选择限制显示条数
  198. },
  199. teacherList: [],
  200. // classList: []
  201. }
  202. },
  203. components: {
  204. pagination
  205. },
  206. mounted () {
  207. this.getList();
  208. // 获取所有老师
  209. getTeacher().then(res => {
  210. if (res.code == 200) {
  211. this.teacherList = res.data;
  212. }
  213. })
  214. // 获取班级列表
  215. // getMusicGroupAllClass().then(res => {
  216. // if (res.code == 200) {
  217. // this.classList = res.data;
  218. // }
  219. // })
  220. getEmployeeOrgan().then(res => {
  221. if (res.code == 200) {
  222. this.organList = res.data;
  223. }
  224. })
  225. },
  226. methods: {
  227. /**
  228. * courseStatus: '', // 课程类型
  229. courseType: '', // 课程状态
  230. timer:[] // 时间
  231. *
  232. */
  233. search () {
  234. this.rules.page = 1;
  235. this.getList();
  236. },
  237. getList () {
  238. let searchForm = this.searchForm
  239. if (!searchForm.timer) {
  240. searchForm.timer = []
  241. }
  242. let obj = {
  243. courseStatus: searchForm.courseStatus || null,
  244. courseType: searchForm.courseType || null,
  245. startTime: searchForm.timer[0] || null,
  246. endTime: searchForm.timer[1] || null,
  247. page: this.rules.page, rows: this.rules.limit,
  248. classGroupId: searchForm.class || null,
  249. organIdList: searchForm.organIdList || null,
  250. search: searchForm.search || null,
  251. teacherIdList: searchForm.teacherIdList || null
  252. }
  253. superFindCourseSchedules(obj).then(res => {
  254. if (res.code == 200) {
  255. this.tableList = res.data.rows;
  256. this.rules.total = res.data.total;
  257. }
  258. })
  259. }
  260. }
  261. }
  262. </script>
  263. <style lang="scss" scope>
  264. .cl-container {
  265. .topFrom {
  266. margin: 20px 30px 0;
  267. .classlist {
  268. display: flex;
  269. flex-direction: row;
  270. justify-content: flex-start;
  271. align-items: center;
  272. ul {
  273. li {
  274. list-style: none;
  275. }
  276. }
  277. }
  278. }
  279. .searchForm {
  280. margin: 0 30px;
  281. }
  282. }
  283. .btnWraps {
  284. display: flex;
  285. flex-direction: row;
  286. justify-content: flex-start;
  287. div {
  288. margin-right: 20px;
  289. }
  290. }
  291. </style>