Compare commits
No commits in common. "2ede30426aa7ac84ce2cb10a0dfa817f9ac23d80" and "930a0f4c40b83433289adce7891dcfb92b539212" have entirely different histories.
2ede30426a
...
930a0f4c40
@ -668,23 +668,15 @@ const queryAllSearch = () => {
|
|||||||
|
|
||||||
//文件类型图标
|
//文件类型图标
|
||||||
const fileTypeAvatar = (fileType) => {
|
const fileTypeAvatar = (fileType) => {
|
||||||
//PDF文件扩展名映射
|
|
||||||
const PDF_EXTENSIONS = ['PDF', 'pdf']
|
|
||||||
// Excel文件扩展名映射
|
|
||||||
const EXCEL_EXTENSIONS = ['XLS', 'XLSX', 'CSV', 'xls', 'xlsx', 'csv']
|
|
||||||
// Word文件扩展名映射
|
|
||||||
const WORD_EXTENSIONS = ['DOC', 'DOCX', 'RTF', 'DOT', 'DOTX', 'doc', 'docx', 'rtf', 'dot', 'dotx']
|
|
||||||
// PPT文件扩展名映射
|
|
||||||
const PPT_EXTENSIONS = ['PPT', 'PPTX', 'PPS', 'PPSX', 'ppt', 'pptx', 'pps', 'ppsx']
|
|
||||||
let file_type_avatar = fileType_Files
|
let file_type_avatar = fileType_Files
|
||||||
if (fileType) {
|
if (fileType) {
|
||||||
if (PPT_EXTENSIONS.includes(fileType)) {
|
if (fileType === 'ppt' || fileType === 'pptx') {
|
||||||
file_type_avatar = fileType_PPT
|
file_type_avatar = fileType_PPT
|
||||||
} else if (PDF_EXTENSIONS.includes(fileType)) {
|
} else if (fileType === 'pdf') {
|
||||||
file_type_avatar = fileType_PDF
|
file_type_avatar = fileType_PDF
|
||||||
} else if (WORD_EXTENSIONS.includes(fileType)) {
|
} else if (fileType === 'doc' || fileType === 'docx') {
|
||||||
file_type_avatar = fileType_WORD
|
file_type_avatar = fileType_WORD
|
||||||
} else if (EXCEL_EXTENSIONS.includes(fileType)) {
|
} else if (fileType === 'xls' || fileType === 'xlsx') {
|
||||||
file_type_avatar = fileType_EXCEL
|
file_type_avatar = fileType_EXCEL
|
||||||
} else {
|
} else {
|
||||||
file_type_avatar = fileType_Files
|
file_type_avatar = fileType_Files
|
||||||
@ -966,7 +958,7 @@ body:deep(.round-3) {
|
|||||||
border-bottom: 1px solid #f8f8f8;
|
border-bottom: 1px solid #f8f8f8;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgba(70, 41, 157, 0.1);
|
background-color: rgba(70, 41, 157, 0.1)
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment-avatar {
|
.attachment-avatar {
|
||||||
|
@ -69,17 +69,9 @@
|
|||||||
class="text-[12px] font-regular"
|
class="text-[12px] font-regular"
|
||||||
:text="resultDetail"
|
:text="resultDetail"
|
||||||
:searchText="props.searchText"
|
:searchText="props.searchText"
|
||||||
v-if="
|
v-if="props.searchItem?.msg_type !== 3 && props.searchItem?.msg_type !== 5 && props.searchItem?.msg_type !== 6"
|
||||||
props.searchItem?.msg_type !== 3 &&
|
|
||||||
props.searchItem?.msg_type !== 5 &&
|
|
||||||
props.searchItem?.msg_type !== 6
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
<div
|
<div class="message-component-wrapper" v-if="props.searchItem?.msg_type === 3 || props.searchItem?.msg_type === 5" @click.stop>
|
||||||
class="message-component-wrapper"
|
|
||||||
v-if="props.searchItem?.msg_type === 3 || props.searchItem?.msg_type === 5"
|
|
||||||
@click.stop
|
|
||||||
>
|
|
||||||
<component
|
<component
|
||||||
:is="MessageComponents[props.searchItem?.msg_type] || 'unknown-message'"
|
:is="MessageComponents[props.searchItem?.msg_type] || 'unknown-message'"
|
||||||
:extra="resultDetail"
|
:extra="resultDetail"
|
||||||
@ -300,9 +292,7 @@ const resultDetail = computed(() => {
|
|||||||
result_detail =
|
result_detail =
|
||||||
props.searchItem?.msg_type === 1
|
props.searchItem?.msg_type === 1
|
||||||
? props.searchItem?.extra?.content
|
? props.searchItem?.extra?.content
|
||||||
: props.searchItem?.msg_type === 3 ||
|
: props.searchItem?.msg_type === 3 || props.searchItem?.msg_type === 5 || props.searchItem?.msg_type === 6
|
||||||
props.searchItem?.msg_type === 5 ||
|
|
||||||
props.searchItem?.msg_type === 6
|
|
||||||
? props.searchItem?.extra
|
? props.searchItem?.extra
|
||||||
: ChatMsgTypeMapping[props.searchItem?.msg_type]
|
: ChatMsgTypeMapping[props.searchItem?.msg_type]
|
||||||
break
|
break
|
||||||
@ -329,7 +319,6 @@ const previewPDF = (item) => {
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
//由于聊天记录本身有跳转到指定位置的逻辑,所以这里不需要再做跳转
|
//由于聊天记录本身有跳转到指定位置的逻辑,所以这里不需要再做跳转
|
||||||
window['$message'].warning('暂不支持在线预览该类型文件')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user