|
|
|
@ -6,9 +6,25 @@ |
|
|
|
<div class="flex-row-center-start"> |
|
|
|
<span style="font-size: 18px;font-weight: bold;">{{details.nickName}}</span> |
|
|
|
<!-- <Icon icon="ant-design:edit-twotone" size="18px" style="margin-left: 12px;color:#0960bd;"/> --> |
|
|
|
<Popconfirm placement="bottom" icon="修改昵称" @confirm="handleNickname"> |
|
|
|
<Popconfirm placement="bottom" icon="修改用户信息" @confirm="handleNickname"> |
|
|
|
<template #title> |
|
|
|
<Input placeholder="请输入昵称" v-model:value="nickName" style="margin-top: 12px;"/> |
|
|
|
<div class="flex-col"> |
|
|
|
<div class="flex-row-center-start" style="margin-top: 12px;"> |
|
|
|
<span style="color: #333;width: 60px;">昵称</span> |
|
|
|
<Input placeholder="请输入昵称" v-model:value="nickName"/> |
|
|
|
</div> |
|
|
|
<div class="flex-row-center-start" style="margin-top: 8px;"> |
|
|
|
<span style="color: #333;width: 60px;">电话</span> |
|
|
|
<Input placeholder="请输入电话" v-model:value="phone"/> |
|
|
|
</div> |
|
|
|
<div class="flex-row-center-start" style="margin-top: 8px;"> |
|
|
|
<span style="color: #333;width: 60px;">微信</span> |
|
|
|
<Input placeholder="请输入微信号" v-model:value="weChatId"/> |
|
|
|
</div> |
|
|
|
<div class="flex-row-center-start" style="margin-top: 8px;"> |
|
|
|
<span style="color: #999;font-size: 12px;">只会修改有输入的信息,没有输入将不会修改。</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<Button type="link"><template #icon><Icon icon="ant-design:edit-twotone" size="16px" style="margin-left: 12px;color:#0960bd;"/></template></Button> |
|
|
|
</Popconfirm> |
|
|
|
@ -321,16 +337,28 @@ |
|
|
|
const activeKey3 = ref<string>('1') |
|
|
|
const avatar = ref<string>('') |
|
|
|
const nickName = ref<string>('') |
|
|
|
const phone = ref<string>('') |
|
|
|
const weChatId = ref<string>('') |
|
|
|
const labelName = ref<string>('') |
|
|
|
async function handleNickname(){ |
|
|
|
if(!nickName.value){ |
|
|
|
createMessage.warning('请输入昵称') |
|
|
|
if(!nickName.value && !phone.value && !weChatId.value){ |
|
|
|
createMessage.warning('请输入修改信息') |
|
|
|
return |
|
|
|
} |
|
|
|
await editClueRecord({id: details.value.id, nickName: nickName.value, phone: details.value.phone, weChatId: details.value.weChatId}) |
|
|
|
createMessage.success('修改昵称成功') |
|
|
|
details.value.nickName = nickName.value |
|
|
|
await editClueRecord({id: details.value.id, nickName: nickName.value || details.value.nickName, phone: phone.value || details.value.phone, weChatId: weChatId.value || details.value.weChatId}) |
|
|
|
createMessage.success('修改成功') |
|
|
|
if(nickName.value){ |
|
|
|
details.value.nickName = nickName.value |
|
|
|
} |
|
|
|
if(phone.value){ |
|
|
|
details.value.phone = phone.value |
|
|
|
} |
|
|
|
if(weChatId.value){ |
|
|
|
details.value.weChatId = weChatId.value |
|
|
|
} |
|
|
|
nickName.value = '' |
|
|
|
phone.value = '' |
|
|
|
weChatId.value = '' |
|
|
|
} |
|
|
|
async function onLabelClose(id){ |
|
|
|
|
|
|
|
|