feige
2024-08-24 22f6c02cdae18e9501a2ce8911208218d271fd92
ruoyi-ui/src/views/components/superMindmap.vue
@@ -251,16 +251,26 @@
                              }
                          })
              // 添加头像
                groups.append("image")
           let pu = null
             let gp = groups.append("image")
                  .attr("xlink:href", function (d) {
                    return d.data.url; // 头像图片的路径
            // console.log(d.data.purl)
                  pu = d.data.purl
            // console.log(d.data.prop)
            // console.log(d.data.label==="")
             if(d.data.label==="")
               return ""
            else
                 return d.data.purl; // 头像图片的路径
                  })
                  .attr("x", 12) // 头像相对于节点的水平位置
         if (pu!=null){
               gp.attr("x", 12) // 头像相对于节点的水平位置
                  .attr("y", 3) // 头像相对于节点的垂直位置
                  .attr("width", 24) // 头像的宽度
                  .attr("height", 24); // 头像的高度
                //绘制标注(节点前的矩形)
                groups.append("rect")
             gp.append("rect")
                  .attr("x", 37)
                  .attr("y", 3)
                  .attr("width",
@@ -272,6 +282,7 @@
                  .attr("fill", "#FFFFFF")
                  // 添加圆角
                  .attr("rx", 4)
            }
                  //绘制文字
                groups.append("text")
                    .on("click", function (event, node) {
@@ -286,6 +297,7 @@
                            that.$router.push("/familymodel/jiagenwang/personInfo/" + data.id);
                            //that.$emit('activeChange', 'map')
                           // return
                        }
                        // 标准节点—— 传出 prop