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