|
|
@ -50,12 +50,14 @@ export default { |
|
|
|
createdTime: '', |
|
|
|
updatedBy: '', |
|
|
|
updatedTime: '', |
|
|
|
fileList: '' |
|
|
|
fileList: '', |
|
|
|
isConReview: false |
|
|
|
}, |
|
|
|
url: '', |
|
|
|
num: 0, |
|
|
|
fileList: [], |
|
|
|
btnAble: false |
|
|
|
btnAble: false, |
|
|
|
isFirst: true |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -72,8 +74,10 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
init () { |
|
|
|
this.btnAble = false |
|
|
|
this.dataForm.isConReview = false |
|
|
|
this.isFirst = true |
|
|
|
this.visible = true |
|
|
|
this.btnAble = false |
|
|
|
this.url = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` |
|
|
|
this.num = 0 |
|
|
|
this.fileList = [] |
|
|
@ -98,14 +102,32 @@ export default { |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
|
this.btnAble = true |
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
|
if (!valid) { |
|
|
|
this.btnAble = false |
|
|
|
return false |
|
|
|
} |
|
|
|
this.btnAble = true |
|
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/cloudAnalysis/masternotice/', this.dataForm).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
if (!this.isFirst && res.code === 533) { |
|
|
|
// 不是第一次提交 并且 依然是违规内容 |
|
|
|
this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', { |
|
|
|
confirmButtonText: '是', |
|
|
|
cancelButtonText: '否', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.dataForm.isConReview = true |
|
|
|
// 选择“是”继续提交,调用提交方法本身 |
|
|
|
this.dataFormSubmitHandle() |
|
|
|
}).catch(() => { |
|
|
|
this.btnAble = false |
|
|
|
}) |
|
|
|
return false |
|
|
|
} else if (res.code === 533) { |
|
|
|
this.isFirst = false |
|
|
|
this.btnAble = false |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} else if (res.code !== 0) { |
|
|
|
this.btnAble = false |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
@ -114,7 +136,6 @@ export default { |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.visible = false |
|
|
|
this.btnAble = false |
|
|
|
this.$emit('refreshDataList') |
|
|
|
} |
|
|
|
}) |
|
|
|