From b71b4fa3c592e667e114ba1bcf42a2204d6cbf6d Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期二, 18 三月 2025 15:56:27 +0800
Subject: [PATCH] 修改了对应代码

---
 ruoyi-ui/src/views/index.vue |  215 +++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 159 insertions(+), 56 deletions(-)

diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue
index 5328088..6b2f046 100644
--- a/ruoyi-ui/src/views/index.vue
+++ b/ruoyi-ui/src/views/index.vue
@@ -1,81 +1,184 @@
 <template>
   <div class="app-container">
-    <div class="image-container">
-      <img class="bottom-image" src="../assets/images/shouye.png" alt="Bottom Image">
-      <el-input
-        class="text-box1"
-        type="textarea" :rows="6" resize="none"
-        placeholder="    鍙傚ぉ澶ф爲蹇呮湁鍏舵牴锛屼竾閲屾睙娌充害鏈夊叾婧愩��
-      鏅ぉ涔嬩笅鐐庨粍瀛愬瓩锛岃剦鑴夌浉浼狅紝涓嶄箯鏈夎瘑涔嬪+锛屾爧姊佷箣鎵嶃�傚惥绛変笉鍙繕鍏跺厛浜猴紝浜︿笉鍙笉鐭ユ垜涔嬫湰婧愩��
-      寤鸿氨涔嬪ぇ浜嬶紝涓婂彲鍛婃叞绁栧厛鍦ㄥぉ涔嬬伒锛屼笅鍙娇瀛愬瓩鍚庝唬鏈夊鏍逛箣鏈�傚彾鑴変箣浜庤崏鏈ㄣ�佸瓙瀛欎箣浜庡墠鏍癸紝琛�绠′箣浜庝汉浣擄紝渚濇墭鎶�鏈緭閫佷簨浠讹紝渚涚粰缁忛獙锛岃氨鍐欐牴鏍圭浉浼犱竴璺蛋鏉ョ殑闈炲嚒銆�"
-      ></el-input>
-      <el-input
-        class="text-box2"
-        type="textarea" :rows="18" resize="none"
-        placeholder="    瀹讹紝鏄垜浠敓鍛界殑椹跨珯銆佹紓娉婄殑褰掓墍銆�
-      浼楁墍鍛ㄧ煡锛岃嚜浠庢湁浜嗚禆浠ョ敓瀛樼殑灏忓搴紝瀹跺涵鎴愬憳灏辨湁浜嗘垚闀跨殑杞ㄨ抗銆佸涔犵殑杞ㄨ抗銆佸伐浣滅殑杞ㄨ抗銆佺敓娲荤殑杞ㄨ抗銆傚搴腑姣忎竴浜烘瘡涓�鐗╅兘璋卞啓鐫�瀹跺涵鐨勮緣鐓岃建杩广�傝鎴戜滑鐢� 鈥滄湰閮介兘鈥� 鏉ユ敹钘忔瘡涓鏃忋�佹瘡涓搴�佹瘡涓汉鐢滆湝鏄ㄥぉ锛岃褰曞垢绂忎粖澶╋紝鎷ユ姳缇庡ソ鏄庡ぉ銆傝鎴戜滑鐪熸鎰熷彈鐢熷懡璇炵敓鐨勬澹扮瑧璇紝浜虹敓濂嬫枟鐨勯吀鐢滆嫤杈o紝鑶濅笅寮勫効鐨勫垢绂忔俯棣ㄣ��
-      娲诲湪褰撲笅锛屾灞ュ寙鍖嗐�傚綋鎮ㄥ湪澶栧湴婕傛硦鑰屾�ラ渶鏌愪簺蹇呴』鐨勮瘉鏄庢潗鏂欐椂锛涘綋鎮ㄥ湪浣跨敤鏌愪欢鐗╁搧闇�瑕佸府鍔╂椂锛涘綋鎮ㄨ韩蹇冪柌鍊︽椂锛涘綋鎮ㄦ�ヤ簬涓鸿嚜宸辨暣鐞嗗仴搴锋棩璁版椂锛涘綋鎮ㄥ湪鏌愪釜鐬棿鍙堝洖蹇嗚捣浜蹭汉鐨勭瑧璨屾椂.......鎮ㄤ笉濡ㄦ墦寮�韬竟鐨� 鈥滄湰閮介兘鈥� 锛岀粏缁嗗湴鍝佸懗鈥滄湰閮介兘鈥濊褰曠殑姣忎竴杞ㄨ抗绛旀锛氬師鏉ュ彲浠ュ湪 鈥滄湰閮介兘鈥� 鏀惰幏鏉愭枡璇佹槑锛涙挱鏀剧殑閭e凡缁忔硾榛勭殑鐓х墖銆佽瘉涔︼紝鍞よ捣浜嗗線鏃ユ棫鏃剁浉鐭ャ�佸浠婂凡婕傛硦澶╂动鐨勬寶鍙嬶紱涓�鏈偖绁ㄣ�佷竴娌撴爣鏈紝璁板綍鐨勬槸鎮ㄩ偅鍒牱鐨勭瓒o紱鎵嬫嬁鐫�瀛╁瓙鐨勫嚭鐢熻瘉鏄庯紝鏇存槸绂佷笉浣忔唱姘存墦婀跨溂鐪讹紝濡備粖浜嬩笟鏈夋垚鐨勫瓙濂充滑浼间箮鍙堝彉鍥為偅涓ぉ鐪熺儌婕殑瀛╁瓙锛涙偍鐨勬埧浜ц瘉銆佸湡鍦拌瘉銆佺粨濠氳瘉銆佸仴搴锋姤鍛娿�佺櫨骞村績鎰�...锛屾垨璁稿湪灏嗘潵鏌愪釜鏃堕棿鈥滄湰閮介兘鈥濊兘鎴愪负鎮ㄧ淮鎶ゆ潈鐩婄殑淇濋殰锛屾姂鎴栨槸鐣欑粰瀛愬コ鐨勪竴浠借储瀵屻��
-      甯屾湜 鈥滄湰閮介兘鈥� 鑳芥垚涓哄姪鎺ㄦ偍浜嬩笟鎴愬姛銆佸搴垢绂忋�佷汉鐢熺編婊$殑濂藉府鎵嬶紒"
-      ></el-input>
+<!--    <div class="text" style="background-color: #FEF7FC;" >
+      <h1 style="font-size: 21px;">{{ greeting +'锛�' + user.userName }}</h1></div> -->
+    <div class="image-container" style="background-color: #FEF7FC;">
+      <img class="top-image" src="../assets/images/awd.png"  alt="Top Image">
     </div>
+    <superMindmap  v-if="showMindMap" :active='active' :data="mapData" @activeChange="activeChange" class="mind-map-container ">
+
+    </superMindmap>
 
   </div>
 </template>
 
 <script>
-
+import { getUserProfile } from "@/api/system/user";
+import { listRootAll ,listRoot} from "@/api/root/index";
+import * as d3 from 'd3';
+// 瀵煎叆鎬濈淮瀵煎浘鏁版嵁
+import MapData from './components/MapData.js'
+// 瀵煎叆鎬濈淮瀵煎浘缁勪欢
+import superMindmap from './components/superMindmap.vue'
 
 export default {
-  name: "App",
-  dicts: ['sys_normal_disable'],
-  data(){
+   components:{superMindmap},
+  name: "index",
+  data() {
     return {
-
+      active: '',
+      mapData: null,
+      showMindMap: false,
+      user: {},
+      greeting: "",
+      rootList:[]
     };
-  }
+  },
+  mounted() {
+  //  this.setGreeting();
+    this.getUser();
+  //  this.mapData = MapData.webMap
 
+   // console.log(this.mapData)
+   // console.log('sssssssssssssssssss')
+  },
+
+  methods: {
+     // 鐐瑰嚮鎬濈淮瀵煎浘鑺傜偣鍚庯紝瑙﹀彂鍙橀噺鏇存柊
+    activeChange(newLabel) {
+        this.active = newLabel
+        this.reloadMindMap()
+    },
+    // 閲嶈浇鎬濈淮瀵煎浘
+    reloadMindMap() {
+        this.showMindMap = false
+        this.$nextTick(
+            () => {
+                this.showMindMap = true
+            }
+        )
+    },
+
+    setGreeting() {
+      const currentTime = new Date();
+      const currentHour = currentTime.getHours();
+
+      if (currentHour < 12) {
+        this.greeting = "鏃╀笂濂�";
+      } else if (currentHour < 14) {
+        this.greeting = "涓崍濂�";
+      } else if (currentHour < 18) {
+        this.greeting = "涓嬪崍濂�";
+      } else {
+        this.greeting = "鏅氫笂濂�";
+      }
+    },
+
+    getUser() {
+      getUserProfile().then(response => {
+        this.user = response.data;
+      });
+	  
+	  let clanId = this.$store.state.user.clanId
+	  if(clanId==null)
+	  {
+		//alert(clanId)
+		return}
+      listRoot(10,clanId).then(response =>{
+        this.rootList =response.data;
+
+        const mindMapData = this.rootList[0];
+         console.log(mindMapData)
+	//	for(let i = 0; i < )
+		 console.log('9999')
+        // console.log(this.drawData(mindMapData))
+        this.mapData = this.drawData(mindMapData)
+        this.showMindMap = true
+      })
+
+    },
+    drawData(mpdata) {
+	  let tp = "https://www.bendudu.com:8080/profile/upload/2023/03/19/test7_20230319222030A007.jpg"
+      if (mpdata == null)
+        return null;
+      var data = {
+        "label": mpdata['spouse'] != null ? eval(mpdata['spouse']).oldName : '',
+        "prop": mpdata['oldName'],
+        "url": mpdata['url']!=null?'https://www.bendudu.com:8080/'+mpdata['url']:tp,
+        "purl": mpdata['spouse'] != null ? (mpdata['spouse'].url!=null? 'https://www.bendudu.com:8080/'+mpdata['spouse'].url:tp):tp,
+        "id": mpdata['userId'],
+		"spid": mpdata['spouseId'] != null ? mpdata['spouseId'] : '',
+		
+        "link": mpdata['oldName'],
+        "children": []
+      };
+
+      if (mpdata['childList'] != null) {
+        for (var i = 0; i < mpdata['childList'].length; i++) {
+          var dt = {
+            "label": mpdata['childList'][i]['spouse'] != null ? eval(mpdata['childList'][i]['spouse']).oldName : "",
+            "prop": mpdata['childList'][i]['oldName'],
+            "url": mpdata['childList'][i]['url']!=null?'https://www.bendudu.com:8080/'+mpdata['childList'][i]['url']:tp,
+             "id": mpdata['childList'][i]['userId'],
+			 "spid": mpdata['childList'][i]['spouseId'] != null ? mpdata['childList'][i]['spouseId'] : '',
+			 
+			 "purl": (mpdata['childList'][i]['spouse'] != null ) ?( mpdata['childList'][i]['spouse'].url!= null?'https://www.bendudu.com:8080/'+mpdata['childList'][i]['spouse'].url:tp):tp,
+            "link": mpdata['childList'][i]['oldName'],
+            "children": []
+          };
+          if (mpdata['childList'][i]['childList'] != null) {
+            for (var j = 0; j < mpdata['childList'][i]['childList'].length; j++) {
+              dt['children'].push(this.drawData(mpdata['childList'][i]['childList'][j]));
+            }
+          }
+          data['children'].push(dt);
+        }
+      }
+      return data;
+    },
+
+  }
 };
 </script>
 
 <style scoped>
 .app-container{
-  background-color: #FEF7FC;
+  position: relative;
+  background-color: transparent;
+  /*padding-left: -30px;*/
+  margin-top:-30px;
+  margin-left: -20px;
+}
+.text{
+  opacity: 0.75;
+  padding: 10px;
 }
 .image-container {
-  position: relative;
-  width: 100%;
-  height: 100%;
-}
-.bottom-image {
-  z-index: -1; /* 璁剧疆搴曞眰鍥剧墖鐨勫眰绾т负1 */
-  width: 100%;
-  height: 100%;
-  /*position: absolute;*/
-  top: 0;
-}
-.text-box1 {
   position: absolute;
-  top: 17.5%;
-  left: 47.5%;
-  transform: translate(-50%, -50%);
-  width: 320px;
+  /*position: fixed;*/
+  top: 50px;
+  /*left:-20px;*/
+  width: 110%;
+  height: 100%;
+  z-index: -1;
+}
 
+.mind-map-container{
+  /*position: fixed;*/
+
+  overflow: auto;
+  z-index: 1;
+  opacity: 1;
+  margin-top: 5%;
+  margin-left: 12%;
+  /*background-color: transparent;*/
 }
-.text-box1 ::placeholder{
-  color:#000000;
-  font-size: 15px;
-  font-family: Microsoft YaHei UI-Light, Microsoft YaHei UI;
-}
-.text-box2 {
-  position: absolute;
-  top: 51%;
-  left: 80%;
-  transform: translate(-50%, -50%);
-  width: 345px;
-}
-.text-box2 ::placeholder{
-  color:#000000;
-  font-size: 15px;
-  font-family: Microsoft YaHei UI-Light, Microsoft YaHei UI;
+.top-image {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+  position: static;
+  opacity: 0.8;
+  overflow: auto;
 }
 </style>

--
Gitblit v1.9.1