diff --git a/core/core-frontend/package.json b/core/core-frontend/package.json index 3a0f6ed..595b55b 100644 --- a/core/core-frontend/package.json +++ b/core/core-frontend/package.json @@ -21,10 +21,12 @@ "@codemirror/lang-sql": "^6.4.0", "@form-create/designer": "^3.2.11", "@form-create/element-ui": "^3.2.22", + "@monaco-editor/loader": "^1.5.0", "@npkg/tinymce-plugins": "^0.0.7", "@tinymce/tinymce-vue": "^5.1.0", "@turf/centroid": "^7.0.0", "@videojs-player/vue": "^1.0.0", + "@vue/compiler-sfc": "^3.5.15", "@vueuse/core": "^9.13.0", "ace-builds": "^1.15.3", "axios": "^1.3.3", @@ -47,6 +49,7 @@ "lodash-es": "^4.17.21", "mathjs": "^11.6.0", "mitt": "^3.0.0", + "monaco-editor": "^0.52.2", "net": "^1.0.2", "normalize.css": "^8.0.1", "nprogress": "^0.2.0", @@ -66,6 +69,7 @@ "vue-types": "^5.0.2", "vue-uuid": "^3.0.0", "vue3-ace-editor": "^2.2.2", + "vue3-sfc-loader": "^0.9.5", "vuedraggable": "^4.1.0", "web-storage-cache": "^1.1.1", "xss": "^1.0.14" diff --git a/core/core-frontend/public/images/navbg.png b/core/core-frontend/public/images/navbg.png new file mode 100644 index 0000000..5fd47ac Binary files /dev/null and b/core/core-frontend/public/images/navbg.png differ diff --git a/core/core-frontend/public/images/navmenu.png b/core/core-frontend/public/images/navmenu.png new file mode 100644 index 0000000..d1a6e6d Binary files /dev/null and b/core/core-frontend/public/images/navmenu.png differ diff --git a/core/core-frontend/public/images/navmenucheck.png b/core/core-frontend/public/images/navmenucheck.png new file mode 100644 index 0000000..43b0e9c Binary files /dev/null and b/core/core-frontend/public/images/navmenucheck.png differ diff --git a/core/core-frontend/src/router/index.ts b/core/core-frontend/src/router/index.ts index 6280169..b6f0b73 100644 --- a/core/core-frontend/src/router/index.ts +++ b/core/core-frontend/src/router/index.ts @@ -226,6 +226,13 @@ export const routes: AppRouteRecordRaw[] = [ hidden: true, meta: {}, component: () => import('@/viewsnew/application/PreviewSystem.vue') + }, + { + path: '/SfcEditor', + name: 'SfcEditor', + hidden: true, + meta: {}, + component: () => import('@/viewsnew/application/SfcEditor/index.vue') } ] diff --git a/core/core-frontend/src/viewsnew/application/PreviewSystem.vue b/core/core-frontend/src/viewsnew/application/PreviewSystem.vue index d011b26..4310ba7 100644 --- a/core/core-frontend/src/viewsnew/application/PreviewSystem.vue +++ b/core/core-frontend/src/viewsnew/application/PreviewSystem.vue @@ -1,6 +1,6 @@ + + \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/application/SfcEditor/index.vue b/core/core-frontend/src/viewsnew/application/SfcEditor/index.vue new file mode 100644 index 0000000..f1d97c6 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/SfcEditor/index.vue @@ -0,0 +1,329 @@ + + + + + \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/application/SfcEditor/previewNavSfc.vue b/core/core-frontend/src/viewsnew/application/SfcEditor/previewNavSfc.vue new file mode 100644 index 0000000..8e649a3 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/SfcEditor/previewNavSfc.vue @@ -0,0 +1,165 @@ + + + \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/application/menuconfig/assocmenu.vue b/core/core-frontend/src/viewsnew/application/menuconfig/assocmenu.vue index c2c8982..13c4cc0 100644 --- a/core/core-frontend/src/viewsnew/application/menuconfig/assocmenu.vue +++ b/core/core-frontend/src/viewsnew/application/menuconfig/assocmenu.vue @@ -9,12 +9,14 @@ import { ElTree,FormInstance } from 'element-plus' import { publicTree } from '@/utils/validate'; import { setModuleId } from '@/api/permission/menu' import { ElMessage, ElMessageBox } from 'element-plus' -import Navbar from '@/viewsnew/application/module/Navbar/index.vue' +import Navbar from '@/viewsnew/application/SfcEditor/previewNavSfc.vue' +import { getMenuTree } from '@/api/permission/menu' const props = defineProps({ applicationId:String, assoccurrentid:String, assocmenuname:String, - currentNodeId:String + currentNodeId:String, + projectname:String }) const defaultPropss = { children: 'children', @@ -45,6 +47,7 @@ const moduletreeData = ref([]) const moduletreeRef = ref>() const assoccurrentid = ref('') const isNavbar = ref(false) +const menuList:any = ref([]) const loadCanvasData = (dvId, weight?, ext?) => { const initMethod = initCanvasData dataInitState.value = false @@ -94,7 +97,15 @@ const handleNodeClick = (e: any) => { moduleInfo.value = e isFormCreate.value = true } else if(e.type == '02'){ + const params = { + appId: props.applicationId, + name:'', + isdisplay:'' + } + getMenuTree(params).then(res => { + menuList.value = res.data isNavbar.value = true + }) } rightloading.value = false } @@ -203,7 +214,8 @@ function handleDatasetName() { :download-status="downloadStatus" > - + diff --git a/core/core-frontend/src/viewsnew/application/menuconfig/assocmodule.vue b/core/core-frontend/src/viewsnew/application/menuconfig/assocmodule.vue index 7c66ab6..f99fae8 100644 --- a/core/core-frontend/src/viewsnew/application/menuconfig/assocmodule.vue +++ b/core/core-frontend/src/viewsnew/application/menuconfig/assocmodule.vue @@ -5,7 +5,7 @@ import FormCreate from '@/viewsnew/common/FormCreate.vue' import { initCanvasData } from '@/utils/canvasUtils' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { moduleList } from '@/api/application/module' -import Navbar from '@/viewsnew/application/module/Navbar/index.vue' +import Navbar from '@/viewsnew/application/SfcEditor/assocPage.vue' const props = defineProps({ moduleinfo:Object, applicationId:String @@ -56,9 +56,10 @@ const loadCanvasData = (dvId, weight?, ext?) => { ) } onMounted(() => { - getInit() isFormCreate.value = false dataInitState.value = false + isNavbar.value = false + getInit() }) watch(() => props.moduleinfo, (val) => { getInit() diff --git a/core/core-frontend/src/viewsnew/application/menuconfig/index.vue b/core/core-frontend/src/viewsnew/application/menuconfig/index.vue index 058f0c9..b5e47c0 100644 --- a/core/core-frontend/src/viewsnew/application/menuconfig/index.vue +++ b/core/core-frontend/src/viewsnew/application/menuconfig/index.vue @@ -2,7 +2,7 @@ import Header from './header.vue' import Assocmodule from './assocmodule.vue' import Assocmenu from './assocmenu.vue' -import { findApplicationById } from "@/api/application/application"; +import { findApplicationById } from "@/api/application/application" import { useRoute, useRouter } from 'vue-router' import { ref, onMounted,reactive,nextTick } from 'vue' import menuconfig_treeadd_white from '@/assets/svg/menuconfig_treeadd_white.svg' @@ -276,7 +276,7 @@ function assocsubmit(){ 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 f0d6355..414c3d4 100644 --- a/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue +++ b/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue @@ -7,6 +7,7 @@ import { publicTree } from '@/utils/validate'; import { moduleList,moduleAdd,moduleUpdate,moduleDel } from '@/api/application/module' const emit = defineEmits(['handleNodeClick']) const { t } = useI18n() +const router = useRouter() const props = defineProps({ projectInfo: { type: String, @@ -130,6 +131,12 @@ function editClic(data:any){ window.open('/#/dashboard?resourceId=' + data.id + '&appId='+projectInfo.value.id, '_blank'); }else if(data.type == '09'){ window.open('/#/formcreatedesigner?moduleId=' +data.id + '&appId='+projectInfo.value.id, '_blank'); + } else if(data.type == '02'){ + const route = router.resolve({ + path: '/SfcEditor', + query: { dvId: data.id,appId:projectInfo.value.id,name:data.name,appname:projectInfo.value.name } + }); + window.open(route.href, '_blank'); } // window.open('/#/dvCanvas?dvId=' + "1097641013486424064", '_blank'); } diff --git a/core/core-frontend/src/viewsnew/application/module/index.vue b/core/core-frontend/src/viewsnew/application/module/index.vue index 5cf301e..0182e01 100644 --- a/core/core-frontend/src/viewsnew/application/module/index.vue +++ b/core/core-frontend/src/viewsnew/application/module/index.vue @@ -7,11 +7,11 @@ import { findApplicationById } from "@/api/application/application"; import { useRouter, useRoute } from 'vue-router' import DvPreview from '@/viewsnew/data-visualization/DvPreview.vue' import FormCreate from '@/viewsnew/common/FormCreate.vue' -import Navbar from '@/viewsnew/application/module/Navbar/index.vue' - +import Navbar from '@/viewsnew/application/sfcEditor/previewNavSfc.vue' import DePreview from '@/components/data-visualization/canvas/DePreview.vue' import { initCanvasData, initCanvasDataPrepare, onInitReady } from '@/utils/canvasUtils' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' +import { getMenuTree } from '@/api/permission/menu' import { storeToRefs } from 'pinia' import { t } from '@/hooks/web/useI18n'; const dvMainStore = dvMainStoreWithOut() @@ -42,7 +42,7 @@ const isNavbar = ref(false) // } // }) - +const menuList = ref([]) const dataVKeepSize = computed(() => { return state.canvasStylePreview?.screenAdaptor === 'keep' }) @@ -65,6 +65,7 @@ const route = useRoute() const projectInfo:any = ref({}) const applicationId:any = ref('') const busiFlag = ref('dataV') +const isExecuteEvent = ref(false) onMounted(() => { applicationId.value = route.query.id getInit() @@ -122,9 +123,19 @@ function handleNodeClick(e){ moduleInfo.value = e isFormCreate.value = true } else if(e.type == '02'){ + isExecuteEvent.value = true + const params = { + appId: applicationId.value, + name:'', + isdisplay:'' + } + getMenuTree(params).then(res => { + menuList.value = res.data isNavbar.value = true + }) } } + onBeforeMount(() => { dvMainStore.canvasDataInit() }) @@ -147,7 +158,8 @@ onBeforeMount(() => { :download-status="downloadStatus" > - +