Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
1e78ce8c
提交
1e78ce8c
authored
8月 25, 2025
作者:
毛细亚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化AI聊天组件样式与交互逻辑
上级
59494996
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
30 行增加
和
25 行删除
+30
-25
aiArgenChat.vue
src/views/components/aiChat/aiArgenChat.vue
+30
-25
没有找到文件。
src/views/components/aiChat/aiArgenChat.vue
浏览文件 @
1e78ce8c
...
...
@@ -10,14 +10,14 @@
<p
v-for=
"(name, index) in knowledge_search_list"
style=
"margin-bottom:10px;"
:key=
"index"
>
<el-tag
size=
"mini"
>
{{
name
}}
</el-tag>
}}
</el-tag>
</p>
</div>
<el-button
type=
"text"
size=
"medium"
slot=
"reference"
>
{{
knowledge_search_list
.
length
}}
个
</el-button>
}}
个
</el-button>
</el-popover>
</p>
<el-button
type=
"text"
@
click=
"clearContext"
class=
"clearContext"
>
清除上下文
</el-button>
<el-button
type=
"text"
@
click=
"clearContext
Comfion
"
class=
"clearContext"
>
清除上下文
</el-button>
</div>
</div>
</div>
...
...
@@ -25,7 +25,7 @@
<!-- v-loadingChat="loading" -->
<div
ref=
"ai-box"
v-debounce=
"paperScroll"
class=
"msg-box columnFlex flex1"
>
<div>
<div
v-if=
"!isHistory"
class=
"rowFlex rowCenter linkStyle"
>
<div
class=
"rowFlex rowCenter linkStyle"
>
<div
class=
"rowFlex columnCenter"
>
<div
class=
"line"
></div>
<svg-icon
icon-class=
"start"
style=
"margin-left:5px;"
/>
...
...
@@ -91,7 +91,7 @@
</div>
</div>
<!-- 复制客户的消息 -->
<div
class=
"
likeBtn rowFlex
"
v-if=
"i.send_type == 2"
>
<div
class=
"
rowFlex likeBtn
"
v-if=
"i.send_type == 2"
>
<span
v-if=
"!i.loading"
style=
"color:#87909c;font-size:12px;margin-right:5px;"
>
{{
i
.
response_time
}}
ms
</span>
...
...
@@ -162,8 +162,11 @@ export default {
recordMessage
:
[],
aiText
:
''
,
aiAnswer
:
{},
isHistory
:
false
,
knowledge_search_list
:
[],
page_info
:
{
page
:
1
,
page_size
:
20
},
answerItem
:
{
session_id
:
''
,
create_time
:
''
,
...
...
@@ -232,7 +235,7 @@ export default {
this
.
recordMessage
.
unshift
(
welcomeItem
)
}
},
async
clearContext
()
{
async
clearContext
Comfion
()
{
this
.
$confirm
(
'确定清除上下文吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -302,16 +305,14 @@ export default {
}
},
async
Aihistory
()
{
this
.
recordMessage
=
[]
const
data
=
{
cser_id
:
this
.
userInfo
.
cser_id
,
page
:
1
,
page_size
:
20
...
this
.
page_info
}
const
res
=
await
corp_beta_question_log_index
(
data
)
if
(
res
.
status_code
===
1
&&
res
?.
data
?.
data
?.
length
>
0
)
{
this
.
page_info
.
page
++
res
.
data
.
data
.
forEach
(
item
=>
{
console
.
log
(
item
,
'item'
)
item
.
to
=
{
cser
:
{
avatar
:
this
.
chatUserInfo
.
avatar
,
...
...
@@ -328,9 +329,12 @@ export default {
item
.
loading
=
false
item
.
is_retry
=
false
})
this
.
isHistory
=
true
this
.
recordMessage
=
res
.
data
.
data
.
reverse
().
concat
(
this
.
recordMessage
)
this
.
scrollBottm
()
if
(
this
.
page_info
.
page
==
1
)
{
this
.
scrollBottm
()
}
}
else
{
this
.
$message
.
warning
(
'没有更多数据了'
)
}
},
// 复制消息
...
...
@@ -432,16 +436,19 @@ export default {
})
},
paperScroll
()
{
// 监听滚动事件
const
el
=
this
.
$refs
[
'ai-box'
]
if
(
el
.
scrollTop
<=
5
&&
this
.
isMoreRecord
)
{
this
.
messageList
()
}
else
if
(
!
this
.
isMoreRecord
)
{
// this.$message({
// type: 'error',
// message: '没有更多数据了'
// })
if
(
this
.
userInfo
.
userid
)
{
// 监听滚动事件
const
el
=
this
.
$refs
[
'ai-box'
]
if
(
el
.
scrollTop
<=
5
&&
this
.
isMoreRecord
)
{
this
.
messageList
()
}
else
if
(
!
this
.
isMoreRecord
)
{
// this.$message({
// type: 'error',
// message: '没有更多数据了'
// })
}
}
}
}
}
...
...
@@ -531,11 +538,9 @@ export default {
.chatItemBox
{
border-radius
:
10px
;
position
:
relative
;
width
:
100%
;
}
.user-msg
{
width
:
100%
;
word-break
:
break-all
;
font-size
:
14px
;
line-height
:
20px
;
...
...
@@ -677,9 +682,9 @@ export default {
.likeBtn
{
position
:
absolute
;
bottom
:
5px
;
right
:
10px
;
display
:
flex
;
flex-direction
:
row-reverse
;
width
:
100%
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论