| | |
| | | <el-form-item label="解析:" prop="analyze" required> |
| | | <el-input v-model="form.analyze" @focus="inputClick(form,'analyze')" /> |
| | | </el-form-item> |
| | | <el-form-item label="分数:" prop="score" required> |
| | | <!-- <el-form-item label="分数:" prop="score" required> |
| | | <el-input-number v-model="form.score" :precision="1" :step="1" :max="100"></el-input-number> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | <el-form-item label="难度:" required> |
| | | <el-rate v-model="form.difficult" class="question-item-rate"></el-rate> |
| | | </el-form-item> |
| | |
| | | <script> |
| | | import QuestionShow from '@/components/PopUp/question/Show' |
| | | import Ueditor from '@/components/Ueditor' |
| | | import { mapGetters, mapState, mapActions } from 'vuex' |
| | | import { mapActions } from 'vuex' |
| | | import questionApi from '@/api/question' |
| | | import subjectApi from '@/api/subject' |
| | | |
| | |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | let id = this.$route.query.id |
| | | props: { |
| | | id: { |
| | | type: Number, |
| | | default: 0 |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSubjects(); |
| | | let id = this.id |
| | | let _this = this |
| | | if (id && parseInt(id) !== 0) { |
| | | _this.formLoading = true |
| | | questionApi.select(id).then(re => { |
| | | _this.form = re.response |
| | | _this.form = re.data |
| | | _this.formLoading = false |
| | | }) |
| | | } |
| | |
| | | questionApi.edit(this.form).then(re => { |
| | | if (re.code === 1) { |
| | | _this.$message.success(re.message) |
| | | _this.delCurrentView(_this).then(() => { |
| | | _this.$router.push('/exam/question/list') |
| | | }) |
| | | this.$emit('callback') |
| | | } else { |
| | | _this.$message.error(re.message) |
| | | this.formLoading = false |