|
@@ -212,6 +212,7 @@
|
|
filterable
|
|
filterable
|
|
clearable
|
|
clearable
|
|
placeholder="请选择分部"
|
|
placeholder="请选择分部"
|
|
|
|
+ @change="changeStudentOrgan"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="(item,index) in organList"
|
|
v-for="(item,index) in organList"
|
|
@@ -249,10 +250,10 @@
|
|
<el-option value="0" label="否"></el-option>
|
|
<el-option value="0" label="否"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="指导老师" prop="teacherId">
|
|
|
|
|
|
+ <el-form-item label="指导老师" prop="teacherId">
|
|
<el-select class="multiple" v-model.trim="studentForm.teacherId" clearable filterable>
|
|
<el-select class="multiple" v-model.trim="studentForm.teacherId" clearable filterable>
|
|
<el-option
|
|
<el-option
|
|
- v-for="(item,index) in teacherList"
|
|
|
|
|
|
+ v-for="(item,index) in maskTeacherList"
|
|
:label="item.realName"
|
|
:label="item.realName"
|
|
:value="item.id"
|
|
:value="item.id"
|
|
:key="index"
|
|
:key="index"
|
|
@@ -336,7 +337,7 @@ import {
|
|
studentHasCourse
|
|
studentHasCourse
|
|
} from "@/api/studentManager";
|
|
} from "@/api/studentManager";
|
|
import { vaildStudentUrl } from "@/utils/validate";
|
|
import { vaildStudentUrl } from "@/utils/validate";
|
|
-import { getEmployeeOrgan, resetPassword2,getTeacher } from "@/api/buildTeam";
|
|
|
|
|
|
+import { getEmployeeOrgan, resetPassword2, getTeacher } from "@/api/buildTeam";
|
|
import QRCode from "qrcodejs2";
|
|
import QRCode from "qrcodejs2";
|
|
import store from "@/store";
|
|
import store from "@/store";
|
|
import axios from "axios";
|
|
import axios from "axios";
|
|
@@ -360,12 +361,13 @@ export default {
|
|
hasPracticeCourse: null,
|
|
hasPracticeCourse: null,
|
|
operatingTag: null,
|
|
operatingTag: null,
|
|
serviceTag: null,
|
|
serviceTag: null,
|
|
- teacherId:null
|
|
|
|
|
|
+ teacherId: null
|
|
},
|
|
},
|
|
searchList: [],
|
|
searchList: [],
|
|
tableList: [],
|
|
tableList: [],
|
|
organList: [],
|
|
organList: [],
|
|
- teacherList:[],
|
|
|
|
|
|
+ teacherList: [],
|
|
|
|
+ maskTeacherList:[],
|
|
pageInfo: {
|
|
pageInfo: {
|
|
// 分页规则
|
|
// 分页规则
|
|
limit: 10, // 限制显示条数
|
|
limit: 10, // 限制显示条数
|
|
@@ -383,7 +385,7 @@ export default {
|
|
nation: "",
|
|
nation: "",
|
|
serviceTag: null,
|
|
serviceTag: null,
|
|
operatingTag: null,
|
|
operatingTag: null,
|
|
- teacherId:null
|
|
|
|
|
|
+ teacherId: null
|
|
},
|
|
},
|
|
studentRules: {
|
|
studentRules: {
|
|
name: [{ required: true, message: "请输入学生姓名" }],
|
|
name: [{ required: true, message: "请输入学生姓名" }],
|
|
@@ -393,7 +395,7 @@ export default {
|
|
nation: [{ required: true, message: "请输入名族" }],
|
|
nation: [{ required: true, message: "请输入名族" }],
|
|
serviceTag: [{ required: true, message: "请选择是否参与服务" }],
|
|
serviceTag: [{ required: true, message: "请选择是否参与服务" }],
|
|
operatingTag: [{ required: true, message: "请选择是否参与运营" }],
|
|
operatingTag: [{ required: true, message: "请选择是否参与运营" }],
|
|
- teacherId: [{ required: true, message: "请选择指导老师" }],
|
|
|
|
|
|
+ teacherId: [{ required: true, message: "请选择指导老师" }]
|
|
},
|
|
},
|
|
isNew: false,
|
|
isNew: false,
|
|
active: null,
|
|
active: null,
|
|
@@ -426,7 +428,7 @@ export default {
|
|
this.organList = res.data;
|
|
this.organList = res.data;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- getTeacher().then(res => {
|
|
|
|
|
|
+ getTeacher().then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.teacherList = res.data;
|
|
this.teacherList = res.data;
|
|
}
|
|
}
|
|
@@ -484,7 +486,7 @@ export default {
|
|
hasPracticeCourse: null,
|
|
hasPracticeCourse: null,
|
|
operatingTag: null,
|
|
operatingTag: null,
|
|
serviceTag: null,
|
|
serviceTag: null,
|
|
- teacherId:null,
|
|
|
|
|
|
+ teacherId: null
|
|
};
|
|
};
|
|
},
|
|
},
|
|
downLoadStudent() {
|
|
downLoadStudent() {
|
|
@@ -501,7 +503,7 @@ export default {
|
|
: null,
|
|
: null,
|
|
operatingTag: searchForm.operatingTag ? searchForm.operatingTag : null,
|
|
operatingTag: searchForm.operatingTag ? searchForm.operatingTag : null,
|
|
serviceTag: searchForm.serviceTag ? searchForm.serviceTag : null,
|
|
serviceTag: searchForm.serviceTag ? searchForm.serviceTag : null,
|
|
- teacherId:searchForm.teacherId ? searchForm.teacherId:null
|
|
|
|
|
|
+ teacherId: searchForm.teacherId ? searchForm.teacherId : null
|
|
};
|
|
};
|
|
const options = {
|
|
const options = {
|
|
method: "POST",
|
|
method: "POST",
|
|
@@ -592,7 +594,7 @@ export default {
|
|
nation: this.studentForm.nation,
|
|
nation: this.studentForm.nation,
|
|
serviceTag: this.studentForm.serviceTag,
|
|
serviceTag: this.studentForm.serviceTag,
|
|
operatingTag: this.studentForm.operatingTag,
|
|
operatingTag: this.studentForm.operatingTag,
|
|
- teacherId:this.studentForm.teacherId
|
|
|
|
|
|
+ teacherId: this.studentForm.teacherId
|
|
};
|
|
};
|
|
registerStudent(obj).then(res => {
|
|
registerStudent(obj).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -619,7 +621,7 @@ export default {
|
|
nation: this.studentForm.nation,
|
|
nation: this.studentForm.nation,
|
|
serviceTag: this.studentForm.serviceTag,
|
|
serviceTag: this.studentForm.serviceTag,
|
|
operatingTag: this.studentForm.operatingTag,
|
|
operatingTag: this.studentForm.operatingTag,
|
|
- teacherId:this.studentForm.teacherId
|
|
|
|
|
|
+ teacherId: this.studentForm.teacherId
|
|
};
|
|
};
|
|
updateStudent(obj).then(res => {
|
|
updateStudent(obj).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -632,28 +634,39 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
addStudent() {
|
|
addStudent() {
|
|
- this.isNew = true;
|
|
|
|
- this.studentVisible = true;
|
|
|
|
- this.maskName = "新增学员";
|
|
|
|
|
|
+ getTeacher().then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.maskTeacherList = res.data;
|
|
|
|
+ this.isNew = true;
|
|
|
|
+ this.studentVisible = true;
|
|
|
|
+ this.maskName = "新增学员";
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
resetStudent(row) {
|
|
resetStudent(row) {
|
|
- this.isNew = false;
|
|
|
|
- this.active = row;
|
|
|
|
- this.studentVisible = true;
|
|
|
|
- this.maskName = "修改学员";
|
|
|
|
-
|
|
|
|
- this.studentForm = {
|
|
|
|
- phone: row.parentsPhone,
|
|
|
|
- name: row.username,
|
|
|
|
- sex: row.gender,
|
|
|
|
- parseName: row.realName,
|
|
|
|
- date: row.birthdate,
|
|
|
|
- organId: row.organId,
|
|
|
|
- nation: row.nation,
|
|
|
|
- serviceTag: row.serviceTag+'',
|
|
|
|
- operatingTag: row.operatingTag+'',
|
|
|
|
- teacherId:row.teacherId
|
|
|
|
- };
|
|
|
|
|
|
+ let organId = row.organId;
|
|
|
|
+ getTeacher({ organId }).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.maskTeacherList = res.data;
|
|
|
|
+ this.isNew = false;
|
|
|
|
+ this.active = row;
|
|
|
|
+ this.studentVisible = true;
|
|
|
|
+ this.maskName = "修改学员";
|
|
|
|
+
|
|
|
|
+ this.studentForm = {
|
|
|
|
+ phone: row.parentsPhone,
|
|
|
|
+ name: row.username,
|
|
|
|
+ sex: row.gender,
|
|
|
|
+ parseName: row.realName,
|
|
|
|
+ date: row.birthdate,
|
|
|
|
+ organId: row.organId,
|
|
|
|
+ nation: row.nation,
|
|
|
|
+ serviceTag: row.serviceTag + "",
|
|
|
|
+ operatingTag: row.operatingTag + "",
|
|
|
|
+ teacherId: row.teacherId
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
resetPassWrod(row) {
|
|
resetPassWrod(row) {
|
|
this.activatedRow = row;
|
|
this.activatedRow = row;
|
|
@@ -691,6 +704,13 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ },
|
|
|
|
+ changeStudentOrgan(val){
|
|
|
|
+ getTeacher({organId:val}).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.maskTeacherList = res.data;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -706,7 +726,7 @@ export default {
|
|
nation: "",
|
|
nation: "",
|
|
serviceTag: null,
|
|
serviceTag: null,
|
|
operatingTag: null,
|
|
operatingTag: null,
|
|
- teacherId:null
|
|
|
|
|
|
+ teacherId: null
|
|
};
|
|
};
|
|
this.$refs["studentForm"].resetFields();
|
|
this.$refs["studentForm"].resetFields();
|
|
}
|
|
}
|