fix : 主次账号消息框展示、审批记录优化、头像框组件优化

This commit is contained in:
2024-06-21 18:35:30 +08:00
parent 2a80c8df21
commit 1cdd2cb02b
6 changed files with 48 additions and 30 deletions

View File

@@ -3,7 +3,7 @@
<slot name="pre"></slot> <slot name="pre"></slot>
<div class="user-audit"> <div class="user-audit">
<div class="circle-user"> <div class="circle-user">
<Tooltip :content="user.name" placement="bottom-start" width="45"/> <Tooltip :content="user.name" placement="bottom-start" width="45px"/>
<div v-if="user.icon" <div v-if="user.icon"
class="el-timeline-item__node" :style="{ class="el-timeline-item__node" :style="{
backgroundColor: user.color backgroundColor: user.color

View File

@@ -5,7 +5,7 @@
placement="bottom-start" placement="bottom-start"
:disabled="isShow" :disabled="isShow"
> >
<div :class="lines?'content-lines':'content'" :style="{width: props.width+'px'}" @mouseover="isShowTooltip"> <div :class="lines?'content-lines':'content'" :style="{width: props.width}" @mouseover="isShowTooltip">
<span ref="contentRef"> <span ref="contentRef">
<slot name="content">{{ props.content }}</slot> <slot name="content">{{ props.content }}</slot>
</span> </span>
@@ -17,10 +17,12 @@ const props = defineProps({
content: { content: {
type: String, type: String,
default: '' default: ''
}, width: { },
width: {
type: String, type: String,
default: '' default: '100%'
}, lines: { },
lines: {
type: Boolean, type: Boolean,
default: false default: false
} }
@@ -40,6 +42,7 @@ const isShowTooltip = () => {
overflow: hidden; overflow: hidden;
} }
.content-lines{ .content-lines{
word-break:break-all;
overflow:hidden; overflow:hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;

View File

@@ -17,9 +17,10 @@
<ul> <ul>
<li>主次账号切换</li> <li>主次账号切换</li>
<li class="avatar-li" v-for="item in accountList" @click="accountChange(item.userId)"> <li class="avatar-li" v-for="item in accountList" @click="accountChange(item.userId)">
<el-badge :value="item.taskCount"> <el-badge :value="item.taskCount" v-if="item.taskCount!==0">
<el-avatar>{{ item.nickName }}</el-avatar> <el-avatar>{{ item.nickName }}</el-avatar>
</el-badge> </el-badge>
<el-avatar v-else>{{ item.nickName }}</el-avatar>
<div class="right-li"> <div class="right-li">
<div class="name-line"> <div class="name-line">
<span v-if="item.accountType==='0'" class="zhu"></span> <span v-if="item.accountType==='0'" class="zhu"></span>
@@ -68,6 +69,7 @@ import {useTagsView} from '@/stores/tagsview';
import {getUserAccount} from "@/api/user/user"; import {getUserAccount} from "@/api/user/user";
import {switchAccount} from "@/api/login"; import {switchAccount} from "@/api/login";
import {setToken} from "../../utils/auth"; import {setToken} from "../../utils/auth";
import {ElNotification} from "element-plus";
const authStore = useAuthStore() const authStore = useAuthStore()
const permisstionStore = usePermisstionStroe() const permisstionStore = usePermisstionStroe()
@@ -91,7 +93,13 @@ const nullBlockClick = () => {
} }
const handleVisitedP = () => { const handleVisitedP = () => {
getUserAccount().then(res => { getUserAccount().then(res => {
console.log(res) if (res.code !== 1000) {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
}
accountList.value = res.data accountList.value = res.data
nextTick(() => { nextTick(() => {
visitedP.value = !visitedP.value visitedP.value = !visitedP.value
@@ -137,9 +145,11 @@ const handleLogout = () => {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
:deep(.el-badge){
:deep(.el-badge) {
padding: 0 2px; padding: 0 2px;
} }
:deep(.el-badge__content.is-fixed) { :deep(.el-badge__content.is-fixed) {
position: absolute; position: absolute;
right: 26px; right: 26px;

View File

@@ -59,7 +59,7 @@ const getInfo = async () => {
const {code, data, msg} = await getPhaseDetail(projectId) const {code, data, msg} = await getPhaseDetail(projectId)
if (code === 1000) { if (code === 1000) {
summaryData.value = data; summaryData.value = data;
copyName.value= data.formData.userInfoList.map(item=>item.name).join('') copyName.value= data.formData.userInfoList?.map(item=>item.name).join('')
loading.value = false loading.value = false
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;

View File

@@ -8,6 +8,9 @@
size="large" size="large"
placement="top"> placement="top">
<el-card> <el-card>
<div>
当前节点: {{ operation.operationName }}
</div>
<div class="card"> <div class="card">
<div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name"> <div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name">
<div> <div>
@@ -17,15 +20,15 @@
<div> <div>
<div class="remark">{{ operation.remark }}</div> <div class="remark">{{ operation.remark }}</div>
<div> <div>
<div>{{ operation.operationName }}</div> <div>审批人</div>
<div>{{ user.name }}</div> <div>{{ user.name }}</div>
</div> </div>
<div v-if="user.auditOpinion"> <div v-if="user.auditOpinion">
<div style="margin-bottom: 10px;color: #909399">{{ user.operationTime }}</div> <div style="margin-bottom: 10px;color: #909399">{{ user.operationTime }}</div>
<Tooltip :content="user.auditOpinion" placement="bottom-start" width="140" :lines="true"/> <el-text v-text="user.auditOpinion" style="word-break: break-all">
</el-text>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</el-card> </el-card>
@@ -270,9 +273,10 @@ init()
> div:first-child { > div:first-child {
display: flex; display: flex;
width: 200px;
> span { > span {
width: 100px;
color: #2a99ff; color: #2a99ff;
margin-left: 10px; margin-left: 10px;
margin-right: 20px; margin-right: 20px;
@@ -307,20 +311,21 @@ init()
right: 1px; right: 1px;
} }
//.username { .username {
// //width: 90px; //width: 90px;
// margin-top: 10px; margin-top: 10px;
// background: #f5f5f5; background: #f5f5f5;
// padding: 5px; padding: 12px;
// overflow: hidden;
// .el-tooltip__trigger {
// width: 90px; //.el-tooltip__trigger {
// text-align: center; // width: 90px;
// //padding-top: 2px; // text-align: center;
// //text-align: center; // //padding-top: 2px;
// text-overflow: ellipsis; // //text-align: center;
// white-space: nowrap; // text-overflow: ellipsis;
// overflow: hidden // white-space: nowrap;
// } // overflow: hidden
//} //}
}
</style> </style>

View File

@@ -7,7 +7,7 @@
<div v-for="(user,index) in userInfo" :key="index" class="avatar_name"> <div v-for="(user,index) in userInfo" :key="index" class="avatar_name">
<div class="user"> <div class="user">
<div class="circle-user"> <div class="circle-user">
<Tooltip :content="user.name" placement="bottom-start" width="45"> <Tooltip :content="user.name" placement="bottom-start" width="45px">
</Tooltip> </Tooltip>
</div> </div>
<div v-if="user.icon && mode === 'preview'" <div v-if="user.icon && mode === 'preview'"