连点限制

This commit is contained in:
zhaoxiao
2021-10-12 10:12:26 +08:00
parent e9f9ca6cab
commit 93e7e8a4f0
25 changed files with 237 additions and 141 deletions
@@ -27,10 +27,6 @@
</a-form>
<a-empty v-else></a-empty>
</a-spin>
<template slot="footer">
<a-button @click="handleCancel">关闭</a-button>
<a-button @click="handleOk" type="primary" v-preventclick>确定</a-button>
</template>
</j-modal>
</template>
@@ -148,12 +144,18 @@ export default {
this.memberList = []
},
handleOk() {
if (this.confirmLoading) {
return
}
this.confirmLoading = true
if (this.memberList.length === 0) {
this.$message.warn('当前工作组暂无成员,无法分发文件')
this.confirmLoading = false
return
}
if (this.checkedKeys.length === 0) {
this.form.validateFields()
this.confirmLoading = false
return
}
let str = this.checkedKeys.join(',').toString()
@@ -179,7 +181,9 @@ export default {
this.$message.warn(res.message)
}
}).finally(() => {
this.confirmLoading = false
setTimeout(() => {
this.confirmLoading = false
}, 1000)
})
} else {
// 单个分发
@@ -198,9 +202,13 @@ export default {
this.$message.warn(res.message)
}
}).finally(() => {
this.confirmLoading = false
setTimeout(() => {
this.confirmLoading = false
}, 1000)
})
}
} else {
this.confirmLoading = false
}
})
},