【修改】下拉框两个人的bug
This commit is contained in:
@@ -119,6 +119,7 @@ export default {
|
||||
* 获取联系人数据
|
||||
*/
|
||||
getContactsList() {
|
||||
this.contactsList = []
|
||||
let params = {}
|
||||
if (this.selectedCompany && this.selectedCompany.id) {
|
||||
params.companyId = this.selectedCompany.id
|
||||
@@ -188,17 +189,15 @@ export default {
|
||||
* 第一次展开下拉,去掉和初始联系人一样的联系人
|
||||
*/
|
||||
handleDropdownOpen() {
|
||||
this.getContactsList()
|
||||
// this.getContactsList()
|
||||
if (this.isFirstOpen && this.initContacts && this.initContacts.id) {
|
||||
this.contactsList.forEach((item, index) => {
|
||||
if (item.id === this.initContacts.id) {
|
||||
this.$emit('change', undefined)
|
||||
this.contactsList.splice(index, 1)
|
||||
}
|
||||
let delIndex = this.contactsList.findIndex(e => {
|
||||
e.id === this.initContacts.id
|
||||
})
|
||||
this.contactsList.splice(delIndex,1)
|
||||
this.isFirstOpen = false
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
model: {
|
||||
prop: 'value',
|
||||
|
||||
Reference in New Issue
Block a user