From 8191562f28c525373941af4638c30c8f8e74c245 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期三, 16 八月 2023 12:12:10 +0800 Subject: [PATCH] bug修复 --- src/views/client/client/index.vue | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/views/client/client/index.vue b/src/views/client/client/index.vue index 4830133..b9b8999 100644 --- a/src/views/client/client/index.vue +++ b/src/views/client/client/index.vue @@ -171,15 +171,22 @@ let contact_name = "" let contact_phone = "" let contact_id = 0 + let contact_wechat = "" + let contact_email = "" + let position = "" if (item.contacts.length !== 0) { for (let i = 0; i < item.contacts.length; i++) { if (item.contacts[i].is_first) { contact_name = item.contacts[i].name contact_phone = item.contacts[i].phone contact_id = item.contacts[i].id + contact_wechat = item.contacts[i].wechat + contact_email = item.contacts[i].email + position = item.contacts[i].position } } } + console.log(contact_wechat, contact_email) return { ...item, contact_name: contact_name, @@ -187,7 +194,10 @@ client_level: item.client_level.name, client_status: item.client_status.name, contact_id: contact_id, - member_name: item.member.username + member_name: item.member.username, + contact_wechat: contact_wechat, + contact_email: contact_email, + position: position } }) this.tableList.tableInfomation = list || [] @@ -232,18 +242,8 @@ console.log(row) this.editConfig.visible = true this.editConfig.title = "缂栬緫" - let contactObj = {} - if (row.contacts.length > 0) { - row.contacts.forEach((ele) => { - if (ele.is_first) { - contactObj = { ...ele } - } - }) - } this.editConfig.infomation = { - ...row, - contact_wechat: contactObj.length > 0 ? contactObj.wechat : "", - contact_email: contactObj.length > 0 ? contactObj.email : "" + ...row } }, // 鍒犻櫎 -- Gitblit v1.8.0