连点限制
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user