| | |
| | | <el-tab-pane label="修改密码" name="resetPwd"> |
| | | <resetPwd /> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="第三方应用" name="thirdParty"> |
| | | <thirdParty :auths="state.auths" /> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-card> |
| | | </el-col> |
| | |
| | | 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 state = ref<Record<string, any>>({ |
| | | user: {}, |
| | | roleGroup: '', |
| | | postGroup: '' |
| | | 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; |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getUser(); |
| | | getUser(); |
| | | getAuths(); |
| | | }) |
| | | </script> |