考试管理 分类改为必选

This commit is contained in:
Yuan 2022-10-28 11:16:21 +08:00
parent b6830c2cfd
commit f8257cddfe
2 changed files with 7 additions and 6 deletions

View File

@ -27,7 +27,7 @@ export function handlerUrl() {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://114.116.51.125/jlcloud';
BASE_API = 'http://192.168.3.90:9000'; // 周寅
// BASE_API = 'http://192.168.3.90:9000'; // 周寅
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬

View File

@ -32,7 +32,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="分类" prop="tags">
<el-form-item label="分类" prop="tags" required>
<el-select v-model="form.tags" @change="getQuestionAmount">
<el-option
v-for="item in labels"
@ -117,7 +117,7 @@ export default {
id: '',
type: '',
subtype: '',
tags: '',
tags: '',
amount: 1,
score: 1,
},
@ -130,12 +130,13 @@ export default {
subtype: [{ required: true, message: '请选择规则类型', trigger: 'change' }],
amount: [{ required: true, validator: number, trigger: 'blur' }],
score: [{ required: true, validator: score, trigger: 'blur' }],
tags: [{ required: true, message: '请选择分类', trigger: 'blur' }],
},
}
},
created() {
getLabelList().then(resp => {
this.labels = [{ label: '无', value: '' }, ...resp.data.map(item => ({ label: item, value: item }))]
this.labels = [{ label: '无', value: '' }, ...resp.data.map(item => ({ label: item, value: item }))]
})
},
mounted() {},
@ -153,7 +154,7 @@ export default {
amount: detail.amount,
score: detail.score,
id: detail.id || '',
tags: detail.tags || '',
tags: detail.tags,
}
this.topicNum = detail.topicNum
} else {
@ -180,7 +181,7 @@ export default {
groupType: this.form.type,
subType: this.form.subtype,
}
if (this.form.tags) param.tags = [this.form.tags]
if (this.form.tags !== '无') param.tags = [this.form.tags]
getQuestionAmount(param).then(resp => {
this.topicNum = resp.data
})