提交 59494996 作者: 毛细亚

优化AI聊天组件样式与交互逻辑

上级 c1111e1c
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<p v-for="(name, index) in knowledge_search_list" style="margin-bottom:10px;" <p v-for="(name, index) in knowledge_search_list" style="margin-bottom:10px;"
:key="index"> :key="index">
<el-tag size="mini">{{ name <el-tag size="mini">{{ name
}}</el-tag> }}</el-tag>
</p> </p>
</div> </div>
<el-button type="text" size="medium" slot="reference">{{ knowledge_search_list.length <el-button type="text" size="medium" slot="reference">{{ knowledge_search_list.length
}}</el-button> }}</el-button>
</el-popover> </el-popover>
</p> </p>
<el-button type="text" @click="clearContext" class="clearContext">清除上下文</el-button> <el-button type="text" @click="clearContext" class="clearContext">清除上下文</el-button>
...@@ -91,9 +91,10 @@ ...@@ -91,9 +91,10 @@
</div> </div>
</div> </div>
<!-- 复制客户的消息 --> <!-- 复制客户的消息 -->
<div class="likeBtn rowFlex " v-if="i.send_type == 2 && !i.loading"> <div class="likeBtn rowFlex " v-if="i.send_type == 2">
<span style="color:#87909c;font-size:12px;margin-right:5px;">{{ <span v-if="!i.loading"
i.response_time }} ms</span> style="color:#87909c;font-size:12px;margin-right:5px;">{{
i.response_time }} ms</span>
<svg-icon v-if="i.like_status == 0" class="copy likeIcon" icon-class="like" <svg-icon v-if="i.like_status == 0" class="copy likeIcon" icon-class="like"
@click.stop="likeAnswer(i, 1, index)" /> @click.stop="likeAnswer(i, 1, index)" />
<svg-icon v-else-if="i.like_status == 1" class="copy likeIcon" <svg-icon v-else-if="i.like_status == 1" class="copy likeIcon"
...@@ -250,7 +251,12 @@ export default { ...@@ -250,7 +251,12 @@ export default {
}) })
}, },
async getAiArgenInfo() { async getAiArgenInfo() {
const res = await corp_beta_question_config({ userid: this.chatUserInfo.userid, page: 1, page_size: 10 }) const res = await corp_beta_question_config({
user: {
userid: this.chatUserInfo.userid,
session_type: 3
}, page: 1, page_size: 10
})
console.log(res, '123') console.log(res, '123')
if (res.status_code === 1 && res?.data?.data?.length > 0) { if (res.status_code === 1 && res?.data?.data?.length > 0) {
this.knowledge_search_list = res?.data?.data[0]?.knowledge_search?.doc_name || [] this.knowledge_search_list = res?.data?.data[0]?.knowledge_search?.doc_name || []
...@@ -451,7 +457,7 @@ export default { ...@@ -451,7 +457,7 @@ export default {
.AiChatList { .AiChatList {
width: 100%; width: 100%;
height: calc(100% - 120px); height: calc(100% - 80px);
overflow: auto; overflow: auto;
} }
...@@ -560,7 +566,7 @@ export default { ...@@ -560,7 +566,7 @@ export default {
} }
.chatItemleft { .chatItemleft {
padding-bottom: 25px; padding-bottom: 35px;
} }
.left { .left {
...@@ -669,12 +675,11 @@ export default { ...@@ -669,12 +675,11 @@ export default {
} }
.likeBtn { .likeBtn {
position: absolute;
bottom: 5px;
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
position: relative; width: 100%;
top: 15px;
margin-left: 10px;
margin-bottom: 10px;
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论