| | |
| | | </el-form-item> |
| | | <el-form-item label="适用用户" prop="useType"> |
| | | <el-radio-group v-model="form.useType"> |
| | | <el-radio :label="0">访客和劳务</el-radio> |
| | | <!-- <el-radio :label="0">访客和劳务</el-radio> --> |
| | | <el-radio :label="1">仅访客</el-radio> |
| | | <el-radio :label="2">仅劳务</el-radio> |
| | | <!-- <el-radio :label="2">仅劳务</el-radio> --> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="分值" prop="score"> |
| | | <el-input v-model="form.score" type="number" placeholder="请输入" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="题目顺序(升序)" prop="sortnu"> |
| | | <el-input v-model="form.sortnu" placeholder="请输入" v-trim/> |
| | | <el-input v-model="form.sortnu" type="number" placeholder="请输入" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="选项集合" prop="objectList" v-if="form.type === 1 || form.type === 2"> |
| | | <el-button type="primary" style="width: 120px; margin-bottom: 15px;" @click="add" icon="el-icon-plus">添加选项</el-button> |
| | |
| | | answer: '', |
| | | sortnu: '', |
| | | type: 0, |
| | | useType: 0 |
| | | scroe:null, |
| | | useType: 1 |
| | | }, |
| | | // 验证规则 |
| | | rules: { |
| | |
| | | sortnu: this.form.sortnu, |
| | | type: this.form.type, |
| | | useType: this.form.useType, |
| | | score: this.form.score, |
| | | objectList: this.form.objectList |
| | | }) |
| | | .then(() => { |
| | |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | |
| | | sortnu: this.form.sortnu, |
| | | type: this.form.type, |
| | | useType: this.form.useType, |
| | | score: this.form.score, |
| | | objectList: this.form.objectList |
| | | }) |
| | | .then(() => { |
| | |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |