From 99ca8bf24992558d197ed426a1aa83b8d2cb9983 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期一, 09 十月 2023 09:55:20 +0800
Subject: [PATCH] 修改http为https

---
 ruoyi-ui/src/views/components/superMindmap.vue |   55 +++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 37 insertions(+), 18 deletions(-)

diff --git a/ruoyi-ui/src/views/components/superMindmap.vue b/ruoyi-ui/src/views/components/superMindmap.vue
index 8c30a33..9e57849 100644
--- a/ruoyi-ui/src/views/components/superMindmap.vue
+++ b/ruoyi-ui/src/views/components/superMindmap.vue
@@ -3,7 +3,8 @@
 </template>
 <script>
     import * as d3 from 'd3';
- 
+import { useRoute,useRouter } from 'vue-router'
+
     export default {
         props: {
             data: Object,
@@ -79,6 +80,7 @@
         methods: {
             drawMap() {
                 let that = this
+                //alert(that.$router)
                 // 婧愭暟鎹�
                 let data = {}
                 // 鍒ゆ柇data鏄惁涓虹┖瀵硅薄
@@ -100,7 +102,7 @@
                 // 宸﹀彸鍐呰竟璺�
                 let mapPaddingLR = 10
                 // 涓婁笅鍐呰竟璺�
-                let mapPaddingTB = 0
+                let mapPaddingTB =10
                 let mapWidth = this.nodeWidth * TreeDeep + mapPaddingLR * 2;
                 let mapHeight = (this.nodeHeight - 4) * leafNum + mapPaddingTB * 2;
                 // 瀹氫箟鐢诲竷鈥斺�� 澶栬竟璺� 10px
@@ -158,7 +160,7 @@
                         return B茅zier_curve_generator({source: start, target: end});
                     })
                     .attr("fill", "none")
-                    .attr("stroke", "#c3c3c3")
+                    .attr("stroke", "#EBA4AA")
                     // 铏氱嚎
                     // .attr("stroke-dasharray", "8")
                     .attr("stroke-width", 1);
@@ -192,12 +194,12 @@
                     .attr("r", 4)
                     .attr("fill", function (d) {
                         if (d.data.childrenTemp) {
-                            return 'red'
+                            return '#EBA4AA'
                         } else {
                             return 'white'
                         }
                     })
-                    .attr("stroke", "red")
+                    .attr("stroke", "#EBA4AA")
                     .attr("stroke-width", 1);
                 //缁樺埗鏍囨敞(鑺傜偣鍓嶇殑鐭╁舰)
                 groups.append("rect")
@@ -209,7 +211,7 @@
                         }
                     )
                     .attr("height", 22)
-                    .attr("fill", "grey")
+                    .attr("fill", "#FFFFFF")
                     // 娣诲姞鍦嗚
                     .attr("rx", 4)
                 //缁樺埗閾炬帴鏂瑰紡
@@ -217,11 +219,24 @@
                     .attr("x", 12)
                     .attr("y", -5)
                     .attr("dy", 10)
-                    .attr("fill", 'white')
-                    .attr("font-size", 12)
+                    .attr("fill", '#F6739F')
+                    .attr("font-size", 14)
                     .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
                         }
                         // 鏈夊閾剧殑鑺傜偣锛屾墦寮�鏂扮獥鍙e悗鎭㈠鍒版�濈淮瀵煎浘椤甸潰
-                        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) {
@@ -252,6 +269,8 @@
                         function (d) {
                             if (d.data.prop === that.active) {
                                 return '#409EFF'
+                            }else{
+                              return '#8296C5'
                             }
                         }
                     )
@@ -281,7 +300,7 @@
             },
         },
     }
- 
+
     // 鑾峰彇鏍戠殑娣卞害
     function getDepth(json) {
         var arr = [];
@@ -306,7 +325,7 @@
         }
         return depth;
     }
- 
+
     // 鎻愬彇鏍戠殑瀛愯妭鐐癸紝鏈�缁堟墍鏈夋爲鐨勫瓙鑺傜偣閮戒細瀛樺叆浼犲叆鐨刲eafList鏁扮粍涓�
     function getTreeLeaf(treeData, leafList) {
         // 鍒ゆ柇鏄惁涓烘暟缁�
@@ -326,13 +345,13 @@
             }
         }
     }
- 
+
     // 鑾峰彇鍖呭惈姹夊瓧鐨勫瓧绗︿覆鐨勯暱搴�
     function getStringSizeLength(string) {
         //鍏堟妸涓枃鏇挎崲鎴愪袱涓瓧鑺傜殑鑻辨枃锛屽啀璁$畻闀垮害
         return string.replace(/[\u0391-\uFFE5]/g, "aa").length;
     }
- 
+
     // 鐢熸垚闅忔満鐨勫瓧绗︿覆
     function randomString(strLength) {
         strLength = strLength || 32;
@@ -343,7 +362,7 @@
         }
         return n
     }
- 
+
     // 鑾峰彇瀛楃涓茬殑鍍忕礌瀹藉害
     function getPXwidth(str, fontSize = "12px", fontFamily = "Microsoft YaHei") {
         var span = document.createElement("span");
@@ -365,4 +384,4 @@
         // result.height = parseFloat(window.getComputedStyle(span).height) - result.height;
         return result.width;
     }
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.1