|
@@ -108,14 +108,24 @@ export default {
|
|
async getClasses(termid) {
|
|
async getClasses(termid) {
|
|
const res = await this.classesquery({ termid });
|
|
const res = await this.classesquery({ termid });
|
|
var arr = res.data.filter(item => item.type != '0');
|
|
var arr = res.data.filter(item => item.type != '0');
|
|
- this.$set(this, `classList`, arr);
|
|
|
|
|
|
+ var newData = arr.filter(item => {
|
|
|
|
+ return this.classTypeList.find(i => i.sign == '1' && i.code == item.type);
|
|
|
|
+ });
|
|
|
|
+ this.$set(this, `classList`, newData);
|
|
},
|
|
},
|
|
async onsearch({ skip = 0, limit = 10, ...info } = {}) {
|
|
async onsearch({ skip = 0, limit = 10, ...info } = {}) {
|
|
- const res = await this.stuquery({ termid: this.form.termid, classid: this.form.classid, ...info });
|
|
|
|
- if (this.$checkRes(res)) {
|
|
|
|
- this.$set(this, `list`, res.data);
|
|
|
|
|
|
+ if (this.form.termid && this.form.classid) {
|
|
|
|
+ const res = await this.stuquery({ termid: this.form.termid, classid: this.form.classid, ...info });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
|
+ }
|
|
|
|
+ this.checkSign();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请选择班级',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- this.checkSign();
|
|
|
|
},
|
|
},
|
|
async checkSign() {
|
|
async checkSign() {
|
|
const res = await this.query({ termid: this.form.termid, classid: this.form.classid });
|
|
const res = await this.query({ termid: this.form.termid, classid: this.form.classid });
|