operationalList.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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-select
  42. v-model.trim="searchForm.lowSalary"
  43. placeholder="请选择是否预警"
  44. clearable
  45. filterable
  46. >
  47. <el-option
  48. value="0"
  49. label="否"
  50. ></el-option>
  51. <el-option
  52. value="1"
  53. label="是"
  54. ></el-option>
  55. </el-select>
  56. </el-form-item>
  57. <el-form-item>
  58. <el-input v-model="searchForm.minSalary" type="number" placeholder="预警课酬大于"></el-input>
  59. </el-form-item>
  60. <el-form-item>
  61. <el-input v-model="searchForm.maxSalary" type="number" placeholder="预警课酬小于"></el-input>
  62. </el-form-item>
  63. <el-form-item>
  64. <el-button type="danger" native-type="submit">搜索</el-button>
  65. <el-button native-type="reset" type="primary">重置</el-button>
  66. </el-form-item>
  67. </save-form>
  68. <div class="tableWrap">
  69. <el-table
  70. :data="tableList"
  71. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  72. >
  73. <el-table-column align="center" prop="monthStr" label="月份">
  74. </el-table-column>
  75. <el-table-column align="center" prop="organName" label="分部">
  76. <template slot-scope="scope">
  77. <div>
  78. <copy-text>{{ scope.row.organName }}</copy-text>
  79. </div>
  80. </template>
  81. </el-table-column>
  82. <el-table-column align="center" prop="realName" label="老师">
  83. <template slot-scope="scope">
  84. <div>
  85. <copy-text>{{ scope.row.realName }}</copy-text>
  86. </div>
  87. </template>
  88. </el-table-column>
  89. <el-table-column align="center" prop="subjectListStr" label="专业">
  90. </el-table-column>
  91. <el-table-column
  92. align="center"
  93. prop="musicCourseNum"
  94. label="乐团节数"
  95. >
  96. </el-table-column>
  97. <el-table-column align="center" prop="vipCourseNum" label="VIP节数">
  98. </el-table-column>
  99. <el-table-column align="center" prop="practiceCourseNum" label="网管节数">
  100. </el-table-column>
  101. <el-table-column
  102. align="center"
  103. prop="expectMusicCourseSalary"
  104. label="预计乐团课酬"
  105. >
  106. <template slot-scope="scope">
  107. <div>
  108. {{ scope.row.expectMusicCourseSalary | moneyFormat }}
  109. </div>
  110. </template>
  111. </el-table-column>
  112. <el-table-column
  113. align="center"
  114. prop="expectVipCourseSalary"
  115. label="预计VIP课酬"
  116. >
  117. <template slot-scope="scope">
  118. <div>
  119. {{ scope.row.expectVipCourseSalary | moneyFormat }}
  120. </div>
  121. </template>
  122. </el-table-column>
  123. <el-table-column
  124. align="center"
  125. prop="expectPracticeCourseSalary"
  126. label="预计网管课酬"
  127. >
  128. <template slot-scope="scope">
  129. <div>
  130. {{ scope.row.expectPracticeCourseSalary | moneyFormat }}
  131. </div>
  132. </template>
  133. </el-table-column>
  134. <el-table-column
  135. align="center"
  136. label="预计课酬合计"
  137. prop="expectTotalSalary"
  138. >
  139. <template slot-scope="scope">
  140. <div>
  141. {{ scope.row.expectTotalSalary | moneyFormat }}
  142. </div>
  143. </template>
  144. </el-table-column>
  145. <el-table-column
  146. align="center"
  147. prop="averageClassMinutes"
  148. label="平均上课时长"
  149. >
  150. </el-table-column>
  151. </el-table>
  152. <pagination
  153. sync
  154. :total.sync="pageInfo.total"
  155. :page.sync="pageInfo.page"
  156. :limit.sync="pageInfo.limit"
  157. :page-sizes="pageInfo.page_size"
  158. @pagination="getList"
  159. />
  160. </div>
  161. </div>
  162. </div>
  163. </template>
  164. <script>
  165. import {
  166. getEmployeeOrgan,
  167. teacherCourseStatistics,
  168. getTeacher,
  169. } from "@/api/buildTeam";
  170. import pagination from "@/components/Pagination/index";
  171. let nowDate = new Date();
  172. let nowMonth =
  173. nowDate.getFullYear() +
  174. "-" +
  175. (nowDate.getMonth() + 1 >= 10
  176. ? nowDate.getMonth() + 1
  177. : "0" + (nowDate.getMonth() + 1));
  178. export default {
  179. name: "operationalList",
  180. components: { pagination },
  181. data() {
  182. return {
  183. searchForm: {
  184. organId: null,
  185. monthStr: nowMonth,
  186. userId: null,
  187. maxSalary: null,
  188. lowSalary: null,
  189. },
  190. tableList: [{}],
  191. organList: [],
  192. teacherList: [],
  193. pageInfo: {
  194. // 分页规则
  195. limit: 10, // 限制显示条数
  196. page: 1, // 当前页
  197. total: 0, // 总条数
  198. page_size: [10, 20, 40, 50], // 选择限制显示条数
  199. },
  200. };
  201. },
  202. mounted() {
  203. // 获取分部
  204. // getEmployeeOrgan().then(res => {
  205. // if (res.code == 200) {
  206. // this.organList = res.data;
  207. // }
  208. // })
  209. const { lowSalary } = this.$route.query
  210. let string = lowSalary == 1 || lowSalary == 0 ? String(lowSalary) : ''
  211. if (string) {
  212. this.$set(this.searchForm, 'lowSalary', string)
  213. }
  214. this.$store.dispatch("setBranchs");
  215. // 获取老师列表
  216. // getTeacher({ organId: this.organId }).then(res => {
  217. // if (res.code == 200) {
  218. // this.teacherList = res.data;
  219. // }
  220. // })
  221. this.getList();
  222. },
  223. methods: {
  224. search() {
  225. this.pageInfo.page = 1;
  226. this.getList();
  227. },
  228. onReSet() {
  229. this.searchForm = {
  230. organId: null,
  231. monthStr: null,
  232. userId: null,
  233. maxSalary: null,
  234. lowSalary: null,
  235. };
  236. this.getList();
  237. },
  238. getList() {
  239. let params = this.searchForm;
  240. params.page = this.pageInfo.page
  241. params.rows = this.pageInfo.limit
  242. teacherCourseStatistics(params).then((res) => {
  243. let result = res.data;
  244. if (res.code == 200) {
  245. this.tableList = result.rows;
  246. this.pageInfo.total = result.total;
  247. }
  248. });
  249. },
  250. },
  251. };
  252. </script>
  253. <style lang="scss" scoped>
  254. </style>