Procházet zdrojové kódy

update 基本完成rightbar

master
lb před 1 rokem
rodič
revize
86b5551244
9 změnil soubory, kde provedl 39 přidání a 17 odebrání
  1. +10
    -2
      src/components/RightBar/EnergyCost/EnergyCostChart/index.jsx
  2. +0
    -1
      src/components/RightBar/EnergyCost/EnergyCostChart/index.module.css
  3. +2
    -1
      src/components/RightBar/EnergyCost/index.module.less
  4. +2
    -2
      src/components/RightBar/SmokeHandle/SmokeTrendChart/index.jsx
  5. +1
    -0
      src/components/RightBar/SmokeHandle/SmokeTrendChart/index.module.css
  6. +1
    -1
      src/components/RightBar/SmokeHandle/index.module.less
  7. +9
    -10
      src/components/RightBar/index.jsx
  8. +10
    -0
      src/components/RightBar/index.module.less
  9. +4
    -0
      src/pages/global.less

+ 10
- 2
src/components/RightBar/EnergyCost/EnergyCostChart/index.jsx Zobrazit soubor

@@ -7,7 +7,7 @@ import ReactECharts from 'echarts-for-react';
const EnergyCostChart = (props) => {
const options = {
color: ['#FFD160', '#12FFF5', '#2760FF'],
grid: { top: 28, right: 12, bottom: 32, left: 48 },
grid: { top: 32, right: 12, bottom: 20, left: 48 },
xAxis: {
type: 'category',
data: Array(7)
@@ -33,6 +33,12 @@ const EnergyCostChart = (props) => {
},
},
yAxis: {
name: '单位/m³',
nameTextStyle: {
color: '#fff',
fontSize: 10,
align: 'right',
},
type: 'value',
axisLabel: {
color: '#fff',
@@ -112,7 +118,9 @@ const EnergyCostChart = (props) => {
</Radio.Button>
</Radio.Group>
</div>
<ReactECharts option={options} />
<div className="flex-1">
<ReactECharts option={options} style={{ height: '180px' }} />
</div>
</div>
);
};


+ 0
- 1
src/components/RightBar/EnergyCost/EnergyCostChart/index.module.css Zobrazit soubor

@@ -1,5 +1,4 @@
.energyCostChart {
margin-top: 12px;
height: 1px;
flex: 1;
padding-top: 8px;


+ 2
- 1
src/components/RightBar/EnergyCost/index.module.less Zobrazit soubor

@@ -2,10 +2,11 @@
background: url(../../../assets/energy.png) no-repeat;
background-size: 100% 100%;
width: 626px;
height: 400px;
}

.cost__info {
margin-top: 8px;
margin-top: 4px;
margin-bottom: 12px;

div {


+ 2
- 2
src/components/RightBar/SmokeHandle/SmokeTrendChart/index.jsx Zobrazit soubor

@@ -124,7 +124,7 @@ const SmokeTrendChart = (props) => {
return (
<div className={cls.energyCostChart}>
<div className={cls.titleBar}>
<h2>能耗趋势图</h2>
<h2>烟气趋势图</h2>
<Switch defaultChecked onChange={handleSwitchChange} />
<div className={cls.legend}>
<span className="legend__title">班次详情</span>
@@ -175,7 +175,7 @@ const SmokeTrendChart = (props) => {
</Radio.Button>
</Radio.Group>
</div>
<ReactECharts option={options} />
<ReactECharts option={options} style={{ height: '270px' }} />
</div>
);
};


+ 1
- 0
src/components/RightBar/SmokeHandle/SmokeTrendChart/index.module.css Zobrazit soubor

@@ -66,6 +66,7 @@
}

.choiceBar {
margin: 4px 0;
}

.radioGroup * {


+ 1
- 1
src/components/RightBar/SmokeHandle/index.module.less Zobrazit soubor

@@ -3,7 +3,7 @@
background: url(../../../assets/smoke.png) no-repeat;
background-size: 100% 100%;
width: 626px;
height: 540px;
.smokeHandle__content {
margin-top: 8px;
}


+ 9
- 10
src/components/RightBar/index.jsx Zobrazit soubor

@@ -1,8 +1,8 @@
import React from 'react';

import Chart1 from './Chart1';
import Chart2 from './Chart2';
import Chart3 from './Chart3';
// import Chart1 from './Chart1';
// import Chart2 from './Chart2';
// import Chart3 from './Chart3';
// import RightChart2 from './Chart2'
import SmokeHandle from './SmokeHandle';
import EnergyCost from './EnergyCost';
@@ -14,14 +14,13 @@ import cls from './index.module.less';

export default function index() {
return (
<div className={cls.rightBar}>
<div className={cls.demoFloat}>
<EnergyCost />
<SmokeHandle />
</div>
<Chart1 />
<div className={`${cls.rightBar} flex flex-col`}>
<EnergyCost />
<SmokeHandle />

{/* <Chart1 />
<Chart2 />
<Chart3 />
<Chart3 /> */}
</div>
);
}

+ 10
- 0
src/components/RightBar/index.module.less Zobrazit soubor

@@ -1,4 +1,14 @@
.rightBar {
// background: #f00;

> div {
// height: 1px;
// flex: 1;

&:first-child {
margin-bottom: 24px;
}
}
}

.demoFloat {


+ 4
- 0
src/pages/global.less Zobrazit soubor

@@ -6,6 +6,10 @@
flex-direction: column;
}

.flex-1 {
flex: 1;
}

.justify-between {
justify-content: space-between;
}


Načítá se…
Zrušit
Uložit