From f5eff8665031896e217d795ec2de32ad3c1b9791 Mon Sep 17 00:00:00 2001 From: Yjhon Date: Thu, 14 Apr 2022 17:39:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E5=8D=B7=E7=AD=96=E7=95=A5=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/form/ProjectTestPaperFormationStrategy.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) {