From a2d6eef36d0c23dd946946cc5c6caadad7fde030 Mon Sep 17 00:00:00 2001 From: icanci Date: Mon, 25 Sep 2023 23:50:33 +0800 Subject: [PATCH] =?UTF-8?q?ui=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/vueboot/src/router/index.js | 7 +++ .../src/views/bic-view/bic-singleton-view.vue | 15 ++++-- .../src/views/bic-view/landingGraph.vue | 46 +++++++++++++++++++ 3 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 views/src/main/resources/vueboot/src/views/bic-view/landingGraph.vue diff --git a/views/src/main/resources/vueboot/src/router/index.js b/views/src/main/resources/vueboot/src/router/index.js index 50246a0..023bdc9 100644 --- a/views/src/main/resources/vueboot/src/router/index.js +++ b/views/src/main/resources/vueboot/src/router/index.js @@ -220,6 +220,13 @@ export const constantRoutes = [ name: 'bicSummaryView', meta: {title: '聚合视图'} }, + { + path: 'landingGraph', + component: () => import('@/views/bic-view/landingGraph'), + name: 'landingGraph', + meta: { title: '纠察图节点落地页' }, + hidden:true, + }, // { // path: 'demo-view', // component: () => import('@/views/bic-view/demo-view'), diff --git a/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue b/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue index f5ba648..126c5ec 100644 --- a/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue +++ b/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue @@ -202,6 +202,7 @@ export default { dialogTableTitle: '节点数据', currentBuryings: [], vueCode: '', + nodeVueType: '', pluginContext: {}, } }, @@ -216,7 +217,6 @@ export default { if (valid) { let loading = vm.loading(); let ret = await graphQuery(vm.queryForm) - console.log(ret) if (ret.ok) { if (ret.data.graph === null) { vm.$message({type: 'error', message: '查询失败:此用例没有定义纠察图'}); @@ -264,7 +264,16 @@ export default { showVue(row) { let vm = this vm.pluginContext = row - vm.dialogVisible = true + if (vm.nodeVueType === 'DIALOG') { + vm.dialogVisible = true + } else if (vm.nodeVueType === 'OPEN_TAG') { + // 跳转到新标签页 + localStorage.setItem('pluginContext', JSON.stringify(row)) + localStorage.setItem('vueCode', vm.vueCode) + vm.$router.push({path: '/bicView/landingGraph'}) + } else { + vm.dialogVisible = true + } }, doRefresh() { let vm = this @@ -288,7 +297,6 @@ export default { // graph.centerContent() graph.on('node:click', ({e, x, y, node, view}) => { - console.log(node) if (node.store.data.buryings !== undefined && node.store.data.buryings !== null) { vm.currentBuryings = node.store.data.buryings } else { @@ -296,6 +304,7 @@ export default { } vm.dialogTableTitle = node.store.data.attrs.label.text + ' [节点数据]' vm.vueCode = node.store.data.nodeVueCode + vm.nodeVueType = node.store.data.nodeVueType vm.dialogTableVisible = true }) // diff --git a/views/src/main/resources/vueboot/src/views/bic-view/landingGraph.vue b/views/src/main/resources/vueboot/src/views/bic-view/landingGraph.vue new file mode 100644 index 0000000..2801a33 --- /dev/null +++ b/views/src/main/resources/vueboot/src/views/bic-view/landingGraph.vue @@ -0,0 +1,46 @@ + + + + + -- Gitee