diff --git a/src/views/project/form/ProjectTestPaperFormationStrategy.vue b/src/views/project/form/ProjectTestPaperFormationStrategy.vue index 0812922..68c6262 100644 --- a/src/views/project/form/ProjectTestPaperFormationStrategy.vue +++ b/src/views/project/form/ProjectTestPaperFormationStrategy.vue @@ -150,6 +150,11 @@ export default { //保存 toSave() { this.form.testPaperTactics = this.tableData.filter((Item) => { return Item.topicNum && Item.topicScore }); + console.log('testPaperTactics',this.form.testPaperTactics,this.form.testPaperTactics.length) + if (this.form.testPaperTactics.length == 0) { + this.$message.error("组卷策略详情数据不能为空,如当前列表为空,请返回“选择课程”页面添加有题目的课程"); + return; + } this.form.projectStatus = 1 this.$refs.form.validate(validate => { if (validate) { @@ -160,6 +165,11 @@ export default { //发布 toIssue() { this.form.testPaperTactics = this.tableData.filter((Item) => { return Item.topicNum && Item.topicScore }); + console.log('testPaperTactics',this.form.testPaperTactics,this.form.testPaperTactics.length) + if (this.form.testPaperTactics.length == 0) { + this.$message.error("组卷策略详情数据不能为空,如当前列表为空,请返回”课程选择“页面添加有题目的课程"); + return; + } this.form.projectStatus = 2 this.$refs.form.validate(validate => { if (validate) {