From 1aa5be564d5df56297355a2e71ae4ff6c7df0042 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期一, 09 十月 2023 10:03:23 +0800
Subject: [PATCH] ss
---
ruoyi-ui/src/views/components/superMindmap.vue | 41 ++++++++++++++++++++++++++++++-----------
1 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/ruoyi-ui/src/views/components/superMindmap.vue b/ruoyi-ui/src/views/components/superMindmap.vue
index 6ce4c1b..9e57849 100644
--- a/ruoyi-ui/src/views/components/superMindmap.vue
+++ b/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鏄惁涓虹┖瀵硅薄
@@ -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'
}
}
)
--
Gitblit v1.9.1