123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- <template>
- <div class="m-container">
- <h2>
- <div class="squrt"></div>
- 运营预警
- </h2>
- <div class="m-core">
- <save-form :inline="true" :model="searchForm" @submit='search' @reset='onReSet'>
- <el-form-item>
- <el-select
- v-model.trim="searchForm.organId"
- placeholder="请选择分部"
- clearable
- filterable
- >
- <el-option
- v-for="(item, index) in selects.branchs"
- :key="index"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <remote-search
- :commit="'setTeachers'"
- v-model="searchForm.userId"
- />
- </el-form-item>
- <el-form-item>
- <el-date-picker
- style="width: 100% !important"
- v-model.trim="searchForm.monthStr"
- type="month"
- value-format="yyyy-MM"
- placeholder="选择月"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-select
- v-model.trim="searchForm.lowSalary"
- placeholder="请选择是否预警"
- clearable
- filterable
- >
- <el-option
- value="0"
- label="否"
- ></el-option>
- <el-option
- value="1"
- label="是"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-input v-model="searchForm.minSalary" type="number" placeholder="预警课酬大于"></el-input>
- </el-form-item>
- <el-form-item>
- <el-input v-model="searchForm.maxSalary" type="number" placeholder="预警课酬小于"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="danger" native-type="submit">搜索</el-button>
- <el-button native-type="reset" type="primary">重置</el-button>
- <el-button type="primary" @click="onExport" v-permission="'export/teacherCourseStatistics'">导出</el-button>
- </el-form-item>
- </save-form>
- <div class="tableWrap">
- <el-table
- :data="tableList"
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
- >
- <el-table-column align="center" prop="monthStr" label="月份">
- </el-table-column>
- <el-table-column align="center" prop="organName" label="分部">
- <template slot-scope="scope">
- <div>
- <copy-text>{{ scope.row.organName }}</copy-text>
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="realName" label="老师">
- <template slot-scope="scope">
- <div>
- <copy-text>{{ scope.row.realName }}</copy-text>
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="subjectListStr" label="专业">
- <template slot-scope="scope">
- <overflow-text width="100%" :text="scope.row.subjectListStr" />
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="musicCourseNum"
- label="乐团节数"
- >
- </el-table-column>
- <el-table-column align="center" prop="vipCourseNum" label="VIP节数">
- </el-table-column>
- <el-table-column align="center" prop="practiceCourseNum" label="网管节数">
- </el-table-column>
- <el-table-column
- align="center"
- prop="expectMusicCourseSalary"
- label="预计乐团课酬"
- >
- <template slot-scope="scope">
- <div>
- {{ scope.row.expectMusicCourseSalary | moneyFormat }}
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="expectVipCourseSalary"
- label="预计VIP课酬"
- >
- <template slot-scope="scope">
- <div>
- {{ scope.row.expectVipCourseSalary | moneyFormat }}
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="expectPracticeCourseSalary"
- label="预计网管课酬"
- >
- <template slot-scope="scope">
- <div>
- {{ scope.row.expectPracticeCourseSalary | moneyFormat }}
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="预计课酬合计"
- prop="expectTotalSalary"
- >
- <template slot-scope="scope">
- <div>
- {{ scope.row.expectTotalSalary | moneyFormat }}
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="averageClassMinutes"
- label="平均上课时长"
- >
- </el-table-column>
- </el-table>
- <pagination
- sync
- :total.sync="pageInfo.total"
- :page.sync="pageInfo.page"
- :limit.sync="pageInfo.limit"
- :page-sizes="pageInfo.page_size"
- @pagination="getList"
- />
- </div>
- </div>
- </div>
- </template>
- <script>
- import {
- getEmployeeOrgan,
- teacherCourseStatistics,
- getTeacher,
- } from "@/api/buildTeam";
- import pagination from "@/components/Pagination/index";
- import { Export } from "@/utils/downLoadFile";
- import qs from 'qs'
- let nowDate = new Date();
- let nowMonth =
- nowDate.getFullYear() +
- "-" +
- (nowDate.getMonth() + 1 >= 10
- ? nowDate.getMonth() + 1
- : "0" + (nowDate.getMonth() + 1));
- export default {
- name: "operationalList",
- components: { pagination },
- data() {
- return {
- searchForm: {
- organId: null,
- monthStr: nowMonth,
- userId: null,
- maxSalary: null,
- lowSalary: null,
- },
- tableList: [{}],
- organList: [],
- teacherList: [],
- pageInfo: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 40, 50], // 选择限制显示条数
- },
- };
- },
- mounted() {
- // 获取分部
- // getEmployeeOrgan().then(res => {
- // if (res.code == 200) {
- // this.organList = res.data;
- // }
- // })
- const { lowSalary, organId } = this.$route.query
- if (organId) {
- this.searchForm.organId = organId
- }
- let string = lowSalary == 1 || lowSalary == 0 ? String(lowSalary) : ''
- if (string) {
- this.$set(this.searchForm, 'lowSalary', string)
- }
- this.$store.dispatch("setBranchs");
- // 获取老师列表
- // getTeacher({ organId: this.organId }).then(res => {
- // if (res.code == 200) {
- // this.teacherList = res.data;
- // }
- // })
- this.getList();
- },
- methods: {
- search() {
- this.pageInfo.page = 1;
- this.getList();
- },
- onReSet() {
- this.searchForm = {
- organId: null,
- monthStr: nowMonth,
- userId: null,
- maxSalary: null,
- lowSalary: null,
- };
- this.getList();
- },
- getList() {
- let params = this.searchForm;
- // params.page = this.pageInfo.page
- // params.rows = this.pageInfo.limit
- teacherCourseStatistics({ ...params, page: this.pageInfo.page, rows: this.pageInfo.limit }).then((res) => {
- let result = res.data;
- if (res.code == 200) {
- this.tableList = result.rows;
- this.pageInfo.total = result.total;
- }
- });
- },
- onExport() {
- const { ...rest } = this.searchForm;
- Export(
- this,
- {
- url: "/api-web/export/teacherCourseStatistics",
- fileName: "运营预警.xls",
- method: "post",
- params: qs.stringify({
- ...rest
- }),
- },
- "您确定导出运营预警?"
- );
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- </style>
|