From 7b9e4ef21debd518e7066a910d0e87c0dbca5a74 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Wed, 5 Aug 2020 17:43:06 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90PC=E7=AB=AF=E3=80=91=E5=91=A8=E6=8A=A5?= =?UTF-8?q?=E8=BF=9D=E8=A7=84=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9-=E7=8E=8B=E5=85=AC=E5=B3=B0-2020-08-05?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/workRecord/weekrecordinfoDetail.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/modules/workRecord/weekrecordinfoDetail.vue b/src/views/modules/workRecord/weekrecordinfoDetail.vue index 8314f5be..f47547b3 100644 --- a/src/views/modules/workRecord/weekrecordinfoDetail.vue +++ b/src/views/modules/workRecord/weekrecordinfoDetail.vue @@ -333,7 +333,12 @@ export default { } // 表单提交后台 this.$refs['dataForm'].validate((valid) => { - if (!this.isFirst && res.code === 533) { + if (!valid) { + return false + } + this.isAble = true + this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/weekrecordinfo/', this.dataForm).then(({ data: res }) => { + if (!this.isFirst && res.code === 533) { // 不是第一次提交 并且 依然是违规内容 this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', { confirmButtonText: '是', @@ -351,12 +356,7 @@ export default { this.isFirst = false this.isAble = false return this.$message.error(res.msg) - } else if (!valid) { - return false - } - this.isAble = true - this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/weekrecordinfo/', this.dataForm).then(({ data: res }) => { - if (res.code !== 0) { + } else if (res.code !== 0) { this.isAble = false return this.$message.error(res.msg) }