|
@@ -261,6 +261,7 @@
|
|
|
remote
|
|
|
reserve-keyword
|
|
|
filterable
|
|
|
+ :disabled="!leftForm.classOrganId"
|
|
|
:remote-method="remoteMethod"
|
|
|
:loading="remoteLoading"
|
|
|
>
|
|
@@ -1200,11 +1201,13 @@ export default {
|
|
|
this.rightForm.offlineCourse = "";
|
|
|
this.rightForm.onlineCourse = "";
|
|
|
this.leftForm.courseType = "";
|
|
|
- getTeachSchool({ userId: val }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.scetionList = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ if(val) {
|
|
|
+ getTeachSchool({ userId: val }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.scetionList = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
for (let i in this.teacherList) {
|
|
|
if (this.teacherList[i].id == val) {
|
|
|
// 根据分部id去获取课程形式
|
|
@@ -1223,6 +1226,8 @@ export default {
|
|
|
const leftForm = this.leftForm
|
|
|
let teacher = leftForm.teacher ? leftForm.teacher : null
|
|
|
let educationalTeacherId = leftForm.educationalTeacherId ? leftForm.educationalTeacherId : null
|
|
|
+ leftForm.classOrganId = null // 重置课程分部数据
|
|
|
+ this.classOrganList = []
|
|
|
if(!teacher || !educationalTeacherId) { // 如果没有选择指导老师和教务老师则不请求
|
|
|
return
|
|
|
}
|
|
@@ -1301,7 +1306,7 @@ export default {
|
|
|
if (query !== "") {
|
|
|
this.remoteLoading = true;
|
|
|
// 发请求搜索
|
|
|
- const url = "/api-web/studentManage/queryStudentList"
|
|
|
+ const url = "/api-web/studentManage/queryOrganStudentList"
|
|
|
const options = {
|
|
|
method: "get",
|
|
|
headers: {
|
|
@@ -1309,20 +1314,18 @@ export default {
|
|
|
},
|
|
|
params: {
|
|
|
rows: 100,
|
|
|
- search: query
|
|
|
+ search: query,
|
|
|
+ organId: this.leftForm.classOrganId
|
|
|
},
|
|
|
url
|
|
|
}
|
|
|
this.remoteLoading = true
|
|
|
axios(options).then(res => {
|
|
|
this.remoteLoading = false
|
|
|
- console.log(res)
|
|
|
let result = res.data
|
|
|
if (result.code == 200) {
|
|
|
this.studentList = this.studentList.concat(result.data.rows);
|
|
|
- // this.studentList = res.data.rows;
|
|
|
this.unique(this.studentList, "userId");
|
|
|
- // console.log(this.studentList)
|
|
|
}
|
|
|
})
|
|
|
// queryStudentList({ rows: 100, search: query }).then(res => {
|