diff --git a/packages/wechat/AppAddressBook/components/Add.vue b/packages/wechat/AppAddressBook/components/Add.vue index a534cdc3..cc91403c 100644 --- a/packages/wechat/AppAddressBook/components/Add.vue +++ b/packages/wechat/AppAddressBook/components/Add.vue @@ -134,6 +134,13 @@ getInfo (id) { this.instance.post(`/app/wxcp/wxuser/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { + const departmentNames = res.data.departmentNames.split(',') + this.department = res.data.departmentIdsStr.split(',').map((item, index) => { + return { + name: departmentNames[index], + id: item + } + }) this.form = { ...res.data, departmentName: res.data.departmentNames,