Merge pull request #10594 from dataease/pr@dev-v2@fix_upload-picture

fix(仪表板、数据大屏): 修复图片上传时快速切换组件导致图片上传失败问题
This commit is contained in:
王嘉豪 2024-06-28 13:46:09 +08:00 committed by GitHub
commit c2af9c3e21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 1 deletions

View File

@ -7,6 +7,7 @@ export const uploadFile = (fileId: number | string, param) =>
request.post({
url: '/staticResource/upload/' + fileId,
headersType: 'multipart/form-data',
loading: true,
data: param
})

View File

@ -28,6 +28,8 @@ import { Base64 } from 'js-base64'
import CanvasCacheDialog from '@/components/visualization/CanvasCacheDialog.vue'
import { deepCopy } from '@/utils/utils'
const interactiveStore = interactiveStoreWithOut()
import { useRequestStoreWithOut } from '@/store/modules/request'
import { usePermissionStoreWithOut } from '@/store/modules/permission'
const embeddedStore = useEmbedded()
const { wsCache } = useCache()
const canvasCacheOutRef = ref(null)
@ -42,6 +44,8 @@ const eventCheck = e => {
}
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
const requestStore = useRequestStoreWithOut()
const permissionStore = usePermissionStoreWithOut()
const {
fullscreenFlag,
componentData,
@ -233,6 +237,8 @@ onUnmounted(() => {
<el-container
class="dv-layout-container"
:class="{ 'preview-content': editMode === 'preview' }"
v-loading="requestStore.loadingMap[permissionStore.currentPath]"
element-loading-background="rgba(0, 0, 0, 0)"
>
<!-- 中间画布 -->
<main class="center" :class="{ 'de-screen-full': fullscreenFlag }">

View File

@ -40,6 +40,8 @@ import CanvasCacheDialog from '@/components/visualization/CanvasCacheDialog.vue'
import { deepCopy } from '@/utils/utils'
import DvPreview from '@/views/data-visualization/DvPreview.vue'
import DeRuler from '@/custom-component/common/DeRuler.vue'
import { useRequestStoreWithOut } from '@/store/modules/request'
import { usePermissionStoreWithOut } from '@/store/modules/permission'
const interactiveStore = interactiveStoreWithOut()
const embeddedStore = useEmbedded()
const { wsCache } = useCache()
@ -66,7 +68,8 @@ const composeStore = composeStoreWithOut()
const canvasCacheOutRef = ref(null)
const deWRulerRef = ref(null)
const deHRulerRef = ref(null)
const requestStore = useRequestStoreWithOut()
const permissionStore = usePermissionStoreWithOut()
const {
fullscreenFlag,
componentData,
@ -379,6 +382,8 @@ eventBus.on('handleNew', handleNew)
<div class="custom-dv-divider" />
<el-container
v-if="loadFinish"
v-loading="requestStore.loadingMap[permissionStore.currentPath]"
element-loading-background="rgba(0, 0, 0, 0)"
class="dv-layout-container"
:class="{ 'preview-layout-container': previewStatus }"
>