Browse Source

志愿者管理和积分排名中的积分调整页面,确认按钮增加 防连击

feature/syp_points
zhangyongzhangyong 5 years ago
parent
commit
e47ca7616e
  1. 15
      src/views/modules/points/userinfo-points-adjust.vue
  2. 15
      src/views/modules/points/volunteerinfo-points-adjust.vue

15
src/views/modules/points/userinfo-points-adjust.vue

@ -53,12 +53,12 @@
<el-form-item label="积分调整 :"
prop="operatePoints">
<el-input-number v-model="dataForm.operatePoints"
:min="0" :max="1000"></el-input-number>
:min="1" :max="1000"></el-input-number>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary"
<el-button type="primary" :disabled = "isDisabled" :loading="isLoading"
@click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
@ -83,7 +83,9 @@ export default {
adjustReason: '',
operationType: '',
operatePoints: ''
}
},
isDisabled: false,
isLoading: false
}
},
computed: {
@ -125,6 +127,9 @@ export default {
this.dataForm.adjustReason = ''
this.dataForm.operationType = ''
this.dataForm.operatePoints = ''
//
this.isDisabled = false
this.isLoading = false
}
})
},
@ -144,9 +149,13 @@ export default {
if (!valid) {
return false
}
this.isLoading = true
this.isDisabled = true
this.$http['post'](
'/points/pointslogs/confirmUserAdjustPoint', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isDisabled = false
this.isLoading = false
return this.$message.error(res.msg)
}
this.$message({

15
src/views/modules/points/volunteerinfo-points-adjust.vue

@ -65,12 +65,12 @@
<el-form-item label="积分调整 :"
prop="operatePoints">
<el-input-number v-model="dataForm.operatePoints"
:min="0" :max="1000"></el-input-number>
:min="1" :max="1000"></el-input-number>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary"
<el-button type="primary" :disabled = "isDisabled" :loading="isLoading"
@click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
@ -97,7 +97,9 @@ export default {
operatePoints: '',
behaviorCode: ''
},
behaviorTypeList: []
behaviorTypeList: [],
isDisabled: false,
isLoading: false
}
},
computed: {
@ -148,6 +150,9 @@ export default {
this.dataForm.operationType = ''
this.dataForm.operatePoints = ''
this.dataForm.behaviorCode = ''
//
this.isDisabled = false
this.isLoading = false
}
})
},
@ -167,9 +172,13 @@ export default {
if (!valid) {
return false
}
this.isLoading = true
this.isDisabled = true
this.$http['post'](
'/points/pointslogs/confirmAdjustPoint', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isDisabled = false
this.isLoading = false
return this.$message.error(res.msg)
}
this.$message({

Loading…
Cancel
Save