|
@@ -10,9 +10,11 @@
|
|
|
<div class="newBand"
|
|
|
@click="onCreateQRCode">学员激活列表</div>
|
|
|
<!-- 搜索标题 -->
|
|
|
- <el-form :inline="true"
|
|
|
+ <save-form :inline="true"
|
|
|
class="searchForm"
|
|
|
- v-model.trim="searchForm">
|
|
|
+ @submit="onSearch"
|
|
|
+ @reset="onReSet"
|
|
|
+ :model.sync="searchForm">
|
|
|
<el-form-item>
|
|
|
<el-input placeholder="学生姓名或电话"
|
|
|
@keyup.enter.native="onSearch"
|
|
@@ -24,7 +26,7 @@
|
|
|
v-model.trim="searchForm.organId"
|
|
|
clearable
|
|
|
placeholder="请选择分部">
|
|
|
- <el-option v-for="(item,index) in organList"
|
|
|
+ <el-option v-for="(item,index) in selects.branchs"
|
|
|
:key="index"
|
|
|
:label="item.name"
|
|
|
:value="item.id"></el-option>
|
|
@@ -36,7 +38,7 @@
|
|
|
v-model="searchForm.teacherId"
|
|
|
clearable
|
|
|
filterable>
|
|
|
- <el-option v-for="(item,index) in teacherList"
|
|
|
+ <el-option v-for="(item,index) in selects.teachers"
|
|
|
:label="item.realName"
|
|
|
:value="item.id"
|
|
|
:key="index"></el-option>
|
|
@@ -109,15 +111,15 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button @click="onSearch"
|
|
|
+ <el-button native-type="submit"
|
|
|
type="danger">搜索</el-button>
|
|
|
- <el-button @click="onReSet"
|
|
|
+ <el-button native-type="reset"
|
|
|
type="primary">重置</el-button>
|
|
|
<el-button type="primary"
|
|
|
v-permission="'export/studentHasCourse'"
|
|
|
@click="downLoadStudent">导出名单</el-button>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
+ </save-form>
|
|
|
<!-- 列表 -->
|
|
|
<div class="tableWrap">
|
|
|
<el-table :data="tableList"
|
|
@@ -204,7 +206,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<router-link v-permission="'/studentDetail'"
|
|
|
class="el-button--text"
|
|
|
- :to="{path:`/business/studentDetail?userId=${scope.row.userId}`,query:{search:JSON.stringify(searchForm),rules:JSON.stringify(pageInfo),studentName:scope.row.username}}">查看</router-link>
|
|
|
+ :to="{path:`/business/studentDetail?userId=${scope.row.userId}`,query:{studentName:scope.row.username}}">查看</router-link>
|
|
|
<el-button type="text"
|
|
|
v-permission="'studentManage/studentUpdate'"
|
|
|
@click="resetStudent(scope.row)">修改</el-button>
|
|
@@ -218,7 +220,8 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <pagination :total="pageInfo.total"
|
|
|
+ <pagination sync
|
|
|
+ :total.sync="pageInfo.total"
|
|
|
:page.sync="pageInfo.page"
|
|
|
:limit.sync="pageInfo.limit"
|
|
|
:page-sizes="pageInfo.page_size"
|
|
@@ -253,7 +256,7 @@
|
|
|
clearable
|
|
|
placeholder="请选择分部"
|
|
|
@change="changeStudentOrgan">
|
|
|
- <el-option v-for="(item,index) in organList"
|
|
|
+ <el-option v-for="(item,index) in selects.branchs"
|
|
|
:key="index"
|
|
|
:label="item.name"
|
|
|
:value="item.id"></el-option>
|
|
@@ -518,26 +521,8 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted () {
|
|
|
- if (this.$route.query.search) {
|
|
|
- this.$route.query.search instanceof Object
|
|
|
- ? (this.searchForm = this.$route.query.search)
|
|
|
- : (this.searchForm = JSON.parse(this.$route.query.search));
|
|
|
- }
|
|
|
- if (this.$route.query.rules) {
|
|
|
- this.$route.query.rules instanceof Object
|
|
|
- ? (this.pageInfo = this.$route.query.rules)
|
|
|
- : (this.pageInfo = JSON.parse(this.$route.query.rules));
|
|
|
- }
|
|
|
- getEmployeeOrgan().then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.organList = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
- getTeacher().then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.teacherList = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ this.$store.dispatch('setBranchs')
|
|
|
+ this.$store.dispatch('setTeachers')
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
@@ -666,7 +651,7 @@ export default {
|
|
|
.catch(() => { });
|
|
|
},
|
|
|
checkPhone (val) {
|
|
|
- var regu = /^1[3456789]\d{9}$/;
|
|
|
+ var regu = /^1\d{10}$/;
|
|
|
var re = new RegExp(regu);
|
|
|
if (re.test(val)) {
|
|
|
getStudentInfoByPhone({ mobile: this.studentForm.phone }).then(res => {
|