选择联系人名称修改;

This commit is contained in:
zhaoxiao
2021-09-02 15:32:00 +08:00
parent ac031618ba
commit baac93159f
3 changed files with 7 additions and 7 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

+6 -6
View File
@@ -42,7 +42,7 @@ export default {
}
},
// 编辑时回显的数据, 需要id,name两个字段
initfContacts: {
initContacts: {
type: Object,
required: false,
default: () => {
@@ -78,7 +78,7 @@ export default {
/**
* 编辑联系人变化
*/
initfContacts: {
initContacts: {
handler() {
this.isFirstOpen = true
},
@@ -96,8 +96,8 @@ export default {
}
getContactsByCompany(params).then(res => {
this.contactsList = res.result
if (this.initfContacts && this.initfContacts.hasOwnProperty('id')) {
this.contactsList.push(this.initfContacts)
if (this.initContacts && this.initContacts.hasOwnProperty('id')) {
this.contactsList.push(this.initContacts)
}
})
}
@@ -121,9 +121,9 @@ export default {
);
},
handleDropdownOpen() {
if (this.isFirstOpen && this.initfContacts && this.initfContacts.hasOwnProperty('id')) {
if (this.isFirstOpen && this.initContacts && this.initContacts.hasOwnProperty('id')) {
this.contactsList.forEach((item, index) => {
if (item.id === this.initfContacts.id) {
if (item.id === this.initContacts.id) {
this.$emit('change', undefined)
this.contactsList.splice(index, 1)
}