|
@@ -90,7 +90,12 @@
|
|
|
v-model="formData.companyName"
|
|
|
placeholder="所在公司"
|
|
|
@clear="search(3)"
|
|
|
- ><el-button @click="search(3)" slot="append" icon="el-icon-search"></el-button></el-input>
|
|
|
+ ><el-button
|
|
|
+ @click="search(3)"
|
|
|
+ slot="append"
|
|
|
+ icon="el-icon-search"
|
|
|
+ ></el-button
|
|
|
+ ></el-input>
|
|
|
<el-select
|
|
|
clearable
|
|
|
@change="search(3)"
|
|
@@ -113,16 +118,23 @@
|
|
|
<el-option label="是" :value="1"> </el-option>
|
|
|
<el-option label="否" :value="0"> </el-option>
|
|
|
</el-select>
|
|
|
- <el-button
|
|
|
- size="medium"
|
|
|
- @click="exportGrade"
|
|
|
- :loading="exportLoading"
|
|
|
- >导出学员数据</el-button>
|
|
|
+ <el-button size="medium" @click="exportGrade" :loading="exportLoading"
|
|
|
+ >导出学员数据</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
<template slot="btn" slot-scope="props">
|
|
|
<el-button type="text" @click="addClick(props.scope.row, 2)"
|
|
|
>学员详情</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ v-if="
|
|
|
+ props.scope.row.stuAllNum == 0 && props.scope.row.recordNum == 0
|
|
|
+ "
|
|
|
+ type="text"
|
|
|
+ style="color: red"
|
|
|
+ @click="changeClass(props.scope.row)"
|
|
|
+ >更换班级</el-button
|
|
|
+ >
|
|
|
<!-- <el-button type="text" @click="del(props.scope.row)">移除</el-button> -->
|
|
|
</template>
|
|
|
</table-list>
|
|
@@ -581,6 +593,11 @@
|
|
|
</el-dialog>
|
|
|
<account-tag ref="accountTag" @successFuncBack="successFuncBack" />
|
|
|
<quick-login ref="quickLogin" @backData="backData" />
|
|
|
+ <tab-class-dialog
|
|
|
+ :visible.sync="dialogVisibleClass"
|
|
|
+ :studentInfo="tabClassStudentInfo"
|
|
|
+ @search="search"
|
|
|
+ ></tab-class-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -589,10 +606,11 @@ import tableList from "@/components/tableList";
|
|
|
import pagination from "@/components/pagination";
|
|
|
import accountTag from "@/components/AccountTag";
|
|
|
import quickLogin from "@/components/quickLogin";
|
|
|
+import tabClassDialog from "./tabClassDialog.vue";
|
|
|
import * as baseUrls from "@/utils/request.js";
|
|
|
|
|
|
export default {
|
|
|
- components: { tableList, pagination, accountTag, quickLogin },
|
|
|
+ components: { tableList, pagination, accountTag, quickLogin, tabClassDialog },
|
|
|
data() {
|
|
|
return {
|
|
|
options: [
|
|
@@ -617,7 +635,7 @@ export default {
|
|
|
size: "medium",
|
|
|
active: 1,
|
|
|
loading: false, //当前表单加载是否加载动画
|
|
|
- exportLoading: false,//导出按钮
|
|
|
+ exportLoading: false, //导出按钮
|
|
|
navText: {
|
|
|
title: "班级人数:",
|
|
|
index: 0,
|
|
@@ -626,7 +644,7 @@ export default {
|
|
|
choice: true,
|
|
|
border: true,
|
|
|
addHide: true,
|
|
|
- rowKey:"id",
|
|
|
+ rowKey: "id",
|
|
|
gftsStatus: false,
|
|
|
gfUserStatus: false,
|
|
|
backFatherBtn: {
|
|
@@ -773,21 +791,21 @@ export default {
|
|
|
prop1: "useStudyCount",
|
|
|
prop2: "studyCount",
|
|
|
hidden: true,
|
|
|
- scope:"studyCount"
|
|
|
+ scope: "studyCount",
|
|
|
},
|
|
|
{
|
|
|
label: "考试机会",
|
|
|
prop1: "examNumber",
|
|
|
prop2: "expendNumber",
|
|
|
hidden: true,
|
|
|
- scope:"chance"
|
|
|
+ scope: "chance",
|
|
|
},
|
|
|
{
|
|
|
label: "前培机会",
|
|
|
prop1: "doNumber",
|
|
|
prop2: "expendBefore",
|
|
|
hidden: true,
|
|
|
- scope:"chance"
|
|
|
+ scope: "chance",
|
|
|
},
|
|
|
{
|
|
|
label: "复购-学时冲突",
|
|
@@ -806,6 +824,8 @@ export default {
|
|
|
dialogVisible: false,
|
|
|
dialogVisibleTable: false,
|
|
|
dialogVisibleStudent: false,
|
|
|
+ dialogVisibleClass: false,
|
|
|
+ tabClassStudentInfo: {},
|
|
|
allCheckList: [], //多选数组
|
|
|
stice: 0,
|
|
|
obtainGoods: {}, //选择班级头部商品数据
|
|
@@ -855,6 +875,10 @@ export default {
|
|
|
this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeClass(row) {
|
|
|
+ this.dialogVisibleClass = true;
|
|
|
+ this.tabClassStudentInfo = row;
|
|
|
+ },
|
|
|
/**
|
|
|
* 组件成功回调
|
|
|
*/
|
|
@@ -1172,22 +1196,23 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//导出学员数据
|
|
|
- exportGrade(){
|
|
|
- this.exportLoading = true
|
|
|
- let data = this.$refs.tableList.allCheckData
|
|
|
- if(data && data.length > 0){
|
|
|
- let idCards = data.map(x => x.idCard)
|
|
|
- this.formData.idCards = idCards
|
|
|
- console.log(idCards,'idCards');
|
|
|
- console.log(this.formData,'this.formData');
|
|
|
+ exportGrade() {
|
|
|
+ this.exportLoading = true;
|
|
|
+ let data = this.$refs.tableList.allCheckData;
|
|
|
+ if (data && data.length > 0) {
|
|
|
+ let idCards = data.map((x) => x.idCard);
|
|
|
+ this.formData.idCards = idCards;
|
|
|
+ console.log(idCards, "idCards");
|
|
|
+ console.log(this.formData, "this.formData");
|
|
|
}
|
|
|
- this.formData.gradeId = this.$route.query.id,
|
|
|
- this.formData.status = '0,1',
|
|
|
- this.$api
|
|
|
- .inquireGradegradeexportGrade(this.formData)
|
|
|
- .then((res) => {
|
|
|
+ (this.formData.gradeId = this.$route.query.id),
|
|
|
+ (this.formData.status = "0,1"),
|
|
|
+ this.$api
|
|
|
+ .inquireGradegradeexportGrade(this.formData)
|
|
|
+ .then((res) => {
|
|
|
if (res.msg) {
|
|
|
- let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
|
|
|
+ let url =
|
|
|
+ baseUrls.baseURL + "common/download?fileName=" + res.msg;
|
|
|
let link = document.createElement("a");
|
|
|
let fileName = "班级学员数据" + ".xlsx";
|
|
|
document.body.appendChild(link);
|
|
@@ -1199,9 +1224,10 @@ export default {
|
|
|
} else {
|
|
|
this.$message.error("导出失败");
|
|
|
}
|
|
|
- }).finally(() => {
|
|
|
- this.exportLoading = false
|
|
|
- })
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.exportLoading = false;
|
|
|
+ });
|
|
|
},
|
|
|
search(int) {
|
|
|
this.loading = true;
|