|
@@ -3,15 +3,15 @@
|
|
<list-frame title="学生成绩查看" @query="onsearch" :total="total" :needFilter="false" :needAdd="false">
|
|
<list-frame title="学生成绩查看" @query="onsearch" :total="total" :needFilter="false" :needAdd="false">
|
|
<el-form :inline="true" size="mini">
|
|
<el-form :inline="true" size="mini">
|
|
<el-form-item label="期">
|
|
<el-form-item label="期">
|
|
- <el-select v-model="form.termid" placeholder="请选择期数" @change="getBatch">
|
|
|
|
|
|
+ <el-select v-model="form.termid" placeholder="请选择期数" @change="getClasses">
|
|
<el-option v-for="(i, index) in termList" :key="index" :label="`第${i.term}期`" :value="i._id"></el-option>
|
|
<el-option v-for="(i, index) in termList" :key="index" :label="`第${i.term}期`" :value="i._id"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="批次">
|
|
|
|
|
|
+ <!-- <el-form-item label="批次">
|
|
<el-select v-model="form.batchid" placeholder="请先选择期数" @change="getClasses">
|
|
<el-select v-model="form.batchid" placeholder="请先选择期数" @change="getClasses">
|
|
<el-option v-for="(i, index) in batchList" :key="index" :label="i.name" :value="i._id"></el-option>
|
|
<el-option v-for="(i, index) in batchList" :key="index" :label="i.name" :value="i._id"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- </el-form-item>
|
|
|
|
|
|
+ </el-form-item> -->
|
|
<el-form-item label="班级">
|
|
<el-form-item label="班级">
|
|
<el-select v-model="form.classid" placeholder="请先选择批次">
|
|
<el-select v-model="form.classid" placeholder="请先选择批次">
|
|
<el-option v-for="(i, index) in classList" :key="index" :label="i.name" :value="i._id"></el-option>
|
|
<el-option v-for="(i, index) in classList" :key="index" :label="i.name" :value="i._id"></el-option>
|
|
@@ -88,20 +88,17 @@ export default {
|
|
this.$set(this, `termList`, terms);
|
|
this.$set(this, `termList`, terms);
|
|
if (this.defaultOption.termid) {
|
|
if (this.defaultOption.termid) {
|
|
this.form.termid = this.defaultOption.termid;
|
|
this.form.termid = this.defaultOption.termid;
|
|
- this.getBatch(this.form.termid);
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- getBatch(termid) {
|
|
|
|
- let batchs = this.termList.filter(f => f._id === termid);
|
|
|
|
- if (batchs.length > 0) {
|
|
|
|
- let { batchnum } = batchs[0];
|
|
|
|
- this.$set(this, `batchList`, batchnum);
|
|
|
|
|
|
+ this.getClasses(this.form.termid);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async getClasses(batchid) {
|
|
|
|
- const res = await this.classesquery({ batchid });
|
|
|
|
|
|
+ async getClasses(termid) {
|
|
|
|
+ const res = await this.classesquery({ termid });
|
|
this.$set(this, `classList`, res.data);
|
|
this.$set(this, `classList`, res.data);
|
|
},
|
|
},
|
|
|
|
+ // async getClasses(batchid) {
|
|
|
|
+ // const res = await this.classesquery({ batchid });
|
|
|
|
+ // this.$set(this, `classList`, res.data);
|
|
|
|
+ // },
|
|
async onsearch({ skip = 0, limit = 10, ...info } = {}) {
|
|
async onsearch({ skip = 0, limit = 10, ...info } = {}) {
|
|
const res = await this.findscore({ skip, limit, termid: this.form.termid, classid: this.form.classid, ...info });
|
|
const res = await this.findscore({ skip, limit, termid: this.form.termid, classid: this.form.classid, ...info });
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|