indexLeft.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // 污水
  2. import React, { PureComponent } from "react";
  3. import { Circle, CircleCon, LeftPage, Line, RightPage } from "./style";
  4. import ChartBox from "../ChartBox";
  5. import MaterialsPrepare from "./MaterialsPrepare";
  6. import WaterLevel from "./WaterLevel";
  7. import WarnMessage from "./WarnMessage";
  8. class index extends PureComponent {
  9. constructor(props) {
  10. super(props);
  11. this.state = {
  12. data: [
  13. {
  14. name: "现在",
  15. value: require("../../assets/sun.png"),
  16. },
  17. {
  18. name: "15:00",
  19. value: require("../../assets/smallRain.png"),
  20. },
  21. {
  22. name: "17:00",
  23. value: require("../../assets/bigRain.png"),
  24. },
  25. {
  26. name: "17:00",
  27. value: require("../../assets/bigRain.png"),
  28. },
  29. {
  30. name: "17:00",
  31. value: require("../../assets/bigRain.png"),
  32. },
  33. {
  34. name: "17:00",
  35. value: require("../../assets/bigRain.png"),
  36. },
  37. ],
  38. };
  39. }
  40. render() {
  41. return (
  42. <LeftPage>
  43. <CircleCon>
  44. {this.state.data.map((item, idx) => (
  45. <>
  46. {idx !== 0 && <Line></Line>}
  47. <div style={{ textAlign: "center", color: "#fff" }}>
  48. <div>{item.name}</div>
  49. <img className="image" src={item.value} />
  50. </div>
  51. </>
  52. ))}
  53. </CircleCon>
  54. <ChartBox
  55. title="重点区域积水点液位"
  56. style={{ flex: 1, marginTop: 10, marginBottom: 30 }}
  57. >
  58. <WaterLevel />
  59. </ChartBox>
  60. <ChartBox
  61. title="汛前物资准备统计"
  62. style={{ flex: 1, marginBottom: 30 }}
  63. >
  64. <MaterialsPrepare />
  65. </ChartBox>
  66. <ChartBox title="报警信息" style={{ flex: 1 }}>
  67. <WarnMessage height="20vh" />
  68. </ChartBox>
  69. </LeftPage>
  70. );
  71. }
  72. }
  73. export default index;