|
@@ -1,194 +1,212 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
- <div class="m-container">
|
|
|
- <h2>
|
|
|
- <div class="squrt"></div>
|
|
|
- 学员请假列表
|
|
|
- </h2>
|
|
|
- <div class="m-core">
|
|
|
- <save-form
|
|
|
- :inline="true"
|
|
|
- @submit="search"
|
|
|
- @reset="onReSet"
|
|
|
- ref="searchFrom"
|
|
|
- :model="searchForm"
|
|
|
- >
|
|
|
- <el-form-item prop="search">
|
|
|
- <el-input
|
|
|
- v-model.trim="searchForm.search"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="search"
|
|
|
- placeholder="学员编号/姓名/手机号"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="organId">
|
|
|
- <el-select
|
|
|
- placeholder="请选择分部"
|
|
|
- v-model="searchForm.organId"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in selects.branchs"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- :key="index"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </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-form-item>
|
|
|
- </save-form>
|
|
|
- <div class="tableWrap">
|
|
|
- <el-table
|
|
|
- style="width: 100%"
|
|
|
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
- :data="tableList"
|
|
|
+ <div class="m-container">
|
|
|
+ <h2>
|
|
|
+ <div class="squrt"></div>
|
|
|
+ 学员请假列表
|
|
|
+ </h2>
|
|
|
+ <div class="m-core">
|
|
|
+ <save-form
|
|
|
+ :inline="true"
|
|
|
+ @submit="search"
|
|
|
+ @reset="onReSet"
|
|
|
+ ref="searchFrom"
|
|
|
+ :model="searchForm"
|
|
|
+ >
|
|
|
+ <el-form-item prop="search">
|
|
|
+ <el-input
|
|
|
+ v-model.trim="searchForm.search"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="
|
|
|
+ (e) => {
|
|
|
+ e.target.blur();
|
|
|
+ $refs.searchForm.save();
|
|
|
+ search();
|
|
|
+ }
|
|
|
+ "
|
|
|
+ placeholder="学员编号/姓名/手机号"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="organId">
|
|
|
+ <el-select
|
|
|
+ placeholder="请选择分部"
|
|
|
+ v-model="searchForm.organId"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in selects.branchs"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :key="index"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </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-form-item>
|
|
|
+ </save-form>
|
|
|
+ <div class="tableWrap">
|
|
|
+ <el-table
|
|
|
+ style="width: 100%"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ :data="tableList"
|
|
|
+ >
|
|
|
+ <el-table-column align="center" label="分部">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <copy-text>{{ scope.row.organName }}</copy-text>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="学员编号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <copy-text>{{ scope.row.userId }}</copy-text>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="学员姓名">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <copy-text>{{ scope.row.studentName }}</copy-text>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="手机号" prop="phone">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="近两个月请假次数"
|
|
|
+ prop="totalNum"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="本月请假次数"
|
|
|
+ prop="currentNum"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <auth :auths="['studentManage/queryStudentLeaveCourseList']">
|
|
|
+ <el-button type="text" @click="showDetail(scope.row)"
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
+ </auth>
|
|
|
+ <auth :auths="['visit/add?page=studentLeaveList']">
|
|
|
+ <el-button type="text" @click="addVisit(scope.row)"
|
|
|
+ >新增回访</el-button
|
|
|
>
|
|
|
- <el-table-column align="center" label="分部">
|
|
|
- <template slot-scope="scope">
|
|
|
- <copy-text>{{ scope.row.organName }}</copy-text>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="学员编号">
|
|
|
- <template slot-scope="scope">
|
|
|
- <copy-text>{{ scope.row.userId }}</copy-text>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="学员姓名">
|
|
|
- <template slot-scope="scope">
|
|
|
- <copy-text>{{ scope.row.studentName }}</copy-text>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="手机号" prop="phone">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="近两个月请假次数" prop="totalNum">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="本月请假次数" prop="currentNum">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <auth :auths="['studentManage/queryStudentLeaveCourseList']">
|
|
|
- <el-button type="text" @click="showDetail(scope.row)">查看</el-button>
|
|
|
- </auth>
|
|
|
- <auth :auths="['visit/add?page=studentLeaveList']">
|
|
|
- <el-button type="text" @click="addVisit(scope.row)">新增回访</el-button>
|
|
|
- </auth>
|
|
|
- </template>
|
|
|
- </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>
|
|
|
+ </auth>
|
|
|
+ </template>
|
|
|
+ </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>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="查看"
|
|
|
- width="1000px"
|
|
|
- :visible.sync="leaveVisible"
|
|
|
- append-to-body>
|
|
|
- <student-leave-detail v-if="leaveVisible" :studentId="studentId" />
|
|
|
- </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="查看"
|
|
|
+ width="1000px"
|
|
|
+ :visible.sync="leaveVisible"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <student-leave-detail v-if="leaveVisible" :studentId="studentId" />
|
|
|
+ </el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="新增回访"
|
|
|
- width="500px"
|
|
|
- :visible.sync="visitVisible"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <visit
|
|
|
- v-if="visitVisible && detail"
|
|
|
- :detail="detail"
|
|
|
- :username="detail.username"
|
|
|
- @close="visitVisible = false"
|
|
|
- @submited="getList"
|
|
|
- :useVisitType="['其它','异常请假回访']"
|
|
|
- />
|
|
|
- </el-dialog>
|
|
|
- </div>
|
|
|
+ <el-dialog
|
|
|
+ title="新增回访"
|
|
|
+ width="500px"
|
|
|
+ :visible.sync="visitVisible"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <visit
|
|
|
+ v-if="visitVisible && detail"
|
|
|
+ :detail="detail"
|
|
|
+ :username="detail.username"
|
|
|
+ @close="visitVisible = false"
|
|
|
+ @submited="getList"
|
|
|
+ :useVisitType="['其它', '异常请假回访']"
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import visit from "@/views/withdrawal-application/modals/visit";
|
|
|
-import studentLeaveDetail from './modals/studentLeaveDetail'
|
|
|
-import { queryStudentErrorLeaveList } from './api.js'
|
|
|
+import studentLeaveDetail from "./modals/studentLeaveDetail";
|
|
|
+import { queryStudentErrorLeaveList } from "./api.js";
|
|
|
export default {
|
|
|
- components: { pagination, visit, studentLeaveDetail },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- searchForm: {
|
|
|
- search: null,
|
|
|
- studentSearch: null,
|
|
|
- organId: null,
|
|
|
- },
|
|
|
- visitVisible: false,
|
|
|
- detail: null,
|
|
|
- pageInfo: {
|
|
|
- // 分页规则
|
|
|
- limit: 10, // 限制显示条数
|
|
|
- page: 1, // 当前页
|
|
|
- total: 0, // 总条数
|
|
|
- page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
- },
|
|
|
- tableList: [],
|
|
|
- leaveVisible: false,
|
|
|
- studentId: null,
|
|
|
- };
|
|
|
- },
|
|
|
- //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
- mounted() {
|
|
|
- const { query } = this.$route
|
|
|
- if (query.organId) {
|
|
|
- this.searchForm.organId = Number(query.organId)
|
|
|
- }
|
|
|
- this.$store.dispatch("setBranchs");
|
|
|
+ components: { pagination, visit, studentLeaveDetail },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ searchForm: {
|
|
|
+ search: null,
|
|
|
+ studentSearch: null,
|
|
|
+ organId: null,
|
|
|
+ },
|
|
|
+ visitVisible: false,
|
|
|
+ detail: null,
|
|
|
+ pageInfo: {
|
|
|
+ // 分页规则
|
|
|
+ limit: 10, // 限制显示条数
|
|
|
+ page: 1, // 当前页
|
|
|
+ total: 0, // 总条数
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ },
|
|
|
+ tableList: [],
|
|
|
+ leaveVisible: false,
|
|
|
+ studentId: null,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ mounted() {
|
|
|
+ const { query } = this.$route;
|
|
|
+ if (query.organId) {
|
|
|
+ this.searchForm.organId = Number(query.organId);
|
|
|
+ }
|
|
|
+ this.$store.dispatch("setBranchs");
|
|
|
|
|
|
- this.getList()
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ addVisit(row) {
|
|
|
+ this.visitVisible = true;
|
|
|
+ row.id = row.userId;
|
|
|
+ this.detail = row;
|
|
|
+ },
|
|
|
+ search() {
|
|
|
+ this.pageInfo.page = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ onReSet() {
|
|
|
+ this.$refs["searchFrom"].resetFields();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
- methods: {
|
|
|
- addVisit(row) {
|
|
|
- this.visitVisible = true;
|
|
|
- row.id = row.userId
|
|
|
- this.detail = row;
|
|
|
- },
|
|
|
- search() {
|
|
|
- this.pageInfo.page = 1;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- onReSet() {
|
|
|
- this.$refs['searchFrom'].resetFields()
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- async getList() {
|
|
|
- try {
|
|
|
- const { ...search } = this.searchForm
|
|
|
- const params = {
|
|
|
- ...search,
|
|
|
- page: this.pageInfo.page,
|
|
|
- rows: this.pageInfo.limit
|
|
|
- }
|
|
|
- let res = await queryStudentErrorLeaveList(params)
|
|
|
- this.tableList = res.data.rows;
|
|
|
- this.pageInfo.total = res.data.total;
|
|
|
- } catch (err) {
|
|
|
- //
|
|
|
- }
|
|
|
- },
|
|
|
- showDetail(item) {
|
|
|
- this.leaveVisible = true
|
|
|
- this.studentId = item.userId
|
|
|
- }
|
|
|
+ async getList() {
|
|
|
+ try {
|
|
|
+ const { ...search } = this.searchForm;
|
|
|
+ const params = {
|
|
|
+ ...search,
|
|
|
+ page: this.pageInfo.page,
|
|
|
+ rows: this.pageInfo.limit,
|
|
|
+ };
|
|
|
+ let res = await queryStudentErrorLeaveList(params);
|
|
|
+ this.tableList = res.data.rows;
|
|
|
+ this.pageInfo.total = res.data.total;
|
|
|
+ } catch (err) {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showDetail(item) {
|
|
|
+ this.leaveVisible = true;
|
|
|
+ this.studentId = item.userId;
|
|
|
},
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang='scss' scoped>
|
|
|
-
|
|
|
</style>
|