From 6f33aa1114b1ee7a50e5198bd051ba16d4140c8e Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Wed, 19 Jun 2024 02:56:00 +0800
Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E5=88=87=E6=8D=A2=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DetailComponent/CompanyPicker.vue | 9 +-
src/layout/navbar/index.vue | 131 +++++++++++++++---
2 files changed, 116 insertions(+), 24 deletions(-)
diff --git a/src/components/DetailComponent/CompanyPicker.vue b/src/components/DetailComponent/CompanyPicker.vue
index 13c6544..1474132 100644
--- a/src/components/DetailComponent/CompanyPicker.vue
+++ b/src/components/DetailComponent/CompanyPicker.vue
@@ -10,8 +10,8 @@
搜索
- 全选
- 不全选
+
+
@@ -161,6 +161,11 @@ const show = () => {
getList()
};
const handleChange = (data, checked) => {
+ if(data.value==-1&&checked){
+ chooseAll()
+ }else if(data.value==-1&&!checked){
+ cancelAll()
+ }
// 左侧有选择框 + 多选
if (props.multiple) {
//不添加重复的数据到右边
diff --git a/src/layout/navbar/index.vue b/src/layout/navbar/index.vue
index 5d9e355..ab56862 100644
--- a/src/layout/navbar/index.vue
+++ b/src/layout/navbar/index.vue
@@ -7,16 +7,42 @@
- 欢迎回来,{{ userInfo.userName }}
+ 欢迎回来,{{ userInfo.nickName }}
-
-
-
-
- - 个人中心
- - 退出登录
+ - 主次账号切换
+ -
+ {{ item.nickName }}
+
+
+ 主
+ {{ item.nickName }}
+ {{ item.jobActivityDesc }}
+
+
+ {{ item.companyName }}/{{ item.departmentName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ 退出登录
+
@@ -68,16 +94,15 @@ const handleVisitedP = () => {
}
-const accountChange = () => {
- switchAccount(selectUserId.value).then(res =>{
- if (res.code == 1000){
+const accountChange = (userId) => {
+ switchAccount(userId).then(res => {
+ if (res.code == 1000) {
visitedP.value = !visitedP.value
authStore.userLogout()
- permisstionStore.removeMenu()
- permisstionStore.setIsSuccessReq()
- tagsViewStore.removeAllTagView()
setToken(res.data)
router.push('/')
+ location.reload()
+ visitedP.value = false
}
})
}
@@ -137,24 +162,86 @@ const handleLogout = () => {
.person {
+ font-size: 14px;
+ color: #666666;
position: absolute;
- width: 80px;
+ width: 280px;
right: 0;
z-index: 300;
- bottom: -70px;
- padding: 10px 5px;
+ top: 46px;
+ padding: 5px 0;
border-radius: 4px;
background-color: #fff;
box-shadow: 2px 2px 2px 1px rgb(171, 167, 167);
- li {
- text-align: center;
- font-size: 14px;
- line-height: 1.5;
- cursor: pointer;
+ .avatar-li {
+ display: flex;
+ height: 60px;
+ .right-li {
+ color: #909090;
+ display: flex;
+ flex-direction: column;
+
+ .name-line {
+ margin-bottom: 5px;
+
+ .zhu {
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ background-color: #fa0;
+ color: #fff;
+ text-align: center;
+ }
+
+ .nickName {
+ color: #4d7ad8;
+ }
+
+ > span {
+ margin-right: 5px;
+ }
+ }
+
+ > div:last-child {
+ width: 194px;
+ -webkit-line-clamp: 1;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+ }
+
+ :deep(.el-avatar--circle) {
+ margin-right: 10px;
+ background-color: #8a7243;
+ }
+
+ }
+
+ li {
&:hover {
- color: #79bbff;
+ color: #666666 !important;
+ background-color: #eaeaea;
+ }
+
+ &:first-child:hover {
+ background-color: #fff;
+ }
+
+ padding: 0 10px;
+ height: 28px;
+ display: flex;
+ align-items: center;
+ text-align: left;
+ font-size: 14px;
+ cursor: pointer;
+ border-bottom: 1px solid #e6e6e6;
+
+ &:last-child {
+ border-bottom: none;
}
}
}