From 8b4e7ae8e68681682f9ebd894c3e8423e77192c6 Mon Sep 17 00:00:00 2001 From: hayu <1604366271@qq.com> Date: Sun, 25 Jan 2026 18:17:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 266 +++++++++++++++++++++++++++---- 1 file changed, 235 insertions(+), 31 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 636f7a35..67a2e07e 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -55,11 +55,23 @@ class="warning-item" @click="goWarningDetail(item)" > -
🔔
-
-
{{ item.title }}
-
{{ item.desc }}
+
+ 提醒
+
+
{{ item.title }}
+ + +
+ {{ item.desc }} +
+
+
+
@@ -235,6 +341,8 @@ export default { return { title: process.env.VUE_APP_TITLE, user: {}, + dept:{}, + roles:[], menuList: [], showMenuBox: false, currentMenu: {}, @@ -310,7 +418,7 @@ export default { }, // 待办点击-跳转到待办页面 goTodo() { - this.$router.push({ path: '/todo' }) // 替换为实际的待办页路由 + // this.$router.push({ path: '/todo' }) // 替换为实际的待办页路由 }, goMessageDetail(item) { this.$refs.messagePopover.doClose(); // 关闭消息弹窗 @@ -322,9 +430,16 @@ export default { }, getUser() { getUserProfile().then((response) => { + console.log("用户信息", response.data); this.user = response.data + this.dept=response.data.dept + this.roles=response.data.roles }) }, + downloadUserManual() { + this.download('material-mall/todo/downLoadUserManual', { + }, `机械化施工装备管理(共享)平台操作手册V1.0.pdf`) + }, async logout() { this.$confirm('确定注销并退出系统吗?', '提示', { confirmButtonText: '确定', @@ -460,7 +575,7 @@ export default { } .menus { - min-width: 998px; + min-width: 698px; height: 50px; line-height: 50px; flex: 1; @@ -725,11 +840,10 @@ export default { } .warning-title { - color: #000000; - font-size: 16px; - font-weight: bold; - padding: 10px 12px; - border-bottom: 1px solid #eee; + font-size: 18px; + font-weight: 700; + color: #333; + height: 38px; } .warning-item { @@ -737,6 +851,7 @@ export default { padding: 10px 12px; cursor: pointer; transition: all 0.2s; + border-bottom: 1.5px solid #e1e1e1; &:hover { background: #f5f7fa; @@ -749,29 +864,118 @@ export default { .warning-content { flex: 1; + min-width: 0; } .warning-main { - font-weight: 600; + font-size: 16px; color: #333; } .warning-sub { font-size: 12px; - color: #999; + color: #666666; margin-top: 4px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .warning-footer { text-align: center; padding: 8px; - color: #409eff; + color: #50C7BD; cursor: pointer; - border-top: 1px solid #eee; &:hover { background: #f5f7fa; } } +/* -------用户------- */ +.user-popover { + color: #000; + font-size: 12px; + background-color: #fff; + width: 250px; + border-radius: 12px; + border: 1px solid #e1e1e1; + padding: 10px; +} + +//.user-card { +// width: 260px; +// overflow: hidden; +// font-family: Microsoft YaHei; +//} + +.user-bg { + border-radius: 15px; + //height: 140px; + background-color: #34c3ac; + background-image: linear-gradient(270deg, #4eacff, #00d2be); +} + +/* 顶部渐变 */ +.user-header { + background-image: url("../../assets/images/user-bg.png"); + padding: 15px; + color: #fff; + background-size: 100% 100%; +} + +.user-name { + font-size: 20px; +} + +.user-role { + padding: 5px 0; + font-size: 12px; + margin-top: 4px; + opacity: 0.9; +} + +/* 列表 */ +.user-list { + background: #fff; +} + +.user-item { + display: flex; + align-items: center; + padding: 15px 14px; + font-size: 12px; + color: #000; + cursor: pointer; + border-bottom: 1px solid #eee; + font-weight: 500; + + i { + margin-right: 8px; + color: #666; + } + + .right { + margin-left: auto; + color: #999; + } + + &:hover { + background: #f5f7fa; + } +} + +.user-item.logout { + color: #f56c6c; +} + +/* 底部 */ +.user-footer { + font-size: 12px; + color: #999; + padding: 10px 14px; + background: #fafafa; + line-height: 18px; +} +