This commit is contained in:
lb
2024-01-02 14:33:21 +08:00
parent 4b043214ca
commit a32e6fb591
14 changed files with 261 additions and 86 deletions

View File

@@ -37,12 +37,27 @@ function Gas(props) {
size={["long", "short"]}
>
{/* real echarts here */}
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions([[21, 4, 74, 72, 9, 59, 63]], "氧气")}
style={{ height: "100%" }}
/>
{options && (
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions([[21, 4, 74, 72, 9, 59, 63]], "氧气")}
style={{ height: "100%" }}
/>
)}
{!options && (
<p
style={{
color: "#cccf",
fontSize: "24px",
userSelect: "none",
textAlign: "center",
paddingTop: "48px",
}}
>
暂无数据
</p>
)}
{/* real table data here */}
</GraphBase>
);
@@ -52,6 +67,7 @@ export default Gas;
function getOptions(period, trend) {
console.log("getOptions", period, trend);
if (trend[period].length === 0) return null;
// export default function getOptions(seriesData, name) {
const colors = [
"#FFD160",

View File

@@ -36,12 +36,25 @@ function ElecCost(props) {
size={["long", "short"]}
>
{/* real echarts here */}
<ReactECharts
{ options && <ReactECharts
key={Math.random()}
option={options}
// option={getOptions([[112, 73, 79, 82, 30, 105, 87]], "氧气")}
style={{ height: "100%" }}
/>
/>}
{!options && (
<p
style={{
color: "#cccf",
fontSize: "24px",
userSelect: "none",
textAlign: "center",
paddingTop: "48px",
}}
>
暂无数据
</p>
)}
{/* real table data here */}
</GraphBase>
);
@@ -51,6 +64,7 @@ export default ElecCost;
function getOptions(period, trend) {
console.log("getOptions", period, trend);
if (trend[period].length === 0) return null;
// export default function getOptions(seriesData, name) {
const colors = [
"#FFD160",

View File

@@ -46,19 +46,34 @@ function NO(props) {
size={["long", "middle"]}
>
{/* real echarts here */}
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions(
// [
// [148, 110, 140, 122, 84, 153, 89],
// [88, 79, 75, 73, 33, 54, 31],
// [60, 31, 65, 49, 51, 99, 58],
// ],
// "氧气"
// )}
style={{ height: "100%" }}
/>
{options && (
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions(
// [
// [148, 110, 140, 122, 84, 153, 89],
// [88, 79, 75, 73, 33, 54, 31],
// [60, 31, 65, 49, 51, 99, 58],
// ],
// "氧气"
// )}
style={{ height: "100%" }}
/>
)}
{!options && (
<p
style={{
color: "#cccf",
fontSize: "24px",
userSelect: "none",
textAlign: "center",
paddingTop: "96px",
}}
>
暂无数据
</p>
)}
{/* real table data here */}
</GraphBase>
);
@@ -67,6 +82,7 @@ function NO(props) {
export default NO;
function getOptions(source, period, trend) {
if (trend[source].length == 0) return null;
return {
color: ["#FFD160", "#12FFF5", "#2760FF"],
grid: { top: 38, right: 12, bottom: 20, left: 48 },

View File

@@ -46,19 +46,34 @@ function Dust(props) {
size={["long", "middle"]}
>
{/* real echarts here */}
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions(
// [
// [91, 164, 88, 120, 167, 158, 43],
// [30, 75, 52, 43, 73, 66, 36],
// [61, 89, 36, 77, 94, 92, 7],
// ],
// "氧气"
// )}
style={{ height: "100%" }}
/>
{options && (
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions(
// [
// [91, 164, 88, 120, 167, 158, 43],
// [30, 75, 52, 43, 73, 66, 36],
// [61, 89, 36, 77, 94, 92, 7],
// ],
// "氧气"
// )}
style={{ height: "100%" }}
/>
)}
{!options && (
<p
style={{
color: "#cccf",
fontSize: "24px",
userSelect: "none",
textAlign: "center",
paddingTop: "96px",
}}
>
暂无数据
</p>
)}
{/* real table data here */}
</GraphBase>
);
@@ -67,6 +82,7 @@ function Dust(props) {
export default Dust;
function getOptions(source, period, trend) {
if (trend[source].length == 0) return null;
return {
color: ["#FFD160", "#12FFF5", "#2760FF"],
grid: { top: 38, right: 12, bottom: 20, left: 48 },

View File

@@ -37,12 +37,27 @@ function NatGas(props) {
size={["long", "short"]}
>
{/* real echarts here */}
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions([[91, 69, 5, 10, 21, 46, 24]], "氧气")}
style={{ height: "100%" }}
/>
{options && (
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions([[91, 69, 5, 10, 21, 46, 24]], "氧气")}
style={{ height: "100%" }}
/>
)}
{!options && (
<p
style={{
color: "#cccf",
fontSize: "24px",
userSelect: "none",
textAlign: "center",
paddingTop: "48px",
}}
>
暂无数据
</p>
)}
{/* real table data here */}
</GraphBase>
);
@@ -52,6 +67,7 @@ export default NatGas;
function getOptions(period, trend) {
console.log("getOptions", period, trend);
if (trend[period].length === 0) return null;
// export default function getOptions(seriesData, name) {
const colors = [
"#FFD160",

View File

@@ -46,19 +46,34 @@ function Oxygen(props) {
size={["long", "middle"]}
>
{/* real echarts here */}
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions(
// [
// [172, 165, 135, 35, 101, 53, 68], // 总量
// [87, 68, 81, 33, 35, 44, 38], // 白班
// [85, 97, 54, 2, 66, 9, 30], //
// ],
// "氧气"
// )}
style={{ height: "100%" }}
/>
{options && (
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions(
// [
// [172, 165, 135, 35, 101, 53, 68], // 总量
// [87, 68, 81, 33, 35, 44, 38], //
// [85, 97, 54, 2, 66, 9, 30], // 夜班
// ],
// "氧气"
// )}
style={{ height: "100%" }}
/>
)}
{!options && (
<p
style={{
color: "#cccf",
fontSize: "24px",
userSelect: "none",
textAlign: "center",
paddingTop: "96px",
}}
>
暂无数据
</p>
)}
{/* real table data here */}
</GraphBase>
);
@@ -67,6 +82,7 @@ function Oxygen(props) {
export default Oxygen;
function getOptions(source, period, trend) {
if (trend[source].length == 0) return null;
return {
color: ["#FFD160", "#12FFF5", "#2760FF"],
grid: { top: 38, right: 12, bottom: 20, left: 48 },

View File

@@ -45,19 +45,34 @@ function SO2(props) {
size={["long", "middle"]}
>
{/* real echarts here */}
<ReactECharts
key={Math.random()}
// option={getOptions(
// [
// [132, 155, 140, 83, 180, 67, 136],
// [83, 58, 60, 22, 80, 64, 43],
// [49, 97, 80, 61, 100, 3, 93],
// ],
// '氧气',
// )}
option={options}
style={{ height: "100%" }}
/>
{options && (
<ReactECharts
key={Math.random()}
// option={getOptions(
// [
// [132, 155, 140, 83, 180, 67, 136],
// [83, 58, 60, 22, 80, 64, 43],
// [49, 97, 80, 61, 100, 3, 93],
// ],
// '氧气',
// )}
option={options}
style={{ height: "100%" }}
/>
)}
{!options && (
<p
style={{
color: "#cccf",
fontSize: "24px",
userSelect: "none",
textAlign: "center",
paddingTop: "96px",
}}
>
暂无数据
</p>
)}
{/* real table data here */}
</GraphBase>
);
@@ -66,6 +81,7 @@ function SO2(props) {
export default SO2;
function getOptions(source, period, trend) {
if (trend[source].length == 0) return null;
return {
color: ["#FFD160", "#12FFF5", "#2760FF"],
grid: { top: 38, right: 12, bottom: 20, left: 48 },