|
@@ -271,7 +271,9 @@ function editContacts(row: any) { // row 有数据代表编辑
|
|
|
const templateKey = getTemplateKey(contactsTemplate.value.list)
|
|
|
const formVal: templateKey = { id: row.id }
|
|
|
for (let i in templateKey) {
|
|
|
- formVal[templateKey[i]] = templateKey[i] == 'sex' ? row[templateKey[i]] + '' : row[templateKey[i]]
|
|
|
+ if(row[templateKey[i]]) {
|
|
|
+ formVal[templateKey[i]] = templateKey[i] == 'sex' ? row[templateKey[i]] + '' : row[templateKey[i]]
|
|
|
+ }
|
|
|
}
|
|
|
setTemplateVal(formVal)
|
|
|
allText.editContactsText = '编辑联系人'
|
|
@@ -282,6 +284,7 @@ function editContacts(row: any) { // row 有数据代表编辑
|
|
|
}
|
|
|
|
|
|
function setTemplateVal(val: any = {}) {
|
|
|
+ console.log(val)
|
|
|
contactsTemplateValue.value = val
|
|
|
allLoading.contactsTemplateRefLoading = true
|
|
|
setTimeout(() => {
|