| | |
| | | <el-card class="card"> |
| | | <div class="panel-content flex flex-col items-center"> |
| | | <div class="avatar-container w-40 h-40 rounded-full overflow-hidden"> |
| | | <div class="avatar-content"> |
| | | <div class="avatar-content" v-if="userInfo.imagePath"> |
| | | <img src="@/assets/image/avatar/avatar.png" class="avatar-img" alt=""> |
| | | </div> |
| | | <!-- <div class="avatar-content" :style="{backgroundColor: getColor}"> |
| | | <div class="name text-5xl font-bold text-white">张</div> |
| | | </div> --> |
| | | <div class="avatar-content" :style="{backgroundColor: getColor}" v-else> |
| | | <div class="name text-5xl font-bold text-white">{{ getFirstName }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="name-container text-lg font-bold mt-5 mb-2"> |
| | | 测试测试 |
| | | {{ userInfo.realName }} |
| | | </div> |
| | | |
| | | <div class="department-container text-base mb-10"> |
| | | 测试测试 |
| | | {{ userInfo.userName }} |
| | | </div> |
| | | |
| | | <div class="tool-container grid grid-cols-3 gap-10"> |
| | |
| | | import { ref, computed } from 'vue'; |
| | | import randomColor from '@/utils/randomColor.js'; |
| | | import { useRouter } from 'vue-router'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { useUserStore } from '@/store/index.js'; |
| | | |
| | | const userStore = useUserStore(); |
| | | const { userInfo } = storeToRefs(userStore); |
| | | |
| | | |
| | | |
| | | const router = useRouter(); |
| | | |
| | |
| | | return randomColor(); |
| | | }); |
| | | |
| | | const getFirstName = computed(() => { |
| | | return userInfo.value.realName && userInfo.value.realName[0]; |
| | | }) |
| | | |
| | | const toolClick = (item) => { |
| | | if (item.path) { |
| | | router.push(item.path); |