diff --git a/core/core-frontend/src/components/dashboard/DbToolbar.vue b/core/core-frontend/src/components/dashboard/DbToolbar.vue index e7d28ff..6ca483e 100644 --- a/core/core-frontend/src/components/dashboard/DbToolbar.vue +++ b/core/core-frontend/src/components/dashboard/DbToolbar.vue @@ -49,6 +49,8 @@ import { useCache } from '@/hooks/web/useCache' import DeFullscreen from '@/components/visualization/common/DeFullscreen.vue' import DeAppApply from '@/views/common/DeAppApply.vue' import { useUserStoreWithOut } from '@/store/modules/user' +import { useRoute } from 'vue-router' +const route = useRoute() const { t } = useI18n() const dvMainStore = dvMainStoreWithOut() const snapshotStore = snapshotStoreWithOut() @@ -265,9 +267,10 @@ const clearCanvas = () => { } const backToMain = () => { - let url = '#/panel/index' - if (dvInfo.value.id) { - url = url + '?dvId=' + dvInfo.value.id + let url = '#/module' + const appId:any = route.query.appId + if (appId) { + url = url + '?id=' + appId } if (styleChangeTimes.value > 0) { ElMessageBox.confirm(t('components.sure_to_exit'), { diff --git a/core/core-frontend/src/components/data-visualization/DvToolbar.vue b/core/core-frontend/src/components/data-visualization/DvToolbar.vue index 8c7e7d0..a3760ce 100644 --- a/core/core-frontend/src/components/data-visualization/DvToolbar.vue +++ b/core/core-frontend/src/components/data-visualization/DvToolbar.vue @@ -73,6 +73,8 @@ const dvModel = 'dataV' const outerParamsSetRef = ref(null) const fullScreeRef = ref(null) const userStore = useUserStoreWithOut() +import { useRoute } from 'vue-router' +const route = useRoute() const { t } = useI18n() const props = defineProps({ @@ -221,10 +223,13 @@ const editCanvasName = () => { } const backToMain = () => { - let url = '#/screen/index' - if (dvInfo.value.id) { - url = url + '?dvId=' + dvInfo.value.id + let url = '#/module' + const appId:any = route.query.appId + if (appId) { + url = url + '?id=' + appId } + + if (styleChangeTimes.value > 0) { ElMessageBox.confirm(t('visualization.change_save_tips'), { confirmButtonType: 'primary', diff --git a/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue b/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue index 4d53752..fd5e182 100644 --- a/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue +++ b/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue @@ -103,6 +103,8 @@ function handleDatasetName(){ // 关键字搜索 const handleNodeClick = (data: any) => { // 树节点点击 if(data.node_type == '02'){ emit('handleNodeClick', data) + }else{ + emit('handleNodeClick', {}) } } function moreClic(event:any ,data:any){ // 更多操作 @@ -123,7 +125,6 @@ function moreClic(event:any ,data:any){ // 更多操作 isTreeDrag.value = true } function editClic(data:any){ - console.log(data) if(data.type == '03'){ window.open('/#/dvsCanvas?dvId=' + data.id+'&appId=' + projectInfo.value.id, '_blank'); }else if(data.type == '0301'){ diff --git a/core/core-frontend/src/viewsnew/application/module/header.vue b/core/core-frontend/src/viewsnew/application/module/header.vue index f55a9eb..e2980fe 100644 --- a/core/core-frontend/src/viewsnew/application/module/header.vue +++ b/core/core-frontend/src/viewsnew/application/module/header.vue @@ -10,8 +10,13 @@ const props = defineProps({ projectInfo: { type: String, default: '' + }, + treeInfo: { + type: String, + default: '' } }) +const treeInfo:any = ref({}) const appStore = useAppStoreWithOut() const embeddedStore = useEmbedded() const dvMainStore = dvMainStoreWithOut() @@ -20,12 +25,27 @@ const isDataEaseBi = computed(() => appStore.getIsDataEaseBi) const projectInfo:any=ref({ }) -watch(() => props.projectInfo, val => { - projectInfo.value = props.projectInfo +watch(() => props.projectInfo, (val:any) => { + projectInfo.value = val }) + +watch(() => props.treeInfo, (val:any) => { + treeInfo.value = val +}) + + onMounted(()=>{ projectInfo.value = props.projectInfo }) +function designClick(){ + if(treeInfo.value.type == '03'){ + window.open('/#/dvsCanvas?dvId=' + treeInfo.value.id+'&appId=' + projectInfo.value.id, '_blank'); + }else if(treeInfo.value.type == '0301'){ + window.open('/#/dashboard?resourceId=' + treeInfo.value.id + '&appId='+projectInfo.value.id, '_blank'); + }else if(treeInfo.value.type == '04'||treeInfo.value.type == '05'||treeInfo.value.type == '06'){ + window.open('/#/formcreatedesigner?moduleId=' +treeInfo.value.id + '&appId='+projectInfo.value.id, '_blank'); + } +} //预览 const previewpage=()=>{ if(dvInfo.value.id !== null){ @@ -57,7 +77,7 @@ const initOpenHandler = newWindow => {
预览
-
设计
+
设计
diff --git a/core/core-frontend/src/viewsnew/application/module/index.vue b/core/core-frontend/src/viewsnew/application/module/index.vue index e0834e0..f6e6e36 100644 --- a/core/core-frontend/src/viewsnew/application/module/index.vue +++ b/core/core-frontend/src/viewsnew/application/module/index.vue @@ -23,6 +23,7 @@ const state = reactive({ dvInfo: null, curPreviewGap: 0 }) +const treeInfo:any = ref({}) const dataInitState = ref(true) const downloadStatus = ref(false) const dvPreviewRef = ref(null) @@ -109,6 +110,7 @@ const loadCanvasData = (dvId, weight?, ext?) => { } function handleNodeClick(e){ + treeInfo.value = e isFormCreate.value = false dataInitState.value = false isNavbar.value = false @@ -131,7 +133,7 @@ onBeforeMount(() => {