From b88d68424ab4275c3f6242d5bbc71d327be235a0 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期日, 27 八月 2023 17:12:01 +0800
Subject: [PATCH] 修改了家跟网
---
ruoyi-ui/src/views/homeRoot/index.vue | 134 +++++++++++++++++++++++++-------------------
1 files changed, 75 insertions(+), 59 deletions(-)
diff --git a/ruoyi-ui/src/views/homeRoot/index.vue b/ruoyi-ui/src/views/homeRoot/index.vue
index 117432c..389666a 100644
--- a/ruoyi-ui/src/views/homeRoot/index.vue
+++ b/ruoyi-ui/src/views/homeRoot/index.vue
@@ -27,49 +27,49 @@
@click="getPersonInfo(rootList[0].userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_1_2" v-if="isShow_1">
- <img :src="'http://47.93.189.255:8080/'+ rootList[1].url"
- @click="getPersonInfo(rootList[1].userId)">
+ <img :src="'http://47.93.189.255:8080/'+ rootList[0].spouse.url"
+ @click="getPersonInfo(rootList[0].spouse.userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_2_1" v-if="isShow_2">
- <img :src="'http://47.93.189.255:8080/'+ rootSecList[0][0].url"
- @click="getPersonInfo(rootSecList[0][0].userId)">
+ <img :src="'http://47.93.189.255:8080/'+ rootSecList[0].url"
+ @click="getPersonInfo(rootSecList[0].userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_2_2" v-if="isShow_2">
- <img :src="'http://47.93.189.255:8080/'+ rootSecList[0][1].url"
- @click="getPersonInfo(rootSecList[0][1].userId)">
+ <img :src="'http://47.93.189.255:8080/'+ rootSecList[0].spouse.url"
+ @click="getPersonInfo(rootSecList[0].spouse.userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_2_3" v-if="isShow_2">
- <img :src="'http://47.93.189.255:8080/'+ rootSecList[1][0].url"
- @click="getPersonInfo(rootSecList[1][0].userId)">
+ <img :src="'http://47.93.189.255:8080/'+ rootSecList[1].url"
+ @click="getPersonInfo(rootSecList[1].userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_2_4" v-if="isShow_2">
- <img :src="'http://47.93.189.255:8080/'+ rootSecList[1][1].url"
- @click="getPersonInfo(rootSecList[1][1].userId)">
+ <img :src="'http://47.93.189.255:8080/'+ rootSecList[1].url"
+ @click="getPersonInfo(rootSecList[1].spouse.userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_2_5" v-if="isShow_2">
- <img :src="'http://47.93.189.255:8080/'+ rootSecList[2][0].url"
- @click="getPersonInfo(rootSecList[2][0].userId)">
+ <img :src="'http://47.93.189.255:8080/'+ rootSecList[2].url"
+ @click="getPersonInfo(rootSecList[2].userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_2_6" v-if="isShow_2">
- <img :src="'http://47.93.189.255:8080/'+ rootSecList[2][1].url"
- @click="getPersonInfo(rootSecList[2][1].userId)">
+ <img :src="'http://47.93.189.255:8080/'+ rootSecList[2].spouse.url"
+ @click="getPersonInfo(rootSecList[2].spouse.userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_2_7" v-if="isShow_2">
- <img :src="'http://47.93.189.255:8080/'+ rootSecList[3][0].url"
- @click="getPersonInfo(rootSecList[3][0].userId)">
+ <img :src="'http://47.93.189.255:8080/'+ rootSecList[3].url"
+ @click="getPersonInfo(rootSecList[3].userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_2_8" v-if="isShow_2">
- <img :src="'http://47.93.189.255:8080/'+ rootSecList[3][1].url"
- @click="getPersonInfo(rootSecList[3][1].userId)">
+ <img :src="'http://47.93.189.255:8080/'+ rootSecList[3].spouse.url"
+ @click="getPersonInfo(rootSecList[3].spouse.userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_3_1" v-if="isShow_3">
- <img :src="'http://47.93.189.255:8080/'+ rootSecList[0][0].url"
- @click="getPersonInfo(rootSecList[0][0].userId)">
+ <img :src="'http://47.93.189.255:8080/'+ rootSecList[4].url"
+ @click="getPersonInfo(rootSecList[4].userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_3_2" v-if="isShow_3">
- <el-img :src="'http://47.93.189.255:8080'+ rootList.url"
- ></el-img>
+ <img :src="'http://47.93.189.255:8080/'+ rootSecList[4].spouse.url"
+ @click="getPersonInfo(rootSecList[4].spouse.userId)">
</el-avatar>
<el-avatar shape="circle" class="avater_3_3" v-if="isShow_3">
@@ -198,13 +198,15 @@
greeting: "",
imageSrc: require('../../assets/images/Group 407.png') ,
dropdownList: [
- { name: '鍙樉绀虹涓�浠�', src: 'Group 443.png' },
- { name: '鏄剧ず鑷崇浜屼唬', src: 'Group 444.png' },
+ { name: '鍙樉绀虹涓�浠�', src: 'Group 445.png' },
+ { name: '鏄剧ず鑷崇浜屼唬', src: 'Group 445.png' },
{ name: '鏄剧ず鑷崇涓変唬', src: 'Group 445.png' },
{ name: '鏄剧ず鍏ㄩ儴', src: 'Group 407.png' }
],
rootList:[],
rootSecList:[],
+ rootThiList:[],
+ rootFouList:[],
loading: true,
formData:[],
isShow_1:false,
@@ -331,7 +333,7 @@
generation_1(){
// alert(127)
// this.getList(1)
- listRoot(1).then(response => {
+ listRoot(4).then(response => {
this.rootList = response.data
this.isShow_1=true
this.isShow_2=false
@@ -348,71 +350,85 @@
// alert(2356)
//this.getList(2);
- let st = new Map()
+ // let st = new Map()
this.rootSecList = []
- listRoot(2).then(response => {
+ listRoot(4).then(response => {
this.rootList = response.data
- // console.log(this.rootList[0].childList)
- // alert(this.rootList[0].childList.length)
- for(let i = 0; i < this.rootList[0].childList.length; i++)
- {
- // alert(343)
- if(st.has(this.rootList[0].childList[i].userId)!=true)
- {
- // alert(35)
- st.set(this.rootList[0].childList[i].userId, 1);
- st.set(this.rootList[0].childList[i].spouseId,1)
- let spid = this.rootList[0].childList[i].spouseId
- let gen = []
+ this.getGenByNum(this.rootSecList, this.rootList[0], 1, 2)
+ // console.log(this.rootSecList)
+ // alert(this.rootSecList[0].url)
+ // for(let i = 0; i < this.rootList[0].childList.length; i++)
+ // {
+ // // if(st.has(this.rootList[0].childList[i].userId)!=true)
+ // //{
+ // // st.set(this.rootList[0].childList[i].userId, 1);
+ // // st.set(this.rootList[0].childList[i].spouseId,1)
+ // // let spid = this.rootList[0].childList[i].spouseId
+ // let gen = []
+ // gen.push(this.rootList[0].childList[i])
+ // this.rootSecList.push(gen)
+ // // }
- gen.push(this.rootList[0].childList[i])
- for(let j = 0; j < this.rootList[0].childList.length; j++)
- {
- if(this.rootList[0].childList[j].userId==spid)
- {
- gen.push(this.rootList[0].childList[j])
- break
- }
- }
- this.rootSecList.push(gen)
- }
+ // }
this.isShow_2=true
this.isShow_1=true
this.isShow_3=false
this.isShow_4=false
- }
// console.log(this.rootSecList)
})
},
generation_3(){
- this.getList(3);
+ this.getList(4);
+ //鍐欑3浠g殑浠g爜閫昏緫锛岀敤涓や釜for寰幆鍐欑3浠�
+ this.getGenByNum(this.rootThiList, this.rootList[0], 1, 3)
+ console.log(this.rootThiList)
+ // console.log('-=-------')
this.isShow_2=true
this.isShow_3=true
this.isShow_4=false
},
generation_4(){
this.getList(4);
+ this.getGenByNum(this.rootFouList, this.rootList[0], 1, 3)
+ console.log(this.rootFouList)
this.isShow_2=true
this.isShow_3=true
this.isShow_4=true
},
+ getGenByNum(genData,data,fir,num)
+ {
+ //console.log(data)
+ if(data==null||fir>num)
+ return
+ if(fir==num)
+ {
+ // alert(fir)
+ genData.push(data);
+ return
+ }
+ // console.log(data)
+ // // console.log(data[0].childList)
+ // console.log('----------------')
+ for(var i = 0; i < data.childList.length; i++)
+ {
+ this.getGenByNum(genData, data.childList[i], fir + 1, num);
+ }
+ },
getList(depth) {
this.loading = true;
- // alert(23)
- // alert(45)
- // console.log(this.queryParams)
-
- // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
listRoot(depth).then(response => {
this.rootList = response.data;
this.isShow_1=true
// alert(this.rootList[0].url)
// this.total = response.data.total;
- this.loading = false;
console.log(this.rootList)
+ // alert(45)
+ this.loading = false;
+ // console.log(this.rootList)
+
}
);
},
@@ -436,7 +452,7 @@
getUser() {
getUserProfile().then(response => {
this.user = response.data;
- this.getList(1);
+ this.getList(4);
});
}
--
Gitblit v1.9.1