| | |
| | | <div class="app-container"> |
| | | |
| | | <el-form :model="form" ref="form" label-width="100px" v-loading="formLoading" :rules="rules"> |
| | | <el-form-item label="排序:" prop="sequence"> |
| | | <el-input v-model="form.sequence"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="问题:" prop="question"> |
| | | <el-input v-model="form.question" maxlength="48"></el-input> |
| | | </el-form-item> |
| | |
| | | belongType: 2, |
| | | contentUrl: [], |
| | | attachment: '', |
| | | temp: [] |
| | | temp: [], |
| | | sequence: '' |
| | | }, |
| | | formLoading: false, |
| | | rules: { |
| | |
| | | ], |
| | | answer: [ |
| | | { required: true, message: '请输入答案', trigger: 'blur' } |
| | | ], |
| | | sequence: [ |
| | | { required: true, message: '请输入排序', trigger: 'blur' } |
| | | ] |
| | | } |
| | | } |
| | |
| | | _this.form.id = re.response.id |
| | | _this.form.question = re.response.question |
| | | _this.form.answer = re.response.answer |
| | | _this.form.sequence = re.response.sequence |
| | | _this.form.attachment = re.response.attachment ? re.response.attachment : '' |
| | | _this.form.contentUrl = re.response.attachment ? JSON.parse(re.response.attachment) : [] |
| | | _this.formLoading = false |
| | | }) |
| | | } else { |
| | | questionAnswerApi.getLastSequence().then(re => { |
| | | _this.form.sequence = re.response |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |