| | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item :key="key" :label="titlejs(key)" required v-for="(value,key,index) in form.subjectSource" v-if="form.paperType ==7"> |
| | | <el-form-item :key="item.subjectId" :label="item.label" required v-for="(item,key,index) in form.questionTypeVMS" v-if="form.paperType ==7"> |
| | | <el-row > |
| | | <el-col :span="3" > |
| | | <span>题目数量:</span> |
| | | <span>多选题:</span> |
| | | |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <el-input v-model="form.subjectSource[key]" style="width: 80%"/> |
| | | <el-col :span="3"> |
| | | <el-input v-model="form.questionTypeVMS[key].multipleChoice" style="width: 80%"/> |
| | | </el-col> |
| | | <el-col :span="3" > |
| | | <span>单选题:</span> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-input v-model="form.questionTypeVMS[key].singleChoice" style="width: 80%"/> |
| | | </el-col> |
| | | <el-col :span="3" > |
| | | <span>判断题:</span> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-input v-model="form.questionTypeVMS[key].trueFalse" style="width: 80%"/> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | |
| | | name: '', |
| | | suggestTime: null, |
| | | titleItems: [], |
| | | subjectSource:{} |
| | | subjectSource:{}, |
| | | questionTypeVMS:[] |
| | | }, |
| | | subjectFilter: null, |
| | | formLoading: false, |
| | |
| | | this.$refs.subjectIdRef.selected.forEach(item=>{ |
| | | arr.push({ |
| | | label:item.label, |
| | | id:item.value |
| | | subjectId:item.value, |
| | | singleChoice:'', |
| | | multipleChoice:'', |
| | | trueFalse:'' |
| | | }) |
| | | }) |
| | | console.log(arr) |
| | | this.form.questionTypeVMS = arr |
| | | } |
| | | |
| | | if (this.form.paperType ==7){ |
| | | //說明是隨機 |
| | | this.subjectIdList = arr |
| | | let obj1={} |
| | | let arr1 = [] |
| | | arr.forEach((item,index)=>{ |
| | | obj1[item.id]='' |
| | | |
| | | // obj1[item.id]='' |
| | | arr1.push({ |
| | | subjectId:item.id, |
| | | singleChoice:'', |
| | | multipleChoice:'', |
| | | trueFalse:'' |
| | | }) |
| | | // let obj={ |
| | | // item |
| | | // } |
| | |
| | | // } |
| | | }) |
| | | this.form.subjectSource = obj1 |
| | | |
| | | console.log(this.form.subjectSource) |
| | | console.log(this.form.questionTypeVMS) |
| | | // this.form.paperType = 7 |
| | | this.form.titleItems = [] |
| | | }else { |