operationalList.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. <template slot-scope="scope">
  91. <overflow-text width="100%" :text="scope.row.subjectListStr" />
  92. </template>
  93. </el-table-column>
  94. <el-table-column
  95. align="center"
  96. prop="musicCourseNum"
  97. label="乐团节数"
  98. >
  99. </el-table-column>
  100. <el-table-column align="center" prop="vipCourseNum" label="VIP节数">
  101. </el-table-column>
  102. <el-table-column align="center" prop="practiceCourseNum" label="网管节数">
  103. </el-table-column>
  104. <el-table-column
  105. align="center"
  106. prop="expectMusicCourseSalary"
  107. label="预计乐团课酬"
  108. >
  109. <template slot-scope="scope">
  110. <div>
  111. {{ scope.row.expectMusicCourseSalary | moneyFormat }}
  112. </div>
  113. </template>
  114. </el-table-column>
  115. <el-table-column
  116. align="center"
  117. prop="expectVipCourseSalary"
  118. label="预计VIP课酬"
  119. >
  120. <template slot-scope="scope">
  121. <div>
  122. {{ scope.row.expectVipCourseSalary | moneyFormat }}
  123. </div>
  124. </template>
  125. </el-table-column>
  126. <el-table-column
  127. align="center"
  128. prop="expectPracticeCourseSalary"
  129. label="预计网管课酬"
  130. >
  131. <template slot-scope="scope">
  132. <div>
  133. {{ scope.row.expectPracticeCourseSalary | moneyFormat }}
  134. </div>
  135. </template>
  136. </el-table-column>
  137. <el-table-column
  138. align="center"
  139. label="预计课酬合计"
  140. prop="expectTotalSalary"
  141. >
  142. <template slot-scope="scope">
  143. <div>
  144. {{ scope.row.expectTotalSalary | moneyFormat }}
  145. </div>
  146. </template>
  147. </el-table-column>
  148. <el-table-column
  149. align="center"
  150. prop="averageClassMinutes"
  151. label="平均上课时长"
  152. >
  153. </el-table-column>
  154. </el-table>
  155. <pagination
  156. sync
  157. :total.sync="pageInfo.total"
  158. :page.sync="pageInfo.page"
  159. :limit.sync="pageInfo.limit"
  160. :page-sizes="pageInfo.page_size"
  161. @pagination="getList"
  162. />
  163. </div>
  164. </div>
  165. </div>
  166. </template>
  167. <script>
  168. import {
  169. getEmployeeOrgan,
  170. teacherCourseStatistics,
  171. getTeacher,
  172. } from "@/api/buildTeam";
  173. import pagination from "@/components/Pagination/index";
  174. let nowDate = new Date();
  175. let nowMonth =
  176. nowDate.getFullYear() +
  177. "-" +
  178. (nowDate.getMonth() + 1 >= 10
  179. ? nowDate.getMonth() + 1
  180. : "0" + (nowDate.getMonth() + 1));
  181. export default {
  182. name: "operationalList",
  183. components: { pagination },
  184. data() {
  185. return {
  186. searchForm: {
  187. organId: null,
  188. monthStr: nowMonth,
  189. userId: null,
  190. maxSalary: null,
  191. lowSalary: null,
  192. },
  193. tableList: [{}],
  194. organList: [],
  195. teacherList: [],
  196. pageInfo: {
  197. // 分页规则
  198. limit: 10, // 限制显示条数
  199. page: 1, // 当前页
  200. total: 0, // 总条数
  201. page_size: [10, 20, 40, 50], // 选择限制显示条数
  202. },
  203. };
  204. },
  205. mounted() {
  206. // 获取分部
  207. // getEmployeeOrgan().then(res => {
  208. // if (res.code == 200) {
  209. // this.organList = res.data;
  210. // }
  211. // })
  212. const { lowSalary, organId } = this.$route.query
  213. if (organId) {
  214. this.searchForm.organId = organId
  215. }
  216. let string = lowSalary == 1 || lowSalary == 0 ? String(lowSalary) : ''
  217. if (string) {
  218. this.$set(this.searchForm, 'lowSalary', string)
  219. }
  220. this.$store.dispatch("setBranchs");
  221. // 获取老师列表
  222. // getTeacher({ organId: this.organId }).then(res => {
  223. // if (res.code == 200) {
  224. // this.teacherList = res.data;
  225. // }
  226. // })
  227. this.getList();
  228. },
  229. methods: {
  230. search() {
  231. this.pageInfo.page = 1;
  232. this.getList();
  233. },
  234. onReSet() {
  235. this.searchForm = {
  236. organId: null,
  237. monthStr: null,
  238. userId: null,
  239. maxSalary: null,
  240. lowSalary: null,
  241. };
  242. this.getList();
  243. },
  244. getList() {
  245. let params = this.searchForm;
  246. params.page = this.pageInfo.page
  247. params.rows = this.pageInfo.limit
  248. teacherCourseStatistics(params).then((res) => {
  249. let result = res.data;
  250. if (res.code == 200) {
  251. this.tableList = result.rows;
  252. this.pageInfo.total = result.total;
  253. }
  254. });
  255. },
  256. },
  257. };
  258. </script>
  259. <style lang="scss" scoped>
  260. </style>