forked from github/dataease
fix: 大屏编辑界面的URL错误
This commit is contained in:
parent
73d7911226
commit
8bdba6e74b
@ -2,7 +2,7 @@
|
||||
import { ElMessage, ElMessageBox } from 'element-plus-secondary'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import { deepCopy } from '@/utils/utils'
|
||||
import { nextTick, reactive, ref, computed } from 'vue'
|
||||
import { nextTick, reactive, ref, computed, onMounted } from 'vue'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { storeToRefs } from 'pinia'
|
||||
@ -299,6 +299,10 @@ const saveLinkageSetting = () => {
|
||||
const onDvNameChange = () => {
|
||||
snapshotStore.recordSnapshotCache()
|
||||
}
|
||||
const isDataEaseBi = ref(false)
|
||||
onMounted(() => {
|
||||
isDataEaseBi.value = !!window.DataEaseBi
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -313,7 +317,11 @@ const onDvNameChange = () => {
|
||||
<div class="middle-area"></div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-icon v-if="!batchOptStatus" class="custom-el-icon back-icon" @click="backToMain()">
|
||||
<el-icon
|
||||
v-if="!batchOptStatus && !isDataEaseBi"
|
||||
class="custom-el-icon back-icon"
|
||||
@click="backToMain()"
|
||||
>
|
||||
<Icon class="toolbar-icon" name="icon_left_outlined" />
|
||||
</el-icon>
|
||||
<div class="left-area" v-if="editMode === 'edit' && !batchOptStatus">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ElMessage, ElMessageBox } from 'element-plus-secondary'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import { ref, nextTick } from 'vue'
|
||||
import { ref, nextTick, onMounted } from 'vue'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { storeToRefs } from 'pinia'
|
||||
@ -131,6 +131,10 @@ const getFullScale = () => {
|
||||
const curWidth = dvToolbarMain.value.clientWidth
|
||||
return (curWidth * 100) / canvasStyleData.value.width
|
||||
}
|
||||
const isDataEaseBi = ref(false)
|
||||
onMounted(() => {
|
||||
isDataEaseBi.value = !!window.DataEaseBi
|
||||
})
|
||||
|
||||
eventBus.on('preview', preview)
|
||||
eventBus.on('save', saveCanvasWithCheck)
|
||||
@ -148,7 +152,7 @@ eventBus.on('clearCanvas', clearCanvas)
|
||||
</div>
|
||||
<div class="middle-area"></div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-else-if="!isDataEaseBi">
|
||||
<el-icon class="custom-el-icon back-icon" @click="backToMain()">
|
||||
<Icon class="toolbar-icon" name="icon_left_outlined" />
|
||||
</el-icon>
|
||||
|
@ -58,11 +58,13 @@ import { setupI18n } from '@/plugins/vue-i18n'
|
||||
import { setupStore } from '@/store'
|
||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||
import { setupElementPlus } from '@/plugins/element-plus'
|
||||
import { setupRouter } from '@/router'
|
||||
|
||||
const setupAll = async (dom: string, componentName: string): Promise<App<Element>> => {
|
||||
const app = createApp(AppElement, { componentName })
|
||||
await setupI18n(app)
|
||||
setupStore(app)
|
||||
setupRouter(app)
|
||||
setupElementPlus(app)
|
||||
const userStore = useUserStoreWithOut()
|
||||
await userStore.setUser()
|
||||
|
@ -9,7 +9,9 @@ export function imgUrlTrans(url) {
|
||||
? (basePath.endsWith('/') ? basePath.substring(0, basePath.length - 1) : basePath) + url
|
||||
: null
|
||||
return window.DataEaseBi
|
||||
? `${window.DataEaseBi.baseUrl}${rawUrl.startsWith('/api') ? rawUrl.slice(5) : rawUrl}`
|
||||
? `${window.DataEaseBi.baseUrl}${
|
||||
rawUrl.startsWith('/api') ? rawUrl.slice(5) : rawUrl
|
||||
}`.replace('//', '/')
|
||||
: rawUrl
|
||||
} else {
|
||||
return url
|
||||
|
@ -213,9 +213,10 @@ function getNode(nodeId: number) {
|
||||
}
|
||||
|
||||
defineExpose({ getNode })
|
||||
|
||||
const isDataEaseBi = ref(false)
|
||||
onMounted(() => {
|
||||
initDataset()
|
||||
isDataEaseBi.value = !!window.DataEaseBi
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -321,7 +322,7 @@ onMounted(() => {
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-footer v-if="!isDataEaseBi">
|
||||
<div class="footer-container">
|
||||
<el-button type="primary" :icon="Plus" link class="add-btn" @click="addDataset">
|
||||
新建数据集
|
||||
|
@ -8,6 +8,7 @@ import {
|
||||
computed,
|
||||
nextTick,
|
||||
onBeforeMount,
|
||||
onMounted,
|
||||
provide,
|
||||
h
|
||||
} from 'vue'
|
||||
@ -95,6 +96,11 @@ let cacheId = ''
|
||||
onBeforeMount(() => {
|
||||
cacheId = route.query.id as unknown as string
|
||||
})
|
||||
|
||||
const isDataEaseBi = ref(false)
|
||||
onMounted(() => {
|
||||
isDataEaseBi.value = !!window.DataEaseBi
|
||||
})
|
||||
const dsFieldDragOptions = { group: { name: 'drag', pull: 'clone' }, sort: true }
|
||||
|
||||
const itemFormRules = reactive<FormRules>({
|
||||
@ -1731,7 +1737,7 @@ const onRefreshChange = val => {
|
||||
:class="{ dark: themes === 'dark' }"
|
||||
style="margin-left: 8px"
|
||||
@click="editDs"
|
||||
v-if="curDatasetWeight >= 7"
|
||||
v-if="curDatasetWeight >= 7 && !isDataEaseBi"
|
||||
>
|
||||
<Icon name="icon_edit_outlined" class="el-icon-arrow-down el-icon-delete" />
|
||||
</el-icon>
|
||||
|
Loading…
Reference in New Issue
Block a user