| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="form" ref="form" label-width="150px" v-loading="formLoading" :rules="rules"> |
| | | <el-form-item label="试卷类型:" prop="paperType" required> |
| | | <el-form-item label="试卷类型:" prop="paperType"> |
| | | <el-select v-model="form.paperType" placeholder="试卷类型"> |
| | | <el-option v-for="item in paperTypeEnum" :key="item.key" :value="item.key" :label="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="试卷名称:" prop="name" required> |
| | | <el-form-item label="试卷名称:" prop="name"> |
| | | <el-input style="width: 300px" v-model="form.name"/> |
| | | </el-form-item> |
| | | <!-- 题目详细信息 --> |
| | | <el-form-item :key="index" :label="'标题'+(index+1)+':'" required |
| | | <el-form-item :key="index" :label="'标题'+(index+1)+':'" |
| | | v-for="(titleItem,index) in form.questionTitleList" |
| | | v-show="form.paperType===1 || (form.paperType ===3 && form.id)"> |
| | | <el-input v-model="titleItem.title" style="width: 50%"/> |
| | |
| | | v-show="form.deductType === 2 || form.deductType === 3" :min="0"/> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="建议时长(分钟):" prop="suggestTime" required> |
| | | <el-form-item label="建议时长(分钟):" prop="suggestTime"> |
| | | <el-input-number v-model="form.suggestTime" placeholder="分钟" :min="0"/> |
| | | </el-form-item> |
| | | <el-form-item label="权限:" prop="visibility"> |
| | |
| | | <span style="margin-right: 10px;">{{ '难度' }}</span> |
| | | <el-rate v-model="setting.difficult" :precision="0" :min="0" style="margin-right: 25px;padding: 5px 0"/> |
| | | <span style="margin-right: 10px">{{ '科目' }}</span> |
| | | <el-select v-model="setting.subjectId" placeholder="学科" style="margin-right: 25px"> |
| | | <el-select v-model="setting.subjectId" placeholder="学科" clearable style="margin-right: 25px"> |
| | | <el-option v-for="item in subjects" :key="item.id" :label="item.name" :value="item.id"/> |
| | | </el-select> |
| | | <span style="margin-right: 10px">{{ '数量' }}</span> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-dialog :visible.sync="questionPage.showDialog" width="70%"> |
| | | <el-dialog :visible.sync="questionPage.showDialog" width="70%" :close-on-click-modal="false"> |
| | | <el-form :model="questionPage.queryParam" ref="queryForm" :inline="true"> |
| | | <el-form-item label="ID:"> |
| | | <el-input v-model="questionPage.queryParam.id" clearable></el-input> |
| | | <el-form-item label="题干:"> |
| | | <el-input v-model="questionPage.queryParam.content" @input="queryForm"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="学科:"> |
| | | <el-select v-model="questionPage.queryParam.subjectIdInt" placeholder="学科"> |
| | | <el-select v-model="questionPage.queryParam.subjectIdInt" placeholder="学科" @change="queryForm" clearable> |
| | | <el-option v-for="item in subjects" :key="item.id" :label="item.name" :value="item.id"/> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | addQuestion (titleItem) { |
| | | this.currentTitleItem = titleItem |
| | | this.questionPage.queryParam.questionType = [] |
| | | this.questionPage.queryParam.status = 1 |
| | | if (!titleItem.questionType) { |
| | | this.$message({ |
| | | message: '请先选择题型', |
| | |
| | | }, |
| | | queryForm () { |
| | | this.questionPage.queryParam.pageIndex = 1 |
| | | this.questionPage.queryParam.subjectId = [this.questionPage.queryParam.subjectIdInt] |
| | | this.search() |
| | | if (!this.questionPage.queryParam.subjectIdInt){ |
| | | this.search() |
| | | }else{ |
| | | this.questionPage.queryParam.subjectId = [this.questionPage.queryParam.subjectIdInt] |
| | | this.search() |
| | | } |
| | | }, |
| | | confirmQuestionSelect () { |
| | | let _this = this |