diff --git a/src/components/Common/GraphBase/index.jsx b/src/components/Common/GraphBase/index.jsx
index 1e84828..9c180c4 100644
--- a/src/components/Common/GraphBase/index.jsx
+++ b/src/components/Common/GraphBase/index.jsx
@@ -2,14 +2,10 @@
import useIcon from "../../../hooks/useIcon";
import cls from "./index.module.css";
import { useMemo, useState } from "react";
-import { Switch, Select, Radio } from "antd";
+import { Switch, Select } from "antd";
import "./selector.style.overwrite.css";
-// import { Switch, Select, Space } from 'antd';
import triangle from "../../../assets/Icon/triangle.svg";
-const handleChange = (value: string) => {
- console.log(`selected ${value}`);
-};
function choseBg(size) {
const [width, height] = size;
return width === "long" && height === "middle"
@@ -53,7 +49,6 @@ function GraphBase(props) {
const [showChart, setShowChart] = useState(true);
let dto = null;
- let timerangeHint = null;
const switchStyle = {};
if (props.switchPosition) {
@@ -65,7 +60,6 @@ function GraphBase(props) {
}
if (dateOptions) {
- console.log("dateoptions ", title, dateOptions);
dto = (
)}
- {/* real table data here */}
);
}
@@ -127,16 +106,6 @@ function getOptions(source, period, trend) {
grid: { top: 40, right: 12, bottom: 20, left: 64 },
xAxis: {
type: "category",
- // data: Array(7)
- // .fill(1)
- // .map((_, index) => {
- // const today = new Date();
- // const dtimestamp = today - index * 24 * 60 * 60 * 1000;
- // return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
- // dtimestamp
- // ).getDate()}`;
- // })
- // .reverse(),
data: trend[source].map((item) => item.time),
axisLabel: {
color: "#fff",
@@ -174,9 +143,6 @@ function getOptions(source, period, trend) {
color: "#213259a0",
},
},
- // interval: 10,
- // min: 0,
- // max: 100,
},
series: [
{
@@ -193,40 +159,7 @@ function getOptions(source, period, trend) {
{ offset: 1, color: "#FFD16010" },
]),
},
- // smooth: true,
},
- // {
- // data: Array(7)
- // .fill(1)
- // .map((_) => {
- // return randomInt(60, 100);
- // }),
- // type: "line",
- // areaStyle: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- // { offset: 0, color: "#12FFF540" },
- // { offset: 0.5, color: "#12FFF520" },
- // { offset: 1, color: "#12FFF510" },
- // ]),
- // },
- // // smooth: true,
- // },
- // {
- // data: Array(7)
- // .fill(1)
- // .map((_) => {
- // return randomInt(60, 100);
- // }),
- // type: "line",
- // areaStyle: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- // { offset: 0, color: "#2760FF40" },
- // { offset: 0.5, color: "#2760FF20" },
- // { offset: 1, color: "#2760FF10" },
- // ]),
- // },
- // // smooth: true,
- // },
],
tooltip: {
trigger: "axis",
@@ -234,7 +167,6 @@ function getOptions(source, period, trend) {
type: "shadow",
},
className: "xc-chart-tooltip",
- // backgroundColor: ''
},
};
}
diff --git a/src/components/Modules/EnergyCostAnalysis/NO2/index.jsx b/src/components/Modules/EnergyCostAnalysis/NO2/index.jsx
index e9ba5a2..a6e67b9 100644
--- a/src/components/Modules/EnergyCostAnalysis/NO2/index.jsx
+++ b/src/components/Modules/EnergyCostAnalysis/NO2/index.jsx
@@ -28,20 +28,10 @@ function Dust(props) {
const options = getOptions("dust_float", period, currentTrend);
- function handleSwitch(v) {
- // console.log('switched ', v);
- }
-
+ function handleSwitch(v) {}
function handleDateChange(value) {
- setPeriod(
- {
- 日: "day",
- 周: "week",
- 月: "month",
- 年: "year",
- }[value]
- );
+ setPeriod(value);
setTimestr(
{
日:
@@ -67,7 +57,6 @@ function Dust(props) {
);
}
-
return (
- {/* real echarts here */}
{options && (
)}
@@ -110,7 +89,6 @@ function Dust(props) {
暂无数据
)}
- {/* real table data here */}
);
}
@@ -128,16 +106,6 @@ function getOptions(source, period, trend) {
grid: { top: 40, right: 12, bottom: 20, left: 64 },
xAxis: {
type: "category",
- // data: Array(7)
- // .fill(1)
- // .map((_, index) => {
- // const today = new Date();
- // const dtimestamp = today - index * 24 * 60 * 60 * 1000;
- // return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
- // dtimestamp
- // ).getDate()}`;
- // })
- // .reverse(),
data: trend[source].map((item) => item.time),
axisLabel: {
color: "#fff",
@@ -175,13 +143,9 @@ function getOptions(source, period, trend) {
color: "#213259a0",
},
},
- // interval: 10,
- // min: 0,
- // max: 100,
},
series: [
{
- // (isNaN((+"f")) ? 0 : (+"f")).toFixed(2)
data: trend[source].map((item) =>
!(item.value == null || isNaN(+item.value))
? (+item.value).toFixed(2)
@@ -197,40 +161,7 @@ function getOptions(source, period, trend) {
{ offset: 1, color: "#FFD16010" },
]),
},
- // smooth: true,
},
- // {
- // data: Array(7)
- // .fill(1)
- // .map((_) => {
- // return randomInt(60, 100);
- // }),
- // type: "line",
- // areaStyle: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- // { offset: 0, color: "#12FFF540" },
- // { offset: 0.5, color: "#12FFF520" },
- // { offset: 1, color: "#12FFF510" },
- // ]),
- // },
- // // smooth: true,
- // },
- // {
- // data: Array(7)
- // .fill(1)
- // .map((_) => {
- // return randomInt(60, 100);
- // }),
- // type: "line",
- // areaStyle: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- // { offset: 0, color: "#2760FF40" },
- // { offset: 0.5, color: "#2760FF20" },
- // { offset: 1, color: "#2760FF10" },
- // ]),
- // },
- // // smooth: true,
- // },
],
tooltip: {
trigger: "axis",
@@ -238,7 +169,6 @@ function getOptions(source, period, trend) {
type: "shadow",
},
className: "xc-chart-tooltip",
- // backgroundColor: ''
},
};
}
diff --git a/src/components/Modules/EnergyCostAnalysis/O/index.jsx b/src/components/Modules/EnergyCostAnalysis/O/index.jsx
index be89ec7..d55302c 100644
--- a/src/components/Modules/EnergyCostAnalysis/O/index.jsx
+++ b/src/components/Modules/EnergyCostAnalysis/O/index.jsx
@@ -29,19 +29,10 @@ function Oxygen(props) {
const options = getOptions("O2_float", period, currentTrend);
- function handleSwitch(v) {
- // console.log('switched ', v);
- }
+ function handleSwitch(v) {}
function handleDateChange(value) {
- setPeriod(
- {
- 日: "day",
- 周: "week",
- 月: "month",
- 年: "year",
- }[value]
- );
+ setPeriod(value);
setTimestr(
{
日:
@@ -75,23 +66,13 @@ function Oxygen(props) {
defaultSelect={period}
onSwitch={handleSwitch}
dateOptions={["日", "周", "月", "年"]}
- // legend={["总量", "白班", "夜班"]}
onDateChange={handleDateChange}
size={["long", "middle"]}
>
- {/* real echarts here */}
{options && (
)}
@@ -108,7 +89,6 @@ function Oxygen(props) {
暂无数据
)}
- {/* real table data here */}
);
}
@@ -175,9 +155,6 @@ function getOptions(source, period, trend) {
color: "#213259a0",
},
},
- // interval: 10,
- // min: 0,
- // max: 100,
},
series: [
{
@@ -196,40 +173,7 @@ function getOptions(source, period, trend) {
{ offset: 1, color: "#FFD16010" },
]),
},
- // smooth: true,
},
- // {
- // data: Array(7)
- // .fill(1)
- // .map((_) => {
- // return randomInt(60, 100);
- // }),
- // type: "line",
- // areaStyle: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- // { offset: 0, color: "#12FFF540" },
- // { offset: 0.5, color: "#12FFF520" },
- // { offset: 1, color: "#12FFF510" },
- // ]),
- // },
- // // smooth: true,
- // },
- // {
- // data: Array(7)
- // .fill(1)
- // .map((_) => {
- // return randomInt(60, 100);
- // }),
- // type: "line",
- // areaStyle: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- // { offset: 0, color: "#2760FF40" },
- // { offset: 0.5, color: "#2760FF20" },
- // { offset: 1, color: "#2760FF10" },
- // ]),
- // },
- // // smooth: true,
- // },
],
tooltip: {
trigger: "axis",
@@ -237,7 +181,6 @@ function getOptions(source, period, trend) {
type: "shadow",
},
className: "xc-chart-tooltip",
- // backgroundColor: ''
},
};
}
diff --git a/src/components/Modules/EnergyCostAnalysis/SO2/index.jsx b/src/components/Modules/EnergyCostAnalysis/SO2/index.jsx
index e66cf64..919f36c 100644
--- a/src/components/Modules/EnergyCostAnalysis/SO2/index.jsx
+++ b/src/components/Modules/EnergyCostAnalysis/SO2/index.jsx
@@ -28,19 +28,10 @@ function SO2(props) {
);
const options = getOptions("SO2_float", period, currentTrend);
- function handleSwitch(v) {
- // console.log('switched ', v);
- }
+ function handleSwitch(v) {}
function handleDateChange(value) {
- setPeriod(
- {
- 日: "day",
- 周: "week",
- 月: "month",
- 年: "year",
- }[value]
- );
+ setPeriod(value);
setTimestr(
{
日:
@@ -75,22 +66,12 @@ function SO2(props) {
defaultSelect={period}
onSwitch={handleSwitch}
dateOptions={["日", "周", "月", "年"]}
- // legend={["总量", "白班", "夜班"]}
onDateChange={handleDateChange}
size={["long", "middle"]}
>
- {/* real echarts here */}
{options && (
@@ -108,7 +89,6 @@ function SO2(props) {
暂无数据
)}
- {/* real table data here */}
);
}
@@ -126,16 +106,6 @@ function getOptions(source, period, trend) {
grid: { top: 40, right: 12, bottom: 20, left: 64 },
xAxis: {
type: "category",
- // data: Array(7)
- // .fill(1)
- // .map((_, index) => {
- // const today = new Date();
- // const dtimestamp = today - index * 24 * 60 * 60 * 1000;
- // return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
- // dtimestamp
- // ).getDate()}`;
- // })
- // .reverse(),
data: trend[source].map((item) => item.time),
axisLabel: {
color: "#fff",
@@ -173,9 +143,6 @@ function getOptions(source, period, trend) {
color: "#213259a0",
},
},
- // interval: 10,
- // min: 0,
- // max: 100,
},
series: [
{
@@ -194,40 +161,7 @@ function getOptions(source, period, trend) {
{ offset: 1, color: "#FFD16010" },
]),
},
- // smooth: true,
},
- // {
- // data: Array(7)
- // .fill(1)
- // .map((_) => {
- // return randomInt(60, 100);
- // }),
- // type: "line",
- // areaStyle: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- // { offset: 0, color: "#12FFF540" },
- // { offset: 0.5, color: "#12FFF520" },
- // { offset: 1, color: "#12FFF510" },
- // ]),
- // },
- // // smooth: true,
- // },
- // {
- // data: Array(7)
- // .fill(1)
- // .map((_) => {
- // return randomInt(60, 100);
- // }),
- // type: "line",
- // areaStyle: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- // { offset: 0, color: "#2760FF40" },
- // { offset: 0.5, color: "#2760FF20" },
- // { offset: 1, color: "#2760FF10" },
- // ]),
- // },
- // // smooth: true,
- // },
],
tooltip: {
trigger: "axis",
@@ -235,7 +169,6 @@ function getOptions(source, period, trend) {
type: "shadow",
},
className: "xc-chart-tooltip",
- // backgroundColor: ''
},
};
}
diff --git a/src/pages/EnergyCostAnalysis/index.jsx b/src/pages/EnergyCostAnalysis/index.jsx
index 410b3d9..65114aa 100644
--- a/src/pages/EnergyCostAnalysis/index.jsx
+++ b/src/pages/EnergyCostAnalysis/index.jsx
@@ -15,7 +15,6 @@ function EnergyAnalysis(props) {
return (
- {/*
*/}
@@ -33,32 +32,24 @@ function EnergyAnalysis(props) {
- {/* */}
-
- {/*
*/}
- {/*
*/}
- {/* */}
- {/* */}