Browse Source

【PC端】内容安全-待审核记录审核按钮添加防点击-王公峰-2020-08-06

master
wanggongfeng 5 years ago
parent
commit
f19726e1bd
  1. 8
      src/views/modules/contentSecurity/checkrecords-handle.vue

8
src/views/modules/contentSecurity/checkrecords-handle.vue

@ -18,7 +18,7 @@
</el-form> </el-form>
<template slot="footer"> <template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> <el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> <el-button type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
@ -33,7 +33,8 @@ export default {
id: '', id: '',
result: '', result: '',
suggestion: '' suggestion: ''
} },
isAble: false
} }
}, },
computed: { computed: {
@ -51,6 +52,7 @@ export default {
methods: { methods: {
init () { init () {
this.visible = true this.visible = true
this.isAble = false
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
}) })
@ -61,8 +63,10 @@ export default {
if (!valid) { if (!valid) {
return false return false
} }
this.isAble = true
this.$http['post']('/contentSecurity/handleResult/handleRecords', this.dataForm).then(({ data: res }) => { this.$http['post']('/contentSecurity/handleResult/handleRecords', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.$message({ this.$message({

Loading…
Cancel
Save