| | |
| | | </template> |
| | | <div class="avatar-container"> |
| | | <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click"> |
| | | <div class="avatar-wrapper"> |
| | | <div class="avatar-wrapper" style="display: flex;align-items: center"> |
| | | <!-- <img :src="userStore.avatar" class="user-avatar" />--> |
| | | <img src="../../assets/images/avator.png" class="user-avatar" /> |
| | | <img src="../../assets/images/avator.png" class="user-avatar" /> |
| | | <span style="font-size: 16px">{{userName}}({{userTypeName}})</span> |
| | | <el-icon><caret-bottom /></el-icon> |
| | | </div> |
| | | <template #dropdown> |
| | |
| | | </el-dropdown> |
| | | </div> |
| | | </div> |
| | | <!-- <review-dialog ref="reviewRef" ></review-dialog>--> |
| | | |
| | | <user-dialog ref="reviewRef" ></user-dialog> |
| | | <!-- <register ref="regRef" @getList="getList" />--> |
| | | <!-- <supervise-dialog ref="superRef"></supervise-dialog>--> |
| | | </div> |
| | |
| | | import Cookies from "js-cookie"; |
| | | import {getUserById} from "@/api/sysUsers"; |
| | | import menu from "@/layout/components/Sidebar/menu"; |
| | | import userDialog from '@/views/onlineEducation/systemManage/user/components/userDialog.vue' |
| | | |
| | | const appStore = useAppStore() |
| | | const userStore = useUserStore() |
| | |
| | | const regRef = ref(null) |
| | | const superRef = ref(); |
| | | const userInfo = ref(); |
| | | const userName = ref('') |
| | | const userTypeName = ref('') |
| | | onMounted(()=>{ |
| | | if(getToken()){ |
| | | userInfo.value = JSON.parse(Cookies.get('userInfo')) |
| | | userName.value = userInfo.value.username |
| | | userTypeName.value = userInfo.value.userType == 0 ? '管理员' : userInfo.value.userType == 1 ? '企业级' :userInfo.value.userType == 2 ? '部门级':userInfo.value.userType == 3 ? '车间级' :userInfo.value.userType == 4 ? '其他' : '学员' |
| | | console.log("userInfo",userInfo.value ) |
| | | } |
| | | // getState(); |
| | |
| | | |
| | | function getInfo() { |
| | | console.log("getInfo",userInfo.value) |
| | | //机构用户 |
| | | if(userInfo.value.identity === 1){ |
| | | //审核驳回(可修改) |
| | | if(userInfo.value.state === 3){ |
| | | const obj = { |
| | | id: userInfo.value.id, |
| | | username: userInfo.value.username, |
| | | agencyId: userInfo.value.agentId |
| | | } |
| | | regRef.value.openDialog('reject', obj); |
| | | }else{ |
| | | //审核通过、未审核状态(不可修改) |
| | | const obj = { |
| | | agencyId: userInfo.value.agentId |
| | | } |
| | | reviewRef.value.openDialog(obj,'view') |
| | | } |
| | | } |
| | | //监管用户 |
| | | else if (userInfo.value.identity === 0) { |
| | | const obj = { |
| | | id: userInfo.value.id |
| | | } |
| | | superRef.value.openDialog('view', obj); |
| | | } |
| | | reviewRef.value.openDialog('view',userInfo.value) |
| | | } |
| | | function editPsd() { |
| | | superRef.value.openDialog('pwd', userInfo.value); |
| | | reviewRef.value.openDialog('pwd',userInfo.value) |
| | | } |
| | | const sidebarRouters = ref([]) |
| | | |
| | |
| | | height: 100%; |
| | | line-height: 50px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | &:focus { |
| | | outline: none; |
| | |
| | | margin-right: 40px; |
| | | |
| | | .avatar-wrapper { |
| | | margin-top: 5px; |
| | | margin-top: 15px; |
| | | position: relative; |
| | | |
| | | .user-avatar { |
| | |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 10px; |
| | | margin-right: 15px; |
| | | } |
| | | |
| | | i { |
| | | cursor: pointer; |
| | | position: absolute; |
| | | right: -20px; |
| | | top: 25px; |
| | | font-size: 12px; |
| | | } |
| | | } |