This commit is contained in:
lb
2023-11-03 13:46:54 +08:00
parent 32edb46215
commit 30a8a8e386
16 changed files with 309 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
// TODO: -
import useIcon from '../../../../hooks/useIcon';
import useIcon from '../../../hooks/useIcon';
import cls from './index.module.css';
import { useMemo, useState } from 'react';
import { Switch, Radio } from 'antd';

View File

@@ -5,31 +5,31 @@
} */
.long-middle {
background: url('../../../../assets/long-middle.png') no-repeat;
background: url('../../../assets/long-middle.png') no-repeat;
background-size: 100% 100%;
background-position: 0 0;
}
.long-short {
background: url('../../../../assets/long-short.png') no-repeat;
background: url('../../../assets/long-short.png') no-repeat;
background-size: 100% 100%;
background-position: 0 0;
}
.middle-long {
background: url('../../../../assets/middle-middle.png') no-repeat;
background: url('../../../assets/middle-middle.png') no-repeat;
background-size: 100% 100%;
background-position: 0 0;
}
.middle-middle {
background: url('../../../../assets/middle-middle-2.png') no-repeat;
background: url('../../../assets/middle-middle-2.png') no-repeat;
background-size: 100% 100%;
background-position: 0 0;
}
.middle-short {
background: url('../../../../assets/middle-short.png') no-repeat;
background: url('../../../assets/middle-short.png') no-repeat;
background-size: 100% 100%;
background-position: 0 0;
}

View File

@@ -1,4 +1,4 @@
import GraphBase from '../GraphBase';
import GraphBase from '../../../公共组件/GraphBase';
function NO(props) {
function handleSwitch(v) {

View File

@@ -0,0 +1,30 @@
import GraphBase from '../../../公共组件/GraphBase';
function NO2(props) {
function handleSwitch(v) {
console.log('switched ', v);
}
function handleDateChange(v) {
console.log('date ', v);
}
return (
<GraphBase
icon="battery"
title="二氧化氮"
desc="能耗趋势图"
switchOptions={true}
onSwitch={handleSwitch}
dateOptions={['日', '周', '月', '年']}
legend={['总量', '白班', '夜班']}
onDateChange={handleDateChange}
size={['long', 'middle']}
>
{/* real echarts here */}
{/* real table data here */}
</GraphBase>
);
}
export default NO2;

View File

@@ -0,0 +1,30 @@
import GraphBase from '../../../公共组件/GraphBase';
function NO2(props) {
function handleSwitch(v) {
console.log('switched ', v);
}
function handleDateChange(v) {
console.log('date ', v);
}
return (
<GraphBase
icon="battery"
title="二氧化氮"
desc="能耗趋势图"
switchOptions={true}
onSwitch={handleSwitch}
dateOptions={['日', '周', '月', '年']}
legend={['总量', '白班', '夜班']}
onDateChange={handleDateChange}
size={['long', 'middle']}
>
{/* real echarts here */}
{/* real table data here */}
</GraphBase>
);
}
export default NO2;

View File

@@ -0,0 +1,30 @@
import GraphBase from '../../../公共组件/GraphBase';
function SO2(props) {
function handleSwitch(v) {
console.log('switched ', v);
}
function handleDateChange(v) {
console.log('date ', v);
}
return (
<GraphBase
icon="battery"
title="二氧化硫"
desc="能耗趋势图"
switchOptions={true}
onSwitch={handleSwitch}
dateOptions={['日', '周', '月', '年']}
legend={['总量', '白班', '夜班']}
onDateChange={handleDateChange}
size={['long', 'middle']}
>
{/* real echarts here */}
{/* real table data here */}
</GraphBase>
);
}
export default SO2;

View File

@@ -0,0 +1,30 @@
import GraphBase from '../../../公共组件/GraphBase';
function RestHeat(props) {
function handleSwitch(v) {
console.log('switched ', v);
}
function handleDateChange(v) {
console.log('date ', v);
}
return (
<GraphBase
icon="battery"
title="余热发电"
desc="能耗趋势图"
switchOptions={true}
onSwitch={handleSwitch}
dateOptions={['日', '周', '月', '年']}
legend={['总量', '白班', '夜班']}
onDateChange={handleDateChange}
size={['long', 'middle']}
>
{/* real echarts here */}
{/* real table data here */}
</GraphBase>
);
}
export default RestHeat;

View File

@@ -0,0 +1,30 @@
import GraphBase from '../../../公共组件/GraphBase';
function NatGas(props) {
function handleSwitch(v) {
console.log('switched ', v);
}
function handleDateChange(v) {
console.log('date ', v);
}
return (
<GraphBase
icon="battery"
title="天然气"
desc="能耗趋势图"
switchOptions={true}
onSwitch={handleSwitch}
dateOptions={['日', '周', '月', '年']}
legend={['总量']}
onDateChange={handleDateChange}
size={['long', 'short']}
>
{/* real echarts here */}
{/* real table data here */}
</GraphBase>
);
}
export default NatGas;

View File

@@ -0,0 +1,30 @@
import GraphBase from '../../../公共组件/GraphBase';
function Oxygen(props) {
function handleSwitch(v) {
console.log('switched ', v);
}
function handleDateChange(v) {
console.log('date ', v);
}
return (
<GraphBase
icon="battery"
title="氧气含量"
desc="能耗趋势图"
switchOptions={true}
onSwitch={handleSwitch}
dateOptions={['日', '周', '月', '年']}
legend={['总量', '白班', '夜班']}
onDateChange={handleDateChange}
size={['long', 'middle']}
>
{/* real echarts here */}
{/* real table data here */}
</GraphBase>
);
}
export default Oxygen;

View File

@@ -0,0 +1,30 @@
import GraphBase from '../../../公共组件/GraphBase';
function WaterCost(props) {
function handleSwitch(v) {
console.log('switched ', v);
}
function handleDateChange(v) {
console.log('date ', v);
}
return (
<GraphBase
icon="battery"
title="水耗能"
desc="能耗趋势图"
switchOptions={true}
onSwitch={handleSwitch}
dateOptions={['日', '周', '月', '年']}
legend={['总量', '白班', '夜班']}
onDateChange={handleDateChange}
size={['long', 'middle']}
>
{/* real echarts here */}
{/* real table data here */}
</GraphBase>
);
}
export default WaterCost;

View File

@@ -3,7 +3,7 @@ import GradientText from '../../../公共组件/GradientText';
function SmokeHandle(props) {
return (
<div className={'bgray ' + cls.smoke} style={{ color: '#fff' }}>
<div className={' ' + cls.smoke} style={{ color: '#fff' }}>
<span
className={cls.shadowBorder}
style={{

View File

@@ -0,0 +1,30 @@
import GraphBase from '../../../公共组件/GraphBase';
function Gas(props) {
function handleSwitch(v) {
console.log('switched ', v);
}
function handleDateChange(v) {
console.log('date ', v);
}
return (
<GraphBase
icon="battery"
title="焦炉煤气"
desc="能耗趋势图"
switchOptions={true}
onSwitch={handleSwitch}
dateOptions={['日', '周', '月', '年']}
legend={['总量']}
onDateChange={handleDateChange}
size={['long', 'short']}
>
{/* real echarts here */}
{/* real table data here */}
</GraphBase>
);
}
export default Gas;

View File

@@ -0,0 +1,30 @@
import GraphBase from '../../../公共组件/GraphBase';
function ElecCost(props) {
function handleSwitch(v) {
console.log('switched ', v);
}
function handleDateChange(v) {
console.log('date ', v);
}
return (
<GraphBase
icon="battery"
title="电耗能"
desc="能耗趋势图"
switchOptions={true}
onSwitch={handleSwitch}
dateOptions={['日', '周', '月', '年']}
legend={['总量']}
onDateChange={handleDateChange}
size={['long', 'short']}
>
{/* real echarts here */}
{/* real table data here */}
</GraphBase>
);
}
export default ElecCost;

View File

@@ -3,7 +3,7 @@ import GradientText from '../../../公共组件/GradientText';
function Energy(props) {
return (
<div className={'bgray ' + cls.layout} style={{ color: '#fff' }}>
<div className={' ' + cls.layout} style={{ color: '#fff' }}>
<span
className={cls.shadowBorder}
style={{