| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="container"> |
| | | <h1 style="font-size:21px;padding-top:30px">早上好! |
| | | <h1 style="font-size: 21px;">{{ greeting +',' + user.userName }} |
| | | <el-dropdown style="float:right"> |
| | | <span class="el-dropdown-link"> |
| | | <img src="../../assets/images/Frame.png"> |
| | |
| | | <div v-model="rootList.url"> |
| | | <el-avatar shape="circle" class="avater_1_1" v-if="isShow_1"> |
| | | <img :src="'http://47.93.189.255:8080/'+ rootList[0].url" |
| | | @click="getPersonInfo(rootList[0].userId)"></img> |
| | | @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> |
| | | @click="getPersonInfo(rootList[1].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> |
| | | @click="getPersonInfo(rootSecList[0][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> |
| | | @click="getPersonInfo(rootSecList[0][1].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> |
| | | @click="getPersonInfo(rootSecList[1][0].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> |
| | | @click="getPersonInfo(rootSecList[1][1].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> |
| | | @click="getPersonInfo(rootSecList[2][0].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> |
| | | @click="getPersonInfo(rootSecList[2][1].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> |
| | | @click="getPersonInfo(rootSecList[3][0].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> |
| | | @click="getPersonInfo(rootSecList[3][1].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> |
| | | @click="getPersonInfo(rootSecList[0][0].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> |
| | | </el-avatar> |
| | | |
| | | <el-avatar shape="circle" class="avater_3_3" v-if="isShow_3"> |
| | | <el-img :src="'http://47.93.189.255:8080'+ rootList.url" |
| | | ></el-img> |
| | | </el-avatar> |
| | | |
| | | <el-avatar shape="circle" class="avater_3_4" v-if="isShow_3"> |
| | | <el-img :src="'http://47.93.189.255:8080'+ rootList.url" |
| | | ></el-img> |
| | | </el-avatar> |
| | | |
| | | <el-avatar shape="circle" class="avater_3_5" v-if="isShow_3"> |
| | | <el-img :src="'http://47.93.189.255:8080'+ rootList.url" |
| | | ></el-img> |
| | | </el-avatar> |
| | | |
| | | <el-avatar shape="circle" class="avater_3_6" v-if="isShow_3"> |
| | | <el-img :src="'http://47.93.189.255:8080'+ rootList.url" |
| | | ></el-img> |
| | | </el-avatar> |
| | | |
| | | <el-avatar shape="circle" class="avater_3_7" v-if="isShow_4"> |
| | | <el-img :src="'http://47.93.189.255:8080'+ rootList.url" |
| | | ></el-img> |
| | | </el-avatar> |
| | | |
| | | <el-avatar shape="circle" class="avater_3_8" v-if="isShow_3"> |
| | | <el-img :src="'http://47.93.189.255:8080'+ rootList.url" |
| | | ></el-img> |
| | |
| | | <script> |
| | | |
| | | import {listRoot} from "@/api/root/index"; |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | data(){ |
| | | return{ |
| | | user: {}, |
| | | greeting: "", |
| | | imageSrc: require('../../assets/images/Group 407.png') , |
| | | dropdownList: [ |
| | | { name: '只显示第一代', src: 'Group 407.png' }, |
| | | { name: '显示至第二代', src: 'Group 407.png' }, |
| | | { name: '只显示第一代', src: 'Group 443.png' }, |
| | | { name: '显示至第二代', src: 'Group 444.png' }, |
| | | { name: '显示至第三代', src: 'Group 445.png' }, |
| | | { name: '显示全部', src: 'Group 407.png' } |
| | | ], |
| | |
| | | } |
| | | |
| | | }, |
| | | created() { |
| | | |
| | | // this.getCateInfor() |
| | | // for (let i = 0; i < this.contactList.length; i++) { |
| | | // this.formDat[i] = this.contactList[i]; |
| | | // } |
| | | }, |
| | | mounted() { |
| | | this.getList(1); |
| | | created(){ |
| | | this.setGreeting(); |
| | | this.getUser(); |
| | | }, |
| | | methods:{ |
| | | getInfo(src) |
| | |
| | | } |
| | | }, |
| | | generation_1(){ |
| | | |
| | | |
| | | // alert(127) |
| | | // this.getList(1) |
| | | listRoot(1).then(response => { |
| | | this.rootList = response.data |
| | | this.isShow_1=true |
| | | this.isShow_2=false |
| | | this.isShow_3=false |
| | | this.isShow_4=false |
| | | }) |
| | | listRoot(1).then(response => { |
| | | this.rootList = response.data |
| | | this.isShow_1=true |
| | | this.isShow_2=false |
| | | this.isShow_3=false |
| | | this.isShow_4=false |
| | | }) |
| | | }, |
| | | getPersonInfo(id) |
| | | { |
| | | this.$router.push("/familymodel/jiagenwang/personInfo/" + id); |
| | | this.$router.push("/familymodel/jiagenwang/personInfo/" + id); |
| | | //alert(id) |
| | | }, |
| | | generation_2(){ |
| | |
| | | this.isShow_3=false |
| | | this.isShow_4=false |
| | | } |
| | | // console.log(this.rootSecList) |
| | | // console.log(this.rootSecList) |
| | | }) |
| | | |
| | | |
| | |
| | | |
| | | // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | listRoot(depth).then(response => { |
| | | // alert(123) |
| | | // alert(123) |
| | | // console.log(response.data) |
| | | // alert(90) |
| | | this.rootList = response.data; |
| | | this.isShow_1=true |
| | | // alert(this.rootList[0].url) |
| | | // alert(this.rootList[0].url) |
| | | // this.total = response.data.total; |
| | | this.loading = false; |
| | | console.log(this.rootList) |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | //问候(时间判断) |
| | | 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; |
| | | this.getList(1); |
| | | }); |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |