Browse Source

活动确认积分前端对按钮增加防连击

feature/syp_points
zhangyongzhangyong 5 years ago
parent
commit
52f00b89f9
  1. 13
      src/views/modules/heart/actuserclock-detail.vue

13
src/views/modules/heart/actuserclock-detail.vue

@ -27,6 +27,8 @@
size="small" size="small"
style="width: 95px" style="width: 95px"
type="primary" type="primary"
:disabled = "isDisabled"
:loading="isLoading"
@click="dataFormSubmitHandle()" @click="dataFormSubmitHandle()"
>{{ $t('confirm') }}</el-button> >{{ $t('confirm') }}</el-button>
<el-button size="small" style="width: 95px" @click="backToActClockList">{{ '返回' }}</el-button> <el-button size="small" style="width: 95px" @click="backToActClockList">{{ '返回' }}</el-button>
@ -156,7 +158,9 @@ export default {
previewImgList: [], previewImgList: [],
isAble: false, isAble: false,
isEdit: false, isEdit: false,
actUseId: '' actUseId: '',
isDisabled: false,
isLoading: false
} }
}, },
mounted () { mounted () {
@ -225,6 +229,9 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo() this.getInfo()
//
this.isDisabled = false
this.isLoading = false
} }
}) })
}, },
@ -334,11 +341,15 @@ export default {
if (this.dataForm.failureReason.length > 100) { if (this.dataForm.failureReason.length > 100) {
return this.$message.error('处理意见不超过100字') return this.$message.error('处理意见不超过100字')
} }
this.isLoading = true
this.isDisabled = true
// this.isAble = true // this.isAble = true
this.$http['post']('/heart/actuserclocklog/pointCheck', this.dataForm) this.$http['post']('/heart/actuserclocklog/pointCheck', this.dataForm)
.then(({ data: res }) => { .then(({ data: res }) => {
// this.isAble = false // this.isAble = false
if (res.code !== 0) { if (res.code !== 0) {
this.isDisabled = false
this.isLoading = false
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.$message({ this.$message({

Loading…
Cancel
Save