|
|
@ -64,6 +64,7 @@ export default { |
|
|
|
async created() { |
|
|
|
this.windowResizeHandle(); |
|
|
|
this.routeHandle(this.$route); |
|
|
|
|
|
|
|
Promise.all([this.getWorkUserInfo()]).then(() => { |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
@ -109,6 +110,24 @@ export default { |
|
|
|
this.$store.state.mainShuju.activeName = tab.menuId; |
|
|
|
this.$store.state.mainShuju.contentTabsActiveName = tab.name; |
|
|
|
}, |
|
|
|
//获取团长信息 |
|
|
|
async getCommanderByUserId(userId){ |
|
|
|
const url = "/voluntary/volunteerOrg/getCommanderByUserId/"+userId; |
|
|
|
const { data, code, msg } = await requestGet(url); |
|
|
|
console.log(data,"sdfjldsflk1;"); |
|
|
|
if (code === 0) { |
|
|
|
console.log(this.$store.state.user, "sd;klfdslk"); |
|
|
|
this.$store.state.user = { |
|
|
|
volunteerOrgId: data.volunteerOrgId, |
|
|
|
volunteerOrgName: data.volunteerOrgName, |
|
|
|
commander: data.commander, |
|
|
|
...this.$store.state.user |
|
|
|
}; |
|
|
|
console.log(this.$store.state.user, "sd;klfdslk"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取当前管理员信息 |
|
|
|
async getWorkUserInfo() { |
|
|
|
const url = "/epmetuser/customerstaff/staffbasicinfo"; |
|
|
@ -116,6 +135,7 @@ export default { |
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
if (code === 0) { |
|
|
|
this.$store.state.user = { ...data }; |
|
|
|
await this.getCommanderByUserId(data.id); |
|
|
|
localStorage.setItem("roleList", data.roleList); |
|
|
|
localStorage.setItem("customerId", data.customerId); |
|
|
|
localStorage.setItem("staffId", data.id); |
|
|
|