|
@@ -75,11 +75,28 @@
|
|
<el-option label="否" value="false"></el-option>
|
|
<el-option label="否" value="false"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <!-- <el-form-item>
|
|
|
|
- <el-input placeholder="学生姓名"
|
|
|
|
- @keyup.enter.native='onSearch'
|
|
|
|
- v-model.trim="searchForm.studentName"></el-input>
|
|
|
|
- </el-form-item>-->
|
|
|
|
|
|
+ <el-form-item prop="hasCourse">
|
|
|
|
+ <el-select
|
|
|
|
+ class="multiple"
|
|
|
|
+ v-model.trim="searchForm.operatingTag"
|
|
|
|
+ clearable
|
|
|
|
+ placeholder="是否运营"
|
|
|
|
+ >
|
|
|
|
+ <el-option label="是" value="1"></el-option>
|
|
|
|
+ <el-option label="否" value="0"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item prop="hasCourse">
|
|
|
|
+ <el-select
|
|
|
|
+ class="multiple"
|
|
|
|
+ v-model.trim="searchForm.serviceTag"
|
|
|
|
+ clearable
|
|
|
|
+ placeholder="是否服务"
|
|
|
|
+ >
|
|
|
|
+ <el-option label="是" value="1"></el-option>
|
|
|
|
+ <el-option label="否" value="0"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button @click="onSearch" type="danger">搜索</el-button>
|
|
<el-button @click="onSearch" type="danger">搜索</el-button>
|
|
<el-button @click="onReSet" type="primary">重置</el-button>
|
|
<el-button @click="onReSet" type="primary">重置</el-button>
|
|
@@ -95,12 +112,12 @@
|
|
<el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
<el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
<el-table-column align="center" prop="userId" label="学员编号"></el-table-column>
|
|
<el-table-column align="center" prop="userId" label="学员编号"></el-table-column>
|
|
<el-table-column align="center" prop="username" label="学员姓名"></el-table-column>
|
|
<el-table-column align="center" prop="username" label="学员姓名"></el-table-column>
|
|
- <el-table-column align="center" prop="organName" width="150px" label="所属分部"></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="center" prop="organName" label="所属分部"></el-table-column>
|
|
<el-table-column align="center" label="性别">
|
|
<el-table-column align="center" label="性别">
|
|
<template slot-scope="scope">{{ scope.row.gender ? '男': '女' }}</template>
|
|
<template slot-scope="scope">{{ scope.row.gender ? '男': '女' }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="realName" label="家长姓名"></el-table-column>
|
|
<el-table-column align="center" prop="realName" label="家长姓名"></el-table-column>
|
|
- <el-table-column align="center" width="180px" prop="parentsPhone" label="家长联系电话"></el-table-column>
|
|
|
|
|
|
+ <el-table-column align="center" width="120px" prop="parentsPhone" label="家长联系电话"></el-table-column>
|
|
<el-table-column align="center" label="是否激活">
|
|
<el-table-column align="center" label="是否激活">
|
|
<template slot-scope="scope">{{ scope.row.isActive ? '是' : '否' }}</template>
|
|
<template slot-scope="scope">{{ scope.row.isActive ? '是' : '否' }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -113,6 +130,12 @@
|
|
<el-table-column align="center" label="是否有网管课">
|
|
<el-table-column align="center" label="是否有网管课">
|
|
<template slot-scope="scope">{{ scope.row.hasPracticeCourse ? '是' : '否' }}</template>
|
|
<template slot-scope="scope">{{ scope.row.hasPracticeCourse ? '是' : '否' }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column align="center" label="是否服务">
|
|
|
|
+ <template slot-scope="scope">{{ scope.row.serviceTag ? '是' : '否' }}</template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="是否运营">
|
|
|
|
+ <template slot-scope="scope">{{ scope.row.operatingTag ? '是' : '否' }}</template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column align="center" prop="courseBalance" label="课程余额(元)"></el-table-column>
|
|
<el-table-column align="center" prop="courseBalance" label="课程余额(元)"></el-table-column>
|
|
<el-table-column align="center" fixed="right" width="180px" label="操作">
|
|
<el-table-column align="center" fixed="right" width="180px" label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -200,6 +223,20 @@
|
|
<el-option :value="1" label="男"></el-option>
|
|
<el-option :value="1" label="男"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item label="是否运营" prop="operatingTag">
|
|
|
|
+ <el-select class="multiple" v-model.trim="studentForm.operatingTag" clearable>
|
|
|
|
+ <el-option value="1" label="是"></el-option>
|
|
|
|
+ <el-option value="0" label="否"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="是否服务" prop="serviceTag">
|
|
|
|
+ <el-select class="multiple" v-model.trim="studentForm.serviceTag" clearable>
|
|
|
|
+ <el-option value="1" label="是"></el-option>
|
|
|
|
+ <el-option value="0" label="否"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
<el-form-item label="家长姓名">
|
|
<el-form-item label="家长姓名">
|
|
<el-input v-model.trim="studentForm.parseName"></el-input>
|
|
<el-input v-model.trim="studentForm.parseName"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -284,7 +321,7 @@ import axios from "axios";
|
|
import qs from "qs";
|
|
import qs from "qs";
|
|
import { getToken } from "@/utils/auth";
|
|
import { getToken } from "@/utils/auth";
|
|
import load from "@/utils/loading";
|
|
import load from "@/utils/loading";
|
|
-import {permission} from "@/utils/directivePage"
|
|
|
|
|
|
+import { permission } from "@/utils/directivePage";
|
|
export default {
|
|
export default {
|
|
name: "studentList",
|
|
name: "studentList",
|
|
components: { pagination },
|
|
components: { pagination },
|
|
@@ -298,7 +335,9 @@ export default {
|
|
isActive: null,
|
|
isActive: null,
|
|
hasCourse: null,
|
|
hasCourse: null,
|
|
isMake: null,
|
|
isMake: null,
|
|
- hasPracticeCourse: null
|
|
|
|
|
|
+ hasPracticeCourse: null,
|
|
|
|
+ operatingTag: null,
|
|
|
|
+ serviceTag: null
|
|
},
|
|
},
|
|
searchList: [],
|
|
searchList: [],
|
|
tableList: [],
|
|
tableList: [],
|
|
@@ -317,14 +356,18 @@ export default {
|
|
sex: "",
|
|
sex: "",
|
|
parseName: "",
|
|
parseName: "",
|
|
date: "",
|
|
date: "",
|
|
- nation: ""
|
|
|
|
|
|
+ nation: "",
|
|
|
|
+ serviceTag: null,
|
|
|
|
+ operatingTag: null
|
|
},
|
|
},
|
|
studentRules: {
|
|
studentRules: {
|
|
name: [{ required: true, message: "请输入学生姓名" }],
|
|
name: [{ required: true, message: "请输入学生姓名" }],
|
|
sex: [{ required: true, message: "请选择学生姓名" }],
|
|
sex: [{ required: true, message: "请选择学生姓名" }],
|
|
date: [{ required: true, message: "请选择出生日期" }],
|
|
date: [{ required: true, message: "请选择出生日期" }],
|
|
organId: [{ required: true, message: "请选择分部" }],
|
|
organId: [{ required: true, message: "请选择分部" }],
|
|
- nation: [{ required: true, message: "请输入名族" }]
|
|
|
|
|
|
+ nation: [{ required: true, message: "请输入名族" }],
|
|
|
|
+ serviceTag: [{ required: true, message: "请选择是否参与服务" }],
|
|
|
|
+ operatingTag: [{ required: true, message: "请选择是否参与运营" }]
|
|
},
|
|
},
|
|
isNew: false,
|
|
isNew: false,
|
|
active: null,
|
|
active: null,
|
|
@@ -405,12 +448,16 @@ export default {
|
|
search: null,
|
|
search: null,
|
|
studentName: null,
|
|
studentName: null,
|
|
isActive: null,
|
|
isActive: null,
|
|
- isMake: null
|
|
|
|
|
|
+ hasCourse: null,
|
|
|
|
+ isMake: null,
|
|
|
|
+ hasPracticeCourse: null,
|
|
|
|
+ operatingTag: null,
|
|
|
|
+ serviceTag: null
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- downLoadStudent () {
|
|
|
|
- let url = '/api-web/export/studentHasCourse'
|
|
|
|
- let searchForm = this.searchForm
|
|
|
|
|
|
+ downLoadStudent() {
|
|
|
|
+ let url = "/api-web/export/studentHasCourse";
|
|
|
|
+ let searchForm = this.searchForm;
|
|
let data = {
|
|
let data = {
|
|
organId: searchForm.organId ? searchForm.organId : null,
|
|
organId: searchForm.organId ? searchForm.organId : null,
|
|
search: searchForm.search ? searchForm.search : null,
|
|
search: searchForm.search ? searchForm.search : null,
|
|
@@ -419,7 +466,9 @@ export default {
|
|
isMake: searchForm.isMake ? searchForm.isMake : null,
|
|
isMake: searchForm.isMake ? searchForm.isMake : null,
|
|
hasPracticeCourse: searchForm.hasPracticeCourse
|
|
hasPracticeCourse: searchForm.hasPracticeCourse
|
|
? searchForm.hasPracticeCourse
|
|
? searchForm.hasPracticeCourse
|
|
- : null
|
|
|
|
|
|
+ : null,
|
|
|
|
+ operatingTag: searchForm.operatingTag ? searchForm.operatingTag : null,
|
|
|
|
+ serviceTag: searchForm.serviceTag ? searchForm.serviceTag : null
|
|
};
|
|
};
|
|
const options = {
|
|
const options = {
|
|
method: "POST",
|
|
method: "POST",
|
|
@@ -431,43 +480,50 @@ export default {
|
|
responseType: "blob"
|
|
responseType: "blob"
|
|
};
|
|
};
|
|
|
|
|
|
- this.$confirm('确定导出学员名单?', '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning'
|
|
|
|
- }).then(() => {
|
|
|
|
- load.startLoading()
|
|
|
|
- axios(options).then(res => {
|
|
|
|
- let blob = new Blob([res.data], {
|
|
|
|
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
|
|
|
|
- type: 'application/vnd.ms-excel;charset=utf-8'
|
|
|
|
- // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
|
- })
|
|
|
|
- let text = (new Response(blob)).text()
|
|
|
|
- text.then(res => {
|
|
|
|
- // 判断是否报错
|
|
|
|
- if(res.indexOf('code') != -1) {
|
|
|
|
- let json = JSON.parse(res)
|
|
|
|
- this.$message.error(json.msg)
|
|
|
|
- } else {
|
|
|
|
- let objectUrl = URL.createObjectURL(blob)
|
|
|
|
- let link = document.createElement("a")
|
|
|
|
- let nowTime = new Date()
|
|
|
|
- let ymd = nowTime.getFullYear() + (nowTime.getMonth() + 1) + nowTime.getDate()
|
|
|
|
- let fname = `导出学员名单` + ymd //下载文件的名字
|
|
|
|
- link.href = objectUrl
|
|
|
|
- link.setAttribute("download", fname)
|
|
|
|
- document.body.appendChild(link)
|
|
|
|
- link.click()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- load.endLoading();
|
|
|
|
- }).catch(error => {
|
|
|
|
- this.$message.error('导出数据失败,请连接管理员');
|
|
|
|
- load.endLoading();
|
|
|
|
- })
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
|
+ this.$confirm("确定导出学员名单?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ load.startLoading();
|
|
|
|
+ axios(options)
|
|
|
|
+ .then(res => {
|
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
|
+ // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
|
|
|
|
+ type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
|
+ // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
|
+ });
|
|
|
|
+ let text = new Response(blob).text();
|
|
|
|
+ text.then(res => {
|
|
|
|
+ // 判断是否报错
|
|
|
|
+ if (res.indexOf("code") != -1) {
|
|
|
|
+ let json = JSON.parse(res);
|
|
|
|
+ this.$message.error(json.msg);
|
|
|
|
+ } else {
|
|
|
|
+ let objectUrl = URL.createObjectURL(blob);
|
|
|
|
+ let link = document.createElement("a");
|
|
|
|
+ let nowTime = new Date();
|
|
|
|
+ let ymd =
|
|
|
|
+ nowTime.getFullYear() +
|
|
|
|
+ (nowTime.getMonth() + 1) +
|
|
|
|
+ nowTime.getDate();
|
|
|
|
+ let fname = `导出学员名单` + ymd; //下载文件的名字
|
|
|
|
+ link.href = objectUrl;
|
|
|
|
+ link.setAttribute("download", fname);
|
|
|
|
+ document.body.appendChild(link);
|
|
|
|
+ link.click();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ load.endLoading();
|
|
|
|
+ })
|
|
|
|
+ .catch(error => {
|
|
|
|
+ this.$message.error("导出数据失败,请连接管理员");
|
|
|
|
+ load.endLoading();
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {});
|
|
},
|
|
},
|
|
checkPhone(val) {
|
|
checkPhone(val) {
|
|
var regu = /^1[3456789]\d{9}$/;
|
|
var regu = /^1[3456789]\d{9}$/;
|
|
@@ -500,7 +556,9 @@ export default {
|
|
realName: this.studentForm.parseName,
|
|
realName: this.studentForm.parseName,
|
|
birthdate: this.studentForm.date,
|
|
birthdate: this.studentForm.date,
|
|
organId: this.studentForm.organId,
|
|
organId: this.studentForm.organId,
|
|
- nation: this.studentForm.nation
|
|
|
|
|
|
+ nation: this.studentForm.nation,
|
|
|
|
+ serviceTag: this.studentForm.serviceTag,
|
|
|
|
+ operatingTag: this.studentForm.operatingTag
|
|
};
|
|
};
|
|
registerStudent(obj).then(res => {
|
|
registerStudent(obj).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -524,7 +582,9 @@ export default {
|
|
birthdate: this.studentForm.date,
|
|
birthdate: this.studentForm.date,
|
|
organId: this.studentForm.organId,
|
|
organId: this.studentForm.organId,
|
|
id: this.active.userId,
|
|
id: this.active.userId,
|
|
- nation: this.studentForm.nation
|
|
|
|
|
|
+ nation: this.studentForm.nation,
|
|
|
|
+ serviceTag: this.studentForm.serviceTag,
|
|
|
|
+ operatingTag: this.studentForm.operatingTag
|
|
};
|
|
};
|
|
updateStudent(obj).then(res => {
|
|
updateStudent(obj).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -553,7 +613,9 @@ export default {
|
|
parseName: row.realName,
|
|
parseName: row.realName,
|
|
date: row.birthdate,
|
|
date: row.birthdate,
|
|
organId: row.organId,
|
|
organId: row.organId,
|
|
- nation: row.nation
|
|
|
|
|
|
+ nation: row.nation,
|
|
|
|
+ serviceTag: row.serviceTag.toString(),
|
|
|
|
+ operatingTag: row.operatingTag.toString()
|
|
};
|
|
};
|
|
},
|
|
},
|
|
resetPassWrod(row) {
|
|
resetPassWrod(row) {
|
|
@@ -604,7 +666,9 @@ export default {
|
|
sex: "",
|
|
sex: "",
|
|
parseName: "",
|
|
parseName: "",
|
|
date: "",
|
|
date: "",
|
|
- nation: ""
|
|
|
|
|
|
+ nation: "",
|
|
|
|
+ serviceTag: null,
|
|
|
|
+ operatingTag: null
|
|
};
|
|
};
|
|
this.$refs["studentForm"].resetFields();
|
|
this.$refs["studentForm"].resetFields();
|
|
}
|
|
}
|
|
@@ -632,7 +696,7 @@ export default {
|
|
padding-bottom: 0;
|
|
padding-bottom: 0;
|
|
}
|
|
}
|
|
.multiple.el-select {
|
|
.multiple.el-select {
|
|
- width: 100% !important;
|
|
|
|
|
|
+ width: 185px !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|