This commit is contained in:
wangdan-fit2cloud 2025-07-15 19:57:21 +08:00
parent c1a403b583
commit 5cb0b3018f
2 changed files with 83 additions and 78 deletions

View File

@ -89,7 +89,7 @@
<span class="medium ellipsis" :title="dialogTitle" :id="titleId" :class="titleClass"> <span class="medium ellipsis" :title="dialogTitle" :id="titleId" :class="titleClass">
{{ dialogTitle }} {{ dialogTitle }}
</span> </span>
<div class="flex align-center mr-8" v-if="dialogType === 'pdfDocument'"> <!-- <div class="flex align-center mr-8" v-if="dialogType === 'pdfDocument'">
<span class="mr-4"> <span class="mr-4">
<el-button text> <el-button text>
<el-icon> <Download /> </el-icon> <el-icon> <Download /> </el-icon>
@ -99,7 +99,7 @@
<el-button text> <app-icon iconName="app-export" size="20" /></el-button> <el-button text> <app-icon iconName="app-export" size="20" /></el-button>
</span> </span>
<el-divider direction="vertical" /> <el-divider direction="vertical" />
</div> </div> -->
</div> </div>
</template> </template>
<div class="mb-8"> <div class="mb-8">
@ -149,7 +149,7 @@ const showPDF = (item: any) => {
return ( return (
item.document_name.toLocaleLowerCase().endsWith('.pdf') && item.document_name.toLocaleLowerCase().endsWith('.pdf') &&
item.meta?.source_file_id && item.meta?.source_file_id &&
!props.executionIsRightPanel props.executionIsRightPanel
) )
} }
const dialogVisible = ref(false) const dialogVisible = ref(false)

View File

@ -173,13 +173,23 @@
   
<div class="flex align-center"> <div class="flex align-center">
<span v-if="rightPanelType === 'paragraphDocument'" class="mr-4"> <span v-if="rightPanelType === 'paragraphDocument'" class="mr-4">
<a
:href="
getFileUrl(rightPanelDetail?.meta?.source_file_id) ||
rightPanelDetail?.meta?.source_url
"
target="_blank"
class="ellipsis-1"
:title="rightPanelDetail?.document_name?.trim()"
>
<el-button text> <el-button text>
<el-icon> <Download /> </el-icon> <el-icon> <Download /> </el-icon>
</el-button> </el-button>
</a>
</span> </span>
<span v-if="rightPanelType === 'paragraphDocument'"> <!-- <span v-if="rightPanelType === 'paragraphDocument'">
<el-button text> <app-icon iconName="app-export" size="20" /></el-button> <el-button text> <app-icon iconName="app-export" size="20" /></el-button>
</span> </span> -->
<span> <span>
<el-button text @click="closeExecutionDetail"> <el-button text @click="closeExecutionDetail">
<el-icon size="20"><Close /></el-icon <el-icon size="20"><Close /></el-icon
@ -224,15 +234,12 @@ import {useRouter} from 'vue-router'
import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue' import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue'
import { t } from '@/locales' import { t } from '@/locales'
import type { ResetCurrentUserPasswordRequest } from '@/api/type/user' import type { ResetCurrentUserPasswordRequest } from '@/api/type/user'
import ExecutionDetailContent import ExecutionDetailContent from '@/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
from '@/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue' import ParagraphSourceContent from '@/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
import ParagraphSourceContent import ParagraphDocumentContent from '@/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
from '@/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
import ParagraphDocumentContent
from '@/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
import HistoryPanel from '@/views/chat/component/HistoryPanel.vue' import HistoryPanel from '@/views/chat/component/HistoryPanel.vue'
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
import { getFileUrl } from '@/utils/common'
useResize() useResize()
const { common, chatUser } = useStore() const { common, chatUser } = useStore()
@ -290,8 +297,7 @@ const applicationDetail = computed({
get: () => { get: () => {
return props.application_profile return props.application_profile
}, },
set: (v) => { set: (v) => {},
},
}) })
const chatLogData = ref<any[]>([]) const chatLogData = ref<any[]>([])
@ -326,9 +332,8 @@ function deleteLog(row: any) {
}) })
} }
function clearChat() { function clearChat() {
chatAPI.clearChat(left_loading, ).then(() => { chatAPI.clearChat(left_loading).then(() => {
currentChatId.value = 'new' currentChatId.value = 'new'
currentChatName.value = t('chat.createChat') currentChatName.value = t('chat.createChat')
paginationConfig.value.current_page = 1 paginationConfig.value.current_page = 1