|
|
|
@ -19,7 +19,7 @@ |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
icon="el-icon-s-tools" |
|
|
|
icon="el-icon-s-tools" |
|
|
|
@click="handleGroupSetting" |
|
|
|
@click="handleGroupSetting" |
|
|
|
v-if="currentChat && currentChat.scene === ContactsScene.GROUP" |
|
|
|
v-if="currentChat" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -676,14 +676,11 @@ export default { |
|
|
|
text = text.replace(/\n/g, "<br>"); |
|
|
|
text = text.replace(/\n/g, "<br>"); |
|
|
|
// @高亮 - 添加 data 属性存储用户名和索引 |
|
|
|
// @高亮 - 添加 data 属性存储用户名和索引 |
|
|
|
let atIndex = 0; |
|
|
|
let atIndex = 0; |
|
|
|
text = text.replace( |
|
|
|
text = text.replace(/@([^\s@]+)/g, (match, username) => { |
|
|
|
/@([^\s@]+)/g, |
|
|
|
const result = `<span class="at-highlight" data-username="${username}" data-at-index="${atIndex}">@${username}</span>`; |
|
|
|
(match, username) => { |
|
|
|
atIndex++; |
|
|
|
const result = `<span class="at-highlight" data-username="${username}" data-at-index="${atIndex}">@${username}</span>`; |
|
|
|
return result; |
|
|
|
atIndex++; |
|
|
|
}); |
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
// URL链接 |
|
|
|
// URL链接 |
|
|
|
text = text.replace( |
|
|
|
text = text.replace( |
|
|
|
/(https?:\/\/[^\s]+)/g, |
|
|
|
/(https?:\/\/[^\s]+)/g, |
|
|
|
@ -713,7 +710,7 @@ export default { |
|
|
|
async getUserInfoById(userId) { |
|
|
|
async getUserInfoById(userId) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const response = await this.$http.get(`/api/v1/users/info`, { |
|
|
|
const response = await this.$http.get(`/api/v1/users/info`, { |
|
|
|
params: { user_id: userId } |
|
|
|
params: { user_id: userId }, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (response.data.code === 200) { |
|
|
|
if (response.data.code === 200) { |
|
|
|
@ -729,19 +726,25 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showUserInfoModal(userInfo) { |
|
|
|
showUserInfoModal(userInfo) { |
|
|
|
this.$alert(` |
|
|
|
this.$alert( |
|
|
|
|
|
|
|
` |
|
|
|
<div style="text-align: left;"> |
|
|
|
<div style="text-align: left;"> |
|
|
|
<h3 style="margin-bottom: 15px;">${userInfo.name || userInfo.username}</h3> |
|
|
|
<h3 style="margin-bottom: 15px;">${ |
|
|
|
|
|
|
|
userInfo.name || userInfo.username |
|
|
|
|
|
|
|
}</h3> |
|
|
|
<p><strong>账号:</strong>${userInfo.username}</p> |
|
|
|
<p><strong>账号:</strong>${userInfo.username}</p> |
|
|
|
<p><strong>手机:</strong>${userInfo.phone || "-"}</p> |
|
|
|
<p><strong>手机:</strong>${userInfo.phone || "-"}</p> |
|
|
|
<p><strong>邮箱:</strong>${userInfo.email || "-"}</p> |
|
|
|
<p><strong>邮箱:</strong>${userInfo.email || "-"}</p> |
|
|
|
<p><strong>部门:</strong>${userInfo.department || "-"}</p> |
|
|
|
<p><strong>部门:</strong>${userInfo.department || "-"}</p> |
|
|
|
<p><strong>职位:</strong>${userInfo.position || "-"}</p> |
|
|
|
<p><strong>职位:</strong>${userInfo.position || "-"}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
`, '用户信息', { |
|
|
|
`, |
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
"用户信息", |
|
|
|
confirmButtonText: '关闭' |
|
|
|
{ |
|
|
|
}); |
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
|
|
|
|
confirmButtonText: "关闭", |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getFileUrl(pathOrUrl) { |
|
|
|
getFileUrl(pathOrUrl) { |
|
|
|
|