|
@ -333,7 +333,12 @@ export default { |
|
|
} |
|
|
} |
|
|
// 表单提交后台 |
|
|
// 表单提交后台 |
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
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('您提交的内容再次被判定为违规, 是否继续提交?', '提示', { |
|
|
this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', { |
|
|
confirmButtonText: '是', |
|
|
confirmButtonText: '是', |
|
@ -351,12 +356,7 @@ export default { |
|
|
this.isFirst = false |
|
|
this.isFirst = false |
|
|
this.isAble = false |
|
|
this.isAble = false |
|
|
return this.$message.error(res.msg) |
|
|
return this.$message.error(res.msg) |
|
|
} else if (!valid) { |
|
|
} else if (res.code !== 0) { |
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
this.isAble = true |
|
|
|
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/weekrecordinfo/', this.dataForm).then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
this.isAble = false |
|
|
this.isAble = false |
|
|
return this.$message.error(res.msg) |
|
|
return this.$message.error(res.msg) |
|
|
} |
|
|
} |
|
|