From d98ee3d32a130b4a4f25d5a7a8951ff96e3b69d3 Mon Sep 17 00:00:00 2001 From: jingna <1264204245@qq.com> Date: Fri, 30 May 2025 18:30:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/package.json | 4 + core/core-frontend/public/images/navbg.png | Bin 0 -> 4129 bytes core/core-frontend/public/images/navmenu.png | Bin 0 -> 373 bytes .../public/images/navmenucheck.png | Bin 0 -> 370 bytes core/core-frontend/src/router/index.ts | 7 + .../viewsnew/application/PreviewSystem.vue | 5 +- .../Navbar/index.vue => SfcEditor/Navbar.vue} | 89 +++-- .../application/SfcEditor/assocPage.vue | 124 +++++++ .../viewsnew/application/SfcEditor/index.vue | 329 ++++++++++++++++++ .../application/SfcEditor/previewNavSfc.vue | 165 +++++++++ .../application/menuconfig/assocmenu.vue | 18 +- .../application/menuconfig/assocmodule.vue | 5 +- .../viewsnew/application/menuconfig/index.vue | 4 +- .../application/module/Leftmenu/index.vue | 7 + .../src/viewsnew/application/module/index.vue | 20 +- 15 files changed, 736 insertions(+), 41 deletions(-) create mode 100644 core/core-frontend/public/images/navbg.png create mode 100644 core/core-frontend/public/images/navmenu.png create mode 100644 core/core-frontend/public/images/navmenucheck.png rename core/core-frontend/src/viewsnew/application/{module/Navbar/index.vue => SfcEditor/Navbar.vue} (71%) create mode 100644 core/core-frontend/src/viewsnew/application/SfcEditor/assocPage.vue create mode 100644 core/core-frontend/src/viewsnew/application/SfcEditor/index.vue create mode 100644 core/core-frontend/src/viewsnew/application/SfcEditor/previewNavSfc.vue 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 0000000000000000000000000000000000000000..5fd47ac4e02cf6835811d62dfec4025a9e61a2de GIT binary patch literal 4129 zcmYjU2{_aLAD@vkIilo9G*=WwjEG7x<(8w6Yc#T%oSCuQIsY@aq+$|tGq;tHtJOxz zeJ12iM9Y6f{hnvn^L)PV<8{2>pJ!1<20EPVg6seQfD@vtZ2|zWVCcUuu`<&?NA6Qx z=wECex>olA01n=rHv?q|{R;r#qC&JUnfYbT4_U=H^;waYw`;r$Y6EK96dMczl!-3F z2NNm`jDiQ3YUr+G_TN_71hmLF;z;qBzm)%A~x)(4$n^^Y{twPXSTC$+}8 zh3`c;J#@T~6-A8Epmu)uvgn-}8(t_X%6ET|Uwf0b4LQF)e82JjLVoVnkDmP1o4VN0 zXf}*lxqF?OW4N?4=QF5up;kTnGB2OGSR+GNrI!%lQhltkh?FpT;WTxVLSyH9 zd7D@b*L;~f|JjlI?J>PlApyXSW1a zpK5JzgWAn&KoIQitA-y73e>EFi&w)256$^dKQ4c-h97&)t_?tFc`?2|6*@-}40Tm| zC8!MNXRW-aiFuLU8d?eHtx)eU5Fq3w)-z-?k6r7RsP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ZF+(!7q<1gXf1wb>OaBYMQtDlur-L(*`np8vG7z`Tw?Q zsKRon58xaAT-!Nfhq04iQ9cJZ3`6Ib?o)i|17@V|EcamB2T~^jd#z^Y}|Dxj6Fe^->PSG z3wy)ei82+_d%yi>O$e%e{_(y2Vma5JC%i8UZ*?_MekwJ8hehC%mYBbCymjVdt4#a}5{V?e*VzlBUfir|T@uE~aa!}`uLD2T z|1GiNF8CwG`ash=;l|(1dK_O?x5}+PSmZTJ^?Ef=PQ#vE?;E##Tp5*A`@rT+TvUDC b$8Ws08CH8$CYdGz!;!($)z4*}Q$iB}+%%-2 literal 0 HcmV?d00001 diff --git a/core/core-frontend/public/images/navmenucheck.png b/core/core-frontend/public/images/navmenucheck.png new file mode 100644 index 0000000000000000000000000000000000000000..43b0e9c01a9afec1f9645fc4647a9952bb35a6ca GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0vp^@jxuk!3HE7MFeL8Db50q$YKTtZXpn6ymYtj4+8_E zil>WXNJit^TN}L&2Qaig{I6zSTAb^l&*XV@(cxIW{}VJHF4D-GY5B6`({7W$2gFi$m)UjgPQ5vM zKkud-){6YP;OsA1&sRt6zo~ip^JxirDY+|Z)nBL2Sf07jZtlJ{PKI2GYoe|S^>2Qz z_Ca*Ts`LjE60gj*o|C-be?|M&nUAe9@h3 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" > - +