fix: 修复嵌入式历史不显示问题

This commit is contained in:
wangdan-fit2cloud 2024-07-24 12:39:28 +08:00
parent 967c1af87f
commit 2e4d5fa339
4 changed files with 23 additions and 10 deletions

View File

@ -49,8 +49,14 @@
</el-form-item>
<el-form-item label="浮窗入口图标" v-if="user.isEnterprise()">
<div class="flex mt-8">
<div class="border border-r-4 mr-16" style="width: 50px; height: 50px; padding: 8px">
<img v-if="imgUrl.float_icon" :src="imgUrl.float_icon" alt="" height="50px" />
<div class="border border-r-4 mr-16" style="padding: 8px">
<el-image
v-if="imgUrl.float_icon"
:src="imgUrl.float_icon"
alt=""
fit="cover"
style="width: 50px; height: 50px; display: block"
/>
<img v-else src="@/assets/logo/logo.svg" height="50px" />
</div>
@ -95,7 +101,7 @@ import { useRoute } from 'vue-router'
import type { FormInstance, FormRules, UploadFiles } from 'element-plus'
import applicationApi from '@/api/application'
import applicationXpackApi from '@/api/application-xpack'
import { MsgSuccess, MsgConfirm } from '@/utils/message'
import { MsgSuccess, MsgError } from '@/utils/message'
import { t } from '@/locales'
import useStore from '@/stores'
const { user } = useStore()
@ -167,9 +173,10 @@ const onChange = (file: any, fileList: UploadFiles, attr: string) => {
// @ts-ignore
MsgError(t('views.applicationOverview.appInfo.EditAvatarDialog.fileSizeExceeded'))
return false
} else {
xpackForm.value[attr] = file.raw
imgUrl.value[attr] = URL.createObjectURL(file.raw)
}
xpackForm.value[attr] = file.raw
imgUrl.value[attr] = URL.createObjectURL(file.raw)
}
const open = (data: any) => {

View File

@ -100,9 +100,11 @@ const onChange = (file: any) => {
// @ts-ignore
MsgError(t('views.applicationOverview.appInfo.EditAvatarDialog.fileSizeExceeded'))
return false
} else {
iconFile.value = file
fileURL.value = URL.createObjectURL(file.raw)
}
iconFile.value = file
fileURL.value = URL.createObjectURL(file.raw)
}
function submit() {

View File

@ -155,7 +155,9 @@ function getAccessToken(token: string) {
application
.asyncAppAuthentication(token, loading)
.then(() => {
getAppProfile()
setTimeout(() => {
getAppProfile()
}, 500)
})
.catch(() => {
applicationAvailable.value = false

View File

@ -181,6 +181,8 @@ const onChange = (file: any, fileList: UploadFiles, attr: string) => {
// @ts-ignore
MsgError(`文件大小超过 5M`)
return false
} else {
themeForm.value[attr] = file.raw
}
} else {
const isLimit = file?.size / 1024 < 200
@ -188,10 +190,10 @@ const onChange = (file: any, fileList: UploadFiles, attr: string) => {
// @ts-ignore
MsgError(`文件大小超过 200KB`)
return false
} else {
themeForm.value[attr] = file.raw
}
}
themeForm.value[attr] = file.raw
}
function changeThemeHandle(val: string) {