diff --git a/api/app/lib/controllers/homepage/index.js b/api/app/lib/controllers/homepage/index.js index df7d694..71e353c 100644 --- a/api/app/lib/controllers/homepage/index.js +++ b/api/app/lib/controllers/homepage/index.js @@ -221,7 +221,7 @@ function getAccessData(opts) { } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400; - ctx.body = { message: '获取预警列表失败' } + ctx.body = { message: '获取接入数据统计失败' } } } } diff --git a/web/client/src/sections/homePage/components/hotspotData.js b/web/client/src/sections/homePage/components/hotspotData.js index 0f1d7ea..f8a7240 100644 --- a/web/client/src/sections/homePage/components/hotspotData.js +++ b/web/client/src/sections/homePage/components/hotspotData.js @@ -17,18 +17,18 @@ function HotspotData(props) {
- {top3[0].name?.length > 6 ? top3[0].name.substring(0, 6) + '...' : top3[0].name} + {top3[0].name?.length > 8 ? top3[0].name.substring(0, 8) + '...' : top3[0].name}
{top3[0].count}
{top3?.length > 2 && <> - {top3[2].name?.length > 6 ? top3[2].name.substring(0, 6) + '...' : top3[2].name} + {top3[2].name?.length > 8 ? top3[2].name.substring(0, 8) + '...' : top3[2].name}
{top3[2].count}
}
{top3?.length > 1 && <> - {top3[1].name?.length > 6 ? top3[1].name.substring(0, 6) + '...' : top3[1].name} + {top3[1].name?.length > 8 ? top3[1].name.substring(0, 8) + '...' : top3[1].name}
{top3[1].count}
}
diff --git a/web/client/src/sections/homePage/components/style.less b/web/client/src/sections/homePage/components/style.less index e3274cb..b544be6 100644 --- a/web/client/src/sections/homePage/components/style.less +++ b/web/client/src/sections/homePage/components/style.less @@ -199,7 +199,7 @@ ._top3 { position: absolute; bottom: 34%; - right: 2%; + left: 73%; } } diff --git a/web/client/src/sections/homePage/nav-item.js b/web/client/src/sections/homePage/nav-item.js index 7ca5bfb..243f097 100644 --- a/web/client/src/sections/homePage/nav-item.js +++ b/web/client/src/sections/homePage/nav-item.js @@ -2,9 +2,9 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { Menu } from 'antd'; import { HomeOutlined } from '@ant-design/icons'; -export function getNavItem() { +export function getNavItem({ user }) { return ( - }> + user?.role == '系统管理员' && }> 数据监控平台 );