|
@@ -262,6 +262,7 @@
|
|
|
reserve-keyword
|
|
|
filterable
|
|
|
:remote-method="remoteMethod"
|
|
|
+ :loading="remoteLoading"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item,index) in studentList"
|
|
@@ -370,6 +371,8 @@ import {
|
|
|
} from "@/api/vipSeting";
|
|
|
import { getTeachSchool, getTeacherBySubject } from "@/api/teacherManager";
|
|
|
import { queryStudentList } from "@/api/studentManager";
|
|
|
+import axios from "axios";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
export default {
|
|
|
name: "buildVip",
|
|
|
data() {
|
|
@@ -415,6 +418,7 @@ export default {
|
|
|
allPrice: "",
|
|
|
students: []
|
|
|
},
|
|
|
+ remoteLoading: false,
|
|
|
computationalBtn: false,
|
|
|
subjectList: [], // 科目列表
|
|
|
teacherList: [], // 老师列表
|
|
@@ -1295,17 +1299,39 @@ export default {
|
|
|
},
|
|
|
remoteMethod(query) {
|
|
|
if (query !== "") {
|
|
|
- // this.loading = true;
|
|
|
+ this.remoteLoading = true;
|
|
|
// 发请求搜索
|
|
|
- queryStudentList({ rows: 100, search: query }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- // this.loading = false;
|
|
|
- this.studentList = this.studentList.concat(res.data.rows);
|
|
|
+ const url = "/api-web/studentManage/queryStudentList"
|
|
|
+ const options = {
|
|
|
+ method: "get",
|
|
|
+ headers: {
|
|
|
+ Authorization: getToken()
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ rows: 100,
|
|
|
+ search: query
|
|
|
+ },
|
|
|
+ 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 => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.remoteLoading = false;
|
|
|
+ // this.studentList = this.studentList.concat(res.data.rows);
|
|
|
+ // this.unique(this.studentList, "userId");
|
|
|
+ // }
|
|
|
+ // });
|
|
|
}
|
|
|
},
|
|
|
unique(arr, u_key) {
|