Skip to content

Commit 10b8bd6

Browse files
fix: source
1 parent 4a36f78 commit 10b8bd6

File tree

2 files changed

+36
-2
lines changed
  • ui/src

2 files changed

+36
-2
lines changed

ui/src/components/ai-chat/component/knowledge-source-component/index.vue

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,24 @@
7777
:close-on-click-modal="false"
7878
:close-on-press-escape="false"
7979
>
80+
<template #header="{ titleId, titleClass }">
81+
<div class="flex-between">
82+
<span class="medium ellipsis" :title="dialogTitle" :id="titleId" :class="titleClass">
83+
{{ dialogTitle }}
84+
</span>
85+
<div class="flex align-center mr-8">
86+
<span v-if="dialogType === 'pdfDocument'" class="mr-4">
87+
<el-button text>
88+
<el-icon> <Download /> </el-icon>
89+
</el-button>
90+
</span>
91+
<span v-if="dialogType === 'pdfDocument'">
92+
<el-button text> <app-icon iconName="app-export" size="20" /></el-button>
93+
</span>
94+
<el-divider direction="vertical" />
95+
</div>
96+
</div>
97+
</template>
8098
<div class="mb-8">
8199
<component :is="currentComponent" :detail="currentChatDetail" :type="type"></component>
82100
</div>
@@ -119,6 +137,7 @@ const dialogVisible = ref(false)
119137
const dialogTitle = ref('')
120138
const currentComponent = shallowRef<any>(null)
121139
const currentChatDetail = ref<any>(null)
140+
const dialogType = ref('')
122141
function openParagraph(row: any, id?: string) {
123142
dialogTitle.value = t('chat.KnowledgeSource.title')
124143
const obj = cloneDeep(row)
@@ -149,7 +168,7 @@ function openParagraphDocument(row: any) {
149168
emit('openParagraphDocument', row)
150169
return
151170
}
152-
171+
dialogType.value = 'pdfDocument'
153172
currentComponent.value = ParagraphDocumentContent
154173
dialogTitle.value = row.document_name
155174
currentChatDetail.value = row

ui/src/views/chat/pc/index.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,22 @@
167167
>
168168
<div class="p-16 flex-between border-b">
169169
<h4 class="medium ellipsis" :title="rightPanelTitle">{{ rightPanelTitle }}</h4>
170-
<el-icon size="20" class="cursor" @click="closeExecutionDetail"><Close /></el-icon>
170+
 
171+
<div class="flex align-center">
172+
<span v-if="rightPanelType === 'paragraphDocument'" class="mr-4">
173+
<el-button text>
174+
<el-icon> <Download /> </el-icon>
175+
</el-button>
176+
</span>
177+
<span v-if="rightPanelType === 'paragraphDocument'">
178+
<el-button text> <app-icon iconName="app-export" size="20" /></el-button>
179+
</span>
180+
<span>
181+
<el-button text @click="closeExecutionDetail">
182+
<el-icon size="20"><Close /></el-icon
183+
></el-button>
184+
</span>
185+
</div>
171186
</div>
172187
<div class="execution-detail-content" v-loading="rightPanelLoading">
173188
<ParagraphSourceContent

0 commit comments

Comments
 (0)