Просмотр исходного кода

点击无图分类节点提示

cxmo 1 год назад
Родитель
Сommit
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})=>{
         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)
         }
     })

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

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