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