Commit 4e9259c1 authored by 陈龙's avatar 陈龙

fix: 修复历史曲线多设备部显示x轴坐标的问题;调整历史曲线的宽度

parent a998f4be
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
} }
.swiper-wrapper { .swiper-wrapper {
width: calc(100% - 140px); width: calc(100% - 20px);
} }
.swiper-slide { .swiper-slide {
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
} }
.swiper-wrapper { .swiper-wrapper {
width: calc(100% - 140px); width: calc(100% - 20px);
} }
.swiper-slide { .swiper-slide {
...@@ -88,7 +88,6 @@ ...@@ -88,7 +88,6 @@
width: 100%; width: 100%;
min-width: 400px; min-width: 400px;
height: 42px; height: 42px;
//overflow-y: scroll;
.warningWrapper { .warningWrapper {
display: flex; display: flex;
...@@ -138,9 +137,6 @@ ...@@ -138,9 +137,6 @@
.location { .location {
display: inline-block; display: inline-block;
//flex: 230;
//width: 230px;
//min-width: 100px;
flex: 1; flex: 1;
align-items: center; align-items: center;
margin-left: 14px; margin-left: 14px;
...@@ -184,7 +180,6 @@ ...@@ -184,7 +180,6 @@
flex: 2; flex: 2;
margin-left: 14px; margin-left: 14px;
overflow: hidden; overflow: hidden;
//width: 290px;
color: #ff2929; color: #ff2929;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
......
...@@ -45,7 +45,7 @@ const GridChart = memo((props) => { ...@@ -45,7 +45,7 @@ const GridChart = memo((props) => {
}, [dataSource]); }, [dataSource]);
const options = useMemo(() => { const options = useMemo(() => {
return gridData.map((item) => { let _options = gridData.map((item) => {
const { key, list, equipmentName, sensorName, stationCode, unit } = item; const { key, list, equipmentName, sensorName, stationCode, unit } = item;
const cusOption = { const cusOption = {
title: { title: {
...@@ -77,6 +77,8 @@ const GridChart = memo((props) => { ...@@ -77,6 +77,8 @@ const GridChart = memo((props) => {
option: option, option: option,
}; };
}); });
console.log(_options);
return _options
}, [gridData, smooth, curveCenter]); }, [gridData, smooth, curveCenter]);
return ( return (
......
...@@ -457,7 +457,15 @@ const returnXAxis = ({ ...@@ -457,7 +457,15 @@ const returnXAxis = ({
return { return {
xAxis: { xAxis: {
type: 'time', min, max, axisLabel: { type: 'time', min, max, axisLabel: {
formatter: contrast ? (contrastOption === 'month' ? '{dd}日' : '{HH}:{mm}') : '' formatter: contrast ? (contrastOption === 'month' ? '{dd}日' : '{HH}:{mm}') : {
year: '{yyyy}',
month: '{MMM}',
day: '{d}日',
hour: '{HH}:{mm}',
minute: '{HH}:{mm}',
second: '{HH}:{mm}:{ss}',
none: '{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}'
}
} }
}, series }, series
}; };
......
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