feat(msgcenter): /msg 换真实数据——服务端筛选+滚动分页、铃铛直跳、unreadCount 上提 store、WS 通知带应用名

- views/msg/index.vue:数据层整体替换(msgType 0/1/2 映射、isRead 1=已读、fmtTime 重写绝对时间);列表走 msgCenter/list 服务端筛选(msgType/appKey/isRead/keyword 防抖 300ms),滚动到底追加下一页,切视图/搜索重置第 1 页;左栏分类计数走 summary(旧版 UserMsg 缺字段降级显示 —),应用清单取 store 应用列表、计数同源 todos;点击卡片标已读、全部已读、去处理(showJump/jumpUrl)、审批直批(共享弹窗);失败态有重试;WS 新消息经 mittBus 自刷新
- components/Header.vue:铃铛直跳 /msg(移除 Poptip 浮层与 900 宽 Modal 及 columns/tableApi 死代码);unreadCount 上提 pinia store(角标与 /msg、LeftMenu 同源);WS Notice.info 标题带应用名(appKey 匹配 store 应用列表,缺失回退类型标签);壁纸/LOGO Modal 不动
- components/MsgApprovalModal.vue(新增):审批直批弹窗抽共享组件,逻辑照抄原 Header 内联实现(同意可选意见/拒绝必填校验/三种失败反馈)
- components/LeftMenu.vue:「消息」入口(url=/msg)未读角标(读 store,红底白字胶囊)
- store/index.ts:unreadCount + setUnreadCount/incUnread/decUnread
- api/BaseApi.ts:getMsgCenterList 参数类型放宽(服务端筛选项);getMsgCenterSummary 返回类型补分类计数字段(可缺省)
- assets/styles/header.scss:删除消息浮层死样式 .message-wrap 段
This commit is contained in:
chenxing
2026-09-30 12:37:30 +08:00
parent e91ce14408
commit 0f7101983e
7 changed files with 451 additions and 514 deletions
-93
View File
@@ -150,99 +150,6 @@
}
}
.message-wrap {
h3.title {
height: 50px;
padding: 12px 16px;
color: #272829;
font-weight: 600;
font-size: 16px;
border-bottom: 1px solid #e8eaec;
}
.msg-ul {
width: 360px;
background: #fff;
padding-bottom: 0;
border-radius: 10px;
max-height: 240px;
min-height: 100px;
li {
height: 46px;
padding: 5px 18px;
position: relative;
overflow: hidden;
line-height: 36px;
border-bottom: 1px dotted #e8eaec;
h4 {
width: calc(100% - 40px);
float: left;
font-size: 15px;
color: #333;
font-weight: 500;
}
.content {
border: none;
font-size: 13px;
cursor: pointer;
}
.read {
color: #999999;
}
a {
float: right;
height: 32px;
outline: none;
display: flex;
align-items: center;
}
svg {
width: 20px;
height: 20px;
}
}
.no-msg-box {
display: flex;
height: 100px;
justify-content: center;
align-items: center;
border: none;
}
.app-name-box {
border: none;
color: #fff !important;
background: #577afb;
border-radius: 3px;
padding: 6px 8px;
font-size: 13px;
margin-right: 12px;
}
.fix a img {
width: 22px;
height: 22px;
margin-top: 5px;
}
}
.footer {
background-color: #f9f9f9;
height: 54px;
line-height: 54px;
padding: 0 20px;
font-size: 15px;
border-top: 1px solid #e8eaec;
a.link-all {
color: #999999;
font-weight: 550;
}
a.read-all {
color: #5979ea;
}
}
}
.role-info {
height: 22px;
color: #6b8cf4 !important;