From 8d6a326d5fc06d22b0b14ce506e84313a4bb8414 Mon Sep 17 00:00:00 2001 From: fhysy <1149505133@qq.com> Date: Mon, 13 Oct 2025 15:42:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(drawer):=20=E9=87=8D=E6=9E=84=E6=8A=BD?= =?UTF-8?q?=E5=B1=89=E8=8F=9C=E5=8D=95=E5=B9=B6=E6=96=B0=E5=A2=9E=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 重新设计抽屉菜单布局,采用栅格系统优化结构 - 新增报警、预警统计展示模块 - 添加项目设备统计数据展示 - 集成项目列表及设备类型数量表格 - 实现最新告警列表展示功能 - 添加activated钩子处理项目列表路由参数变化 --- src/components/DrawerMenu/index.vue | 698 +++++++++++++++++++++++++--- src/router/index.js | 5 +- src/views/iot/project/index.vue | 5 + src/views/overview.vue | 14 + 4 files changed, 666 insertions(+), 56 deletions(-) diff --git a/src/components/DrawerMenu/index.vue b/src/components/DrawerMenu/index.vue index cf0dcfe9..e052d875 100644 --- a/src/components/DrawerMenu/index.vue +++ b/src/components/DrawerMenu/index.vue @@ -1,44 +1,225 @@ - \ No newline at end of file + +.card-content { + padding: 0 10px; +} + + +.content-item { + flex: 1; + + .content-item-value { + margin-top: 6px; + font-weight: 500; + font-size: 28px; + line-height: 1em; + } + + .content-item-label { + margin-top: 6px; + font-weight: 400; + font-size: 14px; + color: #444444; + line-height: 1em; + } +} + +.card-item-box { + margin-bottom: 12px; + border-top: 2px solid #0A9A9C; + background: linear-gradient(0deg, #FFFFFF 0%, #ECEDF0 100%); + box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.1); + border-radius: 0px 0px 12px 12px; + padding: 10px; + overflow: hidden; +} + +.color-red { + color: #FF4A56; +} + +.color-green { + color: #00A9AB; +} + +.color-dark-blue { + color: #615DAA; +} + +.color-orange { + color: #FB762B; +} + +.color-blue { + color: #3CA0EC; +} + +.color-yellow { + color: #FDB535; +} + +.color-slate-blue { + color: #7598B3; +} + + +.bg-red { + background: #FF4A56; +} + +.bg-green { + background: #75DC68; +} + diff --git a/src/router/index.js b/src/router/index.js index d82b4d04..41fd4011 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -107,7 +107,10 @@ export const constantRoutes = [ title: '概览页', icon: 'dashboard', noCache: false, affix: false }, }, - ] + ], + meta: { + title: '数据概览' + } }, { diff --git a/src/views/iot/project/index.vue b/src/views/iot/project/index.vue index d1229409..2e60846f 100644 --- a/src/views/iot/project/index.vue +++ b/src/views/iot/project/index.vue @@ -693,6 +693,11 @@ export default { this.getList(); this.getTreeselect(); }, + activated() { + if (this.$route.query["projectId"]) { + this.handleDetails(this.$route.query); + } + }, methods: { listContract, listDevice, diff --git a/src/views/overview.vue b/src/views/overview.vue index 33682ea9..5d11205d 100644 --- a/src/views/overview.vue +++ b/src/views/overview.vue @@ -756,10 +756,24 @@ export default { } @media (min-width: 992px) and (max-width: 1200px) { + .statistics-box > [class*="el-col"] { + padding-left: 10px !important; + padding-right: 10px !important; + .statistics-item{ + margin-bottom: 20px; + } + } .overvie-right-header { min-height: 498px; } } + @media (max-width: 1200px) { + .statistics-box > [class*="el-col"] { + .statistics-item{ + margin-bottom: 20px; + } + } + } } .page-cloud::-webkit-scrollbar {