Ver Fonte

点击无图分类节点提示

cxmo há 1 ano atrás
pai
commit
07e6994ead

+ 2 - 2
src/views/chartFrame_manage/common/event.js

@@ -12,8 +12,8 @@ export const myEvents = (graph,tempThis=null)=>{
 
 
     graph.on('node:click',({node,e})=>{
     graph.on('node:click',({node,e})=>{
         if(!window.location.pathname.startsWith('/chartframe')) return 
         if(!window.location.pathname.startsWith('/chartframe')) return 
-        console.log('node.data',node.data)
-        if(node.data&&node.data.id){
+        //console.log('node.data',node.data)
+        if(node.data){
             tempThis&&tempThis.$emit('showDialog',node.data)
             tempThis&&tempThis.$emit('showDialog',node.data)
         }
         }
     })
     })

+ 4 - 0
src/views/chartFrame_manage/index.vue

@@ -536,6 +536,10 @@ export default {
         },
         },
         //点击框架内节点
         //点击框架内节点
         handleShowDialog({id,nodeLink}){
         handleShowDialog({id,nodeLink}){
+            if(!id){
+                this.$message.warning("该节点没有选择图分类")
+                return
+            }
             //请求接口看有没有数据
             //请求接口看有没有数据
             mychartInterface.myList({
             mychartInterface.myList({
                 PageSize:1200,
                 PageSize:1200,