Commit 0147a07c authored by 皮倩雯's avatar 皮倩雯

fix: '首页增加图标'

parent 2eb6012a
Pipeline #79748 passed with stages
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
......@@ -37,6 +37,11 @@ import bubble from '@/assets/images/icons/三角形.png';
import abnormalRed from '@/assets/images/icons/异常红色.png';
import abnormalGreen from '@/assets/images/icons/异常绿色.png';
import abnormalYellow from '@/assets/images/icons/异常黄色.png';
import pipe from '@/assets/images/icons/管网.png';
import update from '@/assets/images/icons/更新.png';
import map1 from '@/assets/images/icons/地图1.png';
import power from '@/assets/images/icons/权限2.png';
import map2 from '@/assets/images/icons/地图.png';
import { useHistory } from 'react-router-dom';
import moment from 'moment';
import {
......@@ -189,39 +194,44 @@ const HomePage = () => {
const getOMSDashboard = () => {
setLoadingCenter(true);
GetOMSDashboard().then(res => {
setLoadingCenter(false);
if (res.code === 0) {
let arr = [];
res.data.Web?.forEach(i => {
arr.push({ type: 'Web', value: i });
});
res.data.Mobile?.forEach(i => {
arr.push({ type: 'Mobile', value: i });
});
setWebsite(arr);
let newTipList = [];
res.data.用户登录统计?.forEach((i, j) => {
let obj = {
xAxis: j,
yAxis: i.登录次数,
symbol:
'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAdCAYAAADGgB7AAAAAAXNSR0IArs4c6QAAAe5JREFUWEftls9L22AYx5/nzY9WTWt/iKYwxjL0JJt2Nw8iHQMPUrzun9hfMOgm7C8ZOzrYZRdtKjvNmx4mCImt2sRCxTZV19/NK2/HxtYhJulGPSS3kO/zPJ/3k4cQBADIFvNPEe00IPLsfrQXmhdW4z2qpvZMAP5rYiIkckhGywQAtXYTqq3GR1QN/fVDKfJudjI+cigG0KM2fDk77qBqHr1RpOhbJRy9F2AMImfmwQdz8zp8Y25s+Tvm1pZvzDfmxYDbGv875htza8Bt3t8xT8ay5lFGkSIbj8Mxt/X/JU8phZ3SsY3bp9q6JAY+sV9rguhomEAIhITAnVmbUrDazTtzvwdqrSYUrqy9Psl2UX+FAGuAyDnpQgCT87Hp+PTYxK1xdvKDahnK9esDilhy0pdlkEIZRCHjTNFA1x2jsAhIc09iM9F4cPyvmRQADqvnUKpf5UiHrKUUxZ02Buj0JIO5rKEt8chtLcRlKRIY++OxVruA02trt8dLL1Zl+buXGZ7B2DDV0J9zyH1OTiWCYfHHzuUvK2xH9rkOSaUUxfIC1X+lXgt/1qlmPi0i2VycSoiVZh30y8phl6crq/JseZjeQ4Ox4VlTfykg/6Fr94oE7OXUgzljGKh/YuyXuRMtzQeEbyvyo8KwUKz+BiST/d01eWojAAAAAElFTkSuQmCC',
};
newTipList.push(obj);
});
setTip(newTipList);
let echartsData = res.data.用户登录统计;
echartsData?.map(i => {
if (i.月份 !== 1 && i.月份 !== 12) {
let str = i.日期.split('-')[1];
i.日期 = `${str}月`;
}
});
res.data.用户登录统计 = echartsData;
setDashboardData(res.data);
}
});
GetOMSDashboard()
.then(res => {
setLoadingCenter(false);
if (res.code === 0) {
let arr = [];
res.data.Web?.forEach(i => {
arr.push({ type: 'Web', value: i });
});
res.data.Mobile?.forEach(i => {
arr.push({ type: 'Mobile', value: i });
});
setWebsite(arr);
let newTipList = [];
res.data.用户登录统计?.forEach((i, j) => {
let obj = {
xAxis: j,
yAxis: i.登录次数,
symbol:
'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAdCAYAAADGgB7AAAAAAXNSR0IArs4c6QAAAe5JREFUWEftls9L22AYx5/nzY9WTWt/iKYwxjL0JJt2Nw8iHQMPUrzun9hfMOgm7C8ZOzrYZRdtKjvNmx4mCImt2sRCxTZV19/NK2/HxtYhJulGPSS3kO/zPJ/3k4cQBADIFvNPEe00IPLsfrQXmhdW4z2qpvZMAP5rYiIkckhGywQAtXYTqq3GR1QN/fVDKfJudjI+cigG0KM2fDk77qBqHr1RpOhbJRy9F2AMImfmwQdz8zp8Y25s+Tvm1pZvzDfmxYDbGv875htza8Bt3t8xT8ay5lFGkSIbj8Mxt/X/JU8phZ3SsY3bp9q6JAY+sV9rguhomEAIhITAnVmbUrDazTtzvwdqrSYUrqy9Psl2UX+FAGuAyDnpQgCT87Hp+PTYxK1xdvKDahnK9esDilhy0pdlkEIZRCHjTNFA1x2jsAhIc09iM9F4cPyvmRQADqvnUKpf5UiHrKUUxZ02Buj0JIO5rKEt8chtLcRlKRIY++OxVruA02trt8dLL1Zl+buXGZ7B2DDV0J9zyH1OTiWCYfHHzuUvK2xH9rkOSaUUxfIC1X+lXgt/1qlmPi0i2VycSoiVZh30y8phl6crq/JseZjeQ4Ox4VlTfykg/6Fr94oE7OXUgzljGKh/YuyXuRMtzQeEbyvyo8KwUKz+BiST/d01eWojAAAAAElFTkSuQmCC',
};
newTipList.push(obj);
});
setTip(newTipList);
let echartsData = res.data.用户登录统计;
echartsData?.map(i => {
if (i.月份 !== 1 && i.月份 !== 12) {
let str = i.日期.split('-')[1];
i.日期 = `${str}月`;
}
});
res.data.用户登录统计 = echartsData;
setDashboardData(res.data);
}
})
.catch(err => {
setLoadingCenter(false);
message.error(err);
});
};
// 获取当前解决方案
......@@ -1204,11 +1214,26 @@ const HomePage = () => {
<div className={styles.content}>
<div className={styles.item}>
<div className={styles.dataCenterLabel}>
<div>管网服务</div>
<div>元数据更新时间</div>
<div>地图方案</div>
<div>已配置权限</div>
<div>默认范围</div>
<div>
<img src={pipe} alt="" style={{ marginRight: '7px', marginTop: '-5px' }} />
管网服务
</div>
<div>
<img src={update} alt="" style={{ marginRight: '7px', marginTop: '-5px' }} />
元数据更新时间
</div>
<div>
<img src={map1} alt="" style={{ marginRight: '7px', marginTop: '-5px' }} />
地图方案
</div>
<div>
<img src={power} alt="" style={{ marginRight: '7px', marginTop: '-5px' }} />
已配置权限
</div>
<div>
<img src={map2} alt="" style={{ marginRight: '7px', marginTop: '-5px' }} />
默认范围
</div>
</div>
<div className={styles.dataCenterValue}>
<div>
......
......@@ -706,7 +706,7 @@
height: calc(100% - 20px);
overflow-y: scroll;
display: flex;
justify-content: space-around;
justify-content: space-between;
.dataCenterLabel {
line-height: 38px;
margin-left: 10px;
......@@ -721,6 +721,7 @@
font-size: 16px;
font-family: Microsoft YaHei;
color: #333333;
margin-right: 10px;
.boldText {
font-weight: bold;
}
......
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