2020 <div
2121 class =" ml-4 ellipsis-1"
2222 :title =" item?.document_name"
23- v-if =" ! item.source_url "
23+ v-if =" showPDF( item) "
2424 @click =" openParagraphDocument(item)"
2525 >
2626 <p >{{ item && item?.document_name }}</p >
2727 </div >
2828 <div class =" ml-8" v-else >
2929 <a
30- :href =" getNormalizedUrl (item?.source_url )"
30+ :href =" getFileUrl (item?.meta?.source_file_id )"
3131 target =" _blank"
3232 class =" ellipsis-1"
3333 :title =" item?.document_name?.trim()"
@@ -89,7 +89,7 @@ import ExecutionDetailContent from './ExecutionDetailContent.vue'
8989import ParagraphDocumentContent from ' ./ParagraphDocumentContent.vue'
9090import ParagraphSourceContent from ' ./ParagraphSourceContent.vue'
9191import { arraySort } from ' @/utils/array'
92- import { getImgUrl , getNormalizedUrl } from ' @/utils/common'
92+ import { getImgUrl , getFileUrl } from ' @/utils/common'
9393import { t } from ' @/locales'
9494const props = defineProps ({
9595 data: {
@@ -107,7 +107,9 @@ const props = defineProps({
107107})
108108
109109const emit = defineEmits ([' openExecutionDetail' , ' openParagraph' , ' openParagraphDocument' ])
110-
110+ const showPDF = (item : any ) => {
111+ return item .document_name .toLocaleLowerCase ().endsWith (' .pdf' ) && item .meta ?.source_file_id
112+ }
111113const dialogVisible = ref (false )
112114const dialogTitle = ref (' ' )
113115const currentComponent = shallowRef <any >(null )
0 commit comments