选人增加防抖

This commit is contained in:
aixianling
2021-12-21 18:40:25 +08:00
parent b9e6d07a48
commit 84812f477a

View File

@@ -94,6 +94,7 @@ export default {
second: true,
timestamp: true,
},
clickedUserSelect: false
}
},
@@ -108,12 +109,17 @@ export default {
methods: {
...mapActions(['selectEnterpriseContact']),
handleSelectUser() {
if (this.clickedUserSelect) return this.$u.toast("正在打开人员选择器")
this.clickedUserSelect = true
this.selectEnterpriseContact({
fromDepartmentId: 0,
type: ["user"],
selectedUserIds: this.form.persons?.map(e => e.id)
}).then(res => {
this.form.persons = res?.userList || []
this.clickedUserSelect = false
}).catch(() => {
this.clickedUserSelect = false
})
},
confirm(e) {