perf: 优化对话页面
perf: 优化对话页面
This commit is contained in:
commit
7d2f4fe7c7
@ -1,4 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-text type="info">
|
||||||
|
<span class="ml-4">{{ datetimeFormat(data.create_time) }}</span>
|
||||||
|
</el-text>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-tooltip effect="dark" content="重新生成" placement="top">
|
<el-tooltip effect="dark" content="重新生成" placement="top">
|
||||||
<el-button text @click="regeneration">
|
<el-button text @click="regeneration">
|
||||||
@ -59,6 +64,7 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { copyClick } from '@/utils/clipboard'
|
import { copyClick } from '@/utils/clipboard'
|
||||||
import applicationApi from '@/api/application'
|
import applicationApi from '@/api/application'
|
||||||
|
import { datetimeFormat } from '@/utils/time'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<div class="active-button primary">{{ item.similarity?.toFixed(3) }}</div>
|
<div class="active-button primary">{{ item.similarity?.toFixed(3) }}</div>
|
||||||
<template #description>
|
<template #description>
|
||||||
<el-scrollbar height="90">
|
<el-scrollbar height="150">
|
||||||
<MdPreview
|
<MdPreview
|
||||||
ref="editorRef"
|
ref="editorRef"
|
||||||
editorId="preview-only"
|
editorId="preview-only"
|
||||||
@ -110,6 +110,9 @@ defineExpose({ open })
|
|||||||
.paragraph-source-height {
|
.paragraph-source-height {
|
||||||
height: calc(100vh - 260px);
|
height: calc(100vh - 260px);
|
||||||
}
|
}
|
||||||
|
.paragraph-source-card {
|
||||||
|
height: 260px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@media only screen and (max-width: 768px) {
|
@media only screen and (max-width: 768px) {
|
||||||
.paragraph-source {
|
.paragraph-source {
|
||||||
@ -118,7 +121,7 @@ defineExpose({ open })
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.paragraph-source-card {
|
.paragraph-source-card {
|
||||||
height: 225px;
|
height: 285px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,7 +75,7 @@
|
|||||||
<MdRenderer :source="item.answer_text"></MdRenderer>
|
<MdRenderer :source="item.answer_text"></MdRenderer>
|
||||||
<div v-if="showSource(item)">
|
<div v-if="showSource(item)">
|
||||||
<el-divider> <el-text type="info">知识来源</el-text> </el-divider>
|
<el-divider> <el-text type="info">知识来源</el-text> </el-divider>
|
||||||
<div class="mb-8">
|
<div>
|
||||||
<el-space wrap>
|
<el-space wrap>
|
||||||
<el-button
|
<el-button
|
||||||
v-for="(dataset, index) in item.dataset_list"
|
v-for="(dataset, index) in item.dataset_list"
|
||||||
@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<el-button
|
<el-button
|
||||||
class="mr-8"
|
class="mr-8 mt-8"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
size="small"
|
size="small"
|
||||||
@ -99,10 +99,10 @@
|
|||||||
:disabled="!item.paragraph_list || item.paragraph_list?.length === 0"
|
:disabled="!item.paragraph_list || item.paragraph_list?.length === 0"
|
||||||
>引用分段:{{ item.paragraph_list?.length || 0 }}</el-button
|
>引用分段:{{ item.paragraph_list?.length || 0 }}</el-button
|
||||||
>
|
>
|
||||||
<el-tag type="info" effect="plain">
|
<el-tag type="info" effect="plain" class="mr-8 mt-8">
|
||||||
消耗 tokens: {{ item?.message_tokens + item?.answer_tokens }}
|
消耗 tokens: {{ item?.message_tokens + item?.answer_tokens }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag class="ml-8" type="info" effect="plain">
|
<el-tag type="info" effect="plain" class="mt-8">
|
||||||
耗时: {{ item.run_time?.toFixed(2) }} s
|
耗时: {{ item.run_time?.toFixed(2) }} s
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
@ -125,15 +125,14 @@
|
|||||||
>停止回答</el-button
|
>停止回答</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div v-if="item.write_ed && props.appId">
|
<div v-if="item.write_ed && props.appId" class="flex-between">
|
||||||
<OperationButton
|
<OperationButton
|
||||||
:data="item"
|
:data="item"
|
||||||
:applicationId="appId"
|
:applicationId="appId"
|
||||||
:chatId="chartOpenId"
|
:chatId="chartOpenId"
|
||||||
@regeneration="regenerationChart(item)"
|
@regeneration="regenerationChart(item)"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -41,13 +41,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="chat-pc__right">
|
<div class="chat-pc__right">
|
||||||
<div class="right-header border-b mb-24 p-16-24 flex-between">
|
<div class="right-header border-b mb-24 p-16-24 flex-between">
|
||||||
<h4>{{ currentChatName }}</h4>
|
<h4 class="ellipsis-1" style="width: 70%">
|
||||||
|
{{ currentChatName }}
|
||||||
|
</h4>
|
||||||
|
|
||||||
<span v-if="currentRecordList.length" class="flex align-center">
|
<span v-if="currentRecordList.length" class="flex align-center">
|
||||||
<AppIcon iconName="app-chat-record" class="info mr-8" style="font-size: 16px"></AppIcon>
|
<AppIcon iconName="app-chat-record" class="info mr-8" style="font-size: 16px"></AppIcon>
|
||||||
<span class="lighter"> {{ paginationConfig.total }} 条提问 </span>
|
<span class="lighter"> {{ paginationConfig.total }} 条提问 </span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-height">
|
<div class="right-height chat-width">
|
||||||
<!-- 对话 -->
|
<!-- 对话 -->
|
||||||
<AiChat
|
<AiChat
|
||||||
ref="AiChatRef"
|
ref="AiChatRef"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user