| | |
| | | mathList: query => post('/api/admin/exam/count/sourceList', query), |
| | | uploadEnrolmentsa: query => down('/api/admin/exam/count/exportTemplatesSheet/'+query), |
| | | selectStudent: query => post('/api/admin/exam/paper/selectStudent', query), |
| | | getConfig: query => get('/api/admin/exam/templates/getConfig'), |
| | | setConfig: query => post('/api/admin/exam/templates/setConfig', query), |
| | | } |
| | |
| | | meta: { title: '随机试卷', noCache: true } |
| | | }, |
| | | { |
| | | path: 'personalRandomTemplate/config', |
| | | component: () => import('@/views/exam/personalRandomTemplate/config'), |
| | | name: 'personalSimulationConfig', |
| | | meta: { title: '随机试卷配置', noCache: true } |
| | | }, |
| | | { |
| | | path: 'personalRandomTemplate/edit', |
| | | component: () => import('@/views/exam/personalRandomTemplate/edit'), |
| | | name: 'personalSimulationEdit', |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="form" ref="form" label-width="100px"> |
| | | <el-form-item label="单选题" prop="radioNum" :rules="[ |
| | | { required: true, message: '单选题不能为空' }, |
| | | { type: 'number', message: '单选题必须为数字值' } |
| | | ]"> |
| | | <el-input v-model.number="form.radioNum" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="多选题" prop="checkNum" :rules="[ |
| | | { required: true, message: '多选题不能为空' }, |
| | | { type: 'number', message: '多选题必须为数字值' } |
| | | ]"> |
| | | <el-input v-model.number="form.checkNum" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="判断题" prop="judgingNum" :rules="[ |
| | | { required: true, message: '判断题不能为空' }, |
| | | { type: 'number', message: '判断题必须为数字值' } |
| | | ]"> |
| | | <el-input v-model.number="form.judgingNum" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="submitForm('form')">提交</el-button> |
| | | <el-button @click="resetForm('form')">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import examPaperApi from '@/api/examPaper' |
| | | |
| | | export default { |
| | | components: { Pagination }, |
| | | data() { |
| | | return { |
| | | form: { |
| | | radioNum: '', |
| | | checkNum: '', |
| | | judgingNum: '' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | examPaperApi.getConfig('').then(res => { |
| | | if (res.response) this.form = res.response; |
| | | }) |
| | | }, |
| | | methods: { |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | examPaperApi.setConfig(this.form).then(res => { |
| | | if (res.code === 1) { |
| | | this.$message.success('操作成功') |
| | | } else { |
| | | this.$message.error(res.message) |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item :key="item.subjectId" :label="item.label" required v-for="(item, key) in form.questionTypeVMS" |
| | | <!-- <el-form-item :key="item.subjectId" :label="item.label" required v-for="(item, key) in form.questionTypeVMS" |
| | | v-if="form.paperType == 7"> |
| | | <el-row> |
| | | <el-col :span="3"> |
| | |
| | | <el-input v-model="form.questionTypeVMS[key].trueFalse" style="width: 80%" /> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item label="总数分:" v-if="form.paperType==7" prop="name" required>--> |
| | | <!-- <el-input v-model="form.name"/>--> |
| | | <!-- </el-form-item>--> |