ruoyi-ui/src/views/components/superMindmap.vue
@@ -3,6 +3,7 @@
</template>
<script>
    import * as d3 from 'd3';
import { useRoute,useRouter } from 'vue-router'
    export default {
        props: {
@@ -79,6 +80,7 @@
        methods: {
            drawMap() {
                let that = this
                //alert(that.$router)
                // 源数据
                let data = {}
                // 判断data是否为空对象
@@ -222,6 +224,19 @@
                    .text(function (d) {
                        return d.data.link;
                    })
                    .on("click",function (event, node) {
                             let data = node.data
                      that.$router.push("/familymodel/jiagenwang/personInfo/" + data.id);
                      })
                      .attr("cursor",
                          function (d) {
                              if (d.data.disabled) {
                                  return 'not-allowed'
                              } else {
                                  return 'pointer'
                              }
                          })
                //绘制文字
                groups.append("text")
                    .on("click", function (event, node) {
@@ -231,10 +246,12 @@
                            return
                        }
                        // 有外链的节点,打开新窗口后恢复到思维导图页面
                        if (data.url) {
                            window.open(data.url)
                            that.$emit('activeChange', 'map')
                            return
                        if (data.id) {
                           // window.open(data.url)
                            that.$router.push("/familymodel/jiagenwang/personInfo/" + data.id);
                            //that.$emit('activeChange', 'map')
                           // return
                        }
                        // 标准节点—— 传出 prop
                        if (data.dicType) {