diff --git a/src/components/Common/Energy/EnergyCostChart/index.jsx b/src/components/Common/Energy/EnergyCostChart/index.jsx index 3489aed..f9f7945 100644 --- a/src/components/Common/Energy/EnergyCostChart/index.jsx +++ b/src/components/Common/Energy/EnergyCostChart/index.jsx @@ -1,9 +1,11 @@ import cls from "./index.module.css"; -import { Radio } from "antd"; +import { Radio, Select } from "antd"; import ReactECharts from "echarts-for-react"; import { useState } from "react"; import { useSelector } from "react-redux"; import { getOptions } from "../../../../utils/energeChartOption"; +import triangle from "../../../../assets/Icon/triangle.svg"; +import dayjs from "dayjs"; const EnergyCostChart = (props) => { const elecTrend = useSelector((state) => state.energy.trend.elec); @@ -21,6 +23,17 @@ const EnergyCostChart = (props) => { currentTrend ?? { week: [], month: [], year: [] } ); + function handleDateChange(value) { + setPeriod( + { + 日: "day", + 周: "week", + 月: "month", + 年: "year", + }[value] + ); + } + return (
@@ -45,7 +58,7 @@ const EnergyCostChart = (props) => { - setPeriod(v.target.value)} @@ -60,7 +73,31 @@ const EnergyCostChart = (props) => { - + */} + ({ + label: item, + value: item, + }))} + suffixIcon={#} + notFoundContent={ + + - 无 - + + } + onChange={(value, option) => handleSourceChange(value)} + /> + +
{desc}
{/* { style={{ width: 60 }} popupClassName="xc-date-selector-menu" className={cls.radioGroupShort} - options={["日", "周", "月", '年'].map((item) => ({ + options={["日", "周", "月", "年"].map((item) => ({ label: item, value: item, }))} diff --git a/src/components/Common/SmokeHandle/SmokeTrendChart/index.module.css b/src/components/Common/SmokeHandle/SmokeTrendChart/index.module.css index 328e487..725c04a 100644 --- a/src/components/Common/SmokeHandle/SmokeTrendChart/index.module.css +++ b/src/components/Common/SmokeHandle/SmokeTrendChart/index.module.css @@ -1,95 +1,101 @@ .energyCostChart { - height: 1px; - flex: 1; - padding-top: 8px; + height: 1px; + flex: 1; + padding-top: 8px; } .energyCostChart .titleBar { - width: 400px; - margin-bottom: 4px; - display: flex; - justify-content: space-between; - align-items: center; - color: white; + width: 400px; + margin-bottom: 4px; + display: flex; + justify-content: space-between; + align-items: center; + color: white; } .energyCostChart .titleBar h2 { - margin: 0; - font-size: 18px; - line-height: 32px; - letter-spacing: 1.2px; - color: #52fff8; + margin: 0; + font-size: 18px; + line-height: 32px; + letter-spacing: 1.2px; + color: #52fff8; } .energyCostChart .titleBar .legend { - display: flex; - align-items: center; + display: flex; + align-items: center; } .energyCostChart .titleBar .legend * { - font-size: 14px; - line-height: 14px; - color: #dff1fe; + font-size: 14px; + line-height: 14px; + color: #dff1fe; } .energyCostChart .titleBar .legend ul { - display: flex; - margin: 0; - margin-left: 8px; - padding: 0; - list-style: none; - align-items: center; + display: flex; + margin: 0; + margin-left: 8px; + padding: 0; + list-style: none; + align-items: center; } .energyCostChart .titleBar .legend ul li { - position: relative; - margin: 4px; - padding-left: 16px; + position: relative; + margin: 4px; + padding-left: 16px; } .energyCostChart .titleBar .legend ul li::before { - content: ''; - position: absolute; - left: 2px; - top: 2px; - display: inline-block; - width: 12px; - height: 12px; - border-radius: 2px; + content: ""; + position: absolute; + left: 2px; + top: 2px; + display: inline-block; + width: 12px; + height: 12px; + border-radius: 2px; } .energyCostChart .titleBar .legend ul li:first-child::before { - background-color: #ffd160; + background-color: #ffd160; } .energyCostChart .titleBar .legend ul li:nth-child(2)::before { - background-color: #12fff5; + background-color: #12fff5; } .energyCostChart .titleBar .legend ul li:nth-child(3)::before { - background-color: #2760ff; + background-color: #2760ff; } .choiceBar { - margin: 4px 0; + margin: 4px 0; } .radioGroup * { - border: none !important; - border-radius: 0 !important; + border: none !important; + border-radius: 0 !important; } .radioGroupShort * { - border: none !important; - border-radius: 6px !important; + border: none !important; + border-radius: 6px !important; } .radioGroup *:focus-within { - box-shadow: none !important; + box-shadow: none !important; } .radioGroup *::before { - width: 0 !important; + width: 0 !important; } .radioGroup_button_wrapper { - color: #fff !important; - background: #03233c !important; + color: #fff !important; + background: #03233c !important; } .radioGroup_button_wrapper.ant-radio-button-wrapper-checked { - background: #02457e !important; + background: #02457e !important; +} +.graphBaseDesc { + margin: 0 12px; + line-height: 1; + color: #76fff9; + flex: 1; }