perf: url upload style
parent
97eb80882b
commit
7db2714197
|
|
@ -4,8 +4,7 @@
|
||||||
<el-button class="border-primary video-stop-button" @click="stopChat">
|
<el-button class="border-primary video-stop-button" @click="stopChat">
|
||||||
<app-icon iconName="app-video-stop" class="mr-8"></app-icon>
|
<app-icon iconName="app-video-stop" class="mr-8"></app-icon>
|
||||||
{{ $t('chat.operation.stopChat') }}
|
{{ $t('chat.operation.stopChat') }}
|
||||||
</el-button
|
</el-button>
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="operate-textarea">
|
<div class="operate-textarea">
|
||||||
|
|
@ -180,7 +179,8 @@
|
||||||
<video
|
<video
|
||||||
v-if="item.url"
|
v-if="item.url"
|
||||||
:src="item.url"
|
:src="item.url"
|
||||||
controls style="width: 100px; display: block"
|
controls
|
||||||
|
style="width: 100px; display: block"
|
||||||
class="border-r-6"
|
class="border-r-6"
|
||||||
autoplay
|
autoplay
|
||||||
/>
|
/>
|
||||||
|
|
@ -257,6 +257,16 @@
|
||||||
|
|
||||||
<template v-if="recorderStatus === 'STOP' || mode === 'mobile'">
|
<template v-if="recorderStatus === 'STOP' || mode === 'mobile'">
|
||||||
<span v-if="props.applicationDetails.file_upload_enable" class="flex align-center ml-4">
|
<span v-if="props.applicationDetails.file_upload_enable" class="flex align-center ml-4">
|
||||||
|
<!-- 如果URL地址 -->
|
||||||
|
<!-- <el-button
|
||||||
|
text
|
||||||
|
:disabled="checkMaxFilesLimit() || loading"
|
||||||
|
class="mt-4"
|
||||||
|
@click="showURLSetting = true"
|
||||||
|
>
|
||||||
|
<el-icon><Paperclip /></el-icon>
|
||||||
|
</el-button> -->
|
||||||
|
<!-- 没有URL地址 -->
|
||||||
<el-upload
|
<el-upload
|
||||||
action="#"
|
action="#"
|
||||||
multiple
|
multiple
|
||||||
|
|
@ -275,10 +285,8 @@
|
||||||
>
|
>
|
||||||
<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 />{{
|
||||||
$t('chat.uploadFile.fileType')
|
$t('chat.uploadFile.fileType')
|
||||||
|
|
@ -323,6 +331,56 @@
|
||||||
</auto-tooltip>
|
</auto-tooltip>
|
||||||
</el-text>
|
</el-text>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 弹出URL设置框 -->
|
||||||
|
<div class="popperURLSetting" v-if="showURLSetting">
|
||||||
|
<el-card shadow="always" class="border-r-8" style="--el-card-padding: 16px">
|
||||||
|
<el-form label-position="top" ref="urlFormRef" :model="urlForm">
|
||||||
|
<el-form-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="flex-between">
|
||||||
|
<span>URL 地址</span>
|
||||||
|
<el-select
|
||||||
|
:teleported="false"
|
||||||
|
v-model="urlForm.type"
|
||||||
|
size="small"
|
||||||
|
style="width: 85px"
|
||||||
|
>
|
||||||
|
<el-option :label="$t('common.fileUpload.image')" value="image" />
|
||||||
|
<el-option :label="$t('common.fileUpload.audio')" value="audio" />
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="urlForm.source_url"
|
||||||
|
placeholder="请输入URL地址,每行一个地址"
|
||||||
|
:rows="5"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="text-right">
|
||||||
|
<el-button @click="showURLSetting = false">{{ $t('common.cancel') }}</el-button>
|
||||||
|
<el-button type="primary" @click="showURLSetting = false">{{
|
||||||
|
$t('common.confirm')
|
||||||
|
}}</el-button>
|
||||||
|
</div>
|
||||||
|
<el-divider style="margin: 16px 0" />
|
||||||
|
<el-upload
|
||||||
|
action="#"
|
||||||
|
multiple
|
||||||
|
:auto-upload="false"
|
||||||
|
:show-file-list="false"
|
||||||
|
:accept="getAcceptList()"
|
||||||
|
:on-change="(file: any, fileList: any) => uploadFile(file, fileList)"
|
||||||
|
v-model:file-list="fileAllList"
|
||||||
|
ref="upload"
|
||||||
|
class="import-button"
|
||||||
|
>
|
||||||
|
<el-button class="w-full url-upload-button">本地上传</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -387,6 +445,12 @@ const localLoading = computed({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const showURLSetting = ref(false)
|
||||||
|
const urlForm = reactive({
|
||||||
|
source_url: '',
|
||||||
|
type: '',
|
||||||
|
})
|
||||||
|
|
||||||
const uploadLoading = computed(() => {
|
const uploadLoading = computed(() => {
|
||||||
return Object.values(filePromisionDict.value).length > 0
|
return Object.values(filePromisionDict.value).length > 0
|
||||||
})
|
})
|
||||||
|
|
@ -612,8 +676,7 @@ const TouchEnd = (bool?: boolean) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 取消录音控制台日志
|
// 取消录音控制台日志
|
||||||
Recorder.CLog = function () {
|
Recorder.CLog = function () {}
|
||||||
}
|
|
||||||
|
|
||||||
class RecorderManage {
|
class RecorderManage {
|
||||||
recorder?: any
|
recorder?: any
|
||||||
|
|
@ -1026,14 +1089,21 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.popperURLSetting {
|
||||||
|
right: 30px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.popperUserInput {
|
.popperURLSetting {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
left: 0;
|
right: 60px;
|
||||||
bottom: 50px;
|
bottom: 65px;
|
||||||
width: calc(100% - 50px);
|
width: calc(100% - 50px);
|
||||||
max-width: 400px;
|
max-width: 320px;
|
||||||
|
.url-upload-button {
|
||||||
|
border-color: var(--el-color-primary);
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,9 @@ export default {
|
||||||
image: 'Image',
|
image: 'Image',
|
||||||
audio: 'Audio',
|
audio: 'Audio',
|
||||||
video: 'Video',
|
video: 'Video',
|
||||||
|
other: 'Other',
|
||||||
|
addExtensions: 'Add Extensions',
|
||||||
|
existingExtensionsTip: 'The following extensions already exist',
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
label: 'Status',
|
label: 'Status',
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,9 @@ export default {
|
||||||
image: '圖片',
|
image: '圖片',
|
||||||
audio: '音頻',
|
audio: '音頻',
|
||||||
video: '視頻',
|
video: '視頻',
|
||||||
|
other: '其他文件',
|
||||||
|
addExtensions: '添加後綴名',
|
||||||
|
existingExtensionsTip: '文件後綴已存在',
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
label: '狀態',
|
label: '狀態',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue