diff --git a/src/assets/Icon/icon-good.png b/src/assets/Icon/icon-good.png new file mode 100644 index 0000000..36b78e1 Binary files /dev/null and b/src/assets/Icon/icon-good.png differ diff --git a/src/components/Container.jsx b/src/components/Container.jsx index 0426cdf..fb2cf25 100644 --- a/src/components/Container.jsx +++ b/src/components/Container.jsx @@ -1,23 +1,31 @@ -import cls from './container.module.less' +import { useEffect, useRef } from 'react'; -import IconStack from '../assets/Icon/icon-stack.png' +import cls from './container.module.less'; -const Container = props => { - let icon = null - switch (props.icon){ - case 'kiln': - icon = IconStack - } +import IconStack from '../assets/Icon/icon-stack.png'; +import IconGood from '../assets/Icon/icon-good.png'; - return
-
- # -

{props.title}

-
-
- {props.children} -
- -} +const Container = (props) => { + let icon = useRef(null); -export default Container \ No newline at end of file + switch (props.icon) { + case 'kiln': + icon.current = IconStack; + break; + case 'good': // 良品率 + icon.current = IconGood; + break; + } + + return ( +
+
+ # +

{props.title}

+
+
{props.children}
+
+ ); +}; + +export default Container; diff --git a/src/components/LeftBar/GoodProduction.jsx b/src/components/LeftBar/GoodProduction.jsx index d0f0c61..625aac2 100644 --- a/src/components/LeftBar/GoodProduction.jsx +++ b/src/components/LeftBar/GoodProduction.jsx @@ -1,6 +1,19 @@ +import cls from './good.module.less'; +import Container from '../Container'; +import TodayTableData from './substitutionCharts/TodayTableData'; +import GoodRateChart from './substitutionCharts/GoodRateChart'; +import TechSplitline from './substitutionCharts/TechSplitline'; const GoodProduction = () => { - return
-} + return ( + +
+ + + +
+
+ ); +}; -export default GoodProduction; \ No newline at end of file +export default GoodProduction; diff --git a/src/components/LeftBar/Kiln.jsx b/src/components/LeftBar/Kiln.jsx index fc0e9c6..7153db8 100644 --- a/src/components/LeftBar/Kiln.jsx +++ b/src/components/LeftBar/Kiln.jsx @@ -52,7 +52,7 @@ export default function Kiln() {
{infos.map((item) => ( -
+
{item.label}: {item.value}
))} diff --git a/src/components/LeftBar/good.module.less b/src/components/LeftBar/good.module.less index e69de29..f56adbc 100644 --- a/src/components/LeftBar/good.module.less +++ b/src/components/LeftBar/good.module.less @@ -0,0 +1,9 @@ +.goodProd { + background: url(../../assets/good.png) no-repeat, #9f84; + background-size: 100% 100%; + width: 625px; + // height: 626px; + flex: 1; + height: 1px; + margin-top: 24px; +} diff --git a/src/components/LeftBar/substitutionCharts/GoodRateChart/index.jsx b/src/components/LeftBar/substitutionCharts/GoodRateChart/index.jsx new file mode 100644 index 0000000..5bc614b --- /dev/null +++ b/src/components/LeftBar/substitutionCharts/GoodRateChart/index.jsx @@ -0,0 +1,7 @@ +import cls from './index.module.less'; + +const GoodRateChart = (props) => { + return
good rate chart
; +}; + +export default GoodRateChart; diff --git a/src/components/LeftBar/substitutionCharts/GoodRateChart/index.module.less b/src/components/LeftBar/substitutionCharts/GoodRateChart/index.module.less new file mode 100644 index 0000000..e69de29 diff --git a/src/components/LeftBar/substitutionCharts/TechSplitline/index.jsx b/src/components/LeftBar/substitutionCharts/TechSplitline/index.jsx new file mode 100644 index 0000000..fe9e623 --- /dev/null +++ b/src/components/LeftBar/substitutionCharts/TechSplitline/index.jsx @@ -0,0 +1,7 @@ +import cls from './index.module.less'; + +const TechSplitline = (props) => { + return
; +}; + +export default TechSplitline; diff --git a/src/components/LeftBar/substitutionCharts/TechSplitline/index.module.less b/src/components/LeftBar/substitutionCharts/TechSplitline/index.module.less new file mode 100644 index 0000000..38f1cd0 --- /dev/null +++ b/src/components/LeftBar/substitutionCharts/TechSplitline/index.module.less @@ -0,0 +1,5 @@ +.techSplitline { + height: 2px; + width: 100%; + background: radial-gradient(#3ce7ff, #3ce8ff92, #3ce8ff32, transparent); +} diff --git a/src/components/LeftBar/substitutionCharts/TodayTableData/index.jsx b/src/components/LeftBar/substitutionCharts/TodayTableData/index.jsx new file mode 100644 index 0000000..ab36061 --- /dev/null +++ b/src/components/LeftBar/substitutionCharts/TodayTableData/index.jsx @@ -0,0 +1,7 @@ +import cls from './index.module.less'; + +const TodayTableData = (props) => { + return
today table data
; +}; + +export default TodayTableData; diff --git a/src/components/LeftBar/substitutionCharts/TodayTableData/index.module.less b/src/components/LeftBar/substitutionCharts/TodayTableData/index.module.less new file mode 100644 index 0000000..e69de29 diff --git a/src/components/container.module.less b/src/components/container.module.less index 917d028..31c8349 100644 --- a/src/components/container.module.less +++ b/src/components/container.module.less @@ -1,49 +1,56 @@ .container { - padding: 24px; - display: flex; - flex-direction: column; - background-size: 100% 100%; - background-repeat: no-repeat; + padding: 24px; + display: flex; + flex-direction: column; + background-size: 100% 100%; + background-repeat: no-repeat; - .container__head { - display: flex; - align-items: center; + .container__head { + display: flex; + align-items: center; - h2 { - font-family: "微软雅黑", "Microsoft YaHei UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", - "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", - "WenQuanYi Micro Hei", sans-serif; - margin: 0; - margin-left: 6px; - font-size: 18px; - color: #fff; - letter-spacing: 2px; - font-weight: 500; - } - } + h2 { + font-family: '微软雅黑', 'Microsoft YaHei UI', -apple-system, + BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', + 'Source Han Sans SC', 'Noto Sans CJK SC', 'WenQuanYi Micro Hei', + sans-serif; + margin: 0; + margin-left: 6px; + font-size: 18px; + color: #fff; + letter-spacing: 2px; + font-weight: 500; + } + } + + .container__content { + height: 1px; + flex: 1; + background: #25a78672; + } } .bgKiln { - background: url(''); + background: url(''); } .bgGood { - background: url('../assets/good.png'); + background: url('../assets/good.png'); } .bgFaultTotal { - background: url(''); + background: url(''); } .bgFaultType { - background: url(''); + background: url(''); } .bgGas { - background: url(''); + background: url(''); } .bgWind { - background: url(''); + background: url(''); } .bgEnergy { - background: url('../assets/energy.png'); + background: url('../assets/energy.png'); } .bgSmoke { - background: url('../assets/smoke.png'); + background: url('../assets/smoke.png'); }