| | |
| | | <el-input style="width: 300px" v-model="form.name"/> |
| | | </el-form-item> |
| | | <el-form-item :key="index" :label="'标题'+(index+1)+':'" required |
| | | v-for="(titleItem,index) in form.questionTitleList" v-show="form.paperType===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%"/> |
| | | <el-select @change="addQuestionType" v-model="titleItem.questionType" style="margin-left: 20px" |
| | | placeholder="请选择题目类型"> |
| | |
| | | :controls="false" @change="updateTotalScore"/> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-button type="text" size="mini" @click="removeQuestion(titleItem,questionItem)">删除 |
| | | <el-button type="text" size="mini" @click="removeQuestion(titleItem,questionIndex)">删除 |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-radio v-model="form.visibility" :label="'1'">私有</el-radio> |
| | | <el-radio v-model="form.visibility" :label="'2'">公开</el-radio> |
| | | </el-form-item> |
| | | <el-form-item v-show="form.paperType ===2 ||form.paperType ===3" :key="index" |
| | | <el-form-item v-show="form.paperType ===2 || (form.paperType ===3 && !form.id)" :key="index" |
| | | :label="translateQuestionType(item.questionType)+':'" v-for="(item,index) in form.questionSetting"> |
| | | <div style="display: flex;"> |
| | | <span style="margin-right: 10px">{{ '标题' }}</span> |
| | |
| | | <div style="display: flex;"> |
| | | <span style="margin-right: 10px">{{ '数量:' }}</span> |
| | | <span v-if ="form.paperType ===2 || (form.paperType ===3 && !form.id)" style="margin-right: 50px;width: 100px">{{ totalNum }}</span> |
| | | <span v-if ="form.paperType ===1" style="margin-right: 50px;width: 100px">{{ form.num }}</span> |
| | | <span v-if ="form.paperType ===1 || (form.paperType ===3 && form.id)" style="margin-right: 50px;width: 100px">{{ form.num }}</span> |
| | | <span style="margin-right: 10px">{{ '总分:' }}</span> |
| | | <span v-if ="form.paperType ===2 || (form.paperType ===3 && !form.id)" style="width: 100px">{{ totalScore }}</span> |
| | | <span v-if ="form.paperType ===1" style="width: 100px">{{ form.score }}</span> |
| | | <span v-if ="form.paperType ===1 || (form.paperType ===3 && form.id)" style="width: 100px">{{ form.score }}</span> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="submitForm">提交</el-button> |
| | | <el-button @click="resetForm">重置</el-button> |
| | | <el-button type="success" @click="addTitle" v-show="form.paperType ===1">添加标题</el-button> |
| | | <el-button type="success" @click="addTitle" v-show="form.paperType ===1 ||(form.paperType ===3 && form.id)">添加标题</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | |
| | | { questionType: 3, title: '判断题', score: null, num: null }, |
| | | { questionType: 4, title: '填空题', score: null, num: null }, |
| | | { questionType: 5, title: '简答题', score: null, num: null }, |
| | | { questionType: 6, title: '计算题', score: null, num: null }, |
| | | { questionType: 6, title: '语音题', score: null, num: null }, |
| | | { questionType: 7, title: '计算题', score: null, num: null }, |
| | | { questionType: 8, title: '分析题', score: null, num: null }, |
| | | ], |
| | | questionTitleList: [] |
| | | } |