operationalList.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <div class="squrt"></div>
  5. 运营预警
  6. </h2>
  7. <div class="m-core">
  8. <save-form :inline="true" :model="searchForm" @submit='search' @reset='onReSet'>
  9. <el-form-item>
  10. <el-select
  11. v-model.trim="searchForm.organId"
  12. placeholder="请选择分部"
  13. clearable
  14. filterable
  15. >
  16. <el-option
  17. v-for="(item, index) in selects.branchs"
  18. :key="index"
  19. :value="item.id"
  20. :label="item.name"
  21. ></el-option>
  22. </el-select>
  23. </el-form-item>
  24. <el-form-item>
  25. <remote-search
  26. :commit="'setTeachers'"
  27. v-model="searchForm.userId"
  28. />
  29. </el-form-item>
  30. <el-form-item>
  31. <el-date-picker
  32. style="width: 100% !important"
  33. v-model.trim="searchForm.monthStr"
  34. type="month"
  35. value-format="yyyy-MM"
  36. placeholder="选择月"
  37. >
  38. </el-date-picker>
  39. </el-form-item>
  40. <el-form-item>
  41. <el-button type="danger" native-type="submit">搜索</el-button>
  42. <el-button native-type="reset" type="primary">重置</el-button>
  43. </el-form-item>
  44. </save-form>
  45. <div class="tableWrap">
  46. <el-table
  47. :data="tableList"
  48. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  49. >
  50. <el-table-column align="center" prop="monthStr" label="月份">
  51. </el-table-column>
  52. <el-table-column align="center" prop="organName" label="分部">
  53. <template slot-scope="scope">
  54. <div>
  55. <copy-text>{{ scope.row.organName }}</copy-text>
  56. </div>
  57. </template>
  58. </el-table-column>
  59. <el-table-column align="center" prop="realName" label="老师">
  60. <template slot-scope="scope">
  61. <div>
  62. <copy-text>{{ scope.row.realName }}</copy-text>
  63. </div>
  64. </template>
  65. </el-table-column>
  66. <el-table-column align="center" prop="subjectListStr" label="专业">
  67. </el-table-column>
  68. <el-table-column
  69. align="center"
  70. prop="musicCourseNum"
  71. label="乐团节数"
  72. >
  73. </el-table-column>
  74. <el-table-column align="center" prop="vipCourseNum" label="小课节数">
  75. </el-table-column>
  76. <el-table-column
  77. align="center"
  78. prop="expectMusicCourseSalary"
  79. label="预计乐团课酬"
  80. >
  81. <template slot-scope="scope">
  82. <div>
  83. {{ scope.row.expectMusicCourseSalary | moneyFormat }}
  84. </div>
  85. </template>
  86. </el-table-column>
  87. <el-table-column
  88. align="center"
  89. prop="expectVipCourseSalary"
  90. label="预计小课课酬"
  91. >
  92. <template slot-scope="scope">
  93. <div>
  94. {{ scope.row.expectVipCourseSalary | moneyFormat }}
  95. </div>
  96. </template>
  97. </el-table-column>
  98. <el-table-column
  99. align="center"
  100. label="预计课酬合计"
  101. prop="expectTotalSalary"
  102. >
  103. <template slot-scope="scope">
  104. <div>
  105. {{ scope.row.expectTotalSalary | moneyFormat }}
  106. </div>
  107. </template>
  108. </el-table-column>
  109. <el-table-column
  110. align="center"
  111. prop="averageClassMinutes"
  112. label="平均上课时长"
  113. >
  114. </el-table-column>
  115. </el-table>
  116. <pagination
  117. sync
  118. :total.sync="pageInfo.total"
  119. :page.sync="pageInfo.page"
  120. :limit.sync="pageInfo.limit"
  121. :page-sizes="pageInfo.page_size"
  122. @pagination="getList"
  123. />
  124. </div>
  125. </div>
  126. </div>
  127. </template>
  128. <script>
  129. import {
  130. getEmployeeOrgan,
  131. teacherCourseStatistics,
  132. getTeacher,
  133. } from "@/api/buildTeam";
  134. import pagination from "@/components/Pagination/index";
  135. let nowDate = new Date();
  136. let nowMonth =
  137. nowDate.getFullYear() +
  138. "-" +
  139. (nowDate.getMonth() + 1 >= 10
  140. ? nowDate.getMonth() + 1
  141. : "0" + (nowDate.getMonth() + 1));
  142. export default {
  143. name: "operationalList",
  144. components: { pagination },
  145. data() {
  146. return {
  147. searchForm: {
  148. organId: null,
  149. monthStr: nowMonth,
  150. userId: null,
  151. },
  152. tableList: [{}],
  153. organList: [],
  154. teacherList: [],
  155. pageInfo: {
  156. // 分页规则
  157. limit: 10, // 限制显示条数
  158. page: 1, // 当前页
  159. total: 0, // 总条数
  160. page_size: [10, 20, 40, 50], // 选择限制显示条数
  161. },
  162. };
  163. },
  164. mounted() {
  165. // 获取分部
  166. // getEmployeeOrgan().then(res => {
  167. // if (res.code == 200) {
  168. // this.organList = res.data;
  169. // }
  170. // })
  171. this.$store.dispatch("setBranchs");
  172. // 获取老师列表
  173. // getTeacher({ organId: this.organId }).then(res => {
  174. // if (res.code == 200) {
  175. // this.teacherList = res.data;
  176. // }
  177. // })
  178. this.getList();
  179. },
  180. methods: {
  181. search() {
  182. this.pageInfo.page = 1;
  183. this.getList();
  184. },
  185. onReSet() {
  186. this.searchForm = {
  187. organId: null,
  188. monthStr: null,
  189. userId: null,
  190. };
  191. this.getList();
  192. },
  193. getList() {
  194. let params = this.searchForm;
  195. params.page = this.pageInfo.page
  196. params.rows = this.pageInfo.limit
  197. teacherCourseStatistics(params).then((res) => {
  198. let result = res.data;
  199. if (res.code == 200) {
  200. this.tableList = result.rows;
  201. this.pageInfo.total = result.total;
  202. }
  203. });
  204. },
  205. },
  206. };
  207. </script>
  208. <style lang="scss" scoped>
  209. </style>