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