| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6" :xs="24"> |
| | | <el-card class="box-card"> |
| | | <template v-slot:header> |
| | | <template #header> |
| | | <div class="clearfix"> |
| | | <span>个人信息</span> |
| | | </div> |
| | | </template> |
| | | <div> |
| | | <div class="text-center"> |
| | | <userAvatar/> |
| | | <userAvatar /> |
| | | </div> |
| | | <ul class="list-group list-group-striped"> |
| | | <li class="list-group-item"> |
| | |
| | | </li> |
| | | <li class="list-group-item"> |
| | | <svg-icon icon-class="tree" />所属部门 |
| | | <div class="pull-right" v-if="state.user.dept">{{ state.user.dept.deptName }} / {{ state.postGroup }}</div> |
| | | <div v-if="state.user.dept" class="pull-right">{{ state.user.dept.deptName }} / {{ state.postGroup }}</div> |
| | | </li> |
| | | <li class="list-group-item"> |
| | | <svg-icon icon-class="peoples" />所属角色 |
| | |
| | | </el-col> |
| | | <el-col :span="18" :xs="24"> |
| | | <el-card> |
| | | <template v-slot:header> |
| | | <template #header> |
| | | <div class="clearfix"> |
| | | <span>基本资料</span> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script setup name="Profile" lang="ts"> |
| | | import UserAvatar from "./userAvatar.vue"; |
| | | import UserInfo from "./userInfo.vue"; |
| | | import ResetPwd from "./resetPwd.vue"; |
| | | import ThirdParty from "./thirdParty.vue"; |
| | | import { getAuthList } from "@/api/system/social/auth"; |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | import UserAvatar from './userAvatar.vue'; |
| | | import UserInfo from './userInfo.vue'; |
| | | import ResetPwd from './resetPwd.vue'; |
| | | import ThirdParty from './thirdParty.vue'; |
| | | import { getAuthList } from '@/api/system/social/auth'; |
| | | import { getUserProfile } from '@/api/system/user'; |
| | | |
| | | const activeTab = ref("userinfo"); |
| | | const activeTab = ref('userinfo'); |
| | | const state = ref<Record<string, any>>({ |
| | | user: {}, |
| | | roleGroup: '', |
| | | postGroup: '', |
| | | auths: [] |
| | | user: {}, |
| | | roleGroup: '', |
| | | postGroup: '', |
| | | auths: [] |
| | | }); |
| | | |
| | | const userForm = ref({}); |
| | | |
| | | const getUser = async () => { |
| | | const res = await getUserProfile(); |
| | | state.value.user = res.data.user; |
| | | userForm.value = { ...res.data.user } |
| | | state.value.roleGroup = res.data.roleGroup; |
| | | state.value.postGroup = res.data.postGroup; |
| | | const res = await getUserProfile(); |
| | | state.value.user = res.data.user; |
| | | userForm.value = { ...res.data.user }; |
| | | state.value.roleGroup = res.data.roleGroup; |
| | | state.value.postGroup = res.data.postGroup; |
| | | }; |
| | | |
| | | const getAuths = async () => { |
| | | const res = await getAuthList(); |
| | | state.value.auths = res.data; |
| | | const res = await getAuthList(); |
| | | state.value.auths = res.data; |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getUser(); |
| | | getAuths(); |
| | | }) |
| | | getUser(); |
| | | getAuths(); |
| | | }); |
| | | </script> |