Commit b09ebaec authored by 皮倩雯's avatar 皮倩雯

fix: '优化仪表盘loading加载效果'

parent e6fce994
Pipeline #78447 passed with stages
......@@ -97,9 +97,6 @@ const HomePage = () => {
onGetProduct();
getLimits();
getMapLayer();
setTimeout(() => {
setLoading(false);
}, 0);
}, [flag]);
const getLimits = () => {
......@@ -152,6 +149,7 @@ const HomePage = () => {
const getOMSDashboard = () => {
setDashboardData([]);
setWebsite([]);
GetOMSDashboard().then(res => {
if (res.code === 0) {
let arr = [];
......@@ -174,7 +172,7 @@ const HomePage = () => {
});
setTip(newTipList);
let echartsData = res.data.用户登录统计;
echartsData.map(i => {
echartsData?.map(i => {
if (i.月份 !== 1 && i.月份 !== 12) {
let str = i.日期.split('-')[1];
i.日期 = `${str}月`;
......@@ -228,16 +226,16 @@ const HomePage = () => {
password: str.password,
})
.then(res => {
if (!val) {
setLoading(false);
}
if (res.code === 0) {
setState(res.data);
if (!val) {
notification.success({
message: '提示',
duration: 3,
description: '连接成功',
});
}
} else {
setState();
notification.error({
......@@ -680,8 +678,8 @@ const HomePage = () => {
<div>连接状态:</div>
</div>
<div className={styles.dataCenterValue}>
<div>{dataBase.ip || '-'}</div>
<div>{dataBase.dbName || '-'}</div>
<div>{dataBase?.ip || '-'}</div>
<div>{dataBase?.dbName || '-'}</div>
<div className={styles.fontText}>
<span
className={classnames({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment