Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_admin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_admin
Commits
a618a14c
Commit
a618a14c
authored
Nov 08, 2023
by
yaya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加用户信息
parent
3d8874f1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
221 additions
and
31 deletions
+221
-31
src/api/business/chat.js
src/api/business/chat.js
+15
-0
src/views/customerService/chatDetail.vue
src/views/customerService/chatDetail.vue
+107
-31
src/views/customerService/components/chatUserInfo.vue
src/views/customerService/components/chatUserInfo.vue
+99
-0
No files found.
src/api/business/chat.js
View file @
a618a14c
...
...
@@ -22,4 +22,19 @@ export function sendChatMsg(params) {
data
:
params
})
}
export
function
findChatUserInfo
(
params
)
{
return
request
({
url
:
'
/sysIM/findChatUserInfo
'
,
method
:
'
post
'
,
data
:
params
})
}
export
function
setChatUserRemark
(
params
)
{
return
request
({
url
:
'
/sysIM/setChatUserRemark
'
,
method
:
'
post
'
,
data
:
params
})
}
src/views/customerService/chatDetail.vue
View file @
a618a14c
This diff is collapsed.
Click to expand it.
src/views/customerService/components/chatUserInfo.vue
0 → 100644
View file @
a618a14c
<
template
>
<div
class=
"component-chatUserInfo"
>
<div
class=
"info flex"
>
<div
class=
"info-title"
>
机器人昵称:
</div>
<div
class=
"info-content"
>
{{
chatUserInfo
.
aiAssistant
&&
chatUserInfo
.
aiAssistant
.
name
||
'
-
'
}}
</div>
</div>
<div
class=
"info flex"
>
<div
class=
"info-title"
>
简介:
</div>
<div
class=
"info-content"
>
{{
chatUserInfo
.
aiAssistant
&&
chatUserInfo
.
aiAssistant
.
profile
||
'
-
'
}}
</div>
</div>
<el-divider
/>
<div
class=
"info flex"
>
<div
class=
"info-title"
>
用户昵称:
</div>
<div
class=
"info-content"
>
{{
chatUserInfo
.
user
&&
chatUserInfo
.
user
.
nickname
||
'
-
'
}}
</div>
</div>
<div
class=
"info flex"
>
<div
class=
"info-title"
>
手机号:
</div>
<div
class=
"info-content"
>
{{
chatUserInfo
.
user
&&
chatUserInfo
.
user
.
mobile
||
'
-
'
}}
</div>
</div>
<div
class=
"info flex"
>
<div
class=
"info-title"
>
备注:
</div>
<el-input
v-model=
"chatUserInfo.user.remark"
:autosize=
"
{ minRows: 4, maxRows: 4}"
maxlength="30"
type="textarea"
show-word-limit
style="border: 1px solid #DCDFE6; border-radius: 4px;margin: 0;"
placeholder="请输入备注"
@blur="handleBlur"/>
</div>
</div>
</
template
>
<
script
>
import
{
setChatUserRemark
}
from
'
@/api/business/chat
'
export
default
{
name
:
'
ChatUserInfo
'
,
props
:
{
chatUserInfo
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
return
{
preRemark
:
this
.
chatUserInfo
.
user
&&
this
.
chatUserInfo
.
user
.
remark
||
''
}
},
methods
:
{
handleBlur
()
{
if
(
this
.
chatUserInfo
.
user
.
remark
&&
this
.
chatUserInfo
.
user
.
remark
!==
this
.
preRemark
)
{
const
params
=
{
user
:
this
.
chatUserInfo
.
user
.
id
,
remark
:
this
.
chatUserInfo
.
user
.
remark
}
setChatUserRemark
(
params
).
then
(
response
=>
{
this
.
preRemark
=
this
.
chatUserInfo
.
user
.
remark
}).
catch
(
response
=>
{
this
.
closeLoading
()
this
.
$notify
.
error
({
title
:
'
失败
'
,
message
:
response
.
data
.
errmsg
||
'
请求失败
'
})
})
}
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.component-chatUserInfo {
display: flex;
flex-direction: column;
.info {
font-size: 14px;
display: flex;
align-items: start;
line-height: 20px;
margin-top: 10px;
.info-title {
width: 90px;
text-align: end;
font-weight: bold;
}
.info-content {
flex: 1;
}
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment