indexCenter.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.Rainfall,
  44. ShowIconType.Flow,
  45. ShowIconType.All,
  46. ]}
  47. />
  48. </CenterPage>
  49. );
  50. }
  51. }
  52. export default index;