indexCenter.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // 污水
  2. import React, { PureComponent } from "react";
  3. import {
  4. CenterFloodTop,
  5. CenterPage,
  6. FloodItem,
  7. LeftPage,
  8. RightPage,
  9. } from "./style";
  10. import ChartBox from "../ChartBox";
  11. import BMap from "../centerPage/charts/BMap";
  12. import { ShowIconType } from "../Map/MockData";
  13. class index extends PureComponent {
  14. constructor(props) {
  15. super(props);
  16. this.state = {
  17. data: [
  18. { name: "内涝点总数", value: "28%" },
  19. { name: "内涝点消除率", value: "28%" },
  20. ],
  21. };
  22. }
  23. render() {
  24. return (
  25. <CenterPage>
  26. <CenterFloodTop>
  27. {this.state.data.map((item, idx) => (
  28. <FloodItem
  29. color={idx ? "#9f6d0b" : "#3598df"}
  30. right={`${idx * 180 + 50}px`}
  31. >
  32. {item.name}
  33. <div className="text">{item.value}</div>
  34. </FloodItem>
  35. ))}
  36. </CenterFloodTop>
  37. <BMap
  38. actives={[
  39. ShowIconType.Personnel,
  40. ShowIconType.Car,
  41. ShowIconType.Waterlogging,
  42. ShowIconType.Video,
  43. ShowIconType.All,
  44. ]}
  45. />
  46. </CenterPage>
  47. );
  48. }
  49. }
  50. export default index;