|
@@ -9,7 +9,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="期(可选)" v-if="useterm">
|
|
|
- <el-select clearable v-model="form.termid" @change="selectTerm">
|
|
|
+ <el-select clearable v-model="form.termid" multiple @change="selectTerm">
|
|
|
<el-option v-for="(i, index) in termList" :key="index" :label="`第${i.term}期`" :value="i._id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -86,7 +86,13 @@ export default {
|
|
|
this.$set(this, `termList`, termnum);
|
|
|
},
|
|
|
// 找到批次列表,查询班级列表
|
|
|
- async selectTerm(termid) {
|
|
|
+ async selectTerm(termids = []) {
|
|
|
+ if (termids.length != 1) {
|
|
|
+ this.$set(this.form, `classid`, undefined);
|
|
|
+ this.$set(this.form, `batchid`, undefined);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const termid = _.head(termids);
|
|
|
const r = this.termList.find(f => f._id === termid);
|
|
|
if (!r) return;
|
|
|
const { batchnum } = r;
|