diff --git a/src/assets/images/menu-1.png b/src/assets/images/menu-1.png new file mode 100644 index 00000000..251a6c62 Binary files /dev/null and b/src/assets/images/menu-1.png differ diff --git a/src/assets/images/menu-2.png b/src/assets/images/menu-2.png new file mode 100644 index 00000000..5a358f64 Binary files /dev/null and b/src/assets/images/menu-2.png differ diff --git a/src/assets/images/tishi.png b/src/assets/images/tishi.png new file mode 100644 index 00000000..76e16419 Binary files /dev/null and b/src/assets/images/tishi.png differ diff --git a/src/assets/images/yujing.png b/src/assets/images/yujing.png new file mode 100644 index 00000000..469ecc86 Binary files /dev/null and b/src/assets/images/yujing.png differ diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index d8c49e24..411b3e91 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -38,18 +38,12 @@ --> -
- 提醒 +
+ 提醒
-
- 提醒 +
+ 提醒
@@ -80,17 +74,14 @@ @click="goWarningDetail(item)" >
- 提醒 + 提醒
-
{{ item.title }}
+
退役预警
- +
- {{ item.desc }} + {{ item.name ? item.name + '-' : '' }}{{ item.status }}
@@ -125,16 +116,13 @@ @click="goMessageDetail(item)" >
- 提醒 + 提醒
-
{{ item.title }}
- +
{{ item.businessName }}-{{ item.statusType }}
+
- {{ item.desc }} + {{ item.deptAbbreviation ? item.deptAbbreviation + '-' : '' }}{{ item.applyUser }}-{{ item.applyTime }}
@@ -188,53 +176,93 @@
- + 手机号 138****8251
- + 修改密码
- + 设置默认首页
- + 操作手册下载
- + 一键换肤
- + 清除缓存
- + 测试网络速度
- + 意见反馈/闭环
- + 联系我们
- + 退出
@@ -260,7 +288,7 @@ - +
-
我的收藏
-
编辑
-
确定
+
我的收藏
+
编辑
+
确定
收藏菜单
-
-
-
{{ item.menuName }}
-
取消
+
+
+
+ {{ item.menuName }} +
+
取消
-
+
- -
暂无数据
+ +
暂无数据
@@ -409,7 +475,9 @@ import { mapGetters } from 'vuex' import Search from '@/components/HeaderSearch' import { getUserProfile } from '@/api/system/user' -import { addMenuCollect,deleteMenuCollect,getMenuCollectListApi } from '@/api/system/menu' +import { addMenuCollect, deleteMenuCollect, getMenuCollectListApi } from '@/api/system/menu' +import { getReal } from '@/api/basic/home' +import { getRetireListAPI } from '@/api/EquipmentRetire/index.js' export default { components: { Search }, @@ -425,50 +493,18 @@ export default { openLevel1: [], openLevel2: [], todoCount: 5, - warningCount: 2, - messageCount: 12, - warningList: [ - { - id: 1, - title: '达标投产复检预警', - desc: '您所管理的今天明天后天工程已超期', - }, - { - id: 2, - title: '达标投产复检预警', - desc: '红红火火恍恍惚惚好工程已超期', - }, - { - id: 3, - title: '达标投产复检预警', - desc: '红红火火恍恍惚惚好新建工程', - }, - ], + warningCount: 0, + messageCount: 0, + warningList: [], // 消息列表数据 - messageList: [ - { - id: 1, - title: '系统通知', - desc: '您的账号于2026-01-25 10:00完成登录,请注意账号安全', - }, - { - id: 2, - title: '业务提醒', - desc: '手塘-北三110kV工程已完成验收,可前往查看报告', - }, - { - id: 3, - title: '待办提醒', - desc: '您有5条待办事项未处理,预计截止时间2026-01-30', - }, - ], + messageList: [], contactDialogVisible: false, // 控制联系我们弹窗显示 contactPhone: '田经理15212781264,刘经理19855530627', // 联系电话 - drawerShow:false, - isEdit:false, - isHover:-1, - isHover2:-1, - zhinengList:[],//{name:"入库申请",url:'/all/stockManagement/entryApply'},{name:"出库申请",url:'/all/business/outbound/addApply'} + drawerShow: false, + isEdit: false, + isHover: -1, + isHover2: -1, + zhinengList: [], //{name:"入库申请",url:'/all/stockManagement/entryApply'},{name:"出库申请",url:'/all/business/outbound/addApply'} // xiangmuList:[], } }, @@ -484,15 +520,34 @@ export default { value: val, }) }, - } + }, }, created() { this.getUser() this.menuList = this.sidebarRouters.filter((route) => !route.hidden && route.path !== '/') this.menuList = this.menuList.slice(1) - console.log('🚀 ~ this.menuList:', this.menuList) + this.getEventList() + this.getRetireList() }, methods: { + async getEventList() { + try { + const res = await getReal() + this.messageList = res.data || [] + this.messageCount = res.data.length || 0 + } catch (error) { + console.log('🚀 ~ error:', error) + } + }, + async getRetireList() { + const params = { + pageNum: 1, + pageSize: 100, + } + const res = await getRetireListAPI(params) + this.warningList = res.data.rows || [] + this.warningCount = res.data.rows.length || 0 + }, goHome() { this.$router.push({ path: '/' }) }, @@ -509,12 +564,12 @@ export default { goTodo() { // this.$router.push({ path: '/todo' }) // 替换为实际的待办页路由 }, - async getMenuCollectList(){ + async getMenuCollectList() { try { const res = await getMenuCollectListApi() - if(res.code==200){ - this.zhinengList = res.data; - }else{ + if (res.code == 200) { + this.zhinengList = res.data + } else { this.zhinengList = [] } console.log(res) @@ -522,27 +577,27 @@ export default { console.error(error) } }, - goCollection(){ + goCollection() { this.getMenuCollectList() - this.isEdit=false - this.drawerShow=true + this.isEdit = false + this.drawerShow = true }, - gotoPage(item){ - this.drawerShow=false - this.isEdit=false - this.$router.replace({ path: '/'+item.fullRoutePath }) + gotoPage(item) { + this.drawerShow = false + this.isEdit = false + this.$router.replace({ path: '/' + item.fullRoutePath }) }, - async delCollect(item){ + async delCollect(item) { let param = { - menuId:item.menuId + menuId: item.menuId, } const res = await deleteMenuCollect(param) - this.changCollection(this.menuList,item.menuId,0) + this.changCollection(this.menuList, item.menuId, 0) this.getMenuCollectList() }, - closeDrawer(){ - this.isEdit=false; - this.drawerShow=false + closeDrawer() { + this.isEdit = false + this.drawerShow = false }, goMessageDetail(item) { this.$refs.messagePopover.doClose() // 关闭消息弹窗 @@ -661,45 +716,45 @@ export default { this.showMenuBox = false }, async handleCollection(route) { - console.log("route2",route) - if(route.isCollect==0){ + console.log('route2', route) + if (route.isCollect == 0) { try { let param = { - menuId:route.id + menuId: route.id, } const res = await addMenuCollect(param) if (res.code === 200) { this.$message.success('菜单收藏成功') - this.$nextTick(()=>{ - this.changCollection(this.menuList,route.id,1) + this.$nextTick(() => { + this.changCollection(this.menuList, route.id, 1) }) this.$forceUpdate() this.showMenuBox = false } else { this.$message.error(res.msg || '菜单收藏失败') - this.changCollection(this.menuList,route.id,0) + this.changCollection(this.menuList, route.id, 0) } } catch (error) { this.$message.error('菜单收藏失败:' + (error.message || '未知错误')) console.error(error) } - }else if(route.isCollect==1){ + } else if (route.isCollect == 1) { try { let param = { - menuId:route.id + menuId: route.id, } const res = await deleteMenuCollect(param) if (res.code === 200) { this.$message.success('取消收藏成功') - this.changCollection(this.menuList,route.id,0) - this.$nextTick(()=>{ - this.changCollection(this.menuList,route.id,0) + this.changCollection(this.menuList, route.id, 0) + this.$nextTick(() => { + this.changCollection(this.menuList, route.id, 0) }) this.$forceUpdate() this.showMenuBox = false } else { this.$message.error(res.msg || '取消收藏失败') - this.changCollection(this.menuList,route.id,1) + this.changCollection(this.menuList, route.id, 1) } } catch (error) { this.$message.error('取消收藏失败:' + (error.message || '未知错误')) @@ -707,20 +762,20 @@ export default { } } }, - changCollection(array,targetId,status){ + changCollection(array, targetId, status) { for (let obj of array) { - if (obj.id === targetId) { - this.$set(obj,"isCollect",status) - obj.isCollect=status; - } - // 如果当前对象有子数组,递归搜索 - if (obj.children && Array.isArray(obj.children)) { - this.changCollection(obj.children, targetId, status); - } + if (obj.id === targetId) { + this.$set(obj, 'isCollect', status) + obj.isCollect = status + } + // 如果当前对象有子数组,递归搜索 + if (obj.children && Array.isArray(obj.children)) { + this.changCollection(obj.children, targetId, status) + } } }, goRoute(route) { - console.log("route",route) + console.log('route', route) if (route.fullPath) { this.$router.push({ path: route.fullPath, query: route.query }) this.showMenuBox = false @@ -741,31 +796,41 @@ export default {