perf: upload file count(#2029)
This commit is contained in:
parent
47bcb7f2e5
commit
a9797ca2c7
@ -14,9 +14,22 @@
|
|||||||
uploadVideoList.length
|
uploadVideoList.length
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-space wrap>
|
<el-row :gutter="10">
|
||||||
<template v-for="(item, index) in uploadDocumentList" :key="index">
|
<el-col
|
||||||
<el-card shadow="never" style="--el-card-padding: 8px" class="file cursor">
|
v-for="(item, index) in uploadDocumentList"
|
||||||
|
:key="index"
|
||||||
|
:xs="24"
|
||||||
|
:sm="12"
|
||||||
|
:md="12"
|
||||||
|
:lg="12"
|
||||||
|
:xl="12"
|
||||||
|
class="mb-8"
|
||||||
|
>
|
||||||
|
<el-card
|
||||||
|
shadow="never"
|
||||||
|
style="--el-card-padding: 8px; max-width: 100%"
|
||||||
|
class="file cursor"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="flex align-center"
|
class="flex align-center"
|
||||||
@mouseenter.stop="mouseenter(item)"
|
@mouseenter.stop="mouseenter(item)"
|
||||||
@ -32,13 +45,22 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
<img :src="getImgUrl(item && item?.name)" alt="" width="24" />
|
<img :src="getImgUrl(item && item?.name)" alt="" width="24" />
|
||||||
<div class="ml-4 ellipsis" style="max-width: 160px" :title="item && item?.name">
|
<div class="ml-4 ellipsis-1" :title="item && item?.name">
|
||||||
{{ item && item?.name }}
|
{{ item && item?.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</el-col>
|
||||||
<template v-for="(item, index) in uploadImageList" :key="index">
|
<el-col
|
||||||
|
:xs="24"
|
||||||
|
:sm="12"
|
||||||
|
:md="12"
|
||||||
|
:lg="12"
|
||||||
|
:xl="12"
|
||||||
|
class="mb-8"
|
||||||
|
v-for="(item, index) in uploadImageList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="file cursor border border-r-4"
|
class="file cursor border border-r-4"
|
||||||
v-if="item.url"
|
v-if="item.url"
|
||||||
@ -62,8 +84,17 @@
|
|||||||
class="border-r-4"
|
class="border-r-4"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</el-col>
|
||||||
<template v-for="(item, index) in uploadAudioList" :key="index">
|
<el-col
|
||||||
|
:xs="24"
|
||||||
|
:sm="12"
|
||||||
|
:md="12"
|
||||||
|
:lg="12"
|
||||||
|
:xl="12"
|
||||||
|
class="mb-8"
|
||||||
|
v-for="(item, index) in uploadAudioList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
<el-card shadow="never" style="--el-card-padding: 8px" class="file cursor">
|
<el-card shadow="never" style="--el-card-padding: 8px" class="file cursor">
|
||||||
<div
|
<div
|
||||||
class="flex align-center"
|
class="flex align-center"
|
||||||
@ -80,13 +111,13 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
<img :src="getImgUrl(item && item?.name)" alt="" width="24" />
|
<img :src="getImgUrl(item && item?.name)" alt="" width="24" />
|
||||||
<div class="ml-4 ellipsis" style="max-width: 160px" :title="item && item?.name">
|
<div class="ml-4 ellipsis-1" :title="item && item?.name">
|
||||||
{{ item && item?.name }}
|
{{ item && item?.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</el-col>
|
||||||
</el-space>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
@ -119,8 +150,7 @@
|
|||||||
<el-tooltip effect="dark" placement="top" popper-class="upload-tooltip-width">
|
<el-tooltip effect="dark" placement="top" popper-class="upload-tooltip-width">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="break-all pre-wrap">
|
<div class="break-all pre-wrap">
|
||||||
{{ $t('chat.uploadFile.label') }}:{{
|
{{ $t('chat.uploadFile.label') }}:{{ $t('chat.uploadFile.most')
|
||||||
$t('chat.uploadFile.most')
|
|
||||||
}}{{ props.applicationDetails.file_upload_setting.maxFiles
|
}}{{ props.applicationDetails.file_upload_setting.maxFiles
|
||||||
}}{{ $t('chat.uploadFile.limit') }}
|
}}{{ $t('chat.uploadFile.limit') }}
|
||||||
{{ props.applicationDetails.file_upload_setting.fileLimit }}MB<br />{{
|
{{ props.applicationDetails.file_upload_setting.fileLimit }}MB<br />{{
|
||||||
@ -191,7 +221,7 @@ import { t } from '@/locales'
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const {
|
const {
|
||||||
query: { mode, question },
|
query: { mode, question }
|
||||||
} = route as any
|
} = route as any
|
||||||
const quickInputRef = ref()
|
const quickInputRef = ref()
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
|
|||||||
@ -16,8 +16,17 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="text break-all pre-wrap">
|
<div class="text break-all pre-wrap">
|
||||||
<div class="mb-8" v-if="document_list.length">
|
<div class="mb-8" v-if="document_list.length">
|
||||||
<el-space wrap>
|
<el-row :gutter="10">
|
||||||
<template v-for="(item, index) in document_list" :key="index">
|
<el-col
|
||||||
|
v-for="(item, index) in document_list"
|
||||||
|
:key="index"
|
||||||
|
:xs="24"
|
||||||
|
:sm="12"
|
||||||
|
:md="12"
|
||||||
|
:lg="12"
|
||||||
|
:xl="12"
|
||||||
|
class="mb-8 w-full"
|
||||||
|
>
|
||||||
<el-card shadow="never" style="--el-card-padding: 8px" class="download-file cursor">
|
<el-card shadow="never" style="--el-card-padding: 8px" class="download-file cursor">
|
||||||
<div class="download-button flex align-center" @click="downloadFile(item)">
|
<div class="download-button flex align-center" @click="downloadFile(item)">
|
||||||
<el-icon class="mr-4">
|
<el-icon class="mr-4">
|
||||||
@ -27,17 +36,26 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="show flex align-center">
|
<div class="show flex align-center">
|
||||||
<img :src="getImgUrl(item && item?.name)" alt="" width="24" />
|
<img :src="getImgUrl(item && item?.name)" alt="" width="24" />
|
||||||
<div class="ml-4 ellipsis" style="max-width: 150px" :title="item && item?.name">
|
<div class="ml-4 ellipsis-1" :title="item && item?.name">
|
||||||
{{ item && item?.name }}
|
{{ item && item?.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</el-col>
|
||||||
</el-space>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-8" v-if="image_list.length">
|
<div class="mb-8" v-if="image_list.length">
|
||||||
<el-space wrap>
|
<el-row :gutter="10">
|
||||||
<template v-for="(item, index) in image_list" :key="index">
|
<el-col
|
||||||
|
v-for="(item, index) in image_list"
|
||||||
|
:key="index"
|
||||||
|
:xs="24"
|
||||||
|
:sm="12"
|
||||||
|
:md="12"
|
||||||
|
:lg="12"
|
||||||
|
:xl="12"
|
||||||
|
class="mb-8"
|
||||||
|
>
|
||||||
<div class="file cursor border-r-4" v-if="item.url">
|
<div class="file cursor border-r-4" v-if="item.url">
|
||||||
<el-image
|
<el-image
|
||||||
:src="item.url"
|
:src="item.url"
|
||||||
@ -52,12 +70,21 @@
|
|||||||
class="border-r-4"
|
class="border-r-4"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</el-col>
|
||||||
</el-space>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-8" v-if="audio_list.length">
|
<div class="mb-8" v-if="audio_list.length">
|
||||||
<el-space wrap>
|
<el-row :gutter="10">
|
||||||
<template v-for="(item, index) in audio_list" :key="index">
|
<el-col
|
||||||
|
v-for="(item, index) in audio_list"
|
||||||
|
:key="index"
|
||||||
|
:xs="24"
|
||||||
|
:sm="12"
|
||||||
|
:md="12"
|
||||||
|
:lg="12"
|
||||||
|
:xl="12"
|
||||||
|
class="mb-8"
|
||||||
|
>
|
||||||
<div class="file cursor border-r-4" v-if="item.url">
|
<div class="file cursor border-r-4" v-if="item.url">
|
||||||
<audio
|
<audio
|
||||||
:src="item.url"
|
:src="item.url"
|
||||||
@ -66,8 +93,8 @@
|
|||||||
class="border-r-4"
|
class="border-r-4"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</el-col>
|
||||||
</el-space>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
{{ chatRecord.problem_text }}
|
{{ chatRecord.problem_text }}
|
||||||
</div>
|
</div>
|
||||||
@ -119,7 +146,6 @@ onMounted(() => {})
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.download-file {
|
.download-file {
|
||||||
width: 200px;
|
|
||||||
height: 43px;
|
height: 43px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@ -137,9 +163,6 @@ onMounted(() => {})
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.show {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.download-button {
|
.download-button {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user